Whitman MATH 235 - A Maple Tutorial

Unformatted text preview:

A Maple TutorialDavid GuichardJuly 11, 1997(modified by Albert Schueller, Jan 2011)(modified by Douglas Hundley, Jan 2013)Contents1 Getting Started 22 Algebra 32.1 Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 Variables and Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.3 Evaluation and Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.4 Solving Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Plotting 64 Calculus 74.1 Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74.2 Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.3 Implicit Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.4 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Adding text to a Maple session 96 Printing 97 Working with Data 98 Saving your work 109 Getting Help 1010 Packages 1011 Getting StartedMaple is a powerful mathematical calculator, often called a computer algebra system (CAS) orsymbolic mathematics program, because unlike most calculators it can do algebra and calculussymbolically. For example, it can expand the product (x + 1)30into the normal representationof this polynomial, and it can factor the result back into the original form. It can compute thederivative or antiderivative of 3x/√x2+ 2x + 47. It can also serve as a numerical calculator, butagain unlike most calculators it can do integer and rational number arithmetic exactly, no matterhow many digits are involved. If it is undesirable or impossible to express a result exactly, Maplecan do numerical approximation. Finally, Maple can do some quite sophisticated graphing in both2 and 3 dimensions.To learn how to use some of Maple’s features, you should work through this tutorial step bystep. What you should type will be shown in the left hand column in typewriter style; commentsand explanations will appear at the right. You should do everything listed here, but you shouldfeel free to experiment too. If you leave something out or do something extra it may change theresults of some later computations. (If you want to experiment along the way, try using differentnames for functions and variables than the ones in the examples.)To start Maple, log in on one of the workstations in the math lab. If the Maple icon is not onthe launchpad on the left, then go to upper left icon (Dash Home) and search for Maple. Dragthe icon over to your launchpad (NOTE: If Maple is running, you won’t be able to drag it to thelaunchpad).Once Maple has started, it is useful to set some options so that they are the default options:• We will always work in Worksheet mode, NOT in Document mode. You can tell that you arein Worksheet mode because you will see the red cursor: >When the Maple program begins, select Start with a Blank Worksheet.• To make some options default, go to: Tools, then Options– Go to the Display tab, and set Input display: to Maple Notation– Go to the Interface tab, and choose: Default format for new worksheets:, andselect Worksheet• Select the Apply Globally button at the bottom.• You might close, then re-start Maple to see that the options took (that is, Maple shouldautomatically start in Worksheet mode).• Hint: You can shut off the somewhat annoying startup dialog box once you get the defaultsset- Uncheck the little box in the lower left corner: Show this dialog on startup.• Hint: You can close all the buttons on the left for the time being- We don’t want to use theshortcut keys until we understand what is behind them. Use the small triangle key on thedivider to shut them off temporarily.Side Remark: The new Document interface is rather nice- It enables you to create documentswith live, embedded mathematics. That is more than we need- We will use Maple to do symbolicand graphical tasks, then incorporate those answers into our LaTeX code for the lab write-ups.However, if you’re feeling bored sometime, you might check out Maple’s ability to create coollooking documents.22 Algebra2.1 Numbers2+3;123456789*987654321;You must type the semicolon at the end of the line tosignal the end of your expression.2+334*98-45;Type this as is, without the semicolon on the first line.Maple will warn you about the missing semicolon, butwill do the calculation anyway. Sometimes you maywant to start a new line as part of the same expression;you can do this by holding the shift key while you pressreturn. Do this after the “98”.2/5 + 1/3;23/45-167/345*2/3;All rational arithmetic is done exactly.2^5;2**5;3^27;ifactor(%);Maple knows standard mathematical notation, includ-ing these two symbols for exponentiation. The per-cent sign (%) denotes the previous result (it’s called the‘ditto’ operator). The command ifactor does integerfactoring; the command factor factors polynomials.12345/98765;evalf(%);You can force Maple to approximate values as ‘floatingpoint numbers’ (i.e., using decimal notation). Some ofMaple’s commands do this automatically, as we willsee later.I^2;evalf(Pi);evalf(exp(1));The number i =√−1 is denoted by I; the case issignificant—a lower case ‘i’ is different. Pi denotes π;again case is significant. It is very easy to mistakenlytype ‘pi’ instead of ‘Pi’. When you do, things willalmost certainly not work properly, but you will prob-ably get no error messages—you just have to watch outfor this. There is no built-in symbol for e ≈ 2.71828;use the function exp(x) whenever you need ex.2.2 Variables and ExpressionsMaple can manipulate expressions involving variables as well as numbers. Variables can be assignedvalues, either actual numeric values or entire expressions.(x+5)^2;f:=%;x:=5;f;x^2;Maple simply repeats the first line since x has no value.The second line saves the expression (x+5)2with namef; the “:=” symbol acts like an equal sign in normalmathematics or the “:=” in the Pascal programminglanguage. The third line assigns x the value 5.x:=’x’;x;f;This clears the value of x—this is not the same assetting it to zero! Note that Maple remembers the‘real’ definition of f—it is still an expression involvingx, not the fixed value 100.32x;2*x;You must always type the multiplication symbol—Maple will not accept the first line even though it isstandard


View Full Document

Whitman MATH 235 - A Maple Tutorial

Documents in this Course
Load more
Download A Maple Tutorial
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view A Maple Tutorial and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view A Maple Tutorial 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?