I have a problem that I'm working on matlab which uses runge kutta in second order differential equation. The equation is given dx2/dt2 +5dx/dt +6x = f(t) where f(t)=4e^(-t) u (t). The intial condition is x(0)=1 and x'(0)=2.

I change the equation to first order by setting a different variable since matlab can only do first order.

dx/dt=z

dz2/dt2=4exp(-t)-5*z+6*x

I only know what is the first order of runge kutta and not the second if you can direct me where to go from there. I greatly appreciate it and post my code soon afterward to see if my result is correct.