Need help setting up diff equation in matlab

  • Context: MATLAB 
  • Thread starter Thread starter Pepsi24chevy
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
SUMMARY

The discussion focuses on setting up and plotting the direction field for the differential equation dy/dt = y^2 - ty using MATLAB. The user encounters issues with the direction vectors consistently pointing down regardless of the chosen domain. The correct approach involves using meshgrid to create a grid of points and calculating the slope correctly. The unique constant solution is evident from the equation, and the limiting behaviors of solution curves are analyzed based on their position relative to this constant solution.

PREREQUISITES
  • Understanding of differential equations, specifically first-order equations.
  • Familiarity with MATLAB syntax and functions, particularly meshgrid and quiver.
  • Knowledge of direction fields and their significance in analyzing differential equations.
  • Basic concepts of limiting behavior in the context of differential equations.
NEXT STEPS
  • Learn how to correctly implement MATLAB's meshgrid and quiver functions for plotting direction fields.
  • Study the concept of unique constant solutions in differential equations.
  • Explore the analysis of limiting behaviors in differential equations, focusing on stability and equilibrium points.
  • Investigate MATLAB's built-in functions for solving and visualizing differential equations, such as ode45.
USEFUL FOR

Mathematics students, educators, and researchers interested in differential equations and their graphical representations using MATLAB.

Pepsi24chevy
Messages
65
Reaction score
0
The problem reads as followed: Plot the direction field fo rthe equation dy/dt = y^2-ty

again using a rectangle large enough to show the possible limiting behavors. Identify the unique constant solution. Why is this solution evident from the differential equation? If a solution curve is ever below the constant solution, what must its limiting behavor be as t increases? For solutions lying above the constant solution, describe two possible limiting behavors as t increases. there is a solution curv e that lies along the boundary of the two limiting behavors. What does it do as t increases.

ok, now i am having problems plotting the field. I get all the direction vectors pointing down no matter what domain i choose. Here is how i have been typing it in.
>> [T,Y] = meshgrid(-5:0.2:5, -5:0.2:5);
>> S = Y^2 - T*Y;
>> L = sqrt(1 + S.^2);
>> quiver(T, Y, 1./L, S./L, 0.5), axis tight
 
Physics news on Phys.org
anyone? any help is appreciated
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
5K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K