Example:
Suppose that
$$\displaystyle\frac{dy}{dx} = 0.06 y$$ and $y(0) = 1000$. (This might describe money in a bank account with an initial deposit of $\$ $1000 and a 6% interest rate.) What will $y(1)$ be?
A reasonable first guess is to say that $\displaystyle\frac{dy}{dx} = 60$ when $x=0$. Since we're growing at rate 60 , we should expect to grow around 60 between $x=0$ and $x=1$, so $y(1)$ should be around 1060. That's not far off, but it's not exact. The trouble is that $\displaystyle\frac{dy}{dx}$ isn't constant, as it keeps on changing as $x$ and $y$ change. So although we start growing at a rate of 60, we don't keep growing at that rate.
To get a better estimate we can reduce our step size. Since at first we have $\displaystyle\frac{dy}{dx} = 60$, we should expect $y(0.5)$ to be around $1000 + (0.5)60 = 1030$. Then we stop and recompute the derivative. When $y=1030$, $\displaystyle\frac{dy}{dx} = 61.8$, so $$y(1) \approx y(0.5) + (0.5) 61.8 \approx 1060.9.$$
To get even better, we can take smaller and smaller step sizes.
This is Euler's method!
|