Solving Bernoulli Type Differential Equations Using A Maple Graphical User Interface (GUI) Application
Solving Bernoulli Type Differential Equations Using A Maple Graphical User Interface (GUI) Application
Abstract
Maplets are Java applets, which are written with Maple that hold all the algebraic computational power of Maple. A Maplet contains
one or more windows, which interact with the user by means of buttons, checkboxes, text fields, and other standard graphical controls.
Almost all of the Maplets that are available with Maple either display something or compute something; it helps to avoid the standard
Maple syntax. The Maplets try to improve the students’ intuitive and computational abilities while covering graphical, numerical, and
analytical aspects. In this paper, we represent a Maplet application “Solutions of Bernoulli Differential Equations”. The Maplet was
developed to solve and to teach the solution methods of a Bernoulli Equation. How to use the developed Maplet was explained in the
paper. The developed Maplet for Solving Bernoulli type of equations is pedagogical that they ask a student to do something, provide
some hints and guidance along the way, and inform the student if their responses are correct or incorrect. It is also possible to see the
graph of the solution displayed on the interface as well.
Keywords: Maple, Maplets, Education, Calculus, Differential Equations, Bernoulli Differential Equations.
Introduction
The Instructor: Authoring Maplets
A Maplet enables user access to the parts of Maple relevant
to their needs while shielding them from any problems as- The writing of complex code is a detailed business. The
sociated with Maple syntax. What the student sees in using layout has to be specified. The Maplets package for Maple
Maplets: Maplets and Java Swing Classes. 15 enables the writing of the GUI code to be done from
Maplets use calls to the Java Swing Classes to handle Maple. In writing a Maplet, the first command to Maple is
Graphic User Interface (GUI) details. The screen image with (Maplets [Elements]);
of the First-Order Linear Differential Equations example In my opinion, the easiest way to start writing Maplets
provided is typical enough. The elements from the Swing is to begin with the examples, and modify them. You will
Classes used include dialog boxes (TextBox), and buttons. have no difficulty writing simple Maplets. The Maplets
Items not package makes intelligent decisions on layout, and for a
Illustrated there are pull-down menus, checkboxes, simple GUI, writing a Maplet is easy; it is also capable of
etc. (One may imagine pedagogic variations of the exam- writing more complicated and sophisticated GUIs.
ple in which these might be used. For example, in educa-
tion, it is often appropriate to ask students to do tasks, and How Maplet works?
here it may be appropriate to ask them to select from a list
of intervals provided via an appropriate element where the The following is a short, description of the Maplets archi-
function is increasing, etc. Maplets and the Swing Classes tecture based on that provided by Jason Schattman of Wa-
cope with this easily.) Many of the other GUI elements are terloo Maple. The user (student or staff) interacts with the
illustrated in the Maplet examples publicly available at the Maplets package within Maple. The Maplets [Elements]
mapleapps.com. Maplets are launched from Maple. Once part of the package generates an XML description of a Ma-
Maple knows the definition of myMaplet (say), the Maple plet. Using Maplets [Display], this description is sent to
command for running it is: Maplets [Display]( myMaplet the Maplets runtime engine, which is written in Java. This
): One could hide the Maple - both that defining myMaplet runtime engine interprets the XML description of the Ma-
and also the callout to it - in a script or, on Windows, a.bat plet, dynamically creates the necessary user interface (Java
file. The script would be one which started Maple, read in Swing) components, and displays the Maplet. There is no
Maple code which in turn launched the Maplet. (For bet- single-handed Java code associated to a specific Maplet.
ter methods that will come with Maple 15, see the section, Maplets are XML descriptions that are taken as input by a
“How Maplets work“). generic runtime engine. We now quote verbatim from the
21
Isa MUSLU
Journal of Technical Science and Technologies, 1(2):21-24,2012 ISSN:2298-0032
Waterloo Maple source: “That said, in Maple 15, users will In the future? Java, Computer Algebra (CA) and the
be able to save a Maplet to a single-handed file, which can Web
be shared with other users. Using “Save as ... Maplet”
stores all the information necessary to reconstruct a Maplet I know of at least three Java-Maple combinations, all Web-
to a file. Executing (double-clicking) this file on any com- server related. The first one is AIM. AIM is reviewed in
puter that has a Maple 15 installation launches the Maplet.” (Strickland N., 2002). AIM uses Java servlets. The next
As a small incremental change? One view of soft- two use JSP pages and involve GAP or Maple as alterna-
ware is that it can come in two main parts - “appliance soft- tives in the algebra engine used. They are java math, and
ware” as one part, “environments” as another. “Appliance the next edition of “Algebra Interactive”. LiveMath, and
software” does just one task. Appliance software is easy then called Math View that was reviewed in (Keady G. &
to use. However, if different appliances come in too many Hill D., 1997). At some stage in the future, one can imagine
different styles, it can be confusing. Maplets, by using Java the functionality of LiveMath being delivered from some-
Swing classes, should feel familiar to our students. “Com- thing Maple based. Maybe it will be something that to the
puting environments” are, for us, big packages like Maple, students and instructors will feel Maplets-like. It will al-
Mathematica or Matlab or similar. Such software, which most certainly involve some sort of Maple-Java combina-
might do many different tasks. The obvious problem with tion. This is enough imagination about the future. Maplets
environments is that they can become bloom and hence will have some role on the way through to it.
difficult to maintain as trustworthy software. Maple has
avoided too much in-package word processing (as LaTeX How to Use the Software? “Solutions of Bernoulli Dif-
does the job) and too much in-package float numeric (as ferential Equations”
Matlab/Octave) does the job.
Maple aims at extending its functionality by intelligent In the following figures, we represent the usage of the Ma-
connection or inter-relation with other software. Adding plet “Solutions of Bernoulli Differential Equations.” Here
to its functionality the production of (Java-Swing-based) we are going to represent two different solution methods
Maplets seems a reasonable increment. In the near future, “Solution by Linearization Method” and “Solution by us-
maybe most first year students in mathematics departments ing Stable Modulation Technique”. It is both possible to
where Maple is the dominant package in teaching will use find general solution and solve an initial value problem
Maplets rather than Maple. There should then be a smooth (IVP) by using the Maplet. Solution steps shall be repre-
transition at second year to students using pre-prepared sented.
Worksheets more than Maplets, with some Maplets around In the figure 1-solution steps with two solution meth-
both for those who really don’t want to program and to ods, solution curve are seen. Here interactively it is possi-
get continuity with the first year experience. At third year ble to see the buttons “New Problem” or “Modify or Make
it seems trustworthy to expect all mathematics students to Your Own Problem”, to make new problem automatically
be able to program in Maple to solve proper tasks of their or to make your own problem, “hint”, “check”, “show”,
own. “Quit”, To see hint about solution of the problem, to check
if our solution is correct or not and to see solution, ”Select
Pedagogic Targets for Maplets Combined with Larger- the viewing Window” and ”Remove the Solution Curve”.
Scale Teaching Software? As seen also for the general solution, step three is the last
step. In this interface if we choose “Find a general solu-
Many Calculus, etc. CDs, DVDs have been written. Some tion”, and then after third step we can see the result of the
even have Maple as an algebra engine reinforcing them. problem that is chosen automatically or our own problem.
I imagine that Maplets might provide an attractive way If we choose “Solve an Initial Value Problem”, then after
of getting a consistent feel to pedagogic materials of this the third step the given initial values are going to be in-
kind. Perhaps if the Math’s project were to have started serted in the general solution and after the sixth step we
now rather than a decade earlier, Maplets would have been are going to see the exact solution of the chosen problem
seriously considered to reinforce it. In reference (Quinney or our own problem. Graph of solution can be seen at the
D., 2001) Douglas Quinney describes “Calculus Machina”. right side of the Maplet as well.
This builds on Java, and is reinforced by its own Computer In the figure 2 it is possible to modify the existing
Algebra system (CAC). Once more again, a reasonable problem or it is possible for the user that to make their own
fraction of the work described there could be implemented problem. If we want to solve our own problem via this Ma-
effectively in Maplets if one were to choose to do so. plet, we have to insert our problem just by modifying the
existing problem. In this interface, we can also change the
initial conditions as we wish.
22
Solving Bernoulli Type Differential Equations Using a Maple Graphical User Interface (GUI)
Application
Journal of Technical Science and Technologies, 1(2):21-24,2012 ISSN:2298-0032
23
Isa MUSLU
Journal of Technical Science and Technologies, 1(2):21-24,2012 ISSN:2298-0032
After changing the values just by clicking the button hint about the step even if they still can’t find them, they
“Update Problem and Close”, we can update the problem. can see the results. After solving the problem, it is possible
Then on the main interface, the values will be changed au- to plot solution curves of the problem.
tomatically.
In figure 3 the solution of an initial-value problem in- References
terface is seen. The difference in this interface and the main
interface is giving the initial values. In the main interface,
some of the fields and buttons are disabled. These disabled Forrest S., (2005), Electronic Notes in Theoretical Com-
buttons are being enabled when we choose “Solve an Ini- puter Science, Elsevier
tial Value Problem” radio button. In this interface, the solu- Keady G. and Hill D., (1997), School of Mathematics and
tion steps of initial value problem are seen. Here solution Statistics, University of Western Australia, Nedlands.
of the problem is finished in five steps because with the Keady G., (2005), Review of Maplets, MSOR Connections
third step the initial conditions are added. At the right side Vol 2 No 2, Loughborough University, United King-
dom,
of the application, the exact solution of the initial value
problem can be seen. Kolokolnikov T., (2002), Using Maple and the web to
grade mathematics tests, International Workshop on
Advanced Learning Technologies, Palmerston North,
Conclusion New Zealand.
In the presented paper a Maple Graphical User Interface Quinney D.(2001), http://ltsn.mathstore.ac.uk/articles/
(GUI) application, “Solutions of Bernoulli Differential maths-caa-ries/nov2001/index.htm#casestudy
Equations” Maplet, for a nonlinear differential equation, Strickland N.(2002), Alice interactive mathematics. MSOR
Bernoulli type, is presented. With this pedagogic way, stu- Connections, 2(1):27–30, 2002. http://ltsn.mathstore.
ac.uk/newsletter
dents or users have control if their solution steps are correct
or not or they can get hint about the problem solution. They
can check the steps if correct or not. If not they can see the
24