[Math] Newton Raphson method for implicit methods

implicit-differentiationnumerical methods

If $x'=\sqrt x$, to solve for implicit midpoint's method, which according to Wikipedia is,
$x_{n+1}=x_{n}+hf((x_{n+1}+x_{n})/2)$ for an autonomous system, where h is the time step, how can i use newton's method to calculate $x_{n+1}$? I did the following method,
$g(x_{n+1})=x_{n+1}-x_{n}-hf((x_{n+1}+x_{n})/2) $ and $g'(x)=\frac{g_{x+h}-g_{x}}{h}$, where $h$ is the time step. Now how can i get $x_{n+1}$? Should i use any explicit schemes or is there any other way?

Best Answer

You have first to decide what you want to take as variable, $x_{n+1}$, $k$ in $x_{n+1}=x_n+hk$ or the midpoint $u=\frac{x_n+x_{n+1}}2$.

IMO the midpoint gives the easiest-to-read formulas. So use $x_{n+1}=2u-x_n$ to transform the implicit equation for $x_{n+1}$ into $$ 2u-x_n=x_n+hf(u)\iff 0=2u-2x_n-hf(u) $$ The derivative of that equation is $$ 2-hf'(u) $$ so that you get the Newton step $$ u_+=u-(2-hf'(u))^{-1}(2u-2x_n-hf(u)) $$ which you have to iterate until convergence in a numerical sense. Then set $x_{n+1}=2u-x_n$.