# Reduce second order diff equation into series of first order diff equations

1. May 3, 2012

### shaka091

Hi guys I was hoping if someone could help me with this second order differential equation which i have to reduce into a series of first order equations and then solve using a fourth order runge kutta method.

The equation is

y"-30y'-3y=-2 with the initial conditions y(1)=-12 and y'(x=1)=-2

My attempt at reducing it is

I firstly did y'=z and then did dz/dx=30z+3y-2 with the conditions being x(0)=1, y(0)=-12 and z(0)=-2

could someone please tell me if this is right and if not point me in the right direction to be able to reduce it. I think i can solve it using the runge kutta. Thank you very much!

2. May 3, 2012

### clamtrox

That is entirely correct.

You can also solve this equation analytically without too much trouble by using an ansatz y(x) = A exp(rx) to the homogeneous equation, and finding the trivial solution y=2/3 to the full equation, so you can check that your integrator gives you correct results.

3. May 3, 2012

### shaka091

Thank you very much for your reply!

I followed all the steps in my lecture notes to reduce it and thought it was correct but I thought I must have got it wrong when i then put it into the runge kutta as i was getting back some pretty big values.

Evaluating y(1.2) using a step size of h=0.2

I got y(n+1)= -24.212 and z(n+1)=-377.1852 and x(n+1)= 1.2

I don't think that is right...

4. May 3, 2012

### clamtrox

The function is really steep so it might be difficult to evaluate with approximate methods. The correct values should be higher, for example z(1.2) ~*-1337