{VERSION 2 3 "DEC ALPHA UNIX" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 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 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 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 }{CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 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 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 0 2 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }1 0 0 0 6 6 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 4 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Title" 0 18 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 1 0 0 0 0 0 0 }3 0 0 -1 12 12 0 0 0 0 0 0 19 0 }{PSTYLE "Author" 0 19 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 8 8 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Hel vetica" 1 14 0 0 0 0 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Courier" 1 14 0 0 0 0 2 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 18 "" 0 "" {TEXT -1 22 "Introduction to Maple " }}{PARA 18 "" 0 "" {TEXT 256 2 "by" }}{PARA 19 "" 0 "" {TEXT -1 36 "Jon Stewar t and Bill Farr, Fall 1997" }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 12 "Int roduction" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 469 "Welcome to Maple! I f you have never used Maple before, you may be wondering what Maple ac tually is. Maple is a Computer Algebra System, or CAS. It is a speci alized computer language for handling mathematics. Maple can handle m any different types of calculations, plot graphs, take derivatives and anti-derivatives, and much more.\n\nHere's a simple example of how to give instructions to Maple. Move the cursor to the end of the line b elow and press the Return key.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 " 57+1042;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 852 "\nIn this example, w e just told Maple to add two numbers together. The Maple command prom pt is shown as a \">\" to indicate that Maple is waiting for a command . Did you notice the semicolon at the end? In Maple, for a command t o be recognized, it must be followed by a semicolon. If the semicolon is not there, Maple will not respond to the command, because it think s that you have not finished entering it.\n\nOnce the command has been ended with the semicolon, it is submitted to Maple by pressing the Re turn key. Maple executes the operation and displays a result at the m iddle of the next line. If it does not understand the command, an err or message will be displayed instead. \n\nOn the command line below, \+ try adding a couple of numbers. Don't forget the semicolon! Click th e left mouse button right in front of the \">\" to enter your command. \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 383 "\nIf you later decide that you made a mistake or want to change a previous entry, you can \"back up\" to commands that you hav e already submitted and modify them with the arrow keys and the backsp ace key. Maple also lets you re-submit the command that you just chan ged. Try going back to the addition that you performed and changing t he numbers. Maple will calculate the new result.\n" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 21 "Arithmetic with Maple" }}{EXCHG {PARA 0 " " 0 "" {TEXT -1 483 "\nMultiplication and division are performed in mu ch the same way. The asterisk \"*\" is used to denote multiplication. Note that Maple does not understand the idea of implied multiplicati on, so the \"*\" must always be present when multiplying two values. \+ The slash \"/\" denotes division and exponentiation is expressed by th e caret, \"^\" or by \"**\". \n\nThe next line combines these operati ons. Try experimenting with the different symbols until you feel comf ortable with the notation.\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "5*7.3+44.9/6-11^0.3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 397 "\n Maple follows the standard rules for order of operations. However, ca re must be taken with the use of parentheses in Maple. When designati ng groups such as (1+3)*5, only parentheses can be used. The symbols \+ \{\} and [] have entirely different meanings in Maple. Square bracket s [] are used to define lists, and \{\} to define sets.\n\nHere are so me examples of the different operations being used.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "3+18/3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "5*(4+2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "3*4;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "3/4;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 398 "\nPerhaps you noticed that in the last example, Maple did not return a decimal value of 0.75. Rather, it returned the frac tion 3/4. The reason for this is that Maple will always try to use an alytical (exact) values in its computations, rather than floating poin t decimal values (unless you enter a floating point number to begin wi th). If we desire a decimal value, we can use the evalf command.\n" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "evalf(3/4);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 5 "Pi/3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "evalf(Pi/3);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 590 "\nIn the s econd command, we asked Maple to evaluate the value of Pi/3. Pi is a \+ special value which Maple knows. Other \"special\" values initially k nown to Maple include I (the square root of -1) and the value of the b ase of the natural logarithm. Maple will always leave symbolic consta nts unevaluated unless told not to.\n\nNote that each decimal value wa s given to 10 decimal places of accuracy. With Maple, or any CAS, flo ating point values can be computed with arbitrary accuracy. Suppose w e wanted to know Pi/3 out to 50 or 100 decimal places. That would be \+ accomplished as follows:\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "evalf (Pi/3, 50);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "evalf(Pi/3, \+ 100);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 90 "\nIn each case, we simpl y added a \", N\" where N was the desired number of decimal places. \+ " }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 24 "Basics of Maple commands" } }{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 316 " Like other Maple commands, evalf uses the form:\n\ncommandname( functi on, options );\n\nThis is the general form of most Maple commands. Su ppose we wanted to take the square root of Pi using the function sqrt. The notation is simply the command name, followed by the value, in p arentheses, which is to be operated on.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "sqrt (Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 140 " \nIn this last example, a space was placed between the command and the parentheses. This is allowed because Maple ignores spaces. Observe: \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "sqrt ( \+ Pi ) ;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 354 "\nIt should also be noted that Maple is \"case-sensitive .\" If you accidentally capitalize a command, Maple may not recognize it. However, some commands in Maple have two forms, an upper-case va riety and a lower-case counterpart. The capital indicates that Maple \+ should not evaluate the expression, but simply \"set\" the expression \+ for later evaluation.\n\n" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 14 "Map le packages" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 213 "Maple has hundreds of commands which use the standard form. Many of these commands are \+ not built into the engine, but are kept in packages which can be loade d into Maple. This is done by using the with command.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with(student):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 527 "\nThis command just loaded the \"student\" library. The student library contains many useful general-purpose commands. Other libraries of interest are \"linalg\", the linear algebra library, \"D Etools\", which has commands for manipulating differential equations, \+ and \"plots\" the graphical tools library. Did you notice the colon i nstead of the semicolon? The colon tells Maple to suppress the output from the command. If you used a semicolon instead, Maple would list \+ all the commands that had just been read from the library.\n\n" }}}}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 22 "Built-in help in Maple" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 407 "With all these tools available, you migh t wonder how you can remember all of them. Fortunately, you don't nee d to. Maple provides extensive on-line help for all built-in and libr ary commands. The help is accessed through the command \"?commandname \", where commandname is the name of the command you want to read abou t. For example, you can learn about the square root function with the \+ following command. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "?sqrt" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 160 "\nBut wait a moment! There is no semicolon after the help command! Help is the only command in Maple \+ which is allowed to omit the semicolon after the command.\n" }}{PARA 0 "" 0 "" {TEXT -1 184 "Often the most useful part of a Maple help pag e for a specific command are the examples at the bottom, so look at th ose first. \nNotice that when a help page is your active window, the \+ " }{TEXT 258 4 "Edit" }{TEXT -1 18 " menu has an item " }{TEXT 259 13 "Copy Examples" }{TEXT -1 81 ". If you select this item, make a worksh eet your active window and then choose " }{TEXT 257 5 "Paste" } {TEXT -1 10 " from the " }{TEXT 260 4 "Edit" }{TEXT -1 45 " menu, the \+ examples appear in your worksheet." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 331 "This method of accessing help is fine if you know the name of the command, and just want to be sure of the syn tax. However, you don't always know the name of the command you want t o use so there are several other ways to access help. In the upper ri ght-hand corner of the Maple window, you will notice that there is a m enu called " }{TEXT 261 4 "Help" }{TEXT -1 55 ". The help menu has se veral tools to assist you. The " }{TEXT 262 8 "Contents" }{TEXT -1 262 " item is helpful if you need general information or instructions \+ in how to format your worksheet. There is also a Help menu item for s earching the help database by topic, for example Calculus or derivativ e, and you can even do a full search for a specific word." }}{PARA 0 " " 0 "" {TEXT -1 1 " " }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 41 "Labels, expressions, and the subs command" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 138 "\nOne useful feature of Maple is that it allows you to assign lab els to the output of commands, so that you can use the results in ot her " }}{PARA 0 "" 0 "" {TEXT -1 75 "commands. The reason for doing t his is to save typing, as we'll see below." }}{PARA 0 "" 0 "" {TEXT -1 72 "The notation \":=\" is used to specify a user-defined label. Fo r example:\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "f := 400;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "g := 3241;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "h:=g / f ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "h - 3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 91 "Labels \+ are not limited to just one character either. They can be expressed a s whole words." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "solution:=h+11/29 ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "sigma := h+solution;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "Gamma:= sigma/solution;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 432 "\nThe last two commands illust rate the use of lowercase and capital greek letters in addition to wor ds. These substitutions can save a lot of typing, so their use is str ongly encouraged. However, the real power of Maple lies in its abilit y to manipulate variables, expressions, and functions. In the next tw o commands, we will define two expressions, ex1 and ex2. Each will be a polynomial expression containing the variable, x.\n" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 20 "ex1:=3*x^2 + 5*x -4;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "ex2:=2*x + 3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 157 "\nLike any other number or label, expressions can be manipulat ed in any way we wish. Feel free to experiment by changing the sample s below however you like.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "ex1+e x2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "ex1*ex2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "ex1^ex2;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 72 "\nIf we wish, we may even define new expressions with the original ones.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "ex3:=ex1*ex2^2 ;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 203 "\nSuppose now that we wish \+ to find a value for the third expression at some particular value of x , for example at x = 3/5 or x = 7. This is easily done by using the s ubs command. (short for substitute)\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "subs (x=3/5, ex3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "subs(x=7, ex3);" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 27 "Defining functions in Maple" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 528 "\nThe subs command can be cumbersome if you want to subsitute several values. S ome times it is more convenient to define a function. In the following examples we'll define two functions, f and g. Besides being easier t o evaluate, functions can be composed to create new functions. Also, \+ by using functions, we do not need to use the subs command to find the value of the function at a given point. The notation for defining a \+ function in Maple is:\n\nF := x -> expression;\n\nThe x tells Maple wh at variable F is a function of. \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "f:= x->5*x -4;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "g:=x- >3*x+11;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "f (1);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "g (50);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "f(g(x));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "g(f(x));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "f(x) * g(x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 171 "\nAs you can se e, creating compound functions is quite easy using functions. To perf orm the same task with expressions would require extensive use of the \+ subs command. \n\n" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 43 "More com mands: simplify, expand, and factor" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 317 "Maple has many commands to manipulate expressions. Some of th ese are the commands: simplify, expand, and factor. Simplify applies algebraic simplification rules to an expression, expand multiplies ou t all factored terms, and factor factors polynomial expressions. For \+ example, with ex3, which we already defined.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "ex3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "exp and(ex3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "factor(\");" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "(ex3^2-1)/(ex3+1);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "simplify((ex3^2-1)/(ex3+1)); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 203 "\nIn the example with facto r, the single quote marks \" indicated that Maple should use the resul ts of the last command. Also known as \"ditto,\" the quotes are equiv alent to typing\n> factor(expand(ex3));\n" }}}}{SECT 1 {PARA 3 "" 0 " " {TEXT -1 24 "Plotting graphs in Maple" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 294 "\nAnother one of Maple's strong features is its graphica l capabilities. Maple has very good 2D and 3D graphics. For 2D graph ics, the most commonly used command is the plot command. In the follo wing example, plot is used to generate the graph of f(x) from x = 0 to x = 10. Notice the notation " }{XPPEDIT 18 0 "x=0..10" "/%\"xG;\"\"! \"#5" }{TEXT -1 109 " that is used to specify the domain for plotting. This is the notation used by Maple to specify an interval. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "plot(f(x), x=0..10);" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 235 "\nTo plot two or more functions (or expressions) \+ on a graph simultaneously, braces \"\{\}\" or square brackets \"[]\" \+ are used to indicate the set of functions we wish to plot. We can als o add a title, axis labels, and different linetypes.\n" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 55 "plot(\{f(x),g(x)\},x=0..10, title=`Demonstrati on Graph`);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 210 "\nPlease note tha t the title is surrounded by ` marks. These are backwards apostrophes , and are found at the upper left-hand corner of the keyboard. They i ndicate the beginning and end of the title \"string.\"\n\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 189 "In addition to plotting functions, you c an also plot expressions. The following examples show how to plot a s imple expression and how to plot an expression that we gave a label to earlier." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "plot(x+sin(x), x=-2*Pi..2*Pi);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "plot(ex3 ,x=-3..3,y=-50..50);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 775 "For thre e-dimensional graphs, the plot3d command is used. The syntax is the s ame as the plot command, except that the equation must be defined in t erms of x and y. Also, the x and y ranges must be specified separatel y.\n\nFor example, to plot the three-dimensional expression z=x*y (the well-known \"saddle plot\") we would first define the function, and t hen plot it from -10 to 10 using the plot3d command. \n\nThe 3D plot \+ window has several nice features. It can rotate the surface, change t he color and contours, and display axes in various ways. To rotate th e surface, click the left mouse button and move the mouse until the \" graph box\" is in the desired orientation. The graph can be regenerat ed by clicking the Replot button, labeled R, in the context bar. Try it!\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "z:=x*y;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "plot3d(z,x=-10..10, y=-10..10);" }}}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 26 "Solving equations in Maple" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 202 "Maple also has commands for solvi ng equations. The main ones we will use are solve, which tries to solv e equations analytically and fsolve, which provides a numerical soluti on based on Newton's method. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 56 "The basic syntax for the solve (and fsolv e) commands is " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 27 "solve( equation, variable);" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 146 "where equation is the equation to be solved, and variable is the variable to solve for. Here is a simpl e example of solving a quadratic equation. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "solve(x^2+3*x+2 = 0, x);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 103 "The solve command can also be used with the expression s we labeled above, as in the following examples." }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 4 "ex3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "solve(ex1 = 0, x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "solve(ex3=0,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 542 "Unfortunatel y, many equations cannot be solved analytically. For example, we can u se the quadratic formula to find the roots of any quadratic polynomia l. There also exist formulas for finding roots of cubic and quartic (f ourth order) equations, but they are so complicated that they are hard ly ever used. However, it can be proven that there is no general formu la for the roots of a fifth or higher order polynomial. Once we get a way from polynomial equations, the situation is even worse. For examp le, even the relatively simple equation " }{XPPEDIT 18 0 "sin(x) = x/2 " "/-%$sinG6#%\"xG*&F&\"\"\"\"\"#!\"\"" }{TEXT -1 28 " has no analytic al solution." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 292 "If an equation cannot be solved analytically, then the only po ssibility is to solve it numerically. In Maple, the command to use is \+ fsolve. The syntax for fsolve is very similar to that of solve. Here i s a very simple example. Note that the result is a decimal approximati on and is not exact." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "fso lve(sin(x) = x/2,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 146 "This ans wer is correct in the sense that the number given satisfies the equati on, but it is not complete. To see why, we plot the two expressions " }{XPPEDIT 18 0 "sin(x)" "-%$sinG6#%\"xG" }{TEXT -1 5 " and " } {XPPEDIT 18 0 "x/2" "*&%\"xG\"\"\"\"\"#!\"\"" }{TEXT -1 19 " on the sa me graph." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "plot([sin(x),x /2],x=-3..3);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 86 "Note that there \+ are three intersections, so there are three solutions to the equation \+ " }{XPPEDIT 18 0 "sin(x) = x/2" "/-%$sinG6#%\"xG*&F&\"\"\"\"\"#!\"\"" }{TEXT -1 116 ". The fsolve command we used above only gave one of the m. To get the other solutions, we need to specify a range of " } {XPPEDIT 18 0 "x" "I\"xG6\"" }{TEXT -1 255 " values in the fsolve comm and that tells Maple where to look. That is, we use a third argument \+ in the fsolve command to specify an interval containing the desired so lution. For example, here is a command that is appropriate for finding the leftmost root." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "fsol ve(sin(x) = x/2,x=-2..-1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 37 "The re is nothing special about using " }{XPPEDIT 18 0 "x=-2..-1" "/%\"xG; ,$\"\"#!\"\",$\"\"\"F'" }{TEXT -1 62 " for the interval. Any interval \+ that contains the solution at " }{XPPEDIT 18 0 "x=1.895494267\031" "I( UNKNOWNG6\"" }{TEXT -1 102 " would work, as long as it didn't contain \+ any of the other solutions. Here are some further examples." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "fsolve(sin(x) = x/2,x=1..2); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "fsolve(sin(x) = x/2,x=- 1..1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "fsolve(sin(x) = x /2,x=1.5..2.0);" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "3" 0 }{VIEWOPTS 1 1 0 1 1 1803 }