1. ## Advanced Numerical solution of differential equations

i) IF $\frac{dy}{dt} = - \frac{∂H}{∂z}, \frac{dz}{dt}= \frac{∂H}{∂y}$
where H is a function of $y$ and $z$, show that $H(y,z)$ is constant in time.
ii) Take a $H(y,z) =Ay^2 + 2Hyz + Bz^2$ where $A,B,H$ are constants and show that solutions of the system lie on ellipses.
iii) Apply the explicit Euler and the symplectic Euler schemes to the system in (ii) and check whether the area is preserved.

can anyone tell me how to start. totally confused.

2. ## Re: Advanced Numerical solution of differential equations

Originally Posted by grandy
i) IF $\frac{dy}{dt} = - \frac{∂H}{∂z}, \frac{dz}{dt}= \frac{∂H}{∂y}$
where H is a function of $y$ and $z$, show that $H(y,z)$ is constant in time.
ii) Take a $H(y,z) =Ay^2 + 2Hyz + Bz^2$ where $A,B,H$ are constants and show that solutions of the system lie on ellipses.
iii) Apply the explicit Euler and the symplectic Euler schemes to the system in (ii) and check whether the area is preserved.

can anyone tell me how to start. totally confused.
i) find $\dfrac{d}{dt}H\left(y(t),z(t)\right)$

ii) is the form of a rotated ellipse. Try writing it in matrix form and showing you can get it into a quadratic form.

iii) I'm not entirely sure what they mean in this problem. It might be trying to demonstrate Kepler's second law.

3. ## Re: Advanced Numerical solution of differential equations

i)
by using the chain rule, we observe that
$\frac{dH}{dt} = - \frac{∂H}{∂y} \frac{dy}{dt} + \frac{∂H}{∂z} \frac{dz}{dt}$ --------(1)
now we use the given equations $\frac{dy}{dt} = - \frac{∂H}{∂z}, \frac{dz}{dt}= \frac{∂H}{∂y}$
into (1), to obtain
$\frac{dH}{dt} = - \frac{∂H}{∂y} \frac{∂H}{∂z} + \frac{∂H}{∂z} \frac{∂H}{∂y}$
$\frac{dH}{dt}=0$
$dH =0$
$\int 1 {dH}= \int{0}$
$H(y,z)= constant$
Therefore, $H(y,z)$ is conatant in time.
Kindly can anyone genuine people check my answer.

4. ## Re: Advanced Numerical solution of differential equations

Originally Posted by grandy
i)
by using the chain rule, we observe that
$\frac{dH}{dt} = - \frac{∂H}{∂y} \frac{dy}{dt} + \frac{∂H}{∂z} \frac{dz}{dt}$ --------(1)
now we use the given equations $\frac{dy}{dt} = - \frac{∂H}{∂z}, \frac{dz}{dt}= \frac{∂H}{∂y}$
into (1), to obtain
$\frac{dH}{dt} = - \frac{∂H}{∂y} \frac{∂H}{∂z} + \frac{∂H}{∂z} \frac{∂H}{∂y}$
$\frac{dH}{dt}=0$
$dH =0$
$\int 1 {dH}= \int{0}$
$H(y,z)= constant$
Therefore, $H(y,z)$ is conatant in time.
Kindly can anyone genuine people check my answer.
You are correct up until you integrate $\dfrac{dH}{dt}$.

What you want to do is $\displaystyle{\int}\dfrac{dH}{dt}~dt = \displaystyle{\int}0~dt=C$

or you can simply say that $\dfrac{dH}{dt}=0 \Rightarrow H(t)=C$

5. ## Re: Advanced Numerical solution of differential equations

ii)
From part i) $H(y,z)$ is constant. So,
$H(y,z) =Ay^{2 }+ 2Hyz + Bz^{2}= constant -------(2)$
are ellipses. but whether $(2)$ defines a family of ellipses or some other conic section depends on the values of $A,B,H$
Writing the function $H(y,z)$ defined in $(2)$ in vector-matrix form we have

H(y,z)= (y,z) \begin{bmatrix}
A & H\\
H & B\\
\end{bmatrix} \begin{pmatrix}
y\\
z\\
\end{pmatrix} -------------------(3)

