Create ODE Phase Portrait with MATLAB

  • Thread starter Dollydaggerxo
  • Start date
  • Tags
    Ode Phase
In summary, the homework statement is to create a phase diagram for the equation \ddot{x}=x^{3}-x. The Attempt at a Solution found a site online which shows what the diagram should look like. However, the student is not sure how to do the integral in Matlab.
  • #1
Dollydaggerxo
62
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
  • #2
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.
 
  • #3
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
 
  • #4
No, the integral wold be:

[tex]
y\frac{dy}{dx}=x^{3}-x\Rightarrow\int ydy=\int x^{3}-xdx
[/tex]
 
  • #5
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
 
  • #6
So now you plot y against x for certain values of C, that is your phase diagram.
 
  • #7
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
 
  • #8
Look at where there are turning points and if they're max/min.

For different values of C.
 

FAQ: Create ODE Phase Portrait with MATLAB

What is a phase portrait?

A phase portrait is a graphical representation of the behavior of a dynamic system over time. It shows the trajectory of the system's state variables, such as position, velocity, and acceleration, as they change over time.

Why is it important to create a phase portrait?

Creating a phase portrait allows for a visual understanding of the behavior of a dynamic system. It can reveal patterns, relationships, and stability of the system, which can aid in predicting future behavior and making informed decisions.

How can MATLAB be used to create a phase portrait?

MATLAB has built-in functions for solving ordinary differential equations (ODEs) and plotting phase portraits. By defining the system's equations and initial conditions, MATLAB can generate a phase portrait plot that can be customized with various options and settings.

What are the key components of a phase portrait plot?

The key components of a phase portrait plot include the phase space, which represents the state variables, the direction field, which shows the system's dynamics, and the trajectories, which illustrate the evolution of the system over time. Other components may include equilibrium points, limit cycles, and other features specific to the system being analyzed.

Can a phase portrait help identify the stability of a system?

Yes, a phase portrait can help identify the stability of a system by showing the behavior of the system's state variables over time. Stable systems will have trajectories that converge towards equilibrium points, while unstable systems may have trajectories that diverge or exhibit chaotic behavior. This information can be useful for predicting the long-term behavior of a system and making necessary adjustments or interventions.

Similar threads

Replies
2
Views
2K
Replies
2
Views
1K
Replies
1
Views
2K
Replies
4
Views
19K
Back
Top