(************** Content-type: application/mathematica ************** 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[ 18073, 531]*) (*NotebookOutlinePosition[ 18781, 555]*) (* CellTagsIndexPosition[ 18737, 551]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["How Does Heat Dissipate?", "Title", FontWeight->"Bold"], Cell[TextData[StyleBox[ "Chapter 11, End of Chapter Additional Exercises, Final Part", FontFamily->"Arial", FontSize->16, FontWeight->"Bold"]], "Text"], Cell[CellGroupData[{ Cell["Introduction", "Section"], Cell["\<\ OBJECTIVE: Observe the physical interpretations of the contour and level \ curve plots and see an application of the Fourier Series.\ \>", "Text"], Cell[TextData[{ "Do you want to see physical interpretations of the contours and level \ curves you have been drawing? This exploration of the heat equation will \ enable you to do so. The heat equation is a partial differential equation \ and its solution employs the Fourier series in a meaningful way. \nNote", StyleBox[":", FontWeight->"Bold"], " Part II requires knowledge of the Fourier series." }], "Text"], Cell[CellGroupData[{ Cell["Technology Guidelines", "Subsection", CellDingbat->"\[LightBulb]"], Cell[TextData[{ StyleBox["NOTE: If you have just finished a module, restart ", CellFrame->True, Background->None], StyleBox["Mathematica", CellFrame->True, FontSlant->"Italic", Background->None], StyleBox[ " before executing a new module.\nTO OPEN CELLS, put your cursor on the \ right cell bracket and double click.", CellFrame->True, Background->None], "\nTO STOP AN EXECUTION\n\tSelect the ", StyleBox["Kernel", FontSlant->"Italic"], " pull-down menu and click on ", StyleBox["Abort Evaluation.\n", FontSlant->"Italic"], "ORDER OF EXECUTION\n\tExecute cells in the order given. Do not skip any \ Input cells within a given notebook.\nSAVING NOTEBOOKS\n\tYou can save \ anytime to any directory you choose, and it is wise to save often.\n\t\ However, before you do your final save, delete all your output by selecting \ the \n\t ", StyleBox["Delete All Output", FontSlant->"Italic"], " selection under the ", StyleBox["Kernel", FontSlant->"Italic"], " pull-down menu.\nEXPERIENCING MAJOR PROBLEMS\n\tSave if appropriate, and \ then shut down ", StyleBox["Mathematica", FontSlant->"Italic"], " and start it up again." }], "Text"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Background", "Section"], Cell[TextData[{ "The following problems represent solutions to the partial differential \ heat equation: ", Cell[BoxData[ \(TraditionalForm\`w\_xx\)]], "=", Cell[BoxData[ \(TraditionalForm\`1\/c\^2\)]], Cell[BoxData[ \(TraditionalForm\`w\_t\)]], ", where ", StyleBox["w(x,t)", FontSlant->"Italic"], " represents the temperature at position ", StyleBox["x", FontSlant->"Italic"], " at time", StyleBox[" t", FontSlant->"Italic"], " in a thin rod of length ", StyleBox["L", FontSlant->"Italic"], " with perfectly insulated sides. The value of the positive constant ", Cell[BoxData[ \(TraditionalForm\`c\^2\)]], " is determined by the material from which the rod is made." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Part 1: Fixed End Temperatures", "Section"], Cell[TextData[{ "We first examine a very simple solution to the problem where we assume \ that the ends of the rod are immersed in ice and are maintained at a \ temperature of ", Cell[BoxData[ \(TraditionalForm\`0\^0\)]], "C. If the rod is of length 4, the 0 degrees at both ends is represented by \ the boundary conditions ", Cell[BoxData[ \(TraditionalForm\`w(0, t)\ = \ \(w(4, t)\ = \ 0\)\)]], ". Assume also that the initial temperature distribution within the rod is \ given by ", Cell[BoxData[ \(TraditionalForm\`w(x, 0)\ = \ sin\ 2 \[Pi]x\)]], ".\n\nWe first show that ", Cell[BoxData[ FormBox[ RowBox[{\(w(x, t)\), " ", "=", " ", RowBox[{ FormBox[\(e\^\(\(-3\) t\)\), "TraditionalForm"], \(sin(2 \[Pi]\ x)\)}]}], TraditionalForm]]], " is a solution to the differential equation with these boundary and \ initial conditions. The value of the constant", StyleBox[" c", FontSlant->"Italic"], " for this problem is ", Cell[BoxData[ InterpretationBox[\("c = "\[InvisibleSpace]\@3\/\(2\ \[Pi]\)\ \[InvisibleSpace]" or "\[InvisibleSpace]0.27566444771089604`\), SequenceForm[ "c = ", Times[ Rational[ 1, 2], Power[ 3, Rational[ 1, 2]], Power[ Pi, -1]], " or ", .27566444771089604], Editable->False]]], "." }], "Text"], Cell[BoxData[{ \(Off[General::spell]\ \), "\n", \(Off[General::spell1]\ \), "\[IndentingNewLine]", \(\(c = \@3\/\(2 \[Pi]\);\)\), "\n", \(w[x_, t_] := \ \(E\^\(\(-3\) t\)\) Sin[2 \[Pi]\ x]\), "\n", \(Print["\", w[0, t]]\), "\n", \(Print["\", w[4, t]]\), "\n", \(Print["\", w[x, 0]]\), "\n", \(Print["\", wxx\ = D[w[x, t], {x, 2}]]\), "\n", \(Print["\", wt = D[w[x, t], {t, 1}]]\), "\n", \(If[wxx == 1/c\^2\ wt, Print[w[x, t], "\< satisfies the differential equation.\>"], Print["\"]]\)}], "Input"], Cell["\<\ Plot the temperature function at various positions along the rod as a \ function of time. \ \>", "Text"], Cell[BoxData[ \(\(xlevelplots = Plot[\ {w[0, t], w[ .8, t], w[1.6, t], w[2.4, t], w[3.2, t], w[4, t]}, {t, 0, 1}, \ PlotStyle -> {RGBColor[1, 0, 0], RGBColor[1, 1, 0], RGBColor[0, 1, 0], RGBColor[0, 1, 1], RGBColor[1, 0, 1], RGBColor[0, 0, 1]}, AxesLabel -> {t, "\"}, PlotLabel -> "\"]\ ;\)\)], "Input"], Cell["\<\ Interpret these plots. What is happening to the temperature along different \ parts of the rod?\ \>", "Text"], Cell["\<\ Plot the temperature function at various times as a function of the position \ on the rod. \ \>", "Text"], Cell[BoxData[ \(\(tlevelplots = Plot[{w[x, 0], w[x, .2], w[x, .4], w[x, .6], w[x, .8], w[x, 1]}, {x, 0, 4}, PlotStyle -> {RGBColor[1, 0, 0], RGBColor[0, 1, 1], RGBColor[0, 1, 0], RGBColor[0, 1, 1], RGBColor[1, 0, 1], RGBColor[0, 0, 1]}, \ \ PlotRange -> All, AxesLabel -> {x, "\"}, PlotLabel -> "\"]\ ;\)\)], "Input"], Cell["\<\ Interpret the results. What is happening to the temperature function as time \ goes on?\ \>", "Text"], Cell["\<\ Plot the contours for the temperature function and the temperature function \ as a surface.\ \>", "Text"], Cell[BoxData[{ \(\(ContourPlot[w[x, t], {x, 0, 4}, {t, 0, 1}, PlotPoints \[Rule] 40, Axes -> True, AxesLabel -> {x, t}];\)\ \), "\n", \(\(Plot3D[w[x, t], {x, 0, 4}, {t, 0, 1}, PlotPoints \[Rule] 40, AxesLabel -> {x, t, "\"}];\)\)}], "Input"], Cell[TextData[ "What is happening as t\[Rule]\[Infinity] ? Is this what you would expect? \ Why?"], "Text"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "You Try It: Part I", Cell[BoxData[ \(TraditionalForm\`-\)]], "Insulated Ends " }], "Section"], Cell[TextData[{ "We will next examine a very simple solution to the problem in which it is \ assumed that the ends of the rod are insulated so that no heat can escape. If \ the rod is of length 4, this is represented by the boundary conditions ", Cell[BoxData[ \(TraditionalForm\`\(w\_x\)(0, t)\ = \ \(\(w\_x\)(4, t)\ = \ 0\)\)]], ". \n\nWhy? Can you explain this in your own words?" }], "Text"], Cell[TextData[{ "Assume also that the initial temperature distribution within the rod is \ given by w(x,0) = cos {2\[Pi] x).\nFirst show that ", Cell[BoxData[ FormBox[ RowBox[{" ", StyleBox[ RowBox[{\(w \((x, t)\)\), "=", " ", RowBox[{ FormBox[\(e\^\(\(-3\) t\)\), "TraditionalForm"], "cos", \((2 \[Pi]\ x\)}]}], FontSlant->"Italic"], "}"}], TextForm]]], " is a solution to the differential equation with these boundary and \ initial conditions. The value of the constant", StyleBox[" c", FontSlant->"Italic"], " for this problem is ", Cell[BoxData[ InterpretationBox[\("c = "\[InvisibleSpace]\@3\/\(2\ \[Pi]\)\ \[InvisibleSpace]" or "\[InvisibleSpace]0.27566444771089604`\), SequenceForm[ "c = ", Times[ Rational[ 1, 2], Power[ 3, Rational[ 1, 2]], Power[ Pi, -1]], " or ", .27566444771089604], Editable->False]]], "\n\nFirst define the function." }], "Text"], Cell[BoxData[{ \(Clear[x, t, w]\), "\n", \(w[x_, t_] := Exp[\(-3\) t] Cos[2\ \[Pi]\ x]\), "\[IndentingNewLine]", \(\(c = \@3\/\(2 \[Pi]\);\)\)}], "Input"], Cell["\<\ Now find the partial derivatives that appear in the equation.\ \>", "Text"], Cell[BoxData[{ \(Print["\", wxx\ = D[w[x, t], {x, 2}]]\), "\n", \(Print["\< The first derivative of the temperature with respect to time is \>", wt = D[w[x, t], {t, 1}]]\)}], "Input"], Cell["\<\ Verify that the function satisfies the partial differential equation and the \ initial and boundary conditions.\ \>", "Text"], Cell[BoxData[{ \(Print["\", D[w[x, t], x] /. x -> 0]\), "\n", \(Print["\", D[w[x, t], x] /. x -> 4]\), "\n", \(Print["\", w[x, 0]]\), "\n", \(If[wxx == 1/c\^2\ wt, Print[w[x, t], "\< satisfies the differential equation.\>"], Print["\"]]\)}], "Input"], Cell["\<\ Plot the temperature function at various positions along the rod as a \ function of time. \ \>", "Text"], Cell[BoxData[ \(\(xlevelplots = Plot[\ {w[0, t], w[ .8, t], w[1.6, t], w[2.4, t], w[3.2, t], w[4, t]}, {t, 0, 1}, \ PlotStyle -> {RGBColor[1, 0, 0], RGBColor[1, 1, 0], RGBColor[0, 1, 0], RGBColor[0, 1, 1], RGBColor[1, 0, 1], RGBColor[0, 0, 1]}, AxesLabel -> {t, "\"}, PlotLabel -> "\"]\ ;\)\)], "Input"], Cell[TextData[StyleBox[ "Interpret these plots. What is happening to the temperature along different \ parts of the rod?"]], "Text"], Cell["\<\ Plot the temperature function at various times as a function of the position \ on the rod. \ \>", "Text"], Cell[BoxData[ \(\(tlevelplots = Plot[{w[x, 0], w[x, .2], w[x, .4], w[x, .6], w[x, .8], w[x, 1]}, {x, 0, 4}, PlotStyle -> {RGBColor[1, 0, 0], RGBColor[0, 1, 1], RGBColor[0, 1, 0], RGBColor[0, 1, 1], RGBColor[1, 0, 1], RGBColor[0, 0, 1]}, \ \ PlotRange -> All, AxesLabel -> {x, "\"}, PlotLabel -> "\"]\ ;\)\)], "Input"], Cell["\<\ Interpret the results. What is happening to the temperature function as time \ goes on?\ \>", "Text"], Cell["\<\ Plot the contours for the temperature function and the temperature function \ as a surface.\ \>", "Text"], Cell[BoxData[{ \(\(ContourPlot[w[x, t], {x, 0, 4}, {t, 0, 1}, PlotPoints \[Rule] 40, Axes -> True, AxesLabel -> {x, t}];\)\ \), "\n", \(\(Plot3D[w[x, t], {x, 0, 4}, {t, 0, 1}, PlotPoints \[Rule] 40, AxesLabel -> {"\", "\", "\"}];\)\)}], "Input"], Cell[TextData[ "What is happening as t\[Rule]\[Infinity] ? Is this what you would expect? \ Why? \n\nHow does this differ from the temperature function in the rod with \ fixed ends?"], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Part II: Insulated Ends and Use of the Fourier Series (demonstration only)\ \>", "Section"], Cell[TextData[StyleBox[ "If you have not learned the Fourier series at the end of Chapter 8 of your \ text, you should not do this part of the module. ", FontWeight->"Bold"]], "Text"], Cell[TextData[{ "Suppose that the rod of length 4 has insulated ends, that is, ", Cell[BoxData[ FormBox[ RowBox[{" ", RowBox[{ RowBox[{ FormBox[\(w\_x\), "TraditionalForm"], "(", \(0, t\), ")"}], " ", "=", " ", RowBox[{ RowBox[{ FormBox[\(w\_x\), "TraditionalForm"], "(", \(4, t\), ")"}], " ", "=", " ", "0"}]}]}], TraditionalForm]]], ". Assume a discontinuous initial temperature distribution that is ", Cell[BoxData[ \(TraditionalForm\`\(\(\ \)\(12\)\)\)]], " for the left ", Cell[BoxData[ \(TraditionalForm\`1/4\)]], " of the rod and ", Cell[BoxData[ \(TraditionalForm\`0\)]], " elsewhere. This discontinuous initial temperature function necessitates \ the use of the Fourier series in order to get a continuous approximation to \ this discontinuous initial state. For this part, we will assume that c = 1.\n\ \nFirst, we determine the Fourier Series corresponding to the initial \ temperature state for the rod. " }], "Text"], Cell[BoxData[{ \(a[n_] := \(a[n] = 1/2 Integrate[12 Cos[n\ Pi\ x/4], {x, 0, 1}]\)\t\ \), "\n", \(Print["\", fourcos[x_, 30] = a[0]/2 + Sum[a[j] Cos[j\ Pi\ x/4], {j, 1, 30}] // N]\), "\n", \(\(Plot[fourcos[x, 30], {x, 0, 4}];\)\ \ \)}], "Input"], Cell[BoxData[{ \(TextForm\`If\ you\ were\ in\ a\ course\ that\ studied\ partial\ \ differential\ equations, \ you\ could\ derive\ the\ solution\ to\ the\ heat\ equation\ to\ be\ the\ \ following . \n\t\t\ \(\(\(\ \)\(a \((0)\)\)\)\/2\ \ + \ \ \ \[Sum]\)\+\(\(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \)\(n = 1\)\)\%\(\(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \)\(\[Infinity]\)\) a \((n)\)\ \(e\^\(\(-\ \((n\[Pi]\/4)\)\^2\) t\)\) Cos \((\(n\[Pi]\/4\) x)\)\), "\n", \(TextForm\`We\ will\ write\ write\ it\ out\ to\ n = 30. \)}], "Text"], Cell[BoxData[{ \(Clear[w]\ \), "\n", \(w[x_, t_] = \ a[0]/2 + Sum[ a[j] Exp[\(-\((j\ Pi/4)\)^2\)\ *\ t] Cos[j\ Pi\ x/4], {j, 1, 30}]\ // N\)}], "Input"], Cell["\<\ Plot the temperature function at various positions along the rod as a \ function of time. \ \>", "Text"], Cell[BoxData[ \(\(xlevelplots = Plot[\ {w[0, t], w[ .8, t], w[1.6, t], w[2.4, t], w[3.2, t], w[4, t]}, {t, 0, 5}, \ PlotStyle -> {RGBColor[1, 0, 0], RGBColor[1, 1, 0], RGBColor[0, 1, 0], RGBColor[0, 1, 1], RGBColor[1, 0, 1], RGBColor[0, 0, 1]}, AxesLabel -> {t, "\"}, PlotLabel -> "\"]\ ;\)\)], "Input"], Cell["\<\ Interpret these plots. What is happening to the temperature along different \ parts of the rod?\ \>", "Text"], Cell["\<\ Plot the temperature function at various times as a function of the position \ on the rod. Interpret the results.\ \>", "Text"], Cell[BoxData[ \(\(tlevelplots = Plot[{w[x, 0], w[x, .3], w[x, 6], w[x, 1], w[x, 1.5], w[x, 2]}, {x, 0, 4}, PlotStyle -> {RGBColor[1, 0, 0], RGBColor[1, 1, 0], RGBColor[0, 1, 0], RGBColor[0, 1, 1], RGBColor[1, 0, 1], RGBColor[0, 0, 1]}, \ \ PlotRange -> All, AxesLabel -> {x, "\"}, PlotLabel -> "\"]\ ;\)\)], "Input"], Cell["\<\ Interpret the results. What is happening to the temperature function as time \ goes on?\ \>", "Text"], Cell["\<\ Plot the contours for the temperature function and the temperature function \ as a surface.\ \>", "Text"], Cell[BoxData[{ \(\(ContourPlot[w[x, t], {x, 0, 4}, {t, 0, 5}, Axes -> True, AxesLabel -> {x, t}];\)\ \), "\n", \(\(Plot3D[w[x, t], {x, 0, 4}, {t, 0, 5}, AxesLabel -> {x, t, "\"}];\)\)}], "Input"], Cell[TextData[ "What is happening as t\[Rule]\[Infinity] ? Is this what you would expect? \ Why?"], "Text"] }, Closed]] }, Open ]] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowSize->{576, 468}, WindowMargins->{{193, Automatic}, {Automatic, 12}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic} ] (******************************************************************* 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[1727, 52, 63, 1, 115, "Title"], Cell[1793, 55, 157, 4, 37, "Text"], Cell[CellGroupData[{ Cell[1975, 63, 31, 0, 59, "Section"], Cell[2009, 65, 157, 3, 52, "Text"], Cell[2169, 70, 425, 8, 90, "Text"], Cell[CellGroupData[{ Cell[2619, 82, 74, 1, 47, "Subsection"], Cell[2696, 85, 1209, 34, 242, "Text"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[3954, 125, 29, 0, 39, "Section"], Cell[3986, 127, 753, 26, 74, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[4776, 158, 49, 0, 39, "Section"], Cell[4828, 160, 1417, 38, 156, "Text"], Cell[6248, 200, 902, 17, 313, "Input"], Cell[7153, 219, 114, 3, 33, "Text"], Cell[7270, 224, 401, 7, 150, "Input"], Cell[7674, 233, 119, 3, 33, "Text"], Cell[7796, 238, 115, 3, 33, "Text"], Cell[7914, 243, 430, 8, 150, "Input"], Cell[8347, 253, 111, 3, 33, "Text"], Cell[8461, 258, 115, 3, 33, "Text"], Cell[8579, 263, 272, 4, 90, "Input"], Cell[8854, 269, 107, 2, 33, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[8998, 276, 122, 5, 39, "Section"], Cell[9123, 283, 409, 7, 109, "Text"], Cell[9535, 292, 1064, 28, 118, "Text"], Cell[10602, 322, 169, 3, 89, "Input"], Cell[10774, 327, 85, 2, 33, "Text"], Cell[10862, 331, 276, 5, 110, "Input"], Cell[11141, 338, 135, 3, 33, "Text"], Cell[11279, 343, 499, 9, 172, "Input"], Cell[11781, 354, 114, 3, 33, "Text"], Cell[11898, 359, 401, 7, 150, "Input"], Cell[12302, 368, 132, 2, 33, "Text"], Cell[12437, 372, 115, 3, 33, "Text"], Cell[12555, 377, 430, 8, 150, "Input"], Cell[12988, 387, 111, 3, 33, "Text"], Cell[13102, 392, 115, 3, 33, "Text"], Cell[13220, 397, 284, 4, 90, "Input"], Cell[13507, 403, 192, 3, 71, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[13736, 411, 101, 2, 66, "Section"], Cell[13840, 415, 185, 3, 52, "Text"], Cell[14028, 420, 1109, 28, 128, "Text"], Cell[15140, 450, 331, 6, 90, "Input"], Cell[15474, 458, 598, 9, 118, "Text"], Cell[16075, 469, 196, 5, 70, "Input"], Cell[16274, 476, 115, 3, 33, "Text"], Cell[16392, 481, 401, 7, 150, "Input"], Cell[16796, 490, 119, 3, 33, "Text"], Cell[16918, 495, 138, 3, 52, "Text"], Cell[17059, 500, 415, 7, 150, "Input"], Cell[17477, 509, 111, 3, 33, "Text"], Cell[17591, 514, 115, 3, 33, "Text"], Cell[17709, 519, 226, 4, 70, "Input"], Cell[17938, 525, 107, 2, 33, "Text"] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)