Implementation of Backward Euler Method
Implementation of Backward Euler Method
• The Backward Euler method for the general ODE, y 0 (t) = f (t, y(t)),
is
yi+1 = yi + hf (ti+1 , yi+1 ).
• The big advantage of the Backward Euler method over the Forward
Euler method is that there is no restriction on the stepsize, h, due to
stability requirements.
• For the simple test ODE, y 0 (t) = λy(t), we saw that the amplification
factor for the Backward Euler method is,
1
,
|1 − hλ|
and we observed that this is less than 1 for all hλ since h, the stepsize,
is always positive, and λ is always negative, since we always assume that
we are considering stable ODEs.
• The above means that when you are using the Backward Euler method,
you can choose h depending on whatever accuracy you are looking for.
There is no restriction on how small h must be in order to keep the
numerical method stable (as we saw for the Forward Euler method.)
1
• But there is a big issue with the implementation of the Backward Euler
method,
yi+1 = yi + hf (ti+1 , yi+1 ).
• The formula seems to say that in order to compute the value for yi+1
you need to already know the value for yi+1 . (The quantity, yi+1 , appears
on the right hand side of the above equation.)
• To address this issue, first note that you can rewrite the Backward
Euler method as,
• To see this, substitute for z with yi+1 in the above equation and note
that you get equation (1), the Backward Euler method.
• So the big takeaway is that if you want to take one step with the
Backward Euler method, you have to solve the nonlinear equation
• The solution of this nonlinear equation will give you the yi+1 value.