If a function y(t) satisfies the differential equation
y' = f(t, y)
then for each value of t we have the approximate formula
y(t + h) = y(t) + h.f(t, y)
for small increments of time h (by definition of the derivative). If we want to solve the differential equation with initial conditions
y(t0) = y0
then Euler's method applies this approximate formula over and over again with some fixed time increment h. Thus we get a sequence of values yn approximating y at t0, t0+h, t0+2h, ...
In the following figure, we apply this to the equation h' = (f - a.sqrt(2 g h) ) / A
which is the equation determining water height in a tank where Torricelli's Rule is valid.
The blue graph plots the approximate solution, which is effectively
a polygon. The initial conditions can be chosen with the blue node,
step size with the red node. The Go button
runs a loop performing single steps of
the calculation, and changes to a b>Stop button.
It stops the loop when the
The Reset button
resets the calculation to initial conditions.
Initial conditions and step size h can also be
chosen by editing the text windows.
The window frame can be chosen
by moving the corner nodes.
You can make slope fields appear by toggling the Slopes button.
[Back to the Mathematics 256 page]