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 have given the following 2nd order DE:

$$ \ddot{q_1} = - \frac{q_1}{|q|^3} $$ $$ \ddot{q_2} = - \frac{q_2}{|q|^3} $$ with $|q| = \sqrt{q_1^2 + q_2^2}$

The assignment is to solve this using explicit and implizit Euler. As for the explicit, I could split this into a system of 1st order DEs using $\dot{q} = p$, thus I had $$ \dot{p_1} = - \frac{q_1}{|q|^3} $$ $$ \dot{p_2} = - \frac{q_2}{|q|^3} $$ $$ \dot{q} = p $$

But now I am stuck at the implicit Euler. The reason is: The equation for this is $\dot{y}_{n+1} = y_n + \Delta t f(y_{n+1})$.

My problem now is: I do not have all q or all p in my function f, but $\dot{p} = f(q)$ So how can I formulate this method?

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

Set $y_1 = q_1$, $y_2 = \dot{q}_1$, $y_3 = q_2$, and $y_4 = \dot{q}_2$. Then, your system of equations is $$\dot{\mathbf{y}} = f(t,\mathbf{y}) = \begin{pmatrix} y_2 \\ -\frac{y_1}{(y_1+y_3)^{3/2}} \\ y_4 \\ \frac{y_3}{(y_1+y_3)^{3/2}}\end{pmatrix}.$$

This form should be compatible with both implicit and explicit Euler methods.

share|cite|improve this answer
Thanks, that worked :) – chris Sep 6 '12 at 22:30

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.