Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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 want to consider this differential system: $$ \ \frac{dx}{dt} = -y(t)\\ \frac{dy}{dt} = \ x(t) $$ where $t>0$ with initial condition$ (x(0),y(0))=(1,0).$

First I want to show that this differential equation admits an invariant of $I = x(t)^2 + y(t)^2$ Also, Can someone help me to figure out if Forward Euler, backwards Euler, or implicit trapezoidal rule admit invariants similar to $I = x(t)^2 + y(t)^2$?

share|cite|improve this question
Does anyone know how we can find that the diffeq admits that invariant that I described? – Jackson Hart Nov 12 '12 at 21:08
up vote 0 down vote accepted

I would like to explain this, using explicit Euler, because it is the most elementary. We have: \begin{align} \begin{pmatrix} x \\ y \end{pmatrix}' = \begin{pmatrix} -y \\ x \end{pmatrix} = f(x,y) \end{align} Explicit euler looks like this: $z_{k+1} = z_k +h \cdot f(z_k)$, applied to our problem it becomes: \begin{align} \begin{pmatrix} x_{k+1} \\ y_{k+1} \end{pmatrix} = \begin{pmatrix} x_{k} \\ y_{k} \end{pmatrix} +h \begin{pmatrix} -y_{k} \\ x_{k} \end{pmatrix} = \begin{pmatrix} x_{k}-hy_k \\ y_{k}+h x_k \end{pmatrix} \end{align} So if we want to know, whether $x(t)^2+y(t)^2$ are constant, we check \begin{align} x_{k+1}^2+y_{k+1}^2 = (x_k -h y_k)^2 +(y_k+ h x_k)^2 = (x_k^2+y_k^2)(1+h^2) \end{align} Give the initial values $x_0=1$ and $y_0=0$ and using recursion, we get \begin{align} x_{k+1}^2+y_{k+1}^2 &=(x_k^2+y_k^2)(1+h^2) =(x_{k-1}^2+y_{k-1}^2)(1+h^2)^2 =\ ... \ =(x_0^2+y_0^2)(1+h^2)^{k+1}\\ &= (1+h^2)^{k+1} \end{align} So it is no invariant.

Next implicit euler. The method reads $z_{k+1} = z_k +h \cdot f(z_{k+1})$ So we get \begin{align} & \begin{pmatrix} x_{k+1} \\ y_{k+1} \end{pmatrix} = \begin{pmatrix} x_{k} \\ y_{k} \end{pmatrix} +h \begin{pmatrix} -y_{k+1} \\ x_{k+1} \end{pmatrix} = \begin{pmatrix} x_{k}-hy_{k+1} \\ y_{k}+h x_{k+1} \end{pmatrix} \\ & \Leftrightarrow \begin{pmatrix} x_{k+1}+ h y_{k+1} \\ y_{k+1} -h x_{k+1} \end{pmatrix} = \begin{pmatrix} x_{k} \\ y_{k} \end{pmatrix} \\ & \Leftrightarrow \begin{pmatrix} 1 & h \\ 1 & -h \end{pmatrix} \begin{pmatrix} x_{k+1} \\ y_{k+1} \end{pmatrix} = \begin{pmatrix} x_{k} \\ y_{k} \end{pmatrix} \end{align} So as you can see, you end up with a linear system you have to solve for $x_{k+1} $ and $y_{k+1}$. This is the price you pay for an implicit scheme. If you solve for $x_{k+1} $ and $y_{k+1}$ you can again check the invariant. Good luck,


share|cite|improve this answer
How are these compared to FE and BE? Also, do you know what method I should use to find the invariant of the diffeq is what I described above? – Jackson Hart Nov 12 '12 at 21:17
And how do you know it is not invariant exactly? – Jackson Hart Nov 12 '12 at 21:20
I showed that $x(t)^2+y(t)^2$ are not invariant for all $t$. If they where, also $x_{k+1}^2+y_{k+1}^2$ would be constant for all $k$. But this is not the case. For larger $k$ we get $x_{k+1}^2+y_{k+1}^2 \rightarrow \infty$ with $h>0$. – k1next Nov 12 '12 at 21:38
@macdaynim Do you know how to show that the diffeq does infact admit that invariant? – Jackson Hart Nov 12 '12 at 21:39
Could you help show me the method for FE, BE, and trap? At least where to start? I am very lost here. – Jackson Hart Nov 12 '12 at 21:41

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.