Problem

In Exercise we will deal with the differential equation y′ = −2y + 2 cos t sin 2t. In prep...

In Exercise we will deal with the differential equation y′ = −2y + 2 cos t sin 2t. In preparation create the function M-file

and save the file as steady.m.

MATLAB’s solvers are able to handle multiple initial conditions for single first order equations. To do so we fake ode45 into assuming that we are solving a system consisting of the same equation repeated for each initial condition. For this purpose it is only necessary to make the function ODE file array smart, as we have for steady.m.

a) To solve the equation y′ = -2y + 2 cos t sin 2t, for initial conditions y(0) = -5, y(0) = -4, …, y(0) = 5, enter the code [t, y] = ode45(@steady, [0,30], -5:5);.

b) Graph the solutions with plot(t,y) and note that each solution approaches a periodic steady-state solution.

c) Repeat parts a) and b) with time spans [0, 10] and [0, 2π] to get a closer look at the convergence to the steady-state solution.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 8
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT