3

What is the reason behind the multiplication of the function's derivative with the step size (and the subsequent addition) in the numerical Euler method? $$ y_{n+1} = y_n + hf(t_n, y_n) $$ I can't figure out why exactly this would work for generating a new value. How can scaling the output of the function $f$ and subsequently adding it to the prior value $y_n$ approximate a new value? Is there some formal or graphical explanation of this? The formula seems somewhat counterintuitive.

2 Answers2

4

I would say Euler's method is actually the most intuitive of the numerical methods!

We have a function $f$ that tells us the derivative of a solution to the ODE passing through our current point $(t_n, y_n)$. What is the derivative? In a small enough interval around $y_n$, it's approximately the "rise over run", so if $h = t_{n+1} - t_n$ is 'small' then we can use this approximation:

$$ \frac{y(t_{n+1}) - y_n}{t_{n+1} - t_n} \simeq f(t_n, y_n)$$

$$ \implies y(t_{n+1}) \simeq y_n + h \cdot f(t_n, y_n)$$

FlipTack
  • 724
2

$f(t_n,y_n)$ is the (approximation of) the derivative of $y$ at $t_n$. $h$ is the time step, so the change in $y$ over the time step is the length of the time step times the slope of the tangent at that point. For example, if $f(t,y)=3y$ and we start from $t=1,y=1$ we have $f(1,1)=3$. If our timestep is $0.1$ we have $h=0.1, y(1.1)\approx 1+0.1 \cdot 3 = 1.3$ The true solution is $y=e^{3t}-e^3+1$ and the true $y(1.1)=1.286$ to three places

Ross Millikan
  • 383,099