Application Center - Maplesoft

# Notational Devices for ODEs

You can switch back to the summary page by clicking here.

Notational Devices for ODEsRobert J. LopezEmeritus Professor of Mathematics and Maple FellowMaplesoft

Introduction

One of the earliest notational devices relevant to differential equations first appeared in Maple V Release 6.  This is the declare command found in the PDEtools package.  In this month's article, we will recollect the functionality provided by declare, and show how it compares to typesetting in Maple 12.  In particular, we are interested in how to write and work with ordinary differential equations using the most natural and standard notations.

A Bit of History

The declare command appeared at a time when Maple had significant constraints on its ability to write the full spectrum of mathematical notation.  The Maple worksheet extant at that time (1999) is presently called "Classic" and carries the extension .mws.  In this restricted environment, input was in text mode, using just the characters available on the keyboard.

The declare command alters the way derivatives are displayed on screen.  It is accessed from within the PDEtools package by executing

 > with(PDEtools):

 >

To use declare to indicate that the derivative should be displayed as , execute

 > declare(prime=x):

 >

To suppress the echo, use

 > declare(prime=x,quiet):

 >

At this point, the derivative

 > diff(y(x),x);

 >

displays as shown.  Note that the display does not exhibit the independent variable .  If both and appear in the differential equation

 > DE := diff(y(x),x) + y(x) = 0;

 >

then one term contains the independent variable and one doesn't.  To suppress the display of the independent variable in , use

 > declare(y(x), x=prime, quiet);

 >

in which case the differential equation would appear as

 > DE;

 >

The declare command filled a need at a time when Maple did not have the general structure to handle the full spectrum of mathematical notation.  It alters the way derivatives are displayed, but does not change the paradigm of linear (text-mode) entry of the notation for derivatives.

The Typesetting functionality that was introduced in Maple 10 corrects these shortcomings.

Typesetting and Ordinary Differential Equations

This article is written in the Standard interface for Maple 12, and its file extension is .mw.  Note that within this one file there are portions that resemble the Classic worksheet, and portions that appear to be in Document mode.  Document mode is the natural setting for entering typeset mathematical notation, but math mode entry can occur at a worksheet prompt.  For example, a restart can be issued either in a Document Block:

or at a worksheet prompt:

 >

In either event, executing the command

shows that with the default "standard" level of Typesetting, the prime is understood to mean differentiation with respect to .  This can be changed by executing the command

in which case

means differentiation with respect to .  The Settings command is found in the Typesetting package, and we have used the long name instead of loading the whole package.

Notice that we have simplified the input, but have not made the output particularly pretty.  To simplify the output as well, we need to change the level of typesetting to "extended" by executing the command

(This setting could also have been changed by using the Tools > Options dialog.)

In "extended" typesetting mode, the derivative

now displays with a prime, also.  However, the independent variable is still visible, even though it was not necessary in the input.  To suppress the display of the independent variable in the output, use the Suppress command from the Typesetting package:

Thus, a differential equation containing both and can be entered as

and the echo reflects exactly the input, making for a much more natural mathematical sentence.  This improvement in entering and displaying derivatives and differential equations requires just the three commands

The Overdot Notation for Derivatives

The Newtonian "overdot" for differentiation is also available in Maple 12.  Let's restore typesetting to it's default "standard" level.  Unfortunately, a restart command does not change extended typesetting to standard.  This has to be done with

where the restart command does remove the effect of the Typesetting commands Settings and Suppress.  In this initial environment, the notation

is understood to mean differentiation with respect to .  (The overdot can be entered by using  , an icon from the Layout palette.  On a Windows platform, the keyboard shortcut is to enter followed by the keys [Ctrl] [Shift] [ , which puts the cursor above the .  Typing a period finishes the task.)

As for the prime, the overdot symbol for differentiation can be mapped to some other independent variable with the Settings command:

after which we would have

To suppress the appearance of the independent variable, use the Suppress command in the presence of extended typesetting:

in which case we would have

The Typesetting Rule Assistant

The option "Typesetting Rules..." in the View menu brings up the Typesetting Rule Assistant, shown in Figure 1.

 Figure 1   Typesetting Rule Assistant available from the View/Typesetting Rules... menu

The Dependency Suppression section provides access to the functionality of the Suppress command in the Typesetting package, while the Differential Options section provides access to the functionality of the Settings command.  Dependency Suppression is not available in standard typesetting mode; changes made in the Differential Options section are for input only.

Changes made in the Typesetting Rules Assistant have no effect if extended typesetting is not first in effect.  Extended typesetting can be imposed either by the appropriate form of the interface command, or in the Options dialog accessed from the Tools menu.

A Caution

For our final comments, we initialize Maple via

It should be clear that in either level of typesetting, Maple is programmed to assume that the symbol carries an independent variable such as , so the symbol really means .  This is a great convenience when entering an ordinary differential equation, but can pose a problem if the differential equation is being constructed from an existing expression.

Suppose the expression

has already been defined in a worksheet.  To form a differential equation such as , both the and the in must explicitly exhibit dependence on .  Thus, it is not unreasonable to try

Since Maple assumes that carries the independent variable, the left-hand side of the differential equation is exactly what is needed.  However, on the right-hand side, the symbol does not get changed to , and any solver applied to the differential equation in this form would generate an error, or at least a warning.

However, if the differential equation is constructed with

both sides of the equation properly carry the independent variable in all terms.