(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 26199, 1119]*) (*NotebookOutlinePosition[ 27304, 1156]*) (* CellTagsIndexPosition[ 27260, 1152]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{Cell[TextData["Derivatives"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "This notebook gives a brief explanation of how to use ", StyleBox["Mathematica", FontSlant->"Italic"], " to take derivatives and to apply the chain rule properly. See the ", StyleBox["Mathematica", FontSlant->"Italic"], " book for more details." }], "Text", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["Ordinary Derivatives"], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["If a function has been defined, say"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["f[x_] = x^3 - x^2"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ -x^2 + x^3\ \>", "\<\ 2 3 -x + x\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[ "then its derivative can be easily calculated using the prime (') notation:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["f'[x]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ -2*x + 3*x^2\ \>", "\<\ 2 -2 x + 3 x\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ "The built in function ", StyleBox["D[]", FontFamily->"Courier", FontWeight->"Bold"], " also calculates the derivative" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[f[x], x] "], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ -2*x + 3*x^2\ \>", "\<\ 2 -2 x + 3 x\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ "With the function ", StyleBox["D[]", FontFamily->"Courier", FontWeight->"Bold"], ", the variable must be given as the second argument. This function also \ works on expressions, for example" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[x^3 - x^2, x]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ -2*x + 3*x^2\ \>", "\<\ 2 -2 x + 3 x\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData["or"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["y = x^3 - x^2"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ -x^2 + x^3\ \>", "\<\ 2 3 -x + x\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["D[y,x]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ -2*x + 3*x^2\ \>", "\<\ 2 -2 x + 3 x\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]]}, Open]], Cell[CellGroupData[{Cell[TextData["Partial Derivatives"], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "The function ", StyleBox["D[]", FontFamily->"Courier", FontWeight->"Bold"], " assumes that every variable except the one given as the second argument \ is a constant. Consequently, ", StyleBox["D[]", FontFamily->"Courier", FontWeight->"Bold"], " can be used to calculate partial derivatives. " }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Clear[y]"], "Input", AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["f[x_,y_] = x^3 y^2 - y"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ -y + x^3*y^2\ \>", "\<\ 3 2 -y + x y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ "The partial derivative of ", StyleBox["f[x,y]", FontFamily->"Courier", FontWeight->"Bold"], " with respect to ", StyleBox["x", FontFamily->"Courier", FontWeight->"Bold"], ":" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[f[x,y], x]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 3*x^2*y^2\ \>", "\<\ 2 2 3 x y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ "The partial derivative of ", StyleBox["f[x,y]", FontFamily->"Courier", FontWeight->"Bold"], " with respect to ", StyleBox["y", FontFamily->"Courier", FontWeight->"Bold"], ":" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[f[x,y], y]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ -1 + 2*x^3*y\ \>", "\<\ 3 -1 + 2 x y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ "As usual,", StyleBox[" D[]", FontFamily->"Courier", FontWeight->"Bold"], " works with expressions:" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[x^3y^2 - y, x]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 3*x^2*y^2\ \>", "\<\ 2 2 3 x y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["D[x^3y^2 - y, y]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ -1 + 2*x^3*y\ \>", "\<\ 3 -1 + 2 x y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["z = x^3y^2 - y"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ -y + x^3*y^2\ \>", "\<\ 3 2 -y + x y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["D[z,x]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 3*x^2*y^2\ \>", "\<\ 2 2 3 x y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["D[z,y]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ -1 + 2*x^3*y\ \>", "\<\ 3 -1 + 2 x y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]]}, Open]], Cell[CellGroupData[{Cell[TextData["Higher Order Derivatives"], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "To compute higher order derivatives, just give the desired variables after \ the function:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["z = x^3y^2 - y"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ -y + x^3*y^2\ \>", "\<\ 3 2 -y + x y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ "Second partial derivative with respect to ", StyleBox["x", FontFamily->"Courier", FontWeight->"Bold"], ":" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[z, x,x]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 6*x*y^2\ \>", "\<\ 2 6 x y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ "Mixed partial derivatives with respect to ", StyleBox["x", FontFamily->"Courier", FontWeight->"Bold"], " and ", StyleBox["y", FontFamily->"Courier", FontWeight->"Bold"], ":" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[z, x,y]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 6*x^2*y\ \>", "\<\ 2 6 x y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["D[z, y,x]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 6*x^2*y\ \>", "\<\ 2 6 x y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[ "Repeated variables can abreviated with a list. For example,"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[z, x,x,x]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 6*y^2\ \>", "\<\ 2 6 y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData["could be entered as"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[z, {x,3}]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 6*y^2\ \>", "\<\ 2 6 y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ "Such abbreviations can be combined. For example, 3 partial derivatives \ with respect to ", StyleBox["x", FontFamily->"Courier", FontWeight->"Bold"], " and 2 with respect to ", StyleBox["y", FontFamily->"Courier", FontWeight->"Bold"], " could be computed with:" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[z, {x,3}, {y,2}]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 12\ \>", "\<\ 12\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]]}, Open]], Cell[CellGroupData[{Cell[TextData["Chain Rule"], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "The function ", StyleBox["D[]", FontFamily->"Courier", FontWeight->"Bold"], " will automatically apply the chain rule properly if the dependencies \ between various variables are explicitly given." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Clear[x,y]"], "Input", AspectRatioFixed->True], Cell[TextData["f[x_,y_] = x^2 y + y^3;"], "Input", AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[f[x[t],y[t]], t]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 3*x[t]^2*y[t]^2*Derivative[1][x][t] - Derivative[1][y][t] + 2*x[t]^3*y[t]*Derivative[1][y][t]\ \>", "\<\ 2 2 3 3 x[t] y[t] x'[t] - y'[t] + 2 x[t] y[t] y'[t]\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ "Notice that ", StyleBox["x[t]", FontFamily->"Courier", FontWeight->"Bold"], " and ", StyleBox["y[t]", FontFamily->"Courier", FontWeight->"Bold"], " were used to indicate that they depend on ", StyleBox["t", FontFamily->"Courier", FontWeight->"Bold"], ". If just ", StyleBox["x", FontFamily->"Courier", FontWeight->"Bold"], " and ", StyleBox["y", FontFamily->"Courier", FontWeight->"Bold"], " had been used, then ", StyleBox["D[]", FontFamily->"Courier", FontWeight->"Bold"], " would assume they were independent of ", StyleBox["t", FontFamily->"Courier", FontWeight->"Bold"], " and give ", StyleBox["0", FontFamily->"Courier", FontWeight->"Bold"], ":" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[f[x,y], t]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 0\ \>", "\<\ 0\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ "If ", StyleBox["x[t]", FontFamily->"Courier", FontWeight->"Bold"], " and ", StyleBox["y[t]", FontFamily->"Courier", FontWeight->"Bold"], " have been defined then these definitions will, of course, be used by ", StyleBox["Mathematica", FontSlant->"Italic"], " to complete the expression for the derivative." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["x[t_] = E^t; y[t_] = t^3 + 1;"], "Input", AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[f[x[t],y[t]], t]"], "Input", AspectRatioFixed->True], Cell[OutputFormData[ "\<\ -3*t^2 + 6*E^(3*t)*t^2*(1 + t^3) + 3*E^(3*t)*(1 + t^3)^2\ \>", "\<\ 2 3 t 2 3 3 t 3 2 -3 t + 6 E t (1 + t ) + 3 E (1 + t )\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[StyleBox["Example 2:", FontWeight->"Bold"]], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Clear[x,y]"], "Input", AspectRatioFixed->True], Cell[TextData["f[x_,y_] = x / y;"], "Input", AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[f[x[u,v],y[u,v]], u]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ Derivative[1, 0][x][u, v]/y[u, v] - (x[u, v]*Derivative[1, 0][y][u, v])/y[u, v]^2\ \>", "\<\ (1,0) (1,0) x [u, v] x[u, v] y [u, v] ------------ - -------------------- y[u, v] 2 y[u, v]\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["D[f[x[u,v],y[u,v]], v]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ Derivative[0, 1][x][u, v]/y[u, v] - (x[u, v]*Derivative[0, 1][y][u, v])/y[u, v]^2\ \>", "\<\ (0,1) (0,1) x [u, v] x[u, v] y [u, v] ------------ - -------------------- y[u, v] 2 y[u, v]\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ "Notice that the partial derivatives of ", StyleBox["x", FontFamily->"Courier", FontWeight->"Bold"], " and ", StyleBox["y", FontFamily->"Courier", FontWeight->"Bold"], " with respect to ", StyleBox["u", FontFamily->"Courier", FontWeight->"Bold"], ", the first variable, are indicated by the exponent ", StyleBox["(1,0)", FontFamily->"Courier", FontWeight->"Bold"], ". The partial derivatives of ", StyleBox["x", FontFamily->"Courier", FontWeight->"Bold"], " and ", StyleBox["y", FontFamily->"Courier", FontWeight->"Bold"], " with respect to ", StyleBox["v", FontFamily->"Courier", FontWeight->"Bold"], ", the second variable, are indicated by the exponent ", StyleBox["(0,1)", FontFamily->"Courier", FontWeight->"Bold"], ". Again, if ", StyleBox["x[u,v]", FontFamily->"Courier", FontWeight->"Bold"], " and ", StyleBox["y[u,v]", FontFamily->"Courier", FontWeight->"Bold"], " are defined, ", StyleBox["Mathematica", FontSlant->"Italic"], " will use the definitions to complete the expression for the derivative." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["x[u_,v_] = u v; y[u_,v] = u^2 - v^2;"], "Input", AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[f[x[u,v],y[u,v]], u]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ (-2*u^2*v)/(u^2 - v^2)^2 + v/(u^2 - v^2)\ \>", "\<\ 2 -2 u v v ---------- + ------- 2 2 2 2 2 (u - v ) u - v\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["D[f[x[u,v],y[u,v]], v]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ (2*u*v^2)/(u^2 - v^2)^2 + u/(u^2 - v^2)\ \>", "\<\ 2 2 u v u ---------- + ------- 2 2 2 2 2 (u - v ) u - v\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ StyleBox["Example 3:", FontWeight->"Bold"], "" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "The chain rule is important in situations where there is incomplete \ information about how the variables depend on each other so that the partial \ derivatives cannot be computed by substituting expressions for the variables \ into the function as in the previous example. "], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Let"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Clear[x,y]"], "Input", AspectRatioFixed->True], Cell[TextData["f[x_,y_] = x^2 Cos[x + y];"], "Input", AspectRatioFixed->True], Cell[TextData[{ "Suppose ", StyleBox["x", FontFamily->"Courier", FontWeight->"Bold"], " and ", StyleBox["y", FontFamily->"Courier", FontWeight->"Bold"], " are (unknown) functions of ", StyleBox["u", FontFamily->"Courier", FontWeight->"Bold"], " and ", StyleBox["v", FontFamily->"Courier", FontWeight->"Bold"], ", ", StyleBox["x[u,v]", FontFamily->"Courier", FontWeight->"Bold"], ", ", StyleBox["y[u,v]", FontFamily->"Courier", FontWeight->"Bold"], ", and ", StyleBox["x[0,0]=Pi", FontFamily->"Courier", FontWeight->"Bold"], ", ", StyleBox["y[0,0]=0", FontFamily->"Courier", FontWeight->"Bold"], ". Suppose that the partial derivatives are known at this point: \n\n", StyleBox[ " D[x[u,v],u]-> 3; D[x[u,v],v]->-1;\n D[y[u,v],u]->-2; \ D[y[u,v],v]->-2;\n\n", FontFamily->"Courier", FontWeight->"Bold"], "Then the partial derivatives of ", StyleBox["f", FontFamily->"Courier", FontWeight->"Bold"], " with respect to ", StyleBox["u", FontFamily->"Courier", FontWeight->"Bold"], " and ", StyleBox["v", FontFamily->"Courier", FontWeight->"Bold"], " at the point ", StyleBox["{u,v}=={0,0}", FontFamily->"Courier", FontWeight->"Bold"], " can be computed as follows:" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["D[f[x[u,v],y[u,v]], u]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 2*Cos[x[u, v] + y[u, v]]*x[u, v]* Derivative[1, 0][x][u, v] - Sin[x[u, v] + y[u, v]]*x[u, v]^2* (Derivative[1, 0][x][u, v] + Derivative[1, 0][y][u, v])\ \>", "\<\ (1,0) 2 Cos[x[u, v] + y[u, v]] x[u, v] x [u, v] - 2 Sin[x[u, v] + y[u, v]] x[u, v] (1,0) (1,0) (x [u, v] + y [u, v])\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData["Plug into this expression:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData[ "% /. {x[u,v]->Pi, y[u,v]->0,\n\t\tD[x[u,v],u]->3, D[y[u,v],u]->-2}"], "Input",\ AspectRatioFixed->True], Cell[OutputFormData["\<\ -6*Pi\ \>", "\<\ -6 Pi\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["D[f[x[u,v],y[u,v]], v]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 2*Cos[x[u, v] + y[u, v]]*x[u, v]* Derivative[0, 1][x][u, v] - Sin[x[u, v] + y[u, v]]*x[u, v]^2* (Derivative[0, 1][x][u, v] + Derivative[0, 1][y][u, v])\ \>", "\<\ (0,1) 2 Cos[x[u, v] + y[u, v]] x[u, v] x [u, v] - 2 Sin[x[u, v] + y[u, v]] x[u, v] (0,1) (0,1) (x [u, v] + y [u, v])\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData["Plug into this expression:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData[ "% /. {x[u,v]->Pi, y[u,v]->0,\n\t\tD[x[u,v],v]->-1, D[y[u,v],v]->-2}"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ 2*Pi\ \>", "\<\ 2 Pi\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]]}, Open]], Cell[CellGroupData[{Cell[TextData["Total Derivatives"], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "The function ", StyleBox["Dt[]", FontFamily->"Courier", FontWeight->"Bold"], " computes the \"total derivative\" of a function. ", StyleBox["Dt[]", FontFamily->"Courier", FontWeight->"Bold"], " treats every variable as if it depended on every other and applies the \ chain rule accordingly. Explicit dependencies between the variables need not \ be given in expressions. On the other hand, the variables that ", StyleBox["are", FontWeight->"Bold"], " independent of other variables have to be declared with the option ", StyleBox["Constants->{}", FontFamily->"Courier", FontWeight->"Bold"], ".\n\n", StyleBox["Example:", FontWeight->"Bold"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["z = x / y;"], "Input", AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["Dt[z, u]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ Dt[x, u]/y - (x*Dt[y, u])/y^2\ \>", "\<\ Dt[x, u] x Dt[y, u] -------- - ---------- y 2 y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["Dt[z, v]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ Dt[x, v]/y - (x*Dt[y, v])/y^2\ \>", "\<\ Dt[x, v] x Dt[y, v] -------- - ---------- y 2 y\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData["x = u v; y = u^2 - v^2;"], "Input", AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["Dt[z, u]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ v/(u^2 - v^2) + (u*Dt[v, u])/(u^2 - v^2) - (u*v*(2*u - 2*v*Dt[v, u]))/(u^2 - v^2)^2\ \>", "\<\ v u Dt[v, u] u v (2 u - 2 v Dt[v, u]) ------- + ---------- - ------------------------ 2 2 2 2 2 2 2 u - v u - v (u - v )\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["Dt[z, v]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ u/(u^2 - v^2) + (v*Dt[u, v])/(u^2 - v^2) - (u*v*(-2*v + 2*u*Dt[u, v]))/(u^2 - v^2)^2\ \>", "\<\ u v Dt[u, v] u v (-2 v + 2 u Dt[u, v]) ------- + ---------- - ------------------------- 2 2 2 2 2 2 2 u - v u - v (u - v )\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ "When computing ", StyleBox["Dt[]", FontFamily->"Courier", FontWeight->"Bold"], " ", StyleBox["Mathematica", FontSlant->"Italic"], " assumes that ", StyleBox["u", FontFamily->"Courier", FontWeight->"Bold"], " might depend on ", StyleBox["v", FontFamily->"Courier", FontWeight->"Bold"], " and vice versa. To make ", StyleBox["v", FontFamily->"Courier", FontWeight->"Bold"], " independent of ", StyleBox["u", FontFamily->"Courier", FontWeight->"Bold"], " in this computation, declare ", StyleBox["v", FontFamily->"Courier", FontWeight->"Bold"], " to be constant with respect to ", StyleBox["u", FontFamily->"Courier", FontWeight->"Bold"], " (and vice versa):" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["Dt[z, u, Constants->{v}]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ (-2*u^2*v)/(u^2 - v^2)^2 + v/(u^2 - v^2)\ \>", "\<\ 2 -2 u v v ---------- + ------- 2 2 2 2 2 (u - v ) u - v\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["Dt[z, v, Constants->{u}]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ (2*u*v^2)/(u^2 - v^2)^2 + u/(u^2 - v^2)\ \>", "\<\ 2 2 u v u ---------- + ------- 2 2 2 2 2 (u - v ) u - v\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[{ "Finally, since ", StyleBox["Mathematica", FontSlant->"Italic"], " automatically substitutes the expressions for ", StyleBox["x", FontFamily->"Courier", FontWeight->"Bold"], " an ", StyleBox["y", FontFamily->"Courier", FontWeight->"Bold"], " into ", StyleBox["z", FontFamily->"Courier", FontWeight->"Bold"], ", the chain rule can be avoided altogether in computing these partial \ derivatives:" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["z"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ (u*v)/(u^2 - v^2)\ \>", "\<\ u v ------- 2 2 u - v\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["D[z,u]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ (-2*u^2*v)/(u^2 - v^2)^2 + v/(u^2 - v^2)\ \>", "\<\ 2 -2 u v v ---------- + ------- 2 2 2 2 2 (u - v ) u - v\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["D[z,v]"], "Input", AspectRatioFixed->True], Cell[OutputFormData["\<\ (2*u*v^2)/(u^2 - v^2)^2 + u/(u^2 - v^2)\ \>", "\<\ 2 2 u v u ---------- + ------- 2 2 2 2 2 (u - v ) u - v\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]]}, Open]] }, FrontEndVersion->"Macintosh 3.0", ScreenRectangle->{{0, 832}, {0, 604}}, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{520, 509}, WindowMargins->{{12, Automatic}, {Automatic, 31}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, 128}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, CharacterEncoding->"MacintoshAutomaticEncoding", MacintoshSystemPageSetup->"\<\ 00<0001804P000000]P2:?oQon82n@960dL5:0?l0080001804P000000]P2:001 0000I00000400`<300000BL?00400@00000000000000060801T1T00000000000 00000000000000000000000000000000\>" ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1731, 51, 88, 2, 70, "Section"], Cell[1822, 55, 343, 10, 70, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[2197, 67, 100, 2, 70, "Subsection"], Cell[2300, 71, 109, 2, 70, "Text"], Cell[CellGroupData[{ Cell[2432, 75, 70, 1, 70, "Input"], Cell[2505, 78, 128, 7, 70, "Output"] }, Open ]], Cell[2645, 87, 152, 4, 70, "Text"], Cell[CellGroupData[{ Cell[2820, 93, 58, 1, 70, "Input"], Cell[2881, 96, 136, 7, 70, "Output"] }, Open ]], Cell[3029, 105, 209, 8, 70, "Text"], Cell[CellGroupData[{ Cell[3261, 115, 64, 1, 70, "Input"], Cell[3328, 118, 136, 7, 70, "Output"] }, Open ]], Cell[3476, 127, 281, 9, 70, "Text"], Cell[CellGroupData[{ Cell[3780, 138, 68, 1, 70, "Input"], Cell[3851, 141, 136, 7, 70, "Output"] }, Open ]], Cell[3999, 150, 76, 2, 70, "Text"], Cell[CellGroupData[{ Cell[4098, 154, 66, 1, 70, "Input"], Cell[4167, 157, 128, 7, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[4327, 166, 59, 1, 70, "Input"], Cell[4389, 169, 136, 7, 70, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[4566, 178, 99, 2, 70, "Subsection"], Cell[4668, 182, 396, 13, 70, "Text"], Cell[5067, 197, 61, 1, 70, "Input"], Cell[CellGroupData[{ Cell[5151, 200, 75, 1, 70, "Input"], Cell[5229, 203, 134, 7, 70, "Output"] }, Open ]], Cell[5375, 212, 277, 12, 70, "Text"], Cell[CellGroupData[{ Cell[5675, 226, 65, 1, 70, "Input"], Cell[5743, 229, 125, 7, 70, "Output"] }, Open ]], Cell[5880, 238, 277, 12, 70, "Text"], Cell[CellGroupData[{ Cell[6180, 252, 65, 1, 70, "Input"], Cell[6248, 255, 135, 7, 70, "Output"] }, Open ]], Cell[6395, 264, 190, 8, 70, "Text"], Cell[CellGroupData[{ Cell[6608, 274, 69, 1, 70, "Input"], Cell[6680, 277, 125, 7, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[6837, 286, 69, 1, 70, "Input"], Cell[6909, 289, 135, 7, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[7076, 298, 67, 1, 70, "Input"], Cell[7146, 301, 134, 7, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[7312, 310, 59, 1, 70, "Input"], Cell[7374, 313, 125, 7, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[7531, 322, 59, 1, 70, "Input"], Cell[7593, 325, 135, 7, 70, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[7769, 334, 104, 2, 70, "Subsection"], Cell[7876, 338, 165, 4, 70, "Text"], Cell[CellGroupData[{ Cell[8064, 344, 67, 1, 70, "Input"], Cell[8134, 347, 134, 7, 70, "Output"] }, Open ]], Cell[8280, 356, 197, 8, 70, "Text"], Cell[CellGroupData[{ Cell[8500, 366, 62, 1, 70, "Input"], Cell[8565, 369, 121, 7, 70, "Output"] }, Open ]], Cell[8698, 378, 276, 12, 70, "Text"], Cell[CellGroupData[{ Cell[8997, 392, 62, 1, 70, "Input"], Cell[9062, 395, 120, 7, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[9214, 404, 62, 1, 70, "Input"], Cell[9279, 407, 120, 7, 70, "Output"] }, Open ]], Cell[9411, 416, 134, 3, 70, "Text"], Cell[CellGroupData[{ Cell[9568, 421, 64, 1, 70, "Input"], Cell[9635, 424, 115, 7, 70, "Output"] }, Open ]], Cell[9762, 433, 93, 2, 70, "Text"], Cell[CellGroupData[{ Cell[9878, 437, 64, 1, 70, "Input"], Cell[9945, 440, 115, 7, 70, "Output"] }, Open ]], Cell[10072, 449, 364, 13, 70, "Text"], Cell[CellGroupData[{ Cell[10459, 464, 71, 1, 70, "Input"], Cell[10533, 467, 106, 6, 70, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[10680, 475, 90, 2, 70, "Subsection"], Cell[10773, 479, 288, 9, 70, "Text"], Cell[11064, 490, 63, 1, 70, "Input"], Cell[11130, 493, 76, 1, 70, "Input"], Cell[CellGroupData[{ Cell[11229, 496, 71, 1, 70, "Input"], Cell[11303, 499, 285, 9, 70, "Output"] }, Open ]], Cell[11600, 510, 826, 36, 70, "Text"], Cell[CellGroupData[{ Cell[12449, 548, 65, 1, 70, "Input"], Cell[12517, 551, 104, 6, 70, "Output"] }, Open ]], Cell[12633, 559, 418, 15, 70, "Text"], Cell[13054, 576, 82, 1, 70, "Input"], Cell[CellGroupData[{ Cell[13159, 579, 71, 1, 70, "Input"], Cell[13233, 582, 250, 9, 70, "Output"] }, Open ]], Cell[13495, 593, 116, 3, 70, "Text"], Cell[13614, 598, 63, 1, 70, "Input"], Cell[13680, 601, 70, 1, 70, "Input"], Cell[CellGroupData[{ Cell[13773, 604, 75, 1, 70, "Input"], Cell[13851, 607, 347, 12, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[14230, 621, 75, 1, 70, "Input"], Cell[14308, 624, 347, 12, 70, "Output"] }, Open ]], Cell[14667, 638, 1217, 47, 70, "Text"], Cell[15887, 687, 89, 1, 70, "Input"], Cell[CellGroupData[{ Cell[15999, 690, 75, 1, 70, "Input"], Cell[16077, 693, 229, 11, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[16338, 706, 75, 1, 70, "Input"], Cell[16416, 709, 230, 11, 70, "Output"] }, Open ]], Cell[16658, 722, 130, 6, 70, "Text"], Cell[16791, 730, 349, 6, 70, "Text"], Cell[17143, 738, 77, 2, 70, "Text"], Cell[17223, 742, 63, 1, 70, "Input"], Cell[17289, 745, 79, 1, 70, "Input"], Cell[17371, 748, 1384, 58, 70, "Text"], Cell[CellGroupData[{ Cell[18778, 808, 75, 1, 70, "Input"], Cell[18856, 811, 483, 17, 70, "Output"] }, Open ]], Cell[19351, 830, 100, 2, 70, "Text"], Cell[CellGroupData[{ Cell[19474, 834, 122, 3, 70, "Input"], Cell[19599, 839, 112, 6, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[19743, 847, 75, 1, 70, "Input"], Cell[19821, 850, 483, 17, 70, "Output"] }, Open ]], Cell[20316, 869, 100, 2, 70, "Text"], Cell[CellGroupData[{ Cell[20439, 873, 124, 3, 70, "Input"], Cell[20566, 878, 110, 6, 70, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[20717, 886, 97, 2, 70, "Subsection"], Cell[20817, 890, 770, 23, 70, "Text"], Cell[21590, 915, 63, 1, 70, "Input"], Cell[CellGroupData[{ Cell[21676, 918, 61, 1, 70, "Input"], Cell[21740, 921, 210, 10, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[21982, 933, 61, 1, 70, "Input"], Cell[22046, 936, 210, 10, 70, "Output"] }, Open ]], Cell[22268, 948, 76, 1, 70, "Input"], Cell[CellGroupData[{ Cell[22367, 951, 61, 1, 70, "Input"], Cell[22431, 954, 365, 11, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[22828, 967, 61, 1, 70, "Input"], Cell[22892, 970, 368, 11, 70, "Output"] }, Open ]], Cell[23272, 983, 828, 35, 70, "Text"], Cell[CellGroupData[{ Cell[24123, 1020, 77, 1, 70, "Input"], Cell[24203, 1023, 229, 11, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[24464, 1036, 77, 1, 70, "Input"], Cell[24544, 1039, 230, 11, 70, "Output"] }, Open ]], Cell[24786, 1052, 518, 20, 70, "Text"], Cell[CellGroupData[{ Cell[25327, 1074, 54, 1, 70, "Input"], Cell[25384, 1077, 147, 9, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[25563, 1088, 59, 1, 70, "Input"], Cell[25625, 1091, 229, 11, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[25886, 1104, 59, 1, 70, "Input"], Cell[25948, 1107, 230, 11, 70, "Output"] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)