Create ODE Phase Portrait with MATLAB

  • Thread starter Thread starter Dollydaggerxo
  • Start date Start date
  • Tags Tags
    Ode Phase
Click For Summary

Homework Help Overview

The discussion revolves around creating a phase portrait for the second-order differential equation \(\ddot{x} = x^3 - x\) using MATLAB. Participants are exploring the characteristics of the equation, including identified equilibrium points such as a center at (0,0) and a saddle point at (-1,0).

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss various methods for computing the phase portrait, including using MATLAB's quiver function and the ode23 package. There are attempts to integrate the equation and questions about the implications of the integral results.

Discussion Status

The discussion is ongoing, with participants providing guidance on integration and plotting techniques. There is an exploration of different values for the constant of integration and how they affect the resulting phase diagram. Some participants express uncertainty about the expected appearance of the graph.

Contextual Notes

Participants mention encountering errors in MATLAB related to integration tolerances and express confusion regarding the integration process and its application to plotting the phase portrait.

Dollydaggerxo
Messages
60
Reaction score
0

Homework Statement



i need to create the phase diagram for the equation [tex]\ddot{x}=x^{3}-x[/tex]
using MATLAB

Homework Equations



Well i have worked out that there is a centre point at 0,0 and a saddle point at -1,0.

The Attempt at a Solution



i found a site on the internet which shows me what the diagram should look like:

(http://fds.oup.com/www.oup.com/pdf/13/9780199208241.pdf ) page 19

but i have no idea how to do this in Matlab.

I tried to do it using a quiver but its not looking anything like this.

Then i tried to do it using ode23 package but i keep getting an error saying "Unable to meet integration tolerances without reducing the step size below the smallest value allowed "

would really really appreciate any help, thanks
 
Last edited by a moderator:
Physics news on Phys.org
To compute the phase portrait, compute:

[tex] \frac{dy}{dx}=\frac{\dot{y}}{\dot{x}}=\frac{x^{3}-x}{y}[/tex]

This is an integral which is do-able, so do it and see what you get.
 
thanks for the reply!

do you mean just straight forward integrate it w,r,t, x
for example it would be

[tex]\frac{x^4 - 2x^2}{4y}[/tex] ??

then what would i do with that though??
thanks so much for your help
 
No, the integral wold be:

[tex] y\frac{dy}{dx}=x^{3}-x\Rightarrow\int ydy=\int x^{3}-xdx[/tex]
 
i see -- ok sorry.

so
[tex]\frac{y^2}{2} = \frac{x^4-2x^2}{4} + C[/tex] ??

i still don't really know what to do with it though forgive me!

thanks again
 
So now you plot y against x for certain values of C, that is your phase diagram.
 
for any values of C??
all i am getting is what looks like a square graph translated a lot I am not sure what its mean to look like

thanks
 
Look at where there are turning points and if they're max/min.

For different values of C.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
7K
  • · Replies 4 ·
Replies
4
Views
20K
Replies
1
Views
3K