0
$\begingroup$

The solution of IVP $$\binom{x}{y}'=\binom{-y}{x}\\\binom{x}{y}(t=0)=\binom{1}{0}$$ is the unit circle $x=\cos(t),y=\sin(t)$.

a)Show that the Forward Euler method does not form a closed curve.

b)Show that the following method will form a closed curve. $$x_{n+1}=x_n-hy_n,\ \ \ \ \ y_{n+1}=y_n+hx_{n+1}$$

As for (a), I use the eigenvalues to solve the $\displaystyle\binom{x_n}{y_n}$, then prove $\displaystyle \binom{x_n}{y_n}\neq\binom{x_0}{y_0}$.

But for (b), it did not work in that the eigenvalues are not simple enough and I have no idea how to find a necessary and sufficient condition of a closed curve.

Could anyone help me out? Thank you very much!

  • 0
    You can solve (a) also by looking at the distance from the origin, which increases with every step. With (b) it's a bit less nice: you have $\binom{x_{n+1}}{y_{n+1}}=A\binom{x_n}{y_n}$. The trajectory would close after $N$ steps iff $A^N\binom{x_0}{y_0}=\binom{x_0}{y_0}$, so 1 has to be an eigenvalue of $A^N$, i.e. $A$ needs to have an eigenvalue which is a $N$-th root of unity. That's not the case for every $h$, only for some special values. However, for $h$ small enough, the eigenvalues of $A$ have absolute value 1, so the trajectory is at least bounded (though not necessarily closed).2017-01-24
  • 0
    @user8268 That being said, I think that in numerical analysis these things are a bit more lenient, meaning it doesn't _have_ to line exactly up, but rather that every solved point needs to lie on a specific closed curve. I might be wrong, though.2017-01-24
  • 0
    The second method is the semi-implicit or symplectic Euler method. As one can suspect from the second name, there is a first integral, or conserved quantity, as explained in the answer of JeanMarie. This can be extended to a general backward error analysis, where the symplectic method follow the energy curves of a perturbed Hamiltionian where the perturbation has the same order as the method. See Hairer et al. on geometric integration methods.2017-01-24

1 Answers 1

2

a) Forward Euler method gives

$$\tag{1}\cases{x_{n+1}=x_n-hy_n\\y_{n+1}=y_n+hx_{n}} \ \ \ \iff \ \ \ \binom{x_{n+1}}{y_{n+1}}=\underbrace{\pmatrix{1&-h\\h& \ \ 1}}_A\binom{x_n}{y_n}$$

with $det(A)=1+h^2>1.$ This generates a divergent sequence of points $(x_n,y_n).$ See proof at the bottom of this text.

b) The fact that, in

$$\tag{2}\cases{x_{n+1}=x_n-hy_n\\y_{n+1}=y_n+hx_{n+1}}$$

it is the newly calculated $x_{n+1}$ that is used in the calculation of $y_{n+1}$ makes all the difference.

Points will be situated on a closed trajectory, the ellipse with equation:

$$\tag{3}x^2-hxy+y^2=k$$

where constant $k$ is determined by the initial condition $k=x_0^2-hx_0y_0+y_0^2$.

Here is why. $(2)$ can be re-written in the following way:

$$\tag{4}\cases{x_{n+1}=x_n-hy_n\\y_{n+1}=y_n+h(x_n-hy_n)=hx_n+(1-h^2)y_n}$$

Showing that all points $(x_n,y_n)$ are situated on the curve with equation $(1)$ is equivalent to show that transformation $(x_n,y_n)\to (x_{n+1},y_{n+1})$ preserves quadratic form

$$q(x,y)=x^2-hxy+y^2$$

i.e., that :

$$x_{n+1}^2-hx_{n+1}y_{n+1}+y_{n+1}^2=x_{n}^2-hx_{n}y_{n}+y_{n}^2$$

which is readily proven using $(4).$

Remark: relationship $(4)$ has the following matrix formulation:

$$\binom{x_{n+1}}{y_{n+1}}=\pmatrix{1&-h\\h&1-h^2}\binom{x_n}{y_n}$$

It is this little $h^2$ that "makes the job": it has a regulatory ("command") effect, preventing the spiraling effect of the first method... because this time the determinant of the matrix is 1.

This form (small rotation followed by small enlargement) explains the spiraling effect that can be observed on simulations.


Proof of divergence for sequence $V_n:=(x_n,y_n)^T$ in case a):

Letting $h=\tan(\theta)$, matrix $A$ can be written:

$$A=\pmatrix{1&-h\\h& \ \ 1}=\frac{1}{cos(\theta)}\underbrace{\pmatrix{\cos(\theta)&-\sin(\theta)\\ \sin(\theta) & \ \ \cos(\theta)}}_R$$

where $R$ is a rotation matrix. Thus at each step, the norms' ratio is $$\|V_{n+1}\|/\|V_{n}\|=\frac{1}{cos(\theta)}>1$$

Thus $\|V_{n}\|$ tends to $\infty$ , whatever $V_{0}.$