如何创建带有最大值滑块的绘图?

agt*_*lla 4 plot slider maxima

为了说明具有无限解系列的一阶颂歌的柯西问题,我将绘制参数化解并可以通过滑块控制参数值。

完整的柯西问题为 y'=sqrt(|y|), y(0)=0,参数解为 y_c(x):={0, if c=>x; (xc)^2/4,如果 x=>c}。
所以我会用滑块来绘制 y=y_c(x) 来控制 c 的值。

谢谢。

Fre*_*ese 5

您可以使用 wxMaxima 中的 with_slider_draw 来执行此操作。

   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 */
   )$
Run Code Online (Sandbox Code Playgroud)

在wxMaxima中,单击图形,然后单击工具栏上的“播放”按钮来播放动画,或者使用工具栏上的滑块来更改c的值。