Question

Consider the initial value problem dx -2x+y dt x(0) m, y(0) = = n. dy = -y dt 1. Draw a direction field for the system. 2. DePlease solve this in Matlab

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Slope Field -2 0 2

(b) The origin is a saddle point.

(c) The code is:

syms u(t) v(t) m n
ode1 = diff(u) == -2*u + 0.5*v;
ode2 = diff(v) == 0*u -v;
odes = [ode1; ode2]
cond1 = u(0) == m;
cond2 = v(0) == n;
conds = [cond1; cond2];
S = dsolve(odes,conds)
uSol(t) = S.u
vSol(t) = S.v

The solution is:

u(t)=(n*exp(-t))/2 + exp(-2*t)*(m - n/2) and v(t)= n*exp(-t).

(d) The system has two straight line solutions which are y=2x and y=0.

(e)

2 1.5 0.5 -0.5 -1 -1.5 2 2 1.5 0.5 0 -0.5 -1 -1.5

The broken red line and the green line are the two straight line solutions. Also the four solutions are also plotted and the solution for the initial point (-2,0) coincides with the solution y=0 in the green line.

Add a comment
Know the answer?
Add Answer to:
Please solve this in Matlab Consider the initial value problem dx -2x+y dt x(0) m, y(0)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
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
ADVERTISEMENT
ADVERTISEMENT