Let the matrix
M= \begin{bmatrix}
A & H\\
H & B\\
\end{bmatrix}

occurring in (3), being symmetric may be diagonalised by some orthogonal matrix $O$, it will then take the form

O^{T} M O= \begin{bmatrix}
\lambda_{1} & 0\\
0 &\lambda_{2}\\
\end{bmatrix}

$\lambda_{1}$ and $\lambda_{2}$ being the eigenvalues of $M$, satisfy its characteristics equation.
\lambda^{2} -(A+B) \lambda + (AB-H^{2})=0 -------------------(4)

and in the coordinate system $x_{1} - x_{2}$ which is the $y-z$ system transformed by $O$,
So $(3)$ takes the form

H(x_{1},x_{2})= (x_{1},x_{2}) \begin{bmatrix}
\lambda_{1} & 0\\
0 &\lambda_{2}\\
\end{bmatrix} \begin{pmatrix}
x_{1}\\
x_{2}\\
\end{pmatrix}

= \lambda_{1} x^2_{1} + \lambda_{2} x^2_{2}

The equation is

H(x_{1},x_{2})= \lambda_{1} x^2_{1} + \lambda_{2} x^2_{2}=constant

represents an elliptical curve precisely when $\lambda_{1},\lambda_{2}$ are the same sign, in which case their sign must be shared with constant lest there be no curve whatsoever
The signs of $\lambda_{1},\lambda_{2}$ are governed by $(4)$ and via the quadratic formula, these signs are precisely when
$det M = AB-H^{2}=$\lambda_{1},\lambda_{2}$>0$ ----------------(5)
when $(5)$ applies, the level of sets of $H(y,z)$ are ellipses but with their axes tilted to align themselves with the $x_{1}$ and $x_{2}$ axes in the transformed coordinates.

(IS THIS ENOUGH TO ANSWER THE PART ii), did I missed anythings, ? do I need to calculate $\lambda_{1},\lambda_{2}$?
any GENIUS PEOPLE PLEASE SUPPORT ME. THANK YOU)

6. ## Re: Advanced Numerical solution of differential equations

for iii)
when explicit euler is applied to part i) equations, it gives:
$y_{n+1} = y_{n} - h z_{n}$
$z_{n+1} = z_{n} + h y_{n}$
now squaring both sides and rearranging both equations gives
$y^{2}_{n+1}+z^{2}_{n+1} = (1+h^{2}) (y^{2}_{n} + z^{2}_{n})$--------------(6)

after that I really don't know, I guess I need to find area of ellipses by comparing (6) with $H(y,z) =Ay^2 + 2Hyz + Bz^2$ but how?

and same for the symmetric euler applied to part i)equations gives:
$y_{n+1} = y_{n} - h z_{n}$
$z_{n+1} = z_{n} + h y_{n+1}$
now squaring both sides and rearranging both equations gives
$y^{2}_{n}+z^{2}_{n} = (1-h^{2}+h^{4}) (y^{2}_{n+1}- 2h^{3} y_{n+1} z_{n+1}+(1+h^{2}) z^{2}_{n})$--------------(7)
again
to find area of ellipses by comparing (7) with $H(y,z) =Ay^2 + 2Hyz + Bz^2$ , but this time
it gives
$A= 1-h^{2}+h^{4}, H= -h^{3}, B=1+h^{2}$
so,
$AB-H^{2}= (1-h^{2}+h^{4})(1+h^{2})-(-h^{3})$
$= 1-h^{2}+h^{4}+h^{2}-h^{4}+h^{6}+h^{6}$
$= 1+2h^{6}$

where $AB-H^{2}=\lambda_{1} \lambda_{2}$
and $a= \frac{1}{\sqrt{\lambda_{1}}} , b=\frac{1}{\sqrt{\lambda_{2}}}$

SO, AREA = $\frac{\pi}{\sqrt{(1+2h^{6})}}$ ( area of $ellipse = \pi a b)$
I am sure with my answer for sympetic euler and not sure for explicit euler to find area.
please someone help will be really grateful.

THANK YOU