## How can I write a set of first order ODEs with two variables?

Hi, my assignment asks me to convert the following two 2nd order ODE’s to a system of four 1st order ODEs and then encode the equations in a function to then use with ODE45.

The two 2nd order ODE’s are as follows:

Then I converted them to a system of four 1st order ODEs (I think I did this correctly):

y’ = v

x’ = u

u’ = -(D/m)*u*sqrt(u^2+v^2)

v’ = -g-(D/m)*v*sqrt(u^2+v^2)

Then, I’ve been looking at this page as a reference for writing the system in my code. But, I’m confused as to how to write it when there are two different equations that use both x and y. The problem does say to slit the equations into several first order ODE’s in terms of the values of y. Thank you!!Hi, my assignment asks me to convert the following two 2nd order ODE’s to a system of four 1st order ODEs and then encode the equations in a function to then use with ODE45.

The two 2nd order ODE’s are as follows:

Then I converted them to a system of four 1st order ODEs (I think I did this correctly):

y’ = v

x’ = u

u’ = -(D/m)*u*sqrt(u^2+v^2)

v’ = -g-(D/m)*v*sqrt(u^2+v^2)

Then, I’ve been looking at this page as a reference for writing the system in my code. But, I’m confused as to how to write it when there are two different equations that use both x and y. The problem does say to slit the equations into several first order ODE’s in terms of the values of y. Thank you!! Hi, my assignment asks me to convert the following two 2nd order ODE’s to a system of four 1st order ODEs and then encode the equations in a function to then use with ODE45.

The two 2nd order ODE’s are as follows:

Then I converted them to a system of four 1st order ODEs (I think I did this correctly):

y’ = v

x’ = u

u’ = -(D/m)*u*sqrt(u^2+v^2)

v’ = -g-(D/m)*v*sqrt(u^2+v^2)

Then, I’ve been looking at this page as a reference for writing the system in my code. But, I’m confused as to how to write it when there are two different equations that use both x and y. The problem does say to slit the equations into several first order ODE’s in terms of the values of y. Thank you!! ode, ode45 MATLAB Answers — New Questions