Enhanced Explore - Maple Help

Home : Support : Online Help : System : Information : Updates : Maple 17 : Enhanced Explore

 Explore

The Explore command gives you a quick and easy way to create interactive applications and demonstrations. Explore builds interactive explorations using a collection of embedded components, which can be used to explore an arbitrary expression or a plot. Explore inserts these automatically constructed components into a new worksheet that can easily be saved and shared.

The Explore command has been re-implemented in Maple 17 to provide enhanced and new functionality. The most important changes are:

 • The exploration components can now be automatically inserted into an existing worksheet or document
 • The exploration parameters can now be specified programmatically in the call to the Explore command
 • Previously assigned variables (including data) can now be referenced in the expressions being explored
 • The Explore command is now used by the plots:-interactive command, including use by the PlotBuilder

Full details on all the options provided by the command are available on the Explore help page.

Note: To fully interact with the examples provided below, open this help page as a worksheet and then execute the worksheet.

Parameters and initial values

The new parameters option of the Explore command allows you to specify which of the unknown names in an expression of plot are the parameters to be explored via sliders. In addition, the initialvalues option allows you to specify the parameter values to be used in the first evaluation.

These two new options give the Explore command more programmatic usefulness. Compare the effects of the following two calls to the command.

In the first example, a pop-up dialog window will appear, suggesting end points for parameters A and B.  Click on Explore to accept the suggested values.

 > $\mathrm{Explore}\left(\mathrm{plot3d}\left(\mathrm{sin}\left(Ay\right)B{x}^{2},x=-1..1,y=-\mathrm{π}..\mathrm{π},\mathrm{view}=-2..2\right)\right)$

 ${A}$: ${B}$:

The second example allows you to bypass the pop-up dialog altogether:

 >

 ${A}$: ${B}$:

Using previously assigned data

The following example illustrates the use of data which has previously been assigned to a name earlier in the session.

 > $\mathrm{data}:=\left[\left[0,2\right],\left[\frac{1}{2},1.5\right],\left[0.8,2.5\right],\left[1.4,2.6\right],\left[1.8,1.5\right],\left[2.2,3.1\right],\left[2.6,2.4\right],\left[3.1,2.2\right],\left[3.5,2.2\right]\right]:$
 > $\mathrm{with}\left(\mathrm{CurveFitting}\right):$
 >

 ${n}$:

Exploring a function call

One powerful way to use the Explore command is to pass it a call to a previously assigned function.

The key here is that the procedure must return the kind of object to be visualized, in this case, a plot.

 >
 > $\mathrm{Explore}\left(f\left(p\right),\mathrm{parameters}=\left[p=-2.0..2.0\right]\right)$

 ${p}$:

The next subsection illustrates this functionality with a more involved example.

Numerical Ordinary Differential Equations with parameters

Suppose that you have an Initial Value Problem (IVP) with unassigned symbolic parameters. The interactive functionality of dsolve,numeric provides an efficient mechanism for numerically solving the solution at multiple values of the parameters.

You can use the Explore command to interact with such a solution space.

 >
 > $\mathrm{caller}:=\mathbf{proc}\left(a,b\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{sol}\left('\mathrm{parameters}'=\left['\mathrm{α}'=a,'\mathrm{β}'=b\right]\right);\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{sol}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{end proc}:$
 >

You can now produce a plot of the solution at parameter values alpha=0.1 and beta=0.2.

 > $F\left(0.1,0.2\right)$

You can also explore the family of such plots as the parameter values change. This is accomplished by calling Explore on a function call.

 > $\mathrm{Explore}\left(F\left(a,b\right),'\mathrm{parameters}'=\left[a=0.5..2.0,b=1.0..10.0\right]\right)$

Exploring an animation

After executing the Explore command below, select the plot with the pointer and run the animation using the top menu. By default, the embedded component will show the animation in continuous loop mode. While the animation is playing, you can move the slider and see a changing instance of the animation.

Note that the animations are created on-the-fly for each new slider value.

 >

 ${a}$:

Interactive plots

Interactive plots produced by the plots:-interactive command now make use of new Explore functionality.

Issuing the following command will produce a pop-up dialog. When the pop-up dialog appears, select Interactive Plot with 1 parameter from the uppermost drop-down menu (combo-box), then click Plot.

The result will now be in terms of Embedded Components in the current worksheet.

 > $\mathrm{plots}:-\mathrm{interactive}\left(\left\{\mathrm{cos}\left(w\right),\mathrm{tan}\left(w+z\right)\right\},\mathrm{variables}=\left[w,z\right]\right)$

 ${z}$:

The plots:-interactive functionality can also be accessed in a purely clickable manner, via the context-sensitive menus. Context-sensitive menus are used to apply operations to an expression using only the pointer. The menus are available for both 2-D Math output (following execution) and 2-D Math input (preceding execution).

Execute the first command below, then right-click (Control-click on Macintosh) on the output expression to bring up the associated context-sensitive menu. Select the Plots option from the pop-up menu. Inside the Plots submenu, select the Plot Builder. This should bring up the PlotBuilder window. Select Interactive Plot with 1 parameter in the uppermost drop-menu, then click on the Plot button to finish.

In a Worksheet this should insert another instance of the call to the Explore command and the embedded components. In a Document the embedded components will be displayed but the Explore call which created them will not be immediately visible.

 > ${ⅇ}^{x}-a{x}^{3}$
 Easy App Creation The Explore command is the quickest and easiest way for you to create apps in Maple.  If you simply follow the steps in any of the examples above in your worksheet, you can simply save your worksheet and you will have a working app!   If you would like to clean up your app a bit, here are some more suggestions:   First, keep in mind that when Explore creates the table of embedded components, this is treated like output in Maple. Similar to other commands in Maple, if you change or remove your original Explore command call, the values in the inserted components will also change or be removed.   To retain the inserted embedded components in a more permanent way, you can copy and paste the whole inserted table containing the embedded components. If you copy and paste the whole inserted table elsewhere in the current worksheet then its components will function just as the original does, even if the original Explore command and its own output table is deleted.  If you would like to try this, simply do the following: 1. Go to one of the above examples and highlight the plot and slider.  You will need to highlight the whole table, so select an area before the plot and drag your mouse down to an area after the slider component. 2. Right click on the selection and choose Copy. 3. Paste the contents elsewhere in the worksheet, delete the original call to the Explore command and its output. 4. Move any preliminary code that you want hidden into the Startup region of the worksheet. 5. Save your worksheet and you have created a brand new standalone app!