Classroom Tips and Techniques: Slider-Control of Parameters in an ODE
Robert J. Lopez
Emeritus Professor of Mathematics and Maple Fellow
Maplesoft
|
One Parameter
|
|
The surface in Figure 1 is the solution of the IVP
The slider controls the value of the parameter , and as it is moved to the value , the solution is graphed on the surface as a space curve. The code by which this is accomplished can be seen by right-clicking on the slider and selecting "Edit Value Changed Action..." For this figure, the IVP is solved analytically for the function , and as the slider varies the value of , the space curve is appended to the graph of the surface.
|
=
|
Figure 1 Slider-control of
|
|
|
This answers the first question.
|
|
Two Parameters
|
|
The curve in Figure 2 is the solution of the IVP
in which the values of the parameters and are controlled by separate sliders.
|
=
|
=
|
Figure 2 Slider control of and
|
|
|
The code behind each slider is the same, a technique that is naive at best. A more efficient strategy would be to write the code as one or more functions in a start-up code region, and then make appropriate function calls behind the sliders.
Compare Figure 2 with Table 32.1 in Gem 31, where the Explore command is used to generate the solution of this IVP, again with two separate sliders to control the parameters and .
|
|
Two Parameters with a 2D Slider
|
|
The graph on the left in Figure 3 shows a portion of the -plane and the curve . The characteristic equation for the differential equation
is , with solutions . Hence, points on the curve correspond to systems that are critically damped; points in the red region (where correspond to systems that are underdamped; and points in the yellow region (where ) correspond to systems that are overdamped.

Click and drag on the left-hand graph to select parameter pairs ; the corresponding solutions of the IVP
are drawn in the right-hand graph. (The default manipulator for the left-hand graph has been set to "Click and Drag". If, for any reason this default changes, use the Context Menu for the graph to re-select Manipulator/Click and Drag.)
|
Legal Notice: © Maplesoft, a division of Waterloo Maple Inc. 2013. Maplesoft and Maple are trademarks of Waterloo Maple Inc. This application may contain errors and Maplesoft is not liable for any damages resulting from the use of this material. This application is intended for non-commercial, non-profit use only. Contact Maplesoft for permission if you wish to use this application in for-profit activities.
|