(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.2' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing 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[ 27779, 1176]*) (*NotebookOutlinePosition[ 28846, 1211]*) (* CellTagsIndexPosition[ 28802, 1207]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Differential Calculus", "Title", Evaluatable->False, TextAlignment->Center, AspectRatioFixed->True], Cell[TextData[{ "Sean Mauch\nsean@caltech.edu\n", ButtonBox["http://www.its.caltech.edu/~sean", ButtonData:>{ URL[ "http://www.its.caltech.edu/~sean"], None}, ButtonStyle->"Hyperlink"], "\n", "This work is distributed under the GNU FDL. See ", ButtonBox["license.nb ", ButtonData:>{"license.nb", None}, ButtonStyle->"Hyperlink"], "for details." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell[TextData[{ CounterBox["Section"], ". Partial Derivatives" }], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Clear[x, y, f]\)], "Input"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " can find partial derivatives of symbolic expressions. If you haven't \ heard the term partial derivative before, it's just a derivative where all \ the formal variables in an expression except the one that your \ differentiating with respect to are assumed to be constant. The mathematical \ form that you'll see in books for partial derivatives is ", Cell[BoxData[ \(TraditionalForm\`\[PartialD]\ f\/\[PartialD]\ x\)]], ". Partial derivatives in ", StyleBox["Mathematica", FontSlant->"Italic"], " are written:" }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(D[x\^2 + y\^2 + a\ Sin[x], x]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "To do the typeset version of the above,\n\t \[EscapeKey]pd\[EscapeKey] \ \[ControlKey]\[LeftModified]-\[RightModified] x \[ControlKey]\[LeftModified]\ \[SpaceKey]\[RightModified]\t\tto get ", Cell[BoxData[ \(TraditionalForm\`\[PartialD]\_x\)]], "\nand enclose the function to be differentiated in parentheses if it has \ more than one term." }], "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(\[PartialD]\_x\((x\^2 + y\^2 + a\ Sin[x])\)\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "Above, ", StyleBox["Mathematica", FontSlant->"Italic"], " assumed the variables ", Cell[BoxData[ \(TraditionalForm\`y\)]], " and ", Cell[BoxData[ \(TraditionalForm\`a\)]], " were constant. You can take second and third, etc. derivatives as \ follows:" }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(D[x\^2 + Sin[x], {x, 2}]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(\[PartialD]\_\(x, x\)\((x\^2 + Sin[x])\)\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(\[PartialD]\_{x, 2}\((x\^2 + Sin[x])\)\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(D[x\^2 + Sin[x], {x, 3}]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(\[PartialD]\_{x, 3}\((x\^2 + Sin[x])\)\)], "Input", AspectRatioFixed->True], Cell[TextData[{ " ", StyleBox["Mathematica", FontSlant->"Italic"], " also allows you to take partial derivatives with respect to several \ variables." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(D[x\^2\ y, x, y]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(\[PartialD]\_\(x, y\)\((x\^2\ y)\)\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(D[Sin[x\ y], {x, 2}, y]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(\[PartialD]\_\({x, 2}, y\)Sin[x\ y]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " can take derivatives of formal functions." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(\[PartialD]\_x f[x]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(\[PartialD]\_{x, 3}\((f[x]\ g[x])\)\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "Note that the first and second derivatives are denoted ", Cell[BoxData[ \(TraditionalForm\`\(f'\)[x]\)]], " and ", Cell[BoxData[ \(TraditionalForm\`\(\(f'\)'\)[x]\)]], ". Higher derivatives are denoted ", Cell[BoxData[ \(TraditionalForm\`\(f\^\((n)\)\)[x]\)]], "." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[TextData[{ "You can specify that a formal variable depends on ", Cell[BoxData[ \(TraditionalForm\`x\)]], " by either explicitly writing it as a function of ", Cell[BoxData[ \(TraditionalForm\`x\)]], " or by using the ", StyleBox["NonConstants", "Input"], " option." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(\[PartialD]\_x\((x\^2\ y[x])\)\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(D[x\^2\ y, x, NonConstants \[Rule] y]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(D[x\ y\ z, x, NonConstants \[Rule] {y, z}]\)], "Input", AspectRatioFixed->True], Cell[CellGroupData[{ Cell[TextData[{ "Exercise ", CounterBox["Subsubsection"] }], "Subsubsection"], Cell[TextData[{ "Verify that ", StyleBox["Mathematica", FontSlant->"Italic"], " knows the rules:" }], "Text"], Cell[BoxData[ FormBox[GridBox[{ {\(\(\[PartialD]\/\[PartialD]x\) \((u\ v)\) = u'\ v + u\ v', \), \(Product\ rule\)}, { \(\(\[PartialD]\/\[PartialD]x\) \((u\/v)\) = \(u'\ v - u\ v'\)\/v\^2, \), \(Quotient\ rule\)}, {\(\(\[PartialD]\/\[PartialD]x\) \((u\^a)\) = a\ u\^\(a - 1\)\ u', \), \(Power\ rule\)}, {\(\(\[PartialD]\/\[PartialD]x\) \((u(v(x)))\) = u' \((v)\)\ v', \), \(Chain\ rule\)} }], TraditionalForm]], "DisplayFormula"] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Exercise ", CounterBox["Subsubsection"] }], "Subsubsection"], Cell["Find the local maxima and minima of the polynomial:", "Text"], Cell[BoxData[ \(TraditionalForm \`\((x - 1)\) \((x - 2)\) \((x - 3)\) \((x - 4)\) \((x - 5)\)\)], "DisplayFormula"] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Exercise ", CounterBox["Subsubsection"] }], "Subsubsection"], Cell["Find the general solution of the differential equation", "Text"], Cell[BoxData[ \(TraditionalForm\`\(y'\)' - 3 y' + 2 y = 0\)], "DisplayFormula"], Cell[TextData[{ "by substituting ", Cell[BoxData[ \(TraditionalForm\`y = \[ExponentialE]\^\(\[Alpha]\ x\)\)]], " into the differential equation." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Exercise ", CounterBox["Subsubsection"] }], "Subsubsection"], Cell["Solve the differential equation,", "Text"], Cell[BoxData[ \(TraditionalForm\`\(\(y'\)'\)' - 6 \( y'\)' + 11 y' - 6 y = 0, \ \ \ \ y(0) = 1, \ \ \ \ y' \((0)\) = 2, \ \ \ \ \(y'\)' \((0)\) = 3. \)], "DisplayFormula", TextAlignment->Center] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Exercise ", CounterBox["Subsubsection"] }], "Subsubsection"], Cell[TextData[{ "Plot the function ", Cell[BoxData[ \(TraditionalForm\`y(x)\)]], " defined by," }], "Text"], Cell[BoxData[ \(TraditionalForm\`x\^2 - x\ y + y\^2 = 3. \)], "DisplayFormula", TextAlignment->Center], Cell[TextData[{ "Use implicit differentiation to find ", Cell[BoxData[ \(TraditionalForm\`y' \((x)\)\)]], " in terms of ", Cell[BoxData[ \(TraditionalForm\`x\)]], " and ", Cell[BoxData[ \(TraditionalForm\`y\)]], ". (That is, differentiate the equation with respect to ", Cell[BoxData[ \(TraditionalForm\`x\)]], " and solve for ", Cell[BoxData[ \(TraditionalForm\`y' \((x)\)\)]], ".) Differentiate ", Cell[BoxData[ \(TraditionalForm\`y' \((x)\)\)]], " to determine ", Cell[BoxData[ \(TraditionalForm\`\(y'\)' \((x)\)\)]], " in terms of ", Cell[BoxData[ \(TraditionalForm\`x\)]], " and ", Cell[BoxData[ \(TraditionalForm\`y\)]], "." }], "Text", TextAlignment->Left, TextJustification->1] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Exercise ", CounterBox["Subsubsection"] }], "Subsubsection"], Cell["\<\ Find the radius and height of a cylindrical cup of minimal surface \ whose volume is 64.\ \>", "Text", TextJustification->1] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ CounterBox["Section"], ". Total Derivatives" }], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Dt[]", "Input"], " is the total derivative function. It takes the derivative of an \ expression assuming that all formal variables in the expression depend on the \ differentiation variable." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(Dt[x\^2 + y\^2, x]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(Dt[x\^2 + a\ y\^2, x]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "You can take second and higher derivatives with the same syntax as ", StyleBox["D[]", FontWeight->"Bold"], "." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(Dt[x\^2 + y\^2, {x, 2}]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "There are two ways of specifying that a formal variable does not depend on \ the differentiation variable. By using the ", Cell[BoxData[ FormBox[ StyleBox["Constants", FontWeight->"Bold"], TraditionalForm]]], " option you can specify that a certain variable is constant in one input." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(Dt[x\^2 + y\^2 + z\^2, x, Constants \[Rule] y]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "Another approach is to globally declare that a formal variable is a \ constant with the ", Cell[BoxData[ FormBox[ StyleBox[\(SetAttributes[]\), "Input"], TraditionalForm]]], " function." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(SetAttributes[c, Constant]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "Now if we use ", StyleBox["Mathematica", FontSlant->"Italic"], " help to get information on ", Cell[BoxData[ \(TraditionalForm\`c\)]], " it tells us that ", Cell[BoxData[ \(TraditionalForm\`c\)]], " is a global formal variable with the attribute that it is constant." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(\(?c\)\)], "Input"], Cell[TextData[{ "Now whenever we use ", Cell[BoxData[ \(TraditionalForm\`c\)]], " it will be regarded as a constant." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(Dt[x\^2 + c\ y\^2, x]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "To remove the constant attribute we use the ", Cell[BoxData[ FormBox[ StyleBox[\(ClearAttributes[]\), "Input"], TraditionalForm]]], " function." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(ClearAttributes[c, Constant]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "Now ", Cell[BoxData[ \(TraditionalForm\`c\)]], " is a global formal variable with no attributes." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(\(?c\)\)], "Input"], Cell[BoxData[ \(Dt[x\^2 + c\ y\^2, x]\)], "Input", AspectRatioFixed->True], Cell["\<\ You can take the total derivative of an expression involving formal \ functions.\ \>", "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(Dt[f[x] + g[y], x]\)], "Input", AspectRatioFixed->True] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ CounterBox["Section"], ". Non-Cartesian Coordinate Systems" }], "Section"], Cell[TextData[{ "Suppose we want to know the Laplacian, ", Cell[BoxData[ \(TraditionalForm \`\[PartialD]\^2\/\[PartialD]x\^2 + \[PartialD]\^2\/\[PartialD]y\^2\)]], ", in circular coordinates. First we define ", Cell[BoxData[ \(TraditionalForm\`r\)]], " and ", Cell[BoxData[ \(TraditionalForm\`\[Theta]\)]], " in terms of ", Cell[BoxData[ \(TraditionalForm\`x\)]], " and ", Cell[BoxData[ \(TraditionalForm\`y\)]], "." }], "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[{ \(\(r := \@\(x\^2 + y\^2\);\)\), "\n", \(\[Theta] := ArcTan[y, x]\)}], "Input"], Cell[TextData[{ "Consider a function ", Cell[BoxData[ \(TraditionalForm\`g(r, \[Theta])\)]], ". With the definition of ", Cell[BoxData[ \(TraditionalForm\`r\)]], " and ", Cell[BoxData[ \(TraditionalForm\`\[Theta]\)]], " above, we compute ", Cell[BoxData[ \(TraditionalForm\`\(\[PartialD]\^2\/\[PartialD]x\^2\) g + \(\[PartialD]\^2\/\[PartialD]y\^2\) g\)]], "." }], "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(\[PartialD]\_{x, 2}g[r, \[Theta]] + \[PartialD]\_{y, 2}g[r, \[Theta]] // Simplify\)], "Input"], Cell[TextData[{ "Now we remove the definition of ", Cell[BoxData[ \(TraditionalForm\`r\)]], " and ", Cell[BoxData[ \(TraditionalForm\`\[Theta]\)]], " because we want to write ", Cell[BoxData[ \(TraditionalForm\`x\)]], " and ", Cell[BoxData[ \(TraditionalForm\`y\)]], " in terms of ", Cell[BoxData[ \(TraditionalForm\`r\)]], " and ", Cell[BoxData[ \(TraditionalForm\`\[Theta]\)]], "." }], "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(\(Clear[r, \[Theta]];\)\)], "Input"], Cell[TextData[{ "We apply the definition of ", Cell[BoxData[ \(TraditionalForm\`r\)]], " and ", Cell[BoxData[ \(TraditionalForm\`\[Theta]\)]], " and simplify the result." }], "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(%% /. {x -> r\ Cos[\[Theta]], y -> r\ Sin[\[Theta]]} // Simplify\)], "Input"], Cell[TextData[{ "We have to explicitly tell ", StyleBox["Mathematica", FontSlant->"Italic"], " to replace ", Cell[BoxData[ \(TraditionalForm\`arctan(r\ sin\ \[Theta], r\ cos\ \[Theta])\)]], " with ", Cell[BoxData[ \(TraditionalForm\`\[Theta]\)]], ". We use the ", Cell[BoxData[ FormBox[ StyleBox[\(PowerExpand[]\), "Input"], TraditionalForm]]], " function to replace ", Cell[BoxData[ \(TraditionalForm\`\@r\^2\)]], " with ", Cell[BoxData[ \(TraditionalForm\`r\)]], "." }], "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(\(% /. ArcTan[r\ Sin[\[Theta]], r\ Cos[\[Theta]]] -> \[Theta] // PowerExpand\) // Simplify\)], "Input"], Cell["Thus we see that the Laplacian in circular coordinates is", "Text", TextAlignment->Left, TextJustification->1], Cell[TextData[{ Cell[BoxData[ \(TraditionalForm \`\[CapitalDelta] = \[PartialD]\^2\/\[PartialD]r\^2 + \(1\/r\) \[PartialD]\/\[PartialD]r + \(1\/r\^2\) \[PartialD]\^2\/\[PartialD]\[Theta]\^2\)]], "." }], "Text", TextAlignment->Center] }, Closed]], Cell[CellGroupData[{ Cell["Solutions", "Subtitle", Evaluatable->False, TextAlignment->Center, TextJustification->0, AspectRatioFixed->True], Cell[CellGroupData[{ Cell[TextData[{ CounterBox["Section"], ". Partial Derivatives" }], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["Solution 1", "Subsubsection"], Cell[BoxData[ \(\[PartialD]\_x\((u[x] v[x])\)\)], "Input"], Cell[BoxData[ \(\[PartialD]\_x\((u[x]\/v[x])\)\)], "Input"], Cell[BoxData[ \(% // Together\)], "Input"], Cell[BoxData[ \(\[PartialD]\_x u[x]\^a\)], "Input"], Cell[BoxData[ \(\[PartialD]\_x u[v[x]]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Solution 2", "Subsubsection"], Cell[TextData[{ "From the plot and what we know about polynomials, we know that there will \ be two local maxima and two local minima for the polynomial:\n\t", Cell[BoxData[ \(TraditionalForm \`\((x - 1)\) \((x - 2)\) \((x - 3)\) \((x - 4)\) \((x - 5)\)\)]], "." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[TextData[{ "First we define a function, ", Cell[BoxData[ \(TraditionalForm\`f\)]], ", to be the above polynomial." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(f[x_] := \((x - 1)\)\ \((x - 2)\)\ \((x - 3)\)\ \((x - 4)\)\ \((x - 5)\)\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(\(Plot[f[x], {x, 0, 6}]; \)\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "Here are the values of ", Cell[BoxData[ \(TraditionalForm\`x\)]], " where the local extrema occur." }], "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(solns = Simplify[Solve[\[PartialD]\_x f[x] == 0, x]]\)], "Input", AspectRatioFixed->True], Cell["Here is the numerical approximation.", "Text"], Cell[BoxData[ \(N[solns]\)], "Input"], Cell["We sort the solutions in increasing numerical order.", "Text"], Cell[BoxData[ \(solns = Sort[solns, \((N[x /. #1] < N[x /. #2])\) &]\)], "Input"], Cell[BoxData[ \(N[solns]\)], "Input"], Cell["Here are the values of the function at the local extrema.", "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(Simplify[f[x] /. solns]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(N[%]\)], "Input"], Cell["\<\ Here are the values of the second derivative of the function at the \ local extrema.\ \>", "Text", Evaluatable->False, TextAlignment->Left, TextJustification->1, AspectRatioFixed->True], Cell[BoxData[ \(Simplify[\(\(f'\)'\)[x] /. solns]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(N[%]\)], "Input"], Cell["\<\ Recalling that if the second derivative is (positive/negative) at a \ local extrema, it is a (minima/maxima), we see that the first and third \ extrema are maxima and the second and fourth extrema are minima.\ \>", "Text",\ TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(Clear[f, solns]\)], "Input", AspectRatioFixed->True] }, Closed]], Cell[CellGroupData[{ Cell["Solution 3", "Subsubsection"], Cell["First we define the substitution.", "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(y[x_] := Exp[\[Alpha]\ x]\)], "Input"], Cell[TextData[{ "With this definition of ", Cell[BoxData[ \(TraditionalForm\`y(x)\)]], ", the differential equation becomes an algebraic equation for \[Alpha]." }], "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(\(\(y'\)'\)[x] - 3 \( y'\)[x] + 2 y[x]\)], "Input"], Cell[TextData[ "Equating the above expression to zero, the exponential factor divides out \ and we have a quadratic equation for \[Alpha]."], "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(Solve[% == 0, \[Alpha]]\)], "Input"], Cell["\<\ Two linearly independent solutions of the differential equation are\ \ \>", "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(y[x] /. %\)], "Input"], Cell["Thus the general solution of the differential equation is ", "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(TraditionalForm \`y(x) = \(c\_1\) \[ExponentialE]\^x + \(c\_2\) \(\[ExponentialE]\^\(2 x\) . \)\)], "DisplayFormula"], Cell[BoxData[ \(Clear[y]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Solution 4", "Subsubsection"], Cell["We consider the problem", "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(TraditionalForm\`y''' - 6 y'' + 11 y' - 6 y = 0, \ \ \ \ y(0) = 1, \ \ \ \ y' \((0)\) = 2, \ \ \ \ y'' \((0)\) = 3. \)], "DisplayFormula"], Cell[TextData[{ "We substitute ", Cell[BoxData[ \(TraditionalForm\`y(x) = \[ExponentialE]\^\(\[Alpha]\ x\)\)]], " into the differential equation to obtain a cubic polynomial equation for \ \[Alpha]." }], "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(y[x_] := Exp[\[Alpha]\ x]\)], "Input"], Cell[BoxData[ \(\(\(\(y'\)'\)'\)[x] - 6 \(\( y'\)'\)[x] + 11 \( y'\)[x] - 6 y[x]\)], "Input"], Cell["The roots of the cubic are", "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(Solve[% == 0, \[Alpha]]\)], "Input"], Cell["\<\ Now we have a set of linearly independent solutions of the \ differential equation.\ \>", "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(y[x] /. %\)], "Input"], Cell["\<\ The general solution of the differential equation is a linear \ combination of the homogeneous solutions.\ \>", "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(y[x_] = % . {c1, c2, c3}\)], "Input"], Cell["\<\ We apply the initial conditions to solve for the constants in the \ linear combination.\ \>", "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(Solve[{y[0] == 1, \(y'\)[0] == 2, \(\(y'\)'\)[0] == 3}, {c1, c2, c3}] \)], "Input"], Cell["\<\ The solution of the differential equation subject to the initial \ conditions is\ \>", "Text", TextAlignment->Left, TextJustification->1], Cell[BoxData[ \(y[x] /. First[%]\)], "Input"], Cell[BoxData[ \(Clear[y]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Solution 5", "Subsubsection"], Cell[TextData[{ "In order to graph ", Cell[BoxData[ \(TraditionalForm\`y(x)\)]], " we solve the equation for ", Cell[BoxData[ \(TraditionalForm\`y\)]], "." }], "Text"], Cell[BoxData[ \(Clear[x, y]; \nSolve[x\^2 - x\ y + y\^2 == 3, y]\)], "Input"], Cell[TextData[{ "We note that ", Cell[BoxData[ \(TraditionalForm\`y\)]], " is real-valued for ", Cell[BoxData[ \(TraditionalForm\`x \[Element] \([\(-2\), 2]\)\)]], ". Here is a plot." }], "Text"], Cell[BoxData[ \(\(Plot[Evaluate[y /. %], {x, \(-2\), 2}, AspectRatio -> Automatic]; \)\)], "Input"], Cell[TextData[{ "Differentiating the left-hand-side of ", Cell[BoxData[ \(TraditionalForm\`x\^2 - x\ y + y\^2 = 3\)]], "," }], "Text"], Cell[BoxData[ \(\[PartialD]\_x\((x\^2 - x\ y[x] + y[x]\^2)\)\)], "Input"], Cell[TextData[{ "Now we set this equal to the derivative of the right side and solve for ", Cell[BoxData[ \(TraditionalForm\`y' \((x)\)\)]], "." }], "Text"], Cell[BoxData[ \(Solve[% == 0, \(y'\)[x]]\)], "Input"], Cell[TextData[{ "The next statement defines ", Cell[BoxData[ \(TraditionalForm\`\(y'\)[x]\)]], " as the above solution." }], "Text"], Cell[BoxData[ \(\(y'\)[x_] = \(y'\)[x] /. %[\([1]\)]\)], "Input"], Cell[TextData[{ "Now we differentiate ", Cell[BoxData[ \(TraditionalForm\`y' \((x)\)\)]], " to get ", Cell[BoxData[ \(TraditionalForm\`\(y'\)' \((x)\)\)]], "." }], "Text"], Cell[BoxData[ \(\[PartialD]\_x\ \(y'\)[x]\)], "Input"], Cell[TextData[{ "Note that ", StyleBox["Mathematica", FontSlant->"Italic"], " has automatically substituted in the definition of ", Cell[BoxData[ \(TraditionalForm\`y' \((x)\)\)]], " into the above expression. Simplifying the expression yields:" }], "Text"], Cell[BoxData[ \(Simplify[%]\)], "Input"], Cell["\<\ Finally we can simplify the numerator by using the original \ implicit equation.\ \>", "Text", TextJustification->1], Cell[BoxData[ \(% /. \((x\^2 - x\ y[x] + y[x]\^2)\) -> 3\)], "Input"], Cell[TextData[{ "This removes the definition of ", Cell[BoxData[ \(TraditionalForm\`y' \((x)\)\)]], " that we made before. (Using the ", StyleBox["Clear[]", FontWeight->"Bold"], " function wouldn't do the job.)" }], "Text", TextJustification->1], Cell[BoxData[ \(Remove[y]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Solution 6", "Subsubsection"], Cell[TextData[{ "The volume of the cup is ", Cell[BoxData[ \(TraditionalForm\`\[Pi]\ r\^2\ h = 64\)]], ". Using this formula we relate the height to the radius. The surface \ area of the cup is the sum of the areas of the circular bottom and \ cylindrical sides." }], "Text", TextJustification->1], Cell[BoxData[ \(Clear[area, r, h]; \nh = 64\/\(\[Pi]\ r\^2\); \n area[r_] = \[Pi]\ r\^2 + 2 \[Pi]\ r\ h\)], "Input"], Cell["Solving for the stationary points,", "Text"], Cell[BoxData[ \(Solve[\(area'\)[r] == 0, r]\)], "Input"], Cell["\<\ we see that there are three solutions, however only the second one \ is real-valued.\ \>", "Text"], Cell[BoxData[ \(N[%]\)], "Input"], Cell["Thus the radius of the cup is", "Text"], Cell[BoxData[ \(\(r = 4\/\[Pi]\^\(1/3\); \)\)], "Input"], Cell["and the height is", "Text"], Cell[BoxData[ \(h\)], "Input"], Cell[BoxData[ \(Remove[f, r, h]\)], "Input"] }, Closed]] }, Closed]], Cell[TextData[{ CounterBox["Section"], ". Total Derivatives" }], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ CounterBox["Section"], ". Non-Cartesian Coordinate Systems" }], "Section"] }, Closed]] }, Open ]] }, FrontEndVersion->"5.2 for Microsoft Windows", ScreenRectangle->{{0, 1680}, {0, 963}}, WindowToolbars->"EditBar", CellGrouping->Automatic, WindowSize->{772, 777}, WindowMargins->{{Automatic, 0}, {Automatic, 0}}, PrintingPageRange->{Automatic, Automatic}, PrintingOptions->{"PaperSize"->{612, 792}, "PaperOrientation"->"Portrait", "Magnification"->1}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, 128}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, CharacterEncoding->"XAutomaticEncoding", Magnification->1.5 ] (******************************************************************* 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[1776, 53, 111, 3, 141, "Title", Evaluatable->False], Cell[1890, 58, 439, 14, 125, "Text", Evaluatable->False], Cell[CellGroupData[{ Cell[2354, 76, 132, 6, 109, "Section", Evaluatable->False], Cell[2489, 84, 47, 1, 39, "Input"], Cell[2539, 87, 711, 18, 151, "Text", Evaluatable->False], Cell[3253, 107, 88, 2, 47, "Input"], Cell[3344, 111, 431, 10, 96, "Text"], Cell[3778, 123, 102, 2, 47, "Input"], Cell[3883, 127, 406, 16, 71, "Text", Evaluatable->False], Cell[4292, 145, 83, 2, 47, "Input"], Cell[4378, 149, 99, 2, 47, "Input"], Cell[4480, 153, 97, 2, 47, "Input"], Cell[4580, 157, 83, 2, 47, "Input"], Cell[4666, 161, 97, 2, 47, "Input"], Cell[4766, 165, 267, 10, 46, "Text", Evaluatable->False], Cell[5036, 177, 75, 2, 47, "Input"], Cell[5114, 181, 93, 2, 47, "Input"], Cell[5210, 185, 82, 2, 39, "Input"], Cell[5295, 189, 94, 2, 42, "Input"], Cell[5392, 193, 221, 8, 46, "Text", Evaluatable->False], Cell[5616, 203, 78, 2, 39, "Input"], Cell[5697, 207, 94, 2, 42, "Input"], Cell[5794, 211, 421, 15, 71, "Text", Evaluatable->False], Cell[6218, 228, 403, 14, 71, "Text", Evaluatable->False], Cell[6624, 244, 89, 2, 47, "Input"], Cell[6716, 248, 96, 2, 47, "Input"], Cell[6815, 252, 101, 2, 39, "Input"], Cell[CellGroupData[{ Cell[6941, 258, 84, 4, 60, "Subsubsection"], Cell[7028, 264, 119, 5, 46, "Text"], Cell[7150, 271, 549, 11, 158, "DisplayFormula"] }, Open ]], Cell[CellGroupData[{ Cell[7736, 287, 84, 4, 60, "Subsubsection"], Cell[7823, 293, 67, 0, 46, "Text"], Cell[7893, 295, 126, 3, 34, "DisplayFormula"] }, Open ]], Cell[CellGroupData[{ Cell[8056, 303, 84, 4, 60, "Subsubsection"], Cell[8143, 309, 70, 0, 46, "Text"], Cell[8216, 311, 85, 1, 34, "DisplayFormula"], Cell[8304, 314, 169, 5, 46, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[8510, 324, 84, 4, 60, "Subsubsection"], Cell[8597, 330, 48, 0, 46, "Text"], Cell[8648, 332, 216, 4, 34, "DisplayFormula"] }, Open ]], Cell[CellGroupData[{ Cell[8901, 341, 84, 4, 60, "Subsubsection"], Cell[8988, 347, 119, 5, 46, "Text"], Cell[9110, 354, 108, 2, 38, "DisplayFormula"], Cell[9221, 358, 783, 31, 96, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[10041, 394, 84, 4, 60, "Subsubsection"], Cell[10128, 400, 136, 4, 46, "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[10313, 410, 130, 6, 62, "Section", Evaluatable->False], Cell[10446, 418, 329, 9, 71, "Text", Evaluatable->False], Cell[10778, 429, 77, 2, 47, "Input"], Cell[10858, 433, 80, 2, 47, "Input"], Cell[10941, 437, 244, 9, 46, "Text", Evaluatable->False], Cell[11188, 448, 82, 2, 47, "Input"], Cell[11273, 452, 439, 12, 96, "Text", Evaluatable->False], Cell[11715, 466, 105, 2, 47, "Input"], Cell[11823, 470, 340, 12, 71, "Text", Evaluatable->False], Cell[12166, 484, 85, 2, 39, "Input"], Cell[12254, 488, 422, 15, 71, "Text", Evaluatable->False], Cell[12679, 505, 39, 1, 39, "Input"], Cell[12721, 508, 236, 9, 46, "Text", Evaluatable->False], Cell[12960, 519, 80, 2, 47, "Input"], Cell[13043, 523, 298, 11, 46, "Text", Evaluatable->False], Cell[13344, 536, 87, 2, 39, "Input"], Cell[13434, 540, 233, 9, 46, "Text", Evaluatable->False], Cell[13670, 551, 39, 1, 39, "Input"], Cell[13712, 554, 80, 2, 47, "Input"], Cell[13795, 558, 199, 7, 46, "Text", Evaluatable->False], Cell[13997, 567, 77, 2, 39, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[14111, 574, 97, 4, 62, "Section"], Cell[14211, 580, 543, 21, 85, "Text"], Cell[14757, 603, 103, 2, 77, "Input"], Cell[14863, 607, 474, 17, 60, "Text"], Cell[15340, 626, 121, 2, 42, "Input"], Cell[15464, 630, 504, 22, 46, "Text"], Cell[15971, 654, 56, 1, 39, "Input"], Cell[16030, 657, 251, 10, 46, "Text"], Cell[16284, 669, 104, 2, 39, "Input"], Cell[16391, 673, 606, 24, 78, "Text"], Cell[17000, 699, 132, 2, 62, "Input"], Cell[17135, 703, 120, 2, 46, "Text"], Cell[17258, 707, 282, 9, 57, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[17577, 721, 126, 4, 77, "Subtitle", Evaluatable->False], Cell[CellGroupData[{ Cell[17728, 729, 132, 6, 77, "Section", Evaluatable->False], Cell[CellGroupData[{ Cell[17885, 739, 35, 0, 60, "Subsubsection"], Cell[17923, 741, 62, 1, 42, "Input"], Cell[17988, 744, 63, 1, 65, "Input"], Cell[18054, 747, 46, 1, 42, "Input"], Cell[18103, 750, 55, 1, 42, "Input"], Cell[18161, 753, 55, 1, 42, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[18253, 759, 35, 0, 37, "Subsubsection"], Cell[18291, 761, 387, 11, 96, "Text", Evaluatable->False], Cell[18681, 774, 238, 9, 46, "Text", Evaluatable->False], Cell[18922, 785, 141, 4, 39, "Input"], Cell[19066, 791, 86, 2, 39, "Input"], Cell[19155, 795, 235, 9, 46, "Text", Evaluatable->False], Cell[19393, 806, 111, 2, 39, "Input"], Cell[19507, 810, 52, 0, 46, "Text"], Cell[19562, 812, 41, 1, 39, "Input"], Cell[19606, 815, 68, 0, 46, "Text"], Cell[19677, 817, 85, 1, 39, "Input"], Cell[19765, 820, 41, 1, 39, "Input"], Cell[19809, 823, 168, 4, 46, "Text", Evaluatable->False], Cell[19980, 829, 82, 2, 39, "Input"], Cell[20065, 833, 37, 1, 39, "Input"], Cell[20105, 836, 203, 7, 46, "Text", Evaluatable->False], Cell[20311, 845, 92, 2, 39, "Input"], Cell[20406, 849, 37, 1, 39, "Input"], Cell[20446, 852, 281, 7, 96, "Text"], Cell[20730, 861, 74, 2, 39, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[20841, 868, 35, 0, 37, "Subsubsection"], Cell[20879, 870, 96, 2, 46, "Text"], Cell[20978, 874, 58, 1, 39, "Input"], Cell[21039, 877, 231, 7, 46, "Text"], Cell[21273, 886, 72, 1, 39, "Input"], Cell[21348, 889, 196, 4, 71, "Text"], Cell[21547, 895, 56, 1, 39, "Input"], Cell[21606, 898, 140, 5, 46, "Text"], Cell[21749, 905, 42, 1, 39, "Input"], Cell[21794, 908, 121, 2, 46, "Text"], Cell[21918, 912, 151, 3, 38, "DisplayFormula"], Cell[22072, 917, 41, 1, 39, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[22150, 923, 35, 0, 37, "Subsubsection"], Cell[22188, 925, 86, 2, 46, "Text"], Cell[22277, 929, 175, 3, 34, "DisplayFormula"], Cell[22455, 934, 270, 8, 71, "Text"], Cell[22728, 944, 58, 1, 39, "Input"], Cell[22789, 947, 105, 2, 39, "Input"], Cell[22897, 951, 89, 2, 46, "Text"], Cell[22989, 955, 56, 1, 39, "Input"], Cell[23048, 958, 154, 5, 46, "Text"], Cell[23205, 965, 42, 1, 39, "Input"], Cell[23250, 968, 176, 5, 71, "Text"], Cell[23429, 975, 57, 1, 39, "Input"], Cell[23489, 978, 158, 5, 46, "Text"], Cell[23650, 985, 109, 2, 39, "Input"], Cell[23762, 989, 151, 5, 46, "Text"], Cell[23916, 996, 49, 1, 39, "Input"], Cell[23968, 999, 41, 1, 39, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[24046, 1005, 35, 0, 37, "Subsubsection"], Cell[24084, 1007, 189, 8, 46, "Text"], Cell[24276, 1017, 81, 1, 69, "Input"], Cell[24360, 1020, 218, 8, 46, "Text"], Cell[24581, 1030, 108, 2, 62, "Input"], Cell[24692, 1034, 146, 5, 46, "Text"], Cell[24841, 1041, 77, 1, 47, "Input"], Cell[24921, 1044, 168, 5, 46, "Text"], Cell[25092, 1051, 57, 1, 39, "Input"], Cell[25152, 1054, 144, 5, 46, "Text"], Cell[25299, 1061, 69, 1, 39, "Input"], Cell[25371, 1064, 193, 8, 46, "Text"], Cell[25567, 1074, 58, 1, 39, "Input"], Cell[25628, 1077, 278, 8, 71, "Text"], Cell[25909, 1087, 44, 1, 39, "Input"], Cell[25956, 1090, 128, 4, 46, "Text"], Cell[26087, 1096, 73, 1, 47, "Input"], Cell[26163, 1099, 268, 9, 71, "Text"], Cell[26434, 1110, 42, 1, 39, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[26513, 1116, 35, 0, 37, "Subsubsection"], Cell[26551, 1118, 313, 8, 96, "Text"], Cell[26867, 1128, 125, 2, 124, "Input"], Cell[26995, 1132, 50, 0, 46, "Text"], Cell[27048, 1134, 60, 1, 39, "Input"], Cell[27111, 1137, 108, 3, 46, "Text"], Cell[27222, 1142, 37, 1, 39, "Input"], Cell[27262, 1145, 45, 0, 46, "Text"], Cell[27310, 1147, 60, 1, 68, "Input"], Cell[27373, 1150, 33, 0, 46, "Text"], Cell[27409, 1152, 34, 1, 39, "Input"], Cell[27446, 1155, 48, 1, 39, "Input"] }, Closed]] }, Closed]], Cell[27521, 1160, 130, 6, 45, "Section", Evaluatable->False], Cell[27654, 1168, 97, 4, 45, "Section"] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)