0
$\begingroup$

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!

$\endgroup$
-1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Thank you it really helps! But I am still a bit confused with the Jacobian part. Would you please explain more for the following example? Given the initial value problem: y"+y'-6y=0 with conditions y(0)=1, y'(0)=0. If I transform it into system, it will be f1=y'=6y-y" y(0)=1; and f2= y"=6y-y' y'(0)=0; So we use backward Euler to solve these two equations. What would the Jacobian matrix be here? $\endgroup$ – Patrick123 Nov 28 '15 at 8:42
  • $\begingroup$ @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. $\endgroup$ – Ian Nov 28 '15 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.