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!
In Backward Euler, the equation to be solved at each step is

$$x_{n+1}=x_n+(t_{n+1}-t_n)f(x_{n+1},t_{n+1}).$$

That is, you want to find roots of the function

$$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.
In Backward Euler, the equation to be solved at each step is

$$x_{n+1}=x_n+(t_{n+1}-t_n)f(x_{n+1},t_{n+1}).$$

That is, you want to find roots of the function

$$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.