Question: wo coupled first order ODEs: = 2+ 2 and = 2 can be written in matrix form: /(1,2) = ( 1(,1,2) 2(,1,2,)) Where 1 =

wo coupled first order ODEs: = 2+ 2 and = 2 can be written in matrix form:

/(1,2) = ( 1(,1,2) 2(,1,2,))

Where 1 = , 2 = , 1(,1,2) = 2+ 2, and 2(,1,2) = 2.

The code for a function defining the two 1st order ODE in matrix form looks like:

%Note: Have to do t then u for MATLAB built-in functions like ode45

function dudt = f(t,u)

dudt = zeros(2,1);

dudt(1) = 2*u(1)+2*u(2);

dudt(2) = 2*u(1)-u(2);

end

The general form is where u and are arrays. Write a dudt function similar to the one above that could be used with MATLABs build in solvers to solve the following two coupled ODEs: = , = +

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!