Message Boards Message Boards

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

Posted 6 years ago

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}]
POSTED BY: Tsukasa Oikawa
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 BY: Mariusz Iwaniuk
Posted 6 years ago

Very helpful! Thank you very much!

POSTED BY: Tsukasa Oikawa
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