|
Math 241 - Maple Workshop |
|
---|---|---|
San Diego State University -- This page last updated 07-Oct-02 |
The more recent versions of Maple have added an additional package called Maplets, which allows the user to create a Java applet-like interface. This type of package porvides a user friendly interface for applications that are used for instruction of people unfamiliar with Maple or for easy access and changes to routines that are used frequently.
Below is a Maplet created by Jason Schattman of Waterloo Maple for use in a seminar teaching the new features of Maple 7.0. It provides two Maplets to illustrate the ideas of Riemann sums. As always, there is a hyperlink to obtain the Maple version of this worksheet. An additional hyperlink is provided for another demonstration that comes from the Maple Applications center.
> | restart: |
> | with(student); |
> | leftbox( x^3, x=-1..1, 15); |
> |
> | restart: with(Maplets):with(Maplets[Elements]): |
> | riemann := Maplet( Window['W1']( [ ["Enter a function f(x)=", TextField['f']("x^2")], ["Enter left endpoint a=", TextField['a']("0", 3), "Enter right endpoint b=", TextField['b']("1", 3)], #end 1 [Plotter['P']()], #end 2 [Button['b1']("Plot f(x)", 'onclick'=Evaluate('P'='plot(f, x=a..b)'))], #end 3 ["Choose number of rectangles"], [Slider['s1'](0..100, 10, 'majorticks'=20, 'minorticks'=5, 'snapticks'='false')], #end 4 [Button['b2']("Show Riemann sum", 'onclick'=Evaluate('P'='student[leftbox](f, x=a..b, s1)'))] ] ) ): |
> | Display(riemann); |
Initializing Java runtime environment.
> | riemann2 := Maplet( Window['W1'] ( [ ["Enter a function f(x)=", TextField['f']("x^2")], ["Enter left endpoint a=", TextField['a']("0", 3), "Enter right endpoint b=", TextField['b']("1", 3)], #end 1 [Plotter['P']()], #end 2 [Button['b1']("Plot f(x)", 'onclick'=Evaluate('P'='plot(f, x=a..b)'))], #end 3 ["Choose number of rectangles"], [Slider['s1'](0..100, 10, 'majorticks'=20, 'minorticks'=5, 'snapticks'='false')], #end 4 [Button['b2']("Show Riemann sum", 'onclick'='ShowSum')], #["Riemann sum", TextField['sum'](), ["Riemann sum", MathMLViewer['sum'](height=70, width=200), "Numeric approximation", TextField['numericSum'](4)] ] ), Action['ShowSum'](Evaluate('sum'='MathML[Export](student[leftsum](f, x=a..b, s1))'), Evaluate('numericSum'='evalf(student[leftsum](f, x=a..b, s1), 5)'), Evaluate('P'='student[leftbox](f, x=a..b, s1)') ) ): |
> | Display(riemann2); |
> |