# How to apply Newton's method on Implicit methods for ODE systems

I am writing a Fortran program to solve any ODE initial value problems. There is a subroutine called Jacobian matrix and for different problems it is required that we just make changes to the subroutine such that all types of problems can be solved. The first step is to transform any high order ODEs to the first order ODE system. The next step is to use the implicit method, e.g. backward Euler method, to solve it. The question I have is how to use Newton's method on the implicit method? Especially what the Jacobian matrix should be? enter image description here enter image description here How to use Newton's method to solve this ODE system? Anyone can give a detailed example? I would really appreciate it!

$$x_{n+1}=x_n+(t_{n+1}-t_n)f(x_{n+1},t_{n+1}).$$
$$g_n(x)=x-x_n-(t_{n+1}-t_n)f(x,t_{n+1})$$
where we interpret $x_n,t_{n+1},t_n$ as parameters. So in particular the Jacobian for Newton's method is $I-(t_{n+1}-t_n)D_x f(x,t_{n+1})$, where $D_x$ represents differentiation with respect to the $x$ variables.
• @Patrick123 You have not recast the system correctly. The system should be $u'=v,v'=-v+6u,u(0)=1,v(0)=0$. ($y''$ can't be on any right side.) Thus $f(u,v)=(v,-v+6u)$, and then you plug into what I said above. – Ian Nov 28 '15 at 15:29