(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.0' 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[ 6482, 218]*) (*NotebookOutlinePosition[ 7125, 240]*) (* CellTagsIndexPosition[ 7081, 236]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Semi-Infinite String", "Title"], Cell["H. Edward Donley, Indiana University of Pennsylvania, 2005.", "Subtitle"], Cell[CellGroupData[{ Cell["The Partial Differential Equation", "Section"], Cell[TextData[{ "A string is initially horizontal and at rest. One end is moved up and \ down, prescribed by the function, ", StyleBox["f", FontSlant->"Italic"], "(", StyleBox["t", FontSlant->"Italic"], "). The other end of the string is so far away that we consider it to be \ at infinity. We can model this problem with\n\n", Cell[BoxData[{ \(TraditionalForm\`u\_tt = \(c\^2\) u\_xx, \ x > 0, \ t > 0\[IndentingNewLine]\), "\[IndentingNewLine]", \(TraditionalForm\`u(x, 0) = 0, \ x > 0\), "\[IndentingNewLine]", \(TraditionalForm\`\(u\_t\)(x, 0) = 0, \ x > 0\), "\[IndentingNewLine]", \(TraditionalForm\`u(0, t) = f(t), \ t > 0\), "\[IndentingNewLine]", \(TraditionalForm\`u(x, t) \[Rule] \(0\ as\ x \[Rule] \[Infinity]\), \ t > 0\)}]], "\n" }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Taking Laplace Transform", "Section"], Cell[TextData[{ "This problem can be solved by taking the Laplace transform with respect to \ ", StyleBox["t", FontSlant->"Italic"], ". We start with the partial differential equation." }], "Text"], Cell[BoxData[ \(waveEqn = D[u[x, t], {t, 2}] \[Equal] \(c\^2\) D[u[x, t], {x, 2}]\)], "Input"], Cell["Take the Laplace transform of both sides of the equation.", "Text"], Cell[BoxData[ \(transformedEqn = LaplaceTransform[waveEqn[\([1]\)], t, s] == LaplaceTransform[waveEqn[\([2]\)], t, s]\)], "Input"], Cell["Substitute the initial conditions.", "Text"], Cell[BoxData[ \(transformedEqn2 = transformedEqn /. {u[x, 0] \[Rule] 0, \(\(Derivative[0, 1]\)[u]\)[x, 0] \[Rule] 0}\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Solving the Ordinary Differential Equation", "Section"], Cell["Solve the ordinary differential equation.", "Text"], Cell[BoxData[ \(odeSolution = DSolve[\(s\^2\) ux[x] \[Equal] \(c\^2\) \(ux''\)[x], ux[x], x]\)], "Input"], Cell[BoxData[ \(uTransformed[x_, s_] = ux[x] /. odeSolution[\([1]\)]\)], "Input"], Cell[TextData[{ "The first solution is unbounded as ", StyleBox["x", FontSlant->"Italic"], " \[LongRightArrow]\[Infinity], so we must remove it." }], "Text"], Cell[BoxData[ \(uTransformed[x_, s_] = uTransformed[x, s] /. C[1] \[Rule] 0\)], "Input"], Cell[TextData[{ "Now we can incorporate the boundary condition at ", StyleBox["x", FontSlant->"Italic"], " = 0. Let's use a particular boundary condition." }], "Text"], Cell[BoxData[{ \(f[t_] = Sin[ .5\ \[Pi]\ t] + .5\ Sin[\[Pi]\ t]\ UnitStep[ t - 2 \[Pi]]\), "\[IndentingNewLine]", \(\(Plot[f[t], {t, 0, 10}];\)\)}], "Input"], Cell["Its Laplace transform is", "Text"], Cell[BoxData[ \(fTransformed[s_] = LaplaceTransform[f[t], t, s]\)], "Input"], Cell[TextData[{ "We substitute this into the Laplace transform of ", StyleBox["u", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[ \(uTransformed[x_, s_] = uTransformed[x, s] /. C[2] \[Rule] fTransformed[s]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Taking the Inverse Laplace Transform", "Section"], Cell["\<\ We can get the solution by taking the inverse Laplace transform.\ \>", "Text"], Cell[BoxData[ \(u[x_, t_] = InverseLaplaceTransform[uTransformed[x, s], s, t]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Graphing the Solution", "Section"], Cell["Here is its graph.", "Text"], Cell[BoxData[ \(\(Table[ Plot[{u[x, t] /. c \[Rule] .5, 0}, {x, 0, 10}, PlotRange \[Rule] {\(-1.5\), 1.5}], {t, 0, 15, .2}];\)\)], "Input"], Cell[TextData[{ "We can emphasize the influence of the boundary condition at ", StyleBox["x", FontSlant->"Italic"], " = 0 by placing a red dot there in the animation." }], "Text"], Cell[BoxData[{ \(\(initialPoint[t_] = Graphics[{RGBColor[1, 0, 0], PointSize[ .05], Point[{0, f[t]}]}];\)\), "\n", \(\(solutionGraphs = Table[Plot[{u[x, t] /. c \[Rule] .5, 0}, {x, 0, 10}, PlotRange \[Rule] {\(-1.5\), 1.5}, DisplayFunction \[Rule] Identity], {t, 0, 15, .2}];\)\), "\n", \(initialPointGraphs = Table[initialPoint[t], {t, 0, 15, .2}]; \), "\n", \(\(Table[ Show[solutionGraphs[\([\)\(i\)\(]\)], initialPointGraphs[\([\)\(i\)\(]\)], DisplayFunction \[Rule] $DisplayFunction], {i, Length[solutionGraphs]}];\)\)}], "Input"] }, Closed]] }, Open ]] }, FrontEndVersion->"5.0 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowSize->{985, 668}, WindowMargins->{{0, Automatic}, {Automatic, 0}} ] (******************************************************************* 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, 37, 0, 95, "Title"], Cell[1816, 55, 79, 0, 51, "Subtitle"], Cell[CellGroupData[{ Cell[1920, 59, 52, 0, 73, "Section"], Cell[1975, 61, 833, 20, 200, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[2845, 86, 43, 0, 43, "Section"], Cell[2891, 88, 208, 6, 33, "Text"], Cell[3102, 96, 105, 2, 30, "Input"], Cell[3210, 100, 73, 0, 33, "Text"], Cell[3286, 102, 150, 3, 30, "Input"], Cell[3439, 107, 50, 0, 33, "Text"], Cell[3492, 109, 153, 3, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[3682, 117, 61, 0, 43, "Section"], Cell[3746, 119, 57, 0, 33, "Text"], Cell[3806, 121, 125, 3, 31, "Input"], Cell[3934, 126, 85, 1, 30, "Input"], Cell[4022, 129, 167, 5, 33, "Text"], Cell[4192, 136, 92, 1, 30, "Input"], Cell[4287, 139, 178, 5, 33, "Text"], Cell[4468, 146, 187, 4, 50, "Input"], Cell[4658, 152, 40, 0, 33, "Text"], Cell[4701, 154, 80, 1, 30, "Input"], Cell[4784, 157, 130, 5, 33, "Text"], Cell[4917, 164, 113, 2, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[5067, 171, 55, 0, 43, "Section"], Cell[5125, 173, 88, 2, 33, "Text"], Cell[5216, 177, 101, 2, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[5354, 184, 40, 0, 43, "Section"], Cell[5397, 186, 34, 0, 33, "Text"], Cell[5434, 188, 164, 3, 30, "Input"], Cell[5601, 193, 189, 5, 33, "Text"], Cell[5793, 200, 661, 14, 110, "Input"] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)