Question

In order to illustrate a Cauchy problem for first order ode with infinite family of solutions, I would plot the parametrized solution and having the possility of control the value the parameter through a slider.

To be complete the Cauchy problem is y'=sqrt(|y|), y(0)=0, and the parametric solution is y_c(x):={0, if c=>x; (x-c)^2/4, if x=>c}.
So I would get a plotting of y=y_c(x) with a slider to control the value of c.

Thank you.

Was it helpful?

Solution

You can use with_slider_draw in wxMaxima to do this.

   Y(c,x) := if c>x then 0 else (x-c)^2/4;
   with_slider_draw(
       c, /* the name of the variable to attach to the slider */
       makelist(i,i,0,1,0.1), /* a list of values that the variable can have */
       explicit(Y(c,x), x, 0, 2) /* plot the function */
   )$

In wxMaxima, click on the graph and then click on the Play button on the toolbar to play the animation, or use the slider on the tool bar to change the value of c.

OTHER TIPS

You could use Maxima from within the Sage notebook and resort to the interact command. See also Sage's interface to Maxima.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top