[Math] How to get the $f(t_{n+1}, y_{n+1})$ needed to use the implicit Euler method

numerical methodsordinary differential equations

I have to solve a system of 1st order ODEs which are implicit.

I know the formula for Explicit or forward Euler method is:
$$y_{n+1}= y_n + hf(t_n, y_n),$$
whereas the formula for implicit or backward Euler method is
$$y_{n+1}= y_n + hf(t_{n+1}, y_{n+1}).$$
In order to use the implicit Euler method, how can i get the value of $f(t_{n+1}, y_{n+1})$ ?

Can I use the forward Euler method to get the value $y_{n+1}$ then substitute in backward Euler formula?

Best Answer

Backward Euler is an implicit method whereas Forward Euler is an explicit method. The latter means that you can obtain $y_{n+1}$ directly from $y_n$. The former means that you in general must solve a (non-linear) equation at each time step to obtain $y_{n+1}$. The typical way to do this to to use a non-linear equation solver such as Newton's method.

Example:

Say we want to solve $$ \frac{dy}{dx}= y\cos{y}. $$ Backward Euler gives us $$ y_{n+1} = y_n + h y_{n+1} \cos{y_{n+1}} $$ or $$ y_{n+1}(1 - h \cos{y_{n+1}}) = y_n, $$ which clearly is non-linear in $y_{n+1}$ and thus requires a non-linear solver.

Update:

The reason we shouldn't use Forward Euler to obtain $f(t_{n+1},y_{n+1})$ is that it defies the entire purpose of the implicit method. If we can obtain $f(t_{n+1},y_{n+1})$ in a stable way using Forward Euler, then we can also obtain $y_{n+1}$ in a stable way, hence there is no need for the implicit method in the first place. However, usually the very reason for using an implicit method is that explicit ones (Forward Euler in this case) are unstable for certain problems, which brings us back to square one.