Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Solve the initial value problem y 2y = sin2t, y(0) = c. Use MATLAB to graph solu

ID: 3667921 • Letter: S

Question

Solve the initial value problem y 2y = sin2t, y(0) = c.

Use MATLAB to graph solutions for c = 0.5, 0.45, . . . , 0.05, 0. Display all the solutions on the same interval between t = 0 and an appropriately chosen right endpoint. Explain what happens to the solution curves as t increases. You should identify three distinct types of behavior. Which values of c correspond to which behaviors? Now, based on this problem, and the material in Chapters 5 and 7, discuss what effect small changes in initial data can have on the global behavior of solution curves.

Explanation / Answer

We can use MATLAB’s built-in dsolve(). The input and output for solving this problem in
MATLAB is given below.
>>y=dsolve(’Dy=y*x’,’x’)
y =
C2*exp(xˆ2/2)
Notice in particular that MATLAB uses capital D to indicate the derivative and requires that
the entire equation appear in single quotes. MATLAB takes t to be the independent variable
by default, so here x must be explicitly specified as the independent variable. Alternatively,
if you are going to use the same equation a number of times, you might choose to define it
as a variable, say, eqn1.
>>eqn1=’Dy=y*x’
eqn1 =
Dy=y*x
>>y=dsolve(eqn1,’x’)
y =
C2*exp(xˆ2/2)
To solve an initial value problem, say, equation (1.1) with y(1) = 1, use
>>y=dsolve(eqn1,’y(1)=1’,’x’)
y =
exp(xˆ2/2)/exp(1)ˆ(1/2)
or
>>inits=’y(1)=1’;
>>y=dsolve(eqn1,inits,’x’)
y =
exp(xˆ2/2)/exp(1)ˆ(1/2)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote