Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm solving a system of stiff ODEs, at first I wanted to implement BDF, but it seem to be a quite complicated method, so I decided to start with Backward Euler method. Basically it says that you can solve an ODE:

$y'=f(t,y)$, with initial guess $y(t_0)=y_0$

Using the following approximation:

$y_{k+1}=y_k+hf(t_{k+1},y_{k+1})$, where $h$ is a step size on parameter $t$

Wikipedia article says that you can solve this equation using Newton-Raphson method, which is basically a following iteration:


So, the question is how to correctly mix them together? What initial guess $x_0$ and function $g$ should be?
Also $f$ is quite complex in my case and I'm not sure if it possible to find another derivative of it analytically. I want to write an implementation of it by myself, so predefined Mathematica functions wouldn't work.

share|cite|improve this question
If computing the derivative of $f$ is not possible, you can try the secant method instead of Newton's method. – Rahul May 31 '12 at 21:33
up vote 4 down vote accepted

Your aim is to solve the following equation for $y_{k+1}$: $$ g(y_{k+1}):=y_{k+1}-y_k-hf(t_{k+1},y_{k+1})=0,$$ where $f$ is a known function and $y_k, t_{k+1}$ and $h$ are known values. This gives you the $g$ for a Newton-Raphson method. As an initial guess, I'd suggest that you use a 1-step forward Euler method to explicitly calculate $$ \hat{y}_{k+1} := y_k+hf(t_{k+1},y_k),$$ and use $\hat{y}_{k+1}$ as your initial guess for $y_{k+1}$.

share|cite|improve this answer
Thank you, this help a lot. But how can I find $g'$? Function $f$ is quite complex and I can't analytically differentiate it. – Andrew May 31 '12 at 21:31
Use a secant approximation. – copper.hat May 31 '12 at 22:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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