12.07.2015 Views

Learning Guide Learning Guide

Learning Guide Learning Guide

Learning Guide Learning Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

18 • Chapter 2: Mathematics with Maple: the Basics> eqn := x = y + 2;eqn := x = y + 2Maple names can include any alphanumeric characters and underscores,but they cannot start with a number. Also, avoid startingnames with an underscore because Maple uses these names for internalclassification. Valid Maple names include: polynomial, test_data,RoOt_lOcUs_pLoT, and value2. Examples of invalid Maple names are2ndphase (because it begins with a number), and x&y (because & is notan alphanumeric character).Define functions by using Maple’s arrow notation (->). This notationallows you to evaluate a function when it appears in Maple expressions.At this point, you can do simple graphing of the function by using theplot command.> f := x -> 2*x^2 -3*x +4;f := x → 2 x 2 − 3 x + 4> plot (f(x), x= -5...5);70605040302010–4 –2 0 2 4xFor more information on the plot command, see chapter 4 or enter?plot at the Maple prompt.The assignment (:=) operator can then associate a function namewith the function definition. The name of the function is on the left-handside of the :=. The function definition (using the arrow notation) is onthe right-hand side. The following statement defines f as the “squaringfunction.”> f := x -> x^2;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!