Which solution would a computer choose with the Euler implicit method when there are several solutions

implicit-differentiationnumerical methods

Let's say I want to solve the following equation :

$\dot{y}(t) = -t(y(t))^2$ with $y(t_0) = y_0 >0$

with the implicit Euler method, which is : $y_{n+1}= y_n + h\cdot f(t_{n+1},y_{n+1})$

I am here only interested to know what happens on the very first time step $h$.

For the first step we get: $y_1 = y_0 + h\cdot f(t_{1},y_{1}) = y_0 + h\cdot(-h\cdot y_1^2) =y_0 – h^2\cdot y_1^2$

The problem is that the equation : $ h^2 y_1^2 +y_1 -y_0 = 0 $ has two solutions which are : $y_1 = \frac{-1+\sqrt{1+4 y_0 h^2}}{2 h^2}$ and $y_1 = \frac{-1-\sqrt{1+4 y_0 h^2}}{2 h^2}$.

So which one should I choose? And how would a computer know which one to choose?

Best Answer

When you implement the implicit Euler method, the equation to be solved at every time step is not solved in an exact way, but rather by some numerical method, typically the fixed point method. You can show that for nice enough $f$ you can get convergence for small $h$, namely $h <\frac 1L$ (where $L$ is the Lipschitz constant for $f$). The method would read something like

$$ \begin{cases} y_0\\ \begin{cases} y_{n+1}^{(0)} = y_n\\ y_{n+1}^{(k+1)} = y_n + h f(t_{n+1},y_{n+1}^{(k)}), \quad k \ge 0 \end{cases} \end{cases}. $$

This way (with this choice of initial approximations), the method keeps selecting solutions "close" to the solution obtained in the previous time step.


$y_{n+1}$ is obtained as the solution of $y_{n+1} = y_n + h f(t_n+h, y_{n+1})$, which is an equation of the form $y_{n+1} = \phi(y_{n+1})$, i.e. $y_{n+1}$ is a fixed point of $\phi$. The natural way to solve this equation is to use the fixed point method, that starts with an initial approximation of $y_{n+1}$, that I denoted as $y_{n+1}^{(0)}$ and builds a sequence $y_{n+1}^{(k+1)} = \phi(y_{n+1}^{(k)})$ with the property $$ \lim_{k\to \infty}y_{n+1}^{(k)} = y_{n+1}. $$