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

The other day, I tried to answer someone's question, you can read the question and the answer here:

Numerical Solutions of ordinary differential equations

The problem is, I got stuck towards the end of the calculation. Now my question is: does anyone know how to get order 2?

Many thanks for your help!

share|cite|improve this question
up vote 1 down vote accepted

You haven't used $b_2 c_2 = \frac{1}{2}$. Taking from where you left off, $e = b_2 h (f(x_n, y_n) - f(x_n + c_2 h, y_n + c_2 h k_1)) + \frac{h^2}{2}*f^\prime(x_n, y_n) +\ldots$ and using the Taylor expansion of $f$ around $(x_n, y_n)$:

$f(x, y) = f(x_0, y_0) + \frac{\partial}{\partial x}f(x_0, y_0)\frac{(x-x_0)}{1!} + \frac{\partial}{\partial y}f(x_0, y_0)\frac{(y-y_0)}{1!} + ... $

we get $f(x_n + c_2 h, y_n + c_2 h k_1) = f(x_n, y_n) + \frac{\partial}{\partial x}f(x_n, y_n)\frac{(c_2 h)}{1!} + \frac{\partial}{\partial y}f(x_n, y_n)\frac{(c_2 h k_1)}{1!} + O(h^2)$

Now make the substitution to eliminate $c_2$ from the RHS and move a term across:

$f(x_n + c_2 h, y_n + c_2 h k_1) - f(x_n, y_n) = \frac{\partial}{\partial x}f(x_n, y_n)\frac{h}{2 b_2} + \frac{\partial}{\partial y}f(x_n, y_n)\frac{h k_1}{2 b_2} + O(h^2)$

and we have

$e = \frac{h^2}{2} (-\frac{\partial}{\partial x}f(x_n, y_n) - \frac{\partial}{\partial y}f(x_n, y_n)k_1) + \frac{h^2}{2}*f^\prime(x_n, y_n) + O(h^3)$

NB I think that $f^\prime$ is $\frac{\partial}{\partial x}f$, so that could be tidied up a bit.

share|cite|improve this answer
Thank you! You're right about the partial derivative, I corrected it. – Rudy the Reindeer Jan 20 '11 at 20:39

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.