# Homework Help: Numerical Solution of Differential equation

1. Apr 11, 2014

### wel

The nonlinear oscillator $y'' + f(y)=0$ is equivalent to the
Simple harmonic motion:
$y'= -z$,
$z'= f(y)$

the modified Symplectic Euler equation are

$y'=-z+\frac {1}{2} hf(y)$

$y'=f(y)+\frac {1}{2} hf_y z$

and deduce that the coresponding approximate solution lie on the family of curves
$2F(y)-hf(y)y+z^2=constant$

where $F_y= f(y)$.

ans =>

for the solution of the system lie on the family of curves, i was thinking

$\frac{d}{dt}[2F(y)-hf(y)y+z^2]= y \frac{dy}{dt} + z \frac{dz}{dt}$
$=y(-z+\frac{1}{2} hf(y)) +z(f(y)- \frac{1}{2} h f_y z)$
but I can not do anything after that to get my answer constant.

2. Apr 19, 2014

### Simon Bridge

How did you get on?
Nice to show some sort of attempt, but please show your reasoning.

If you are supposed to deduce that family of curves, perhaps you shouldn't be starting with them.
Though attempting to work the problem backwards from the solution can help you figure it out.

Start with the modified symplectic euler equations.
Check your course notes about them - how would you go about getting the "corresponding approximate solution" for those?