{VERSION 6 0 "IBM INTEL NT" "6.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 266 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 267 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 271 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 272 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 273 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 274 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 275 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 276 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 277 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 278 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 279 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 280 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 281 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 282 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 283 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 284 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 285 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 286 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 287 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 288 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 289 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 290 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 291 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 292 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 293 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 294 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 295 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1 " -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 2 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 257 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT 257 18 "Maple Fundamentals" }} {PARA 256 "" 0 "" {TEXT -1 30 "last revision: October 2, 2009" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 360 "This tutorial is intended beginni ng calculus students. It is by no means thought of as a comprehensive introduction to maple. We will illustrate how to get started with ma ple and introduce some of the important commands which are very useful in calculus. Maple was developed at the University of Waterloo in On tario, Canada, which explains the maple leaf. " }}{PARA 0 "" 0 "" {TEXT -1 61 "Keep pressing the return key as you go through this tutor ial." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 6 "Basics" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 76 "Maple is a computer algebra system. It will at tempt to give the answers in " }{TEXT 269 13 "symbolic form" }{TEXT -1 50 ", rather than finding numerical approximations. \n" }}{PARA 0 "" 0 "" {TEXT 256 9 "Example: " }{TEXT -1 51 "Compare the two ways to \+ find the square root of 8. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "sqrt (8);\nsqrt(8.0);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 277 "Like with every programming language there are a \+ few rules which you have to follow. Here are a few of them:\n\n1. E very command must end with a semicolon. You may also use a colon ins tead to suppress the output.\n2. Maple is case sensitive. X and x m ean different things." }}{PARA 0 "" 0 "" {TEXT -1 135 "3. A * for mu ltiplication is required. This is different from graphing calculators were you can enter 2x. In maple 2*x is required." }}{PARA 0 "" 0 "" {TEXT -1 87 "4. Use the # sign for comments.\n5. Use % to refer to the last executed expression.\n" }}{PARA 0 "" 0 "" {TEXT 262 16 "Illu strations: " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "sqrt(5)*sqrt(20); # multiply two roots" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "X-x \+ : # use of colon, output suppressed" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "%; # last expression displayed" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 150 "There is a host \+ of maple commands, built-in functions and the like . You can obtain i nformation about a specific command using the question mark key." }} {PARA 0 "" 0 "" {TEXT -1 3 " \n" }{TEXT 270 8 "Example:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "?sqrt" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 86 " The information shows up in a new window. Notice the menu on top/side of help window." }}{PARA 0 "" 0 "" {TEXT -1 5 "\nThe " }{TEXT 271 19 "assignment operator" }{TEXT -1 80 " in maple is := (colon equals). T he syntax is new variable := known variable." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 289 9 "Example: " }{TEXT -1 11 " Assign to " }{XPPEDIT 18 0 "y;" "6#%\"yG" }{TEXT -1 16 " the expressi on " }{XPPEDIT 18 0 "x^2-4*x+3;" "6#,(*$%\"xG\"\"#\"\"\"*&\"\"%F'F%F'! \"\"\"\"$F'" }{TEXT -1 2 " ." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "y := x^2 - 4*x + 3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "From here on, any time you reference the variable y, the quantity " } {XPPEDIT 18 0 "x^2-4*x+3;" "6#,(*$%\"xG\"\"#\"\"\"*&\"\"%F'F%F'!\"\"\" \"$F'" }{TEXT -1 26 " will be substituted for " }{XPPEDIT 18 0 "y;" " 6#%\"yG" }{TEXT -1 3 " .\n" }{TEXT 295 14 "Illustrations:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "y^2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "factor(y);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "In order to undo this definition reset y to a string by typing" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "y := 'y';" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 6 "Check:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "y^2;" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "If you want to reset all variables and erase all working definitions, use" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 14 "Simple Algebra" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 48 "Let's do some al gebra with maple. The commands " }{TEXT 258 6 "factor" }{TEXT -1 2 ", " }{TEXT 259 6 "expand" }{TEXT -1 5 " and " }{TEXT 260 8 "simplify" } {TEXT -1 22 " are extremely useful." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "factor(x^2 -4*x + 3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "E := (x-1)*(x-2)*(x-3)*(x-4);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "expand(E); # maple uses the definition of E " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "(x^(-1) + y^(-1))^(-1);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 43 "A great d eal of algebra deals with solving " }{TEXT 272 9 "equations" }{TEXT -1 24 ". In maple we have the " }{TEXT 261 6 "solve " }{TEXT -1 48 "c ommand to accomplish this task. The syntax is " }{TEXT 290 5 "solve" }{TEXT -1 113 "(equation , unknown), that is, you need to communicate \+ the equation and the variable which you try to find. The " }{TEXT 268 6 "evalf " }{TEXT -1 95 "command comes in handy when you are looki ng for numerical values, rather than symbolic answers." }}{PARA 0 "" 0 "" {TEXT 273 8 "Example:" }{TEXT -1 22 " Solve the equation " } {XPPEDIT 18 0 "x^3+x+1 = 3*x^2" "6#/,(*$%\"xG\"\"$\"\"\"F&F(F(F(*&F'F( *$F&\"\"#F(" }{TEXT -1 104 " . \nFor equations we use the simple = \+ sign, without the colon. The syntax for the solve command is " } {TEXT 274 5 "solve" }{TEXT -1 49 "( equation , unknown ). In our case this becomes" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "solve( x^3 +x+1 = 3*x^2, x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 80 "Maple gave u s the symbolic answers. Floating point answers can be obtained with " }{TEXT 275 7 "evalf. " }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 71 "As a lways, the % symbol makes reference to the last executed command. " } }{PARA 0 "" 0 "" {TEXT -1 52 "An immediate numerical answer can be obt ained using " }{TEXT 276 7 "fsolve." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "fsolve( x^3+x+1 = 3*x^2, x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 277 7 "Example" }{TEXT -1 28 ": Find x from the equation " }{XPPEDIT 18 0 "y = (x-1)/(x-2);" "6#/%\"yG*&,&%\"xG\"\"\"F(!\"\"F(,&F'F(\"\"#F)F) " }{TEXT -1 53 " (this is the calculation to find inverse functions) " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "y = (x-1)/(x-2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "solve(%,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 278 8 "Example:" }{TEXT -1 22 " Solve the equation " } {XPPEDIT 18 0 "cos(x) = sin(2*x);" "6#/-%$cosG6#%\"xG-%$sinG6#*&\"\"# \"\"\"F'F-" }{TEXT -1 25 " for x. Maple's solution" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "solve(cos(x)=sin(2*x),x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 52 "We can obtain the decimal representations as follows" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 5 "With " }{TEXT 267 7 "fsolve " }{TEXT -1 7 "we find" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "fsolve (cos(x)=sin(2*x) ,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 142 "Note that we only found \+ one solution. A search interval for the solution can be added as an o ption. To search for a solution in the interval " }{XPPEDIT 18 0 "[Pi, 2*Pi];" "6#7$%#PiG*&\"\"#\"\"\"F$F'" }{TEXT -1 8 " enter " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "fsolve( cos(x)=sin(2*x),x,Pi ..2*Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 265 10 "Impor tant:" }{TEXT -1 2 " " }{XPPEDIT 18 0 "Pi;" "6#%#PiG" }{TEXT -1 2 " \+ " }{TEXT 266 38 "is to be entered as Pi (upper case P)" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "Pi; evalf(%); # co rrect way\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "pi; evalf(%) ; # incorrect" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 19 "In this last ca se, " }{XPPEDIT 18 0 "pi;" "6#%#piG" }{TEXT -1 87 " is just another sy mbol of the Greek alphabet without a numerical value attached to it." }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 9 "Functions" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 " It is essential that you understand the difference between " }{TEXT 279 36 "functions, expressions and equations" }{TEXT -1 30 ". Let's d o this by example. " }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 11 "Here is an " }{TEXT 280 10 "expression" }{TEXT -1 1 ":" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "x^2 - 4*x + 3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 11 "This is an " }{TEXT 281 10 "equation, " }{TEXT -1 122 "(the right hand side by itself is an expression, or more gener ally, an equation joins two expressions with an equals sign)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "y = x^2 -4*x + 3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 74 "Equations can be solved. For instance we could solv e this equation for x." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "solve(%,x );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 39 "Here we define y to be the \+ expression " }{XPPEDIT 18 0 "x^2-4*x+3;" "6#,(*$%\"xG\"\"#\"\"\"*&\" \"%F'F%F'!\"\"\"\"$F'" }{TEXT -1 3 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "y := x^2 - 4*x +3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 19 "Now let's define a " }{TEXT 282 11 "function. " }{TEXT -1 33 "Notice the -> syntax. The input " }{XPPEDIT 18 0 "x;" "6#%\"xG" }{TEXT -1 35 " \+ is assigned ( -> ) to the output " }{XPPEDIT 18 0 "x^2-4*x+3;" "6#,(* $%\"xG\"\"#\"\"\"*&\"\"%F'F%F'!\"\"\"\"$F'" }{TEXT -1 2 ". " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "f := x -> x^2 - 4*x +3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 71 "We see that f(x) and the expression y are iden tical, but not y and f ." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "f(x); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "y;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 2 "f;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 179 "The re is a subtle, yet very important difference between the function f \+ (this object is defined with the -> syntax), and the output f(x). f(x ) is an expression, f is a function." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 152 "The function notation allows u s to evaluate, manipuilate, calculate all the fun things which we did \+ in class. Remember that f is already defined above." }}{PARA 0 "" 0 " " {TEXT 263 9 "Examples:" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "f(4);\n\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "f(a);" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "f(-x);" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 20 "f(x-3);\nsimplify(%);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 18 "(f(x + h)-f(x))/h;" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 12 "simplify(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 71 "Here is a short select ion of functions which are recognized by maple. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{MPLTEXT 1 0 399 "sqrt(x); # square root function\nr oot[5](x); # 5-th root of x, other order roots similar pattern\nabs(x) ; # aboslute value function\nexp(x); # exponential function\nl n(x); # natural logarithm\nsin(x); # sine function\ncos(x); \+ # cosine function\ntan(x); # tangent function\nsec(x); # se cant function\narcsin(x); # inverse sine function \narctan(x); # inv erse tangent function\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 257 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 4 " " 0 "" {TEXT -1 17 "Even/odd Function" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{EXCHG {PARA 0 "" 0 "" {TEXT 283 7 "Example" }{TEXT -1 16 ": Test whether " }{XPPEDIT 18 0 "f(x) = sin(x*cos(x));" "6#/-%\"fG6#%\"xG-%$ sinG6#*&F'\"\"\"-%$cosG6#F'F," }{TEXT -1 20 " is even or odd. " }} {PARA 0 "" 0 "" {TEXT -1 17 "First we define f" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "f := x -> sin(x*cos(x));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 30 "Then we form f(-x) and compare" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "f(-x);\nf(x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 21 "f is an odd function." }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 284 8 "Example:" }{TEXT -1 109 " Select any function f(x) and f orm the function g(x) = f(|x|). This will always result in an even fu nction." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "f := x -> x - ln(x+5); \+ # select a function" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "g := x -> f(abs(x));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "g(x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "g(-x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "We have \+ " }{XPPEDIT 18 0 "g(-x) = g(x);" "6#/-%\"gG6#,$%\"xG!\"\"-F%6#F(" } {TEXT -1 6 " : " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "g(x)-g(-x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 24 "Composition of F unctions" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 291 8 "Example:" }{TEXT -1 7 " Let " }{XPPEDIT 18 0 "f(x) = sqrt(x+1);" "6#/-%\"fG6#%\"xG-%%sqrtG6#,&F'\"\"\"F,F," }{TEXT -1 11 " and let " }{XPPEDIT 18 0 "g(x) = x^2-4*x+5;" "6#/-%\"gG6#%\"xG,(*$F'\"\"#\"\"\"* &\"\"%F+F'F+!\"\"\"\"&F+" }{TEXT -1 75 " . Form f(g(x)) and g(f(x) ). \nFirst we define the respective functions" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "f := x -> sqrt(x+1);\ng := x -> x^2-4*x+5;" }}} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 28 "No w compute the compositions" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "f(g(x ));\ng(f(x));\n" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 16 "Inverse Func tion" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 292 9 "Example: " }{TEXT -1 31 " Find the invers e function of " }{XPPEDIT 18 0 "f(x) = ln(x+1);" "6#/-%\"fG6#%\"xG-%# lnG6#,&F'\"\"\"F,F," }{TEXT -1 32 ". First we define the function" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "f:= x -> ln(x+1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 105 "Remember that we need to switch x and y \+ and then solve for y. This means we have to solve the equation " } {XPPEDIT 18 0 "x = f(y);" "6#/%\"xG-%\"fG6#%\"yG" }{TEXT -1 9 " for \+ x:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "solve( x = f(y),y);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 48 "Now define the inverse function (c opy and paste)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "g := x-> exp(x)-1 ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "g(x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 22 "Let's test the result:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "g(f(x));\nf(g(x));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 49 " It appears that maple doesn't know the identity " }{XPPEDIT 18 0 "ln( exp(x)) = x;" "6#/-%#lnG6#-%$expG6#%\"xGF*" }{TEXT -1 3 " ." } {MPLTEXT 1 0 1 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT 293 8 "Example:" }{TEXT -1 33 " Find the inverse function of " }{XPPEDIT 18 0 "f(x) = sin(a*x)/b;" "6#/-%\"f G6#%\"xG*&-%$sinG6#*&%\"aG\"\"\"F'F.F.%\"bG!\"\"" }{TEXT -1 4 " . " } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "f := x -> sin(a*x)/b;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "g := x -> solve( x=f(y),y);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "g(x);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 8 "Graphing" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 40 "The plotting command has the structure " }{TEXT 294 4 "plot" }{TEXT -1 45 "( expression or function , range , options) .\n" }{TEXT 285 8 "Example:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "plot ( x^2-4*x+3, x=-2..5);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "This wa s the plot of an expression. In the function setting we have" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "f := x -> x^2-4*x+3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "plot(f,-1..5);" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 66 "The same graph can be obtained as the plot of the \+ expression f(x)." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "plot( f(x), x=- 1..5);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 390 "Let's add some bells a nd whistles (options).\n\nview( x-range, y-range) lets you select \+ the viewing rectangle, like the windows command on a graphing calculat or\nthickness the thickness of the curve, us eful if curve is barely visible in a printout\ncolor \+ color of the curve\ntitle \+ title of the graph" }}{PARA 0 "" 0 "" {TEXT -1 269 "numpoints \+ selecting a large number will increase the resolu tion of the graph and take out artificial corners\n\nIf you click (or \+ right-click) on the graph you'll see some additional icons which may h elp to improve the looks of your graph.\nExample:" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 80 "plot(f,-1..5, view=[-1..5,-2..6], thickness=3, colo r=blue, title=`my parabola`);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "F or " }{TEXT 286 32 "several curves on the same plot," }{TEXT -1 103 " \+ enclose the functions with a bracket. You can select different colors or thicknesses for each curve.\n" }{TEXT 287 8 "Example:" }{TEXT -1 32 " Display the orginal function " }{XPPEDIT 18 0 "f(x) = cos(Pi*x/ 2);" "6#/-%\"fG6#%\"xG-%$cosG6#*(%#PiG\"\"\"F'F-\"\"#!\"\"" }{TEXT -1 90 " in red, along with a shift of its graph (up by 2 units and 1 uni t to the right) in blue." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 91 "f := x \+ -> cos(Pi*x/2);\nplot( [f(x), f(x-1)+2], x=-2..8, color=[red,blue], th ickness=[2,1]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 288 7 "Example" } {TEXT -1 25 ": Display the function " }{XPPEDIT 18 0 "f(x) = ln*x+1; " "6#/-%\"fG6#%\"xG,&*&%#lnG\"\"\"F'F+F+F+F+" }{TEXT -1 33 " its inv erse in a common graph." }}{PARA 0 "" 0 "" {TEXT -1 26 "First define t he function " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "f := x -> ln(x+1); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 34 "Next compute the inverse func tion:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "g := x -> solve( x=f(y),y) ; g(x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 44 "Finally, plot the grap h of the two functions" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "plot( [f, g],-2.5..2.5, view=[-2.5..2.5, -2.5..2.5], color=[red,blue]);" }}}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "8" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }