MATLAB Need help setting up diff equation in matlab

  • Thread starter Thread starter Pepsi24chevy
  • Start date Start date
  • Tags Tags
    Matlab
AI Thread Summary
The discussion centers around plotting the direction field for the differential equation dy/dt = y^2 - ty. The key points include identifying the unique constant solution, which is evident from the equation itself. If a solution curve is below this constant solution, its limiting behavior as t increases must be toward negative infinity. For curves above the constant solution, two possible limiting behaviors are described, with one curve lying along the boundary between these behaviors. The main issue raised involves difficulties in plotting the direction field, where all direction vectors appear to point downward regardless of the chosen domain. The user is seeking assistance with the MATLAB code used for plotting, specifically the calculation of the direction vectors and the quiver function implementation.
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
Views
2K
Replies
4
Views
2K
Replies
1
Views
4K
Replies
2
Views
4K
Replies
1
Views
3K
Replies
1
Views
3K
Back
Top