# Rewriting second order to 1st order diff eqn

#### Don96

Hi
I need to apply the ralston 2nd order method to find an approximate value for y(2) of the following differential equation:

xy'' - y' = x^2 + x

With initial conditions y(1) = 1 and y'(1) = 5

So far I have done z1=y, z2=y' and z3=y'', resulting in the equation

xz2' = x^2 + x + z2

This equation finds an approximate value for y'(x), but I need a value for y(x) how can I advance from this?

#### JJacquelin

xy''-y'=x^2+x
Change of unknown function :
z(x)=y'
xz'-z=x^2+x
First order linear ODE easy to solve.

#### Don96

xy''-y'=x^2+x
Change of unknown function :
z(x)=y'
xz'-z=x^2+x
First order linear ODE easy to solve.
JJacquelin
How would I be able to find an approximation of y(x) using that equation? Wouldn't I only be able to approximate y'(x) by using my second initial condition?

#### Country Boy

Math Team
The point is that you have two first order equations for y and z:
$$\displaystyle xz'- z= x^2+ x$$ and
$$\displaystyle y'= z$$.

Once you have solved the first equation for z, using whatever numerical method you prefer, then do a (numerical) integration to find y.

#### skipjack

Forum Staff
I need to apply . . . /QUOTE]
What was the original wording of the question?