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

Posted 7 months ago
758 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}] 
Answer
2 Replies
Sort By:
Posted 7 months ago
 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}] 
Answer
Posted 7 months ago
 Very helpful! Thank you very much!
Answer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments