(************** 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[ 25738, 751]*) (*NotebookOutlinePosition[ 26445, 775]*) (* CellTagsIndexPosition[ 26401, 771]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "Using ", StyleBox["Mathematica", FontSlant->"Italic"], " to Solve Differential Equations and and to Explore Beats and Resonance" }], "Subtitle"], Cell[TextData[StyleBox["Each part of this lab has an assignment associated \ with it. We will discuss the results in class. You must also be ready to \ present your results to the class, so bring them in both written form and on \ disk.", FontVariations->{"CompatibilityType"->0}]], "Text"], Cell[CellGroupData[{ Cell["\<\ Demo on Using DSolve or NDSolve for Differential Equations with One Dependent \ and One Independent Variable\ \>", "Section"], Cell[TextData[{ " This portion of the lab shows examples of how you can use ", StyleBox["Mathematica", FontSlant->"Italic"], " to solve differential equations both symbolically and numerically and to \ plot multiple solutions to get an idea of what the long term behavior is and \ whether or not it is dependent on the arbitray constants - and hence, on \ initial conditions. ", StyleBox["Try out your own differential equations, one that you think ", FontWeight->"Bold"], StyleBox["Mathematica", FontWeight->"Bold", FontSlant->"Italic"], StyleBox[" can solve symbolically, and one that it can only solve \ numerically. Answer the question posed on the pendulum problem.", FontWeight->"Bold"] }], "Text"], Cell[CellGroupData[{ Cell["Using DSolve - Linear Second Order Equations", "Subsection"], Cell["\<\ DSolve works with some nonlinear differential equations, but not many. It \ usually works with linear differential equations. Note the format for the \ entries. You can use\ \>", "Text"], Cell[CellGroupData[{ Cell["Linear equation where you know initial conditions", "Subsubsection"], Cell[BoxData[{\(Clear[x, y, solution]\), "\[IndentingNewLine]", RowBox[{"solution", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"2", " ", RowBox[{ SuperscriptBox[ SuperscriptBox["y", "\[Prime]", MultilineFunction->None], "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}], "+", RowBox[{"5", " ", RowBox[{ SuperscriptBox["y", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}], "+", \(5\ y[x]\)}], "==", "0"}], ",", \(y[0] == 0\), ",", RowBox[{ RowBox[{ SuperscriptBox["y", "\[Prime]", MultilineFunction->None], "[", "0", "]"}], "==", \(1\/2\)}]}], "}"}], ",", \(y[x]\), ",", "x"}], "]"}]}]}], "Input"], Cell[BoxData[{ \(solution[\([1, 1, 2]\)]\), "\[IndentingNewLine]", \(Plot[y[x] /. solution, {x, \(-\(\[Pi]\/2\)\), \[Pi]}]\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Linear equation where you do not know initial conditions", \ "Subsubsection"], Cell[BoxData[{\(Clear[x, y, solution]\), "\[IndentingNewLine]", RowBox[{"solution", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"3", " ", RowBox[{ SuperscriptBox[ SuperscriptBox["y", "\[Prime]", MultilineFunction->None], "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}], "+", RowBox[{"2", " ", RowBox[{ SuperscriptBox["y", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}], "-", \(5\ y[x]\)}], "==", "0"}], ",", \(y[x]\), ",", "x"}], "]"}]}]}], "Input"], Cell["We can plot an array of solutions.", "Text"], Cell[BoxData[{ \(\(toplot = Table[solution[\([1, 1, 2]\)] /. {C[1] \[Rule] i, C[2] \[Rule] j}, {i, \(-1\), 1}, {j, \(-1\), 1}];\)\), "\[IndentingNewLine]", \(colors = Table[RGBColor[i, 1 - i, \@i], {i, 0, 1, 1\/8}]; Plot[Evaluate[toplot], {x, \(-2\), 2}, PlotStyle \[Rule] colors]\)}], "Input"], Cell["\<\ You will notice that all solutions approach the same value as the independent \ variable approaches infinity.\ \>", "Text"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Using NDSolve - Nonlinear Differential Equation", "Subsection"], Cell[CellGroupData[{ Cell["Pendulum problem ", "Subsubsection"], Cell["\<\ This is the equation for the motion of an actual pendulum where t represents \ the angle through which the pendulum swings, and I do not use the \ approximation of sin(x) being approximated by x.\ \>", "Text"], Cell[BoxData[{ \(Clear[x, t, solution]\), "\[IndentingNewLine]", \(solution = NDSolve[{\(x''\)[t] + 0.5\ \(x'\)[t] + Sin[x[t]] == 0, x[0] \[Equal] 1, \(x'\)[0] \[Equal] 1}, x[t], {t, 0, 15}]\)}], "Input"], Cell[BoxData[ \(\(Plot[Evaluate[x[t] /. solution], {t, 0, 15}];\)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Pendulum problem where you have variable initial conditions", \ "Subsubsection"], Cell["\<\ Here is the same equation, only with different sets of initial conditions.\ \>", "Text"], Cell[BoxData[{ \(Clear[x, t, solution, i, j, s]\), "\[IndentingNewLine]", \(\(s[i_, j_] := NDSolve[{\(x''\)[t] + 0.5\ \(x'\)[t] + Sin[x[t]] == 0, x[0] \[Equal] i, \(x'\)[0] == j}, x[t], {t, 0, 15}];\)\)}], "Input"], Cell[BoxData[{ \(\(table4 = {{1, 2}, {1, 3}, {\(-1\), 4}, {\(-1\), 5}};\)\), "\n", \(\(sols4 = Table[\(s[table4[\([i, 1]\)], table4[\([i, 2]\)]]\)[\([1, 1, 2]\)], {i, 1, 4}];\)\), "\[IndentingNewLine]", \(\(four = Plot[Evaluate[sols4], {t, 0, 15}];\)\)}], "Input"], Cell[BoxData[{ \(\(table5 = {{\(-1\), 2}, {\(-1\), 3}, {1, \(-4\)}, {1, \(-5\)}};\)\), "\n", \(sols5 = Table[\(s[table5[\([i, 1]\)], table5[\([i, 2]\)]]\)[\([1, 1, 2]\)], {i, 1, 4}]\), "\[IndentingNewLine]", \(\(five = Plot[Evaluate[sols5], {t, 0, 15}];\)\)}], "Input"], Cell[BoxData[ \(\(six = Show[four, five];\)\)], "Input"], Cell[TextData[StyleBox["Can you explain what is happening to the pendulum? \ Why does it approach different equilibrium points for different initial \ conditions?", FontWeight->"Bold"]], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Another nonlinear equation", "Subsubsection"], Cell[BoxData[{ \(Clear[x, t, solution]\), "\[IndentingNewLine]", \(solution = NDSolve[{\(x''\)[t]\ \ \(x'\)[t] + Cos[x[t]] \[Equal] 1\/\(t + 1\), x[0] \[Equal] 1, \(x'\)[0] \[Equal] 1}, x[t], {t, 0, 10}]\)}], "Input"], Cell[BoxData[ \(\(Plot[Evaluate[x[t] /. solution], {t, 0, 10}];\)\)], "Input"] }, Closed]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["The Damping Factor in the Homogeneous Equation", "Section"], Cell[TextData[{ "This portion of the lab demonstrates the impact of the damping factor on \ the solution of the second order linear differential equation with constant \ coefficients in homogeneous form. For ease, we use the ", StyleBox["Mathematica", FontSlant->"Italic"], " command DSolve to generate our solutions. You should solve these by hand \ and verify that your solutions agree. All the differential equations in this \ part have the same initial condition. ", StyleBox["Your assignment here is simply to describe what you see happening \ in terms of oscillatory motion and the motion of a spring described by these \ equations AND see if the long term behavior is any different for different \ initial conditions.", FontWeight->"Bold"] }], "Text"], Cell[CellGroupData[{ Cell["Undamped Case - Simple Harmonic Motion", "Subsection"], Cell[BoxData[{\(Clear[x, t, de1, sol1, pp1]\), "\n", RowBox[{ RowBox[{"de1", "=", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox[ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "+", \(9\ x[t]\)}], "==", "0"}]}], ";", RowBox[{"sol1", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{"de1", ",", \(x[0] == 0\), ",", RowBox[{ RowBox[{ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "[", "0", "]"}], "==", "1"}]}], "}"}], ",", \(x[t]\), ",", "t"}], "]"}]}]}], "\n", \(pp1 = Plot[sol1[\([1, 1, 2]\)], {t, 0, 10}, PlotStyle -> RGBColor[1, 0, 0]]\ ;\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Underdamped Case", "Subsection"], Cell[BoxData[{\(Clear[x, t, de2, sol2, pp2]\), "\n", RowBox[{ RowBox[{"de2", "=", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox[ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "+", \(1 \( x'\)[t]\), "+", \(9\ x[t]\)}], "==", "0"}]}], ";", RowBox[{"sol2", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{"de2", ",", \(x[0] == 0\), ",", RowBox[{ RowBox[{ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "[", "0", "]"}], "==", "1"}]}], "}"}], ",", \(x[t]\), ",", "t"}], "]"}]}]}], "\n", \(pp2 = Plot[sol2[\([1, 1, 2]\)], {t, 0, 10}, PlotStyle -> RGBColor[0, 1, 0]]\ ;\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Critically-damped Case", "Subsection"], Cell[BoxData[{\(Clear[x, t, de3, sol3, pp3]\), "\n", RowBox[{ RowBox[{"de3", "=", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox[ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "+", \(6 \( x'\)[t]\), "+", \(9\ x[t]\)}], "==", "0"}]}], ";", RowBox[{"sol3", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{"de3", ",", \(x[0] == 0\), ",", RowBox[{ RowBox[{ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "[", "0", "]"}], "==", "1"}]}], "}"}], ",", \(x[t]\), ",", "t"}], "]"}]}]}], "\n", \(pp3 = Plot[sol3[\([1, 1, 2]\)], {t, 0, 10}, PlotStyle -> RGBColor[0, 0, 1]]\ ;\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Overdamped Case", "Subsection"], Cell[BoxData[{\(Clear[x, t, de4, sol4, pp4]\), "\n", RowBox[{ RowBox[{"de4", "=", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox[ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "+", \(10 \( x'\)[t]\), "+", \(9\ x[t]\)}], "==", "0"}]}], ";", RowBox[{"sol4", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{"de4", ",", \(x[0] == 0\), ",", RowBox[{ RowBox[{ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "[", "0", "]"}], "==", "1"}]}], "}"}], ",", \(x[t]\), ",", "t"}], "]"}]}]}], "\n", \(pp4 = Plot[sol4[\([1, 1, 2]\)], {t, 0, 10}, PlotRange -> All]\ ;\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["The Whole Picture", "Subsection"], Cell[BoxData[ \(\(Show[pp1, pp2, pp3, pp4]\ ;\)\)], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Beats and Resonance", "Section"], Cell[TextData[{ "After examining the problems in this portion on beats and resonance, \ experiment by trying out different forcing functions and see what happens to \ the solutions. ", StyleBox["Do this for both resonance and beats, but also use other forcing \ functions too, including one on which undetermined coefficients might not \ work. Report on your results. Part of your report must include mathematical, \ graphical, and physical descriptions of both beats and resonance. ", FontWeight->"Bold"], "Check to see if the closer you make." }], "Text"], Cell[CellGroupData[{ Cell["Simple Harmonic Motion with No Forcing Function", "Subsection"], Cell[BoxData[{\(Clear[x, t, de1, sol1, pp1]\), "\n", RowBox[{ RowBox[{"de1", "=", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox[ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "+", \(12\ x[t]\)}], "==", "0"}]}], ";", RowBox[{"sol1", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{"de1", ",", \(x[0] == 0\), ",", RowBox[{ RowBox[{ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "[", "0", "]"}], "==", "1"}]}], "}"}], ",", \(x[t]\), ",", "t"}], "]"}]}]}], "\n", \(pp1 = Plot[sol1[\([1, 1, 2]\)], {t, 0, 40}, PlotStyle -> RGBColor[1, 0, 0]]\ ;\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Beats - Forcing Function with Same Frequency as System", "Subsection"], Cell[BoxData[{\(Clear[x, t, de2, sol2, pp2]\), "\n", RowBox[{ RowBox[{"de2", "=", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox[ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "+", \(12\ x[t]\)}], "==", \(Cos[Sqrt[12] t]\)}]}], ";", RowBox[{"sol2", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{"de2", ",", \(x[0] == 0\), ",", RowBox[{ RowBox[{ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "[", "0", "]"}], "==", "1"}]}], "}"}], ",", \(x[t]\), ",", "t"}], "]"}]}]}], "\n", \(pp2 = Plot[sol2[\([1, 1, 2]\)], {t, 0, 40}, PlotStyle -> RGBColor[0, 1, 0]]\ ;\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Resonance - Forcing Function with Frequency Close to that of System\ \>", "Subsection"], Cell[BoxData[ RowBox[{ StyleBox[\(Note\ that\ for\ the\ problem\ below\), FontFamily->"Times New Roman"], StyleBox[",", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], RowBox[{ StyleBox["the", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["coefficient", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["of", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["x", FontFamily->"Times New Roman", FontSlant->"Italic"], StyleBox[ StyleBox[ RowBox[{ StyleBox[" ", FontSlant->"Plain"], " "}]], FontFamily->"Times New Roman"], StyleBox["is", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox[\(\@12\), FontFamily->"Times New Roman"], StyleBox["which", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["is", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["approximately", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox[\(3.4642 . \ Notice\), FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["what", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["happens", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["when", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["the", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["forcing", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["function", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["has", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["a", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["coefficient", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["close", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox["to", FontFamily->"Times New Roman"], StyleBox[" ", FontFamily->"Times New Roman"], StyleBox[\(\(that\)\(.\)\(\ \)\), FontFamily->"Times New Roman"]}]}]], "Text"], Cell[BoxData[{\(Clear[x, t, de3, sol3, pp3]\), "\n", RowBox[{ RowBox[{"de3", "=", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox[ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "+", \(12\ x[t]\)}], "==", RowBox[{"Cos", "[", RowBox[{ StyleBox["3", FontColor->RGBColor[1, 0, 0]], "t"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"sol3", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{"de3", ",", \(x[0] == 0\), ",", RowBox[{ RowBox[{ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "[", "0", "]"}], "==", "1"}]}], "}"}], ",", \(x[t]\), ",", "t"}], "]"}]}], "\n", RowBox[{ RowBox[{"pp3", "=", RowBox[{"Plot", "[", RowBox[{\(sol3[\([1, 1, 2]\)]\), ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", StyleBox["40", FontColor->RGBColor[1, 0, 0]]}], "}"}], ",", \(PlotStyle -> RGBColor[0, 0, 1]\)}], "]"}]}], " ", ";"}]}], "Input"], Cell["\<\ You can look at all three solutions together - no forcing function, one \ causing resonance, and one causing beats.\ \>", "Text"], Cell[BoxData[ \(\(Show[pp1, pp2, pp3]\ ; \)\)], "Input"], Cell["\<\ Now let's see what happens as we get closer to the frequency of the system. \ In particular, notice what happens to both the frequency of the beats and the \ size of the amplitude as those coefficients get closer together. Note that we \ have to keep expanding the domain over which we graph the solution in order \ to see the beats.\ \>", "Text"], Cell[BoxData[{\(Clear[x, t, de3, sol3, pp3]\), "\n", RowBox[{ RowBox[{"de4", "=", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox[ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "+", \(12\ x[t]\)}], "==", RowBox[{"Cos", "[", RowBox[{ StyleBox["3.4", FontColor->RGBColor[1, 0, 0]], "t"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"sol4", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{"de4", ",", \(x[0] == 0\), ",", RowBox[{ RowBox[{ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "[", "0", "]"}], "==", "1"}]}], "}"}], ",", \(x[t]\), ",", "t"}], "]"}]}], "\n", RowBox[{ RowBox[{"pp4", "=", RowBox[{"Plot", "[", RowBox[{\(sol4[\([1, 1, 2]\)]\), ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", StyleBox["200", FontColor->RGBColor[1, 0, 0]]}], "}"}], ",", \(PlotStyle -> RGBColor[0, 0, 1]\)}], "]"}]}], " ", ";"}]}], "Input"], Cell[BoxData[{\(Clear[x, t, de3, sol3, pp3]\), "\n", RowBox[{ RowBox[{"de5", "=", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox[ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "+", \(12\ x[t]\)}], "==", RowBox[{"Cos", "[", RowBox[{ StyleBox["3.464", FontColor->RGBColor[1, 0, 0]], "t"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"sol5", "=", RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{"de5", ",", \(x[0] == 0\), ",", RowBox[{ RowBox[{ SuperscriptBox["x", "\[Prime]", MultilineFunction->None], "[", "0", "]"}], "==", "1"}]}], "}"}], ",", \(x[t]\), ",", "t"}], "]"}]}], "\n", RowBox[{ RowBox[{"pp5", "=", RowBox[{"Plot", "[", RowBox[{\(sol5[\([1, 1, 2]\)]\), ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", StyleBox["100000", FontColor->RGBColor[1, 0, 0]]}], "}"}], ",", \(PlotStyle -> RGBColor[0, 0, 1]\)}], "]"}]}], " ", ";"}]}], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Plot of Tuning Forks Problem", "Section"], Cell[TextData[{ "Two tuning forks were struck, first one with frequency ", Cell[BoxData[ \(\[Omega]\_0\)]], " and then another with a frequency \[Omega] that was fairly close to ", Cell[BoxData[ \(\[Omega]\_0\)]], ". Observe the tuning forks sound plot. ", StyleBox["Describe the initial conditions and how they appear on the graph. \ Explain how this is an example of beats and what the period of the beats is. \ ", FontWeight->"Bold"], "\nFor a mini-project, a group will bring tuning forks into the classroom, \ so that we can actually hear the beats. " }], "Text"], Cell[BoxData[{ \(\(\[Omega]0 = \ 2 \[Pi]\ 256 // N;\)\), "\n", \(\(\[Omega]\ = \ 2 \[Pi]\ 296 // N;\)\), "\n", \(\(ampl = \(-2\)/\((\[Omega]0\^2 - \[Omega]\^2)\) // N;\)\), "\n", \(Print["\", \[Omega]0, "\< and \>", \[Omega]]\), "\n\ ", \(Print["\", ampl]\), "\n", \(\(Plot[ ampl\ Sin[\((\[Omega]0 - \[Omega])\) t/2] Cos[\((\[Omega]0 + \[Omega])\) t/2], {t, 0, .1}]\ ;\)\)}], "Input"] }, Closed]] }, Open ]] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowSize->{735, 572}, WindowMargins->{{10, Automatic}, {Automatic, 15}}, 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, 171, 5, 94, "Subtitle"], Cell[1901, 59, 292, 4, 52, "Text"], Cell[CellGroupData[{ Cell[2218, 67, 135, 3, 86, "Section"], Cell[2356, 72, 736, 16, 90, "Text"], Cell[CellGroupData[{ Cell[3117, 92, 66, 0, 47, "Subsection"], Cell[3186, 94, 196, 4, 52, "Text"], Cell[CellGroupData[{ Cell[3407, 102, 74, 0, 43, "Subsubsection"], Cell[3484, 104, 1061, 24, 104, "Input"], Cell[4548, 130, 145, 2, 61, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[4730, 137, 83, 1, 29, "Subsubsection"], Cell[4816, 140, 733, 17, 50, "Input"], Cell[5552, 159, 50, 0, 33, "Text"], Cell[5605, 161, 352, 7, 84, "Input"], Cell[5960, 170, 133, 3, 33, "Text"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[6142, 179, 69, 0, 31, "Subsection"], Cell[CellGroupData[{ Cell[6236, 183, 42, 0, 43, "Subsubsection"], Cell[6281, 185, 219, 4, 52, "Text"], Cell[6503, 191, 240, 5, 70, "Input"], Cell[6746, 198, 82, 1, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[6865, 204, 86, 1, 29, "Subsubsection"], Cell[6954, 207, 98, 2, 33, "Text"], Cell[7055, 211, 256, 5, 70, "Input"], Cell[7314, 218, 302, 5, 70, "Input"], Cell[7619, 225, 314, 6, 70, "Input"], Cell[7936, 233, 60, 1, 30, "Input"], Cell[7999, 236, 196, 3, 52, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[8232, 244, 51, 0, 29, "Subsubsection"], Cell[8286, 246, 253, 5, 85, "Input"], Cell[8542, 253, 82, 1, 30, "Input"] }, Closed]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[8685, 261, 65, 0, 39, "Section"], Cell[8753, 263, 774, 14, 109, "Text"], Cell[CellGroupData[{ Cell[9552, 281, 60, 0, 47, "Subsection"], Cell[9615, 283, 935, 23, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[10587, 311, 38, 0, 31, "Subsection"], Cell[10628, 313, 960, 23, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[11625, 341, 44, 0, 31, "Subsection"], Cell[11672, 343, 960, 23, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[12669, 371, 37, 0, 31, "Subsection"], Cell[12709, 373, 947, 23, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[13693, 401, 39, 0, 31, "Subsection"], Cell[13735, 403, 64, 1, 30, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[13848, 410, 38, 0, 39, "Section"], Cell[13889, 412, 567, 10, 90, "Text"], Cell[CellGroupData[{ Cell[14481, 426, 69, 0, 47, "Subsection"], Cell[14553, 428, 938, 23, 110, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[15528, 456, 76, 0, 31, "Subsection"], Cell[15607, 458, 954, 23, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[16598, 486, 97, 2, 31, "Subsection"], Cell[16698, 490, 3262, 97, 51, "Text"], Cell[19963, 589, 1328, 35, 90, "Input"], Cell[21294, 626, 139, 3, 33, "Text"], Cell[21436, 631, 60, 1, 30, "Input"], Cell[21499, 634, 357, 6, 71, "Text"], Cell[21859, 642, 1331, 35, 90, "Input"], Cell[23193, 679, 1336, 35, 90, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[24578, 720, 47, 0, 39, "Section"], Cell[24628, 722, 599, 14, 90, "Text"], Cell[25230, 738, 480, 9, 131, "Input"] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)