{VERSION 3 0 "SUN SPARC SOLARIS" "3.0" } {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 1 0 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 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 266 "" 0 1 0 0 0 0 0 1 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 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 0 1 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 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 257 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 258 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 15 "Maple Project 8" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 379 " Since you are learning about conics, we might as well introduce the \" implicitplot\" command. When we plotted things on Maple, we usually h ad them in the form y = f(x). But what if you want to plot a curve, b ut you can't write it in the form y = f(x) (or don't want to)? In cas es like these we use the \"implicitplot\" command. For instance, supp ose we'd like to plot the curve " }{XPPEDIT 18 0 "2*y^2-3*x^2-4*y+12* x+8 = 0;" "6#/,,*&\"\"#\"\"\"*$%\"yG\"\"#F'F'*&\"\"$F'*$%\"xG\"\"#F'! \"\"*&\"\"%F'F)F'F0*&\"#7F'F.F'F'\"\")F'\"\"!" }{TEXT -1 195 ". We ca n't solve for y nicely here, so we'll use the \"implicitplot\" command , which we must first load up from the plots package. In this command we MUST specify a range for x AND a range for y." }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "implicitplot(2*y^2-3*x^2-4*y+12*x+8=0,x=-5..10,y=-5.. 6);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "It's a hyperbola! This is a nice and easy way to plot conics. " }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 153 "Now let's switch gears and consider \+ the \"solve\" command again. First off, \"solve\" can handle systems \+ of equations. Suppose we wish to solve the system " }}{PARA 257 "" 0 "" {TEXT -1 9 "a + b = 3" }}{PARA 258 "" 0 "" {TEXT -1 10 "a - b = -4 " }}{PARA 0 "" 0 "" {TEXT -1 87 "for a and b. We will assign the equa tions to variables and then use a \"solve\" command." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "eqn1:= a+b = 3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "eqn2:= a-b = -4;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "soln:=solve(\{eqn1,eqn2\},\{a,b\});" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 112 "In the above command, we labelled the solution s with the variable \"soln\", so we can refer to them if we want to:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "soln[2];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 219 "There is also a command called \"fsolve\". Th is command works like \"solve\", but it gives us solutions in decimal \+ format. It is also useful when \"solve\" will not give us an answer. \+ For example, let's find a solution to " }{XPPEDIT 18 0 "x^7+3*x^4+2*x -1 = 0;" "6#/,**$%\"xG\"\"(\"\"\"*&\"\"$F(*$F&\"\"%F(F(*&\"\"#F(F&F(F( \"\"\"!\"\"\"\"!" }{TEXT -1 20 " . Trying solve...." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "eqn:=x^7+3*x^4+2*x-1=0;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "solve(eqn,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 175 "Solve fails here. The reason why is that there is no fo rmula for finding roots of polynomials of degree 5 or more. But \"fso lve\" will find a pretty good APPROXIMATE solution:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "fsolve(eqn,x);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 121 "We can also tell \"fsolve\" where to look for solution s to an equation. For example, if we want to look for solutions to \+ " }{XPPEDIT 18 0 "x^2-1 = 0;" "6#/,&*$%\"xG\"\"#\"\"\"\"\"\"!\"\"\"\"! " }{TEXT -1 30 " in the interval [0,2], type:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 26 "fsolve(x^2-1 = 0 ,x=0..2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 9 "Problems:" }}{PARA 0 "" 0 "" {TEXT -1 40 " 1) Suppose we wish to graph the ellipse " }{XPPEDIT 18 0 "25*x^2+9*y^2 = 225;" "6#/,&*&\"#D\"\"\"*$%\"xG\"\"#F'F'*&\"\"*F'*$%\"yG\"\"#F'F'\" $D#" }{TEXT -1 5 " . " }{TEXT 264 32 "First do it with \"implicitplo t\"." }{TEXT -1 112 " What if we didn't have this command, but we sti ll wanted to do it quick and easy on Maple? Here's what we do:" } {TEXT 262 152 " first solve the equation for y and label the solutions . Now plot each of the 2 solutions simultaneously on the same plot (o ver the interval [-5,5]). " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 139 "2) Since we are fooling around with plots, her e is a quick and easy problem that once again shows us not to complete ly trust Maple plots. " }{TEXT 258 7 "Define " }{TEXT -1 4 "f(x)" } {TEXT 267 2 " =" }{TEXT -1 1 " " }{XPPEDIT 18 0 "x^3-x^2-x+1.001;" "6# ,**$%\"xG\"\"$\"\"\"*$F%\"\"#!\"\"F%F*$\"%,5!\"$F'" }{TEXT -1 3 " , " }{TEXT 266 9 "i.e. as a" }{TEXT -1 1 " " }{TEXT 268 9 "function." } {TEXT -1 2 " " }{TEXT 259 31 "Plot it on the interval [-2,2]." } {TEXT -1 93 " Looking at this plot, guess how many real solutions the re are to the equation f(x) = 0 . " }{TEXT 260 57 "Now solve the equ ation f(x) = 0 with the \"solve\" command." }{TEXT -1 154 " How many \+ REAL solutions are there (\"I\" signifies imaginary numbers)? Ah. So mething must be not quite right with our last plot. To see what happe ned, " }{TEXT 261 36 "plot f(x) on the interval [0.9,1.1]." }{TEXT -1 161 " The graph does not cross the x-axis at x=1! So we see our firs t Maple plot did not give us enough detail to actually let us see that f(1) is not equal to 0. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 169 "3) The command \"fsolve\" is an extrememly usefu l one, but it does have its limitations. Sometimes it will not give u s all solutions. For example, consider the equation " }{XPPEDIT 18 0 "x^2+1/x-1/(x^2) = 0;" "6#/,(*$%\"xG\"\"#\"\"\"*&\"\"\"F(F&!\"\"F(*&\" \"\"F(*$F&\"\"#F+F+\"\"!" }{TEXT -1 5 " . " }{TEXT 269 23 "Solve it \+ with \"fsolve\"." }{TEXT -1 26 " It gives one solution. " }{TEXT 256 187 "But now plot the left-hand-side of the equation from -2 to 2, and put the restriction \"y=-10..10\" in your plot command to restric t the y-values so we can see it nicely (it blows up at 0)." }{TEXT -1 48 " The plot tells us there is another solution. " }{TEXT 257 78 "N ow use a modification of \"fsolve\" to find the other solution to our \+ equation." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 40 "4) The general equation of a circle is " }{XPPEDIT 18 0 "x^2+y^2+ a*x+b*y = c;" "6#/,**$%\"xG\"\"#\"\"\"*$%\"yG\"\"#F(*&%\"aGF(F&F(F(*&% \"bGF(F*F(F(%\"cG" }{TEXT -1 4 " . " }{TEXT 263 100 "Find the equatio n of the circle that passes through the points (1,1), (3,-1), and (6,4 ) and plot it." }{TEXT -1 144 " (Hint: Assign the above equation to t he variable \"eq\". Since the circle contains the point (1,1), the fo llowing equation must be satisfied: " }{XPPEDIT 18 0 "1^2+1^2+a*1+b*1 = c;" "6#/,**$\"\"\"\"\"#\"\"\"*$\"\"\"\"\"#F(*&%\"aGF(\"\"\"F(F(*&% \"bGF(\"\"\"F(F(%\"cG" }{TEXT -1 344 " . To get this equation on Map le, use the command \"eq1:=subs(\{x=1,y=1\},eq);\" . Now you need 2 more equations before you can solve for a,b, and c, right? When you \+ solve for a,b, and c, label your solutions with the variable \"soln\" \+ as we did before. To substitute them into eq, you can use the command \"eq:=subs(soln,eq);\". Then plot eq.)" }}}}{MARK "18 4 2" 0 } {VIEWOPTS 1 1 0 1 1 1803 }