Maple Commands With Notes
Maple Commands With Notes
Maple Commands With Notes
The “ode” is the (ordinary) differential equation and “ic” is the initial condition(s) (if they exist).
If there aren’t initial conditions, you can just use the command “dsolve(ode)”.
Troubleshooting:
• Make sure you use the (independent) variable when defining the DE. An expression like
y 0 + 2y will not work; Maple needs to know explicitly what the function and variable (i.e.
dependent and independent variables) are.
• NEVER use quotation marks for two derivatives; always use the appropriate number of
apostrophes.
• Use * for multiplication whenever you are multiplying two letters. For example , if k is an
unknown parameter and t is your (independent) variable, type cos(k ∗ t); otherwise, Maple
will treat kt has (another) unknown variable.
• Use restart if you already solved for a function with the same name to avoid errors.
• Typing y := dsolve(...) will not save the solution in a form that you can evaluate, plot,
etc. Instead, first use the dsolve command by itself. Then in the next line, type “y :=”
followed by either (1) copying and pasting the solution from the previous line or (2) typing
rhs(%) (to recall the right-hand side of the previous line).
Command: with(DEtools):
DEplot(ode, x(t), t = a..b, [[ic]])
Troublshooting:
• Remember to include the package DEtools.
This command will preform Euler’s Method to numerical estimate the solution of a first-order
initial-value problem at a particular point. The “ode” is the (ordinary) differential equation and
“ic” is the initial condition. The point “a” is the place at which you want to estimate the solution
and “n” is the number of steps/times Euler’s approximation is preformed. Note that if you are
given “h” (a step size), you must convert this to figure out “n”. In particular,
a − x0
n=
h
where x0 is where the initial condition occurs.
Troubleshooting
• You must write the ode in the form x0 (t) = f (t, x).
3.2 Option 2
Command: x:=dsolve({ode, ic}, x(t), numeric, method=classical[foreuler], stepsize=∆t)
This command will create a vector of values; the jth entry is the approximate solution at the jth
step point tj . Here “ode” is the (ordinary) differential equation and “ic” is the initial condition.
Make sure that you name/save this vector to recall its information later; above and below, I saved
it as x.
1. To find the estimated value of the solution at a step point tj , type x(tj ).
For a < t < b, this will plot the points (tj , x̃(tj )) where tj is a step point and x̃(tj ) is
the Euler approximation of the solution at that point; those points will be connected with
(approximation) lines.
This command will create a vector of values; the jth entry is the approximate solution at the jth
step point tj . Here “ode” is the (ordinary) differential equation and “ic” is the initial condition.
Make sure that you name/save this vector to recall its information later; above and below, I saved
it as x.
1. To find the estimated value of the solution at a step point tj , type x(tj ).
2. To plot the numerical estimation:
Command: with(plots):
odeplot(x, [t,x(t)], a..b)
For a < t < b, this will plot the points (tj , x̃(tj )) where tj is a step point and x̃(tj ) is the
improved Euler approximation of the solution at that point; those points will be connected
with (approximation) lines.
Here “ode” is the (ordinary) differential equation, t is the (independent) variable, and x(t) is the
solution to the differential equation. This command will plot a slope field for the range a ≤ t ≤ b
and c ≤ x ≤ d.
5.2 Option 2
Command: with(DEtools):
DEplot(ode, x(t), t = a..b, x= c..d, arrows = large)
Once again, “ode” is the (ordinary) differential equation, t is the (independent) variable, x(t) is
the solution to the differential equation, and the command will plot a slope field for the range
a ≤ t ≤ b and c ≤ x ≤ d.
Example: DEplot(x0 (t) = x2 (t) − x(t) − 2, x(t), t = 0..10, x = −3..3, arrows = large)
Troublshooting:
• For either option, remember to include the package DEtools.
Note: To multiply matrices in Maple, use a period (.) instead of an asterisk (*).
7 Important Review
• int(f,x) – To integrate a function
This list is just a highlight of some commands that will be used a lot in this course; this isn’t
necessarily everything you will need to know. On the Mathematics Course Information Repository
Moodle page, look in the Supplementary Materials folder under MA 111, 112, and 113 (Calculus
I, II, and III) to see all the Maple commands you are expected to already know.
In general, look (1) in the help menu on Maple, (2) on the Maple page of our Moodle course,
(3) on Moodle in the Mathematics Course Information Repository course under the corresponding
calculus course, or (4) ask me if you need assistance using any of these commands.