Phase portraits of differential equations

1 view (last 30 days)
Hi all,
I am trying to sketch the phase portraits of the following differential equations, seperately
x˙ = 1 − 2 cos x
and
x˙=-x + 1/(1 + e^(-8 x)) - 0.5
I used some existing matlab codes that i found however it wasnt possible to draw the phase portraits.
Could you please help me with this?
Thank you very much

Accepted Answer

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 31 Oct 2021
Edited: Sulaymon Eshkabilov on 31 Oct 2021
Step 1. Take a derivative of your function 1 (F1) and 2 (F2) and save them dF1 and dF2. You can use syms x and diff() here.
Step 2. Compute their values (F1(x), F2(x), dF1(x), dF2(x)) at x (e.g.: x = -pi... pi). You can use subs() or just plugin the values of x into the expressions of F1, F2, dF1, dF2.
Step 3. Plot the computed values: F1 vs. dF1 in Figure 1 and F2 vs. dF2 in Figure 2. This is a phase plot.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!