Rewriting second order to 1st order diff eqn

Apr 2016
2
0
England
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?
 
Aug 2011
334
8
xy''-y'=x^2+x
Change of unknown function :
z(x)=y'
xz'-z=x^2+x
First order linear ODE easy to solve.
 
Apr 2016
2
0
England
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
Jan 2015
3,261
899
Alabama
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.