{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 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 1 14 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 264 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 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 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 } {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 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT 256 20 "Derivatives in Maple" } }{PARA 256 "" 0 "" {TEXT 257 27 "last modified November 2009" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 10 "D and \+ diff" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 66 "There are two ways to take derivatives in maple: You can use the " }{TEXT 258 1 "D" }{TEXT -1 16 " command or the " }{TEXT 259 5 "diff " }{TEXT -1 99 "command. These commands behave quite differently, and we shall illustrate both for the example " }{XPPEDIT 18 0 "f(x) = 1/(1+x^2) ;" "6#/-%\"fG6#%\"xG*&\"\"\"F),&F)F)*$F'\"\"#F)!\"\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 278 16 "1. The Use of D" }{TEXT -1 1 "\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 260 1 "D" }{TEXT -1 60 " acts on functions and w e need to define the function first." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "f := x -> 1/(1+x^2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "Now taking derivatives is straightforward, just enter" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 5 "D(f);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "or, " } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "D(f)(x);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 198 "Note that D(f) returns a function, namely f ', while D (f)(x) yields f '(x). The difference is subtle, but there is one; it \+ is the difference between a function, namely f', and an expression, f' (x)." }{MPLTEXT 1 0 1 "\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 279 19 "2. \+ The Use of diff" }{TEXT -1 1 "\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 261 4 "diff" }{TEXT -1 66 " acts on expressions. We may enter the exp ression directly, as in" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "diff(1/( 1+x^2),x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 63 "or we may define th e expression first, and then use diff, as in" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "y := 1/(1+x^2);\ndiff(y,x);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 119 "and obtain the derivative, or we may take advantage of the fact that that the function f was already defined, and enter" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "diff(f(x),x);" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 102 "In all cases we have the same result (duh). Note that diff returns an expression, and not a function." }{MPLTEXT 1 0 1 "\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 280 10 "3. Warning" }{TEXT -1 2 ": " }{MPLTEXT 1 0 16 " DO NOT MIX!!!\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 33 "The following result in nonsense:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "diff(f,x);\nD(y)(x);\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 272 19 "4. More Examples:\n" }{TEXT -1 36 "Find the derivative \+ of the function " }{XPPEDIT 18 0 "f(x) = x^2*exp(-x);" "6#/-%\"fG6#%\" xG*&F'\"\"#-%$expG6#,$F'!\"\"\"\"\"" }{TEXT -1 4 " ." }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 22 "f := x -> x^2*exp(-x);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 8 "D(f)(x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "Find the derivative of " }{XPPEDIT 18 0 "f(x) = sin^2;" "6#/-%\"f G6#%\"xG*$%$sinG\"\"#" }{TEXT -1 6 "(x) ." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "f := x -> sin(x)^2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "D(f)(x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 24 "Higher Order Derivatives" } }{EXCHG {PARA 0 "" 0 "" {TEXT -1 39 "Let's go back to the original fun ction " }{XPPEDIT 18 0 "f(x) = 1/(1+x^2);" "6#/-%\"fG6#%\"xG*&\"\"\"F) ,&F)F)*$F'\"\"#F)!\"\"" }{TEXT -1 3 " ." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "restart;\nf := x -> 1/(1+x^2);\ny := f(x);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 88 "The second, third or fourth deriva tives of f can be computed with a modification of the " }{TEXT 262 2 " D " }{TEXT -1 8 "command:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "(D@@2) (f)(x);\n(D@@3)(f)(x);\n(D@@4)(f)(x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 31 "Let's simplify the last result:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 217 "There is no limit as to what order derivative you can compute in this way. Beware, that the results could be messy, or it could take maple a long time to compute the derivative. Here is the 12-th derivative \+ of f(x):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "(D@@12)(f)(x);\nsimplif y(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 55 "You can also compute hig her order derivatives with the " }{TEXT 269 5 "diff " }{TEXT -1 74 "co mmand. Just enter x repeatedly (one x for each order of the derivativ e)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "diff(y,x,x);\ndiff(y,x,x,x); \ndiff(y,x,x,x,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 40 "and of cour se the results are identical." }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 21 "Der ivative at a Point" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "With the " } {TEXT 263 1 "D" }{TEXT -1 75 " command it is quite easy to evaluate a \+ derivative at a specified point. \n" }{TEXT 270 9 "Example: " }{TEXT -1 17 " Find f'(3) when " }{XPPEDIT 18 0 "f(x) = x^4*exp(-x);" "6#/-% \"fG6#%\"xG*&F'\"\"%-%$expG6#,$F'!\"\"\"\"\"" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 157 "f := x -> x^4*exp(-x); # define f first\nD(f)(3); \+ # desired value of the derivative\nD(f)(3.0); \+ # the same in decimal representation" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 11 "When using " }{TEXT 264 4 "diff" }{TEXT -1 22 ", you need to use the " }{TEXT 265 4 "subs" }{TEXT -1 88 " command, that is, you need to substitute x=3 into the expression for the derivative. \n" } {TEXT 271 8 "Example:" }{TEXT -1 18 " Find f'(3) when " }{XPPEDIT 18 0 "f(x) = x^4*exp(-x);" "6#/-%\"fG6#%\"xG*&F'\"\"%-%$expG6#,$F'!\"\"\" \"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 139 "y := x^4*exp(-x); \+ # define y\ndy := diff(y,x); # take derivative and define d y=y'\nsubs( x=3, dy); # substitute x=3 into y'" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 273 13 "More Examples" }{TEXT -1 1 ":" }}{PARA 0 "" 0 "" {TEXT -1 53 "Evaluate the 62nd derivative of the sine functi on at " }{XPPEDIT 18 0 "Pi/2;" "6#*&%#PiG\"\"\"\"\"#!\"\"" }{TEXT -1 4 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "f := x -> sin(x);\n(D@@6 2)(f)(Pi/2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 20 "Compute f''(0) fo r " }{XPPEDIT 18 0 "f(x) = ln(2*x+1);" "6#/-%\"fG6#%\"xG-%#lnG6#,&*& \"\"#\"\"\"F'F.F.F.F." }{TEXT -1 3 " ." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "f := x -> ln(2*x+1);\n(D@@2)(f)(0);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 27 "Compute the derivative of " }{XPPEDIT 18 0 "f(x) = exp (-x)*(sin(x)-cos(x));" "6#/-%\"fG6#%\"xG*&-%$expG6#,$F'!\"\"\"\"\",&-% $sinG6#F'F.-%$cosG6#F'F-F." }{TEXT -1 3 " ." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "f := x -> exp(-x)*(sin(x)-cos(x));\nD(f)(x);\nsimplif y(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 8 " Examples" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 48 "A Function and its De rivative in a Common Figure" }}{EXCHG {PARA 0 "" 0 "" {TEXT 266 8 "Pro blem:" }{TEXT -1 23 " Sketch the graph of " }{XPPEDIT 18 0 "f(x) = s in(x-sin(x));" "6#/-%\"fG6#%\"xG-%$sinG6#,&F'\"\"\"-F)6#F'!\"\"" } {TEXT -1 40 " and its derivative in a common figure." }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "f := x -> sin(x-sin(x)):\nf(x); \+ # review the definition of f" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "plot( [f,D(f)], -2..8,color=[red,blue], thickness=[2,1]);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 159 "The graph of the function is the \+ thick curve in red, its derivative is shown in blue. Note that the bl ue curve is an indicator of the slopes of the red curve." }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 54 "View a Function with a Tangent Line in a \+ Common Figure" }}{EXCHG {PARA 0 "" 0 "" {TEXT 267 8 "Problem:" }{TEXT -1 22 " Graph the function " }{XPPEDIT 18 0 "f(x) = sqrt(x);" "6#/-% \"fG6#%\"xG-%%sqrtG6#F'" }{TEXT -1 103 " along with its tangent line \+ taken at the point where x=4. What is the equation of the tangent li ne?" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 30 "f := x -> sqrt(x); # define f" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "a := 4; # select the po int" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "y := f(a) + D(f)(a)* (x-a); # equation of tangent line" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "plot( [f(x),y] , x=0..8, color=[blue, red], thickness =[2,1]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 46 "Find Horizontal Tangent Lines (Solve f'( x)=0)" }}{EXCHG {PARA 0 "" 0 "" {TEXT 268 8 "Problem:" }{TEXT -1 35 " \+ Find all points in the interval " }{XPPEDIT 18 0 "[0, 2*Pi];" "6#7$ \"\"!*&\"\"#\"\"\"%#PiGF'" }{TEXT -1 25 " for which the graph of " } {XPPEDIT 18 0 "f(x) = sin(x-sin(x));" "6#/-%\"fG6#%\"xG-%$sinG6#,&F'\" \"\"-F)6#F'!\"\"" }{TEXT -1 34 " has a horizontal tangent line. " }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 88 "f := x -> sin(x-sin(x)): # define the function\nf( x); # review the definition of f(x)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "solve( D(f)(x) = 0, x); # set derivative to zero" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 81 "One solution is located at zero . Let's look at the graph to find more solutions." }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 19 "plot( f , 0..2*Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 84 "It appears that the derivative at the right endpoint is z ero as well. Confirmation:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "D(f) (2*Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 109 "The remaining two hor izontal tangents occur when the the function is either +1 or -1. f(x) = 1 occurs when " }{XPPEDIT 18 0 "x-sin(x) = Pi/2;" "6#/,&%\"xG\"\" \"-%$sinG6#F%!\"\"*&%#PiGF&\"\"#F*" }{TEXT -1 11 " , since " } {XPPEDIT 18 0 "sin(Pi/2) = 1;" "6#/-%$sinG6#*&%#PiG\"\"\"\"\"#!\"\"F) " }{TEXT -1 45 " . Let's try to find this point in maple: " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "solve( x - sin(x) = Pi/2, x) ;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 63 "Malpe can't do it symbolical ly, let's try a numerical solution." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "fsolve( x - sin(x) = Pi/2, x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 65 "and indeed, at this point we have a zero derivative (practicall y)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "D(f)(%);" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 49 "We can also go directly for numerical solution. \+ " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "fsolve(D(f)(x)=0,x);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 60 " The graph indicates that, aside f rom the solution at 0 and " }{XPPEDIT 18 0 "2*Pi;" "6#*&\"\"#\"\"\"%#P iGF%" }{TEXT -1 55 " , there should also be a horizontal tangent line \+ near " }{XPPEDIT 18 0 "x = 4;" "6#/%\"xG\"\"%" }{TEXT -1 34 " . Here is a more exact location" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "fsolve ( D(f)(x) =0,x=4);" }}}{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 24 "Implicit Differentiat ion" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 25 "Here we use the example " }{XPPEDIT 18 0 "x^3+y^3 = 9*x*y/2;" "6#/,&*$%\"xG\"\"$\"\"\"*$%\"yGF'F(**\"\"*F(F&F (F*F(\"\"#!\"\"" }{TEXT -1 155 " . Notice that the point (1,2) lies \+ on this curve, and we want to determine the slope of the curve at this point. To do so, we first define the equation" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "Eqn := x^3 + y^3 = 9*x*y/2;" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 137 "Let us first confirm that the point (1,2) really lies \+ on the curve. To do so, we substitute x=1 and y=2 into the equation, \+ and we obtain" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "subs(\{x=1,y=2\}, \+ Eqn);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 44 "The command for implicit differentiation is " } {TEXT 274 12 "implicitdiff" }{TEXT -1 231 ". You need to coomunicate t he equation, the dependent variable (usually y) and the independent va riable (usually x), and the syntax is implicitdiff( equation, depende nt variable, independent variable). In our example this becomes" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "implicitdiff(Eqn,y,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 120 "This result is y'. If we want the slop e at the specific point, we need to substitute the x and y values. Le t's do it:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "subs(\{x=1,y=2\},%); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 45 "Hence, the slope at the point (1,2) is 4/5. " }}{PARA 0 "" 0 "" {TEXT -1 203 "Let us elaborate on \+ the example a little more. First let's look at the curve which is def ined by the equation. Maple lets you graph equations without solving \+ for y first. The command for this task is " }{TEXT 275 12 "implicitpl ot" }{TEXT -1 40 ", and it requires that you activate the " }{TEXT 276 13 "plots package" }{TEXT -1 231 " first. With the regular plot c ommand you have to specify the expression and the range of input varib ale x, with implicitplot you need to specify tthe equation and the vie wing rectangle, that is, the range of x and the range of y." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "with(plots):\nimplicitplot( Eqn,x=-1..3,y =-1..3);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 226 "We obtain a better l ooking graph by incresing the number of points (set numpoint=2500). W e can also add the tangent line to the graph. Here are the details (u se the point slope for for the line without solving for y first: " } {XPPEDIT 18 0 "y-2 = 4/5*(x-1);" "6#/,&%\"yG\"\"\"\"\"#!\"\"*(\"\"%F& \"\"&F(,&%\"xGF&F&F(F&" }{TEXT -1 5 " ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 83 "implicitplot([Eqn,y-2=4/5*(x-1)],x=-1..3,y=-1..3, num points=2500,color=[red,blue]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 277 13 "More Examples" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 72 "Example: Find dy/dx by implicit differentiation for the c urve given by " }{XPPEDIT 18 0 "y = sin(x*y);" "6#/%\"yG-%$sinG6#*&% \"xG\"\"\"F$F*" }{TEXT -1 17 " , . " }{MPLTEXT 1 0 0 "" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "implicitdiff( y=sin(x*y), y ,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "Example: What is the slo pe of the curve given by " }{XPPEDIT 18 0 "sqrt(x)+sqrt(y) = 5;" "6#/, &-%%sqrtG6#%\"xG\"\"\"-F&6#%\"yGF)\"\"&" }{TEXT -1 21 " at the point \+ (9,4)?" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "implicitdiff( sqrt(x) + s qrt(y) = 5 , y, x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "subs (\{x=9,y=4\},%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplif y(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 110 "Example: We go back to the first example of the section and ask: At what point(s) does the \+ curve given by " }{XPPEDIT 18 0 "x^3+y^3 = 9*x*y/2;" "6#/,&*$%\"xG\" \"$\"\"\"*$%\"yGF'F(**\"\"*F(F&F(F*F(\"\"#!\"\"" }{TEXT -1 32 " have \+ horizontal tangent lines?" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 107 "E := \+ x^3 + y^3 = 9*x*y/2; # define the curve\nm := implicitdiff( E ,y,x ); # set m to be the derivative" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 106 "Now we are looking for points which lie on the curve and for whic h m=0 (to ask for m=0 is not sufficient)." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "solve(\{E, m=0\},\{x,y\});" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 54 "solve doesn't do it for us. Let's try fsolve instead. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "fsolve(\{E, m=0\},\{x,y\});" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 134 "The other point with a horizonta l tangent line is at the origin. This one is harder to detect, since \+ the curve self-intersects there." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{MARK "4" 0 } {VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }