I have been given two second order ode's:
d^2x/dt^2 = dx/dt * sqrt( (dx/dt)^2 + (dy/dt)^2 )
d^2y/dt^2 = dy/dt * sqrt( (dx/dt)^2 + (dy/dt)^2 )
with initial conditions x(0)=0; y(0)=0; dx/dt(t=0) = 134; dy/dt(t=0) = 0
Now, my homework problem asks me to reduce the two second-order ode's to a system of first order ode's then write a script to solve the trajectory (i.e. x and y) for the first 5 seconds using the Matlab built-in function ode45.
To reduce the two 2nd order odes i set for the first ode x=x1 and dx/dt=x2 and for second ode y=y1 and dy/dt=y2 to get the system of first order ode's:
dx/dt = x2 ; x1(0) = 0
dy/dt = y2 ; y1(0) = 0
dx2/dt = x2 sqrt( (x2)^2 + (y2)^2 ) ; x2(0)= 134
dy2/dt = y2 sqrt( (x2)^2 + (y2)^2 ); y2(0)= 0
I have no idea however how to set this up in matlab using the ode45 function. Could anyone help please?

