Message Boards Message Boards

0
|
9954 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Plot of a Vector Field and Nullclines

Posted 8 years ago

Hello, I'm writing my thesis and I need to put some pictures in it. I need to plot a vector field (which i found how to do) and in it the nullclines for the field. enter image description here The plot should look like the one in the attachment on the upper right. In that plot one can see the vector field for the system x'=y-x^2 ; y'=x-2 and the respective nullclines which are y=x^2 and x=2. I would be very grateful if anyone could help me and tell me how I can plot that!

Best Regards

POSTED BY: Max Benczek
2 Replies

Hi,

what about this

Show[VectorPlot[{y - x^2, x - 2}, {x, -3, 3}, {y, -1, 9}, Epilog -> {PointSize[0.03], Point[{x, y} /. First[Solve[{y - x^2 == 0, x - 2 == 0}]]]}, 
  Frame -> False, Axes -> True], ContourPlot[{y - x^2 == 0, x - 2 == 0}, {x, -3, 3}, {y, -1, 9}, ContourStyle -> Red]]

enter image description here

where the length of the arrows represents the magnitude/speed. If you prefer the arrows of equal length like in your book this might work:

Show[VectorPlot[{y - x^2, x - 2}, {x, -3, 3}, {y, -1, 9}, Epilog -> {PointSize[0.03], Point[{x, y} /. First[Solve[{y - x^2 == 0, x - 2 == 0}]]]}, 
  Frame -> False, Axes -> True, VectorScale -> {Small, Small, None}, VectorPoints -> Coarse, ImageSize -> Medium], 
 ContourPlot[{y - x^2 == 0, x - 2 == 0}, {x, -3, 3}, {y, -1, 9}, ContourStyle -> Red]]

enter image description here

Cheers,

Marco

POSTED BY: Marco Thiel

You can use the VectorPlot function to plot the vector field. Use the ParametricPlot function to plot the line x == 2 and the parabola y == x^2

Show[
ParametricPlot[{{u,u^2},{2,3u^2}},{u,-3,3}],
VectorPlot[{y-x^2,x-2},{x,-3,3},{y,-1,5},
VectorScale->{Tiny,Small,None}],PlotRange->{-1,4}]

vp

POSTED BY: Shenghui Yang
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract