# Numerical solution of a system of ODEs

I have to solve set of coupled first order ODE's

$y_1=z$, $y_2=\frac{dz}{dt}$;

$\frac{d^2y_1}{dt^2}=\frac{dy_2}{dt}=\frac{(p_s-p_f)}{p_s}g-\frac{9u}{2a^2p_s}y_2$

Using the Euler method and the initial conditions, I get

$\frac{dy_1}{dt}=y_2, y_1(0)=0;$ $\frac{dy_2}{dt}=\frac{(p_s-p_f)}{p_s}g-\frac{9u}{2a^2p_s}y_2, y_2(0)=0;$

I have the constant values of u, $p_s$, $p_f$, g and a.

I have to solve this using the Euler method and compare result to NDsolve. I have no idea how to do it. Especially the part where I have $y_2$ in formula.

-
What code have you tried? What specifically is your problem with $y_2$? Have a look at the NDSolve documentation –  ssch Jan 7 at 17:49
Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! –  ssch Jan 7 at 17:49
At the very least please post the Mathematica code for the equations –  belisarius Jan 7 at 17:55
Reads suspiciously like a homework problem. Do we really want to do someone's homework for them? –  m_goldberg Jan 7 at 18:23
These may help (see code for an idea of how to implement some ODE solving methods). demonstrations.wolfram.com/… demonstrations.wolfram.com/… demonstrations.wolfram.com/UnderstandingRungeKutta –  Daniel Lichtblau Jan 7 at 19:05