Message Boards Message Boards

GROUPS:

Evaluate the effect of changing a parameter of an equation with Manipulate?

Posted 1 month ago
145 Views
|
2 Replies
|
2 Total Likes
|

I want to visually evaluate the effect of changing the parameter "A" in the following Van Der Pol equation. Could anyone tell the way to link the parameter "A" in the Manipulate command to the original "A" in the vdp equation? Thank you in advance.

vdp = NDSolve[{x'[t] == y[t], y'[t] == A (1 - x[t]^2) y[t] - x[t], 
   x[0] == 0.1, y[0] == 1}, {x[t], y[t]}, {t, 0, 100}]

Manipulate[
 Plot[Evaluate[{x[t], y[t]} /. vdp], {t, 0, 100}],
 {A, 0, 1}]
2 Replies
pfun = ParametricNDSolveValue[{x'[t] == y[t], y'[t] == A*(1 - x[t]^2)*y[t] - x[t], x[0] == 1/10, y[0] == 1}, 
{x,y}, {t, 0, 100}, {A}];
Manipulate[Plot[Evaluate[{pfun[A][[1]][t], pfun[A][[2]][t]}], {t, 0, 100}], {A, 0, 1}]
Posted 1 month ago

Very helpful! Thank you very much!

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