(*^ ::[ Information = "This is a Mathematica Notebook file. It contains ASCII text, and can be transferred by email, ftp, or other text-file transfer utility. It should be read or edited using a copy of Mathematica or MathReader. If you received this as email, use your mail application or copy/paste to save everything from the line containing (*^ down to the line containing ^*) into a plain text file. On some systems you may have to give the file a name ending with ".ma" to allow Mathematica to recognize it as a Notebook. The line below identifies what version of Mathematica created this file, but it can be opened using any other version as well."; FrontEndVersion = "Macintosh Mathematica Notebook Front End Version 2.2"; MacintoshStandardFontEncoding; fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e8, 24, "Times"; fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e6, 18, "Times"; fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, e6, 14, "Times"; fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, a20, 18, "Times"; fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, a15, 14, "Times"; fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, a12, 12, "Times"; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times"; fontset = input, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L-5, 12, "Courier"; fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, R65535, L-5, 12, "Courier"; fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, B65535, L-5, 12, "Courier"; fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, 12, "Courier"; fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, 10, "Geneva"; fontset = header, inactive, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = leftheader, inactive, L2, 12, "Times"; fontset = footer, inactive, noKeepOnOnePage, preserveAspect, center, M7, 12, "Times"; fontset = leftfooter, inactive, L2, 12, "Times"; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times"; fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; paletteColors = 128; showRuler; currentKernel; ] :[font = subsection; inactive; noKeepOnOnePage; preserveAspect; leftWrapOffset = 18; leftNameWrapOffset = 18; rightWrapOffset = 450] Math 325: Differential Equations Assignment 1 :[font = subsection; inactive; noKeepOnOnePage; preserveAspect; leftWrapOffset = 18; leftNameWrapOffset = 18; rightWrapOffset = 450] Name: :[font = subsection; inactive; noKeepOnOnePage; preserveAspect; leftWrapOffset = 18; leftNameWrapOffset = 18; rightWrapOffset = 450] Section: :[font = text; inactive; preserveAspect; startGroup] I affirm that the solutions presented in this assignment are entirely my own work. :[font = subsection; inactive; noKeepOnOnePage; preserveAspect; leftWrapOffset = 18; leftNameWrapOffset = 18; rightWrapOffset = 450; endGroup] Signature: :[font = subsubsection; inactive; noKeepOnOnePage; preserveAspect; leftNameWrapOffset = 18; rightWrapOffset = 450; startGroup] Initialization :[font = input; initialization; noKeepOnOnePage; preserveAspect; leftWrapOffset = 18; leftNameWrapOffset = 18; rightWrapOffset = 450; endGroup] *) < 0, determine a particular solution 1) using the method of variation of parameters; 2) using DSolve[]. ;[s] 17:0,0;11,1;12,0;14,1;17,0;23,1;26,0;86,1;140,0;144,1;149,0;183,1;187,0;235,1;239,0;248,1;256,0;258,-1; 2:9,13,9,Times,0,12,0,0,0;8,13,10,Courier,1,12,0,0,0; :[font = subsubsection; inactive; noKeepOnOnePage; preserveAspect; leftNameWrapOffset = 18; rightWrapOffset = 450] Solution :[font = input; preserveAspect; endGroup] :[font = subsubsection; inactive; noKeepOnOnePage; preserveAspect; leftNameWrapOffset = 18; rightWrapOffset = 450; startGroup] Problem 8 :[font = text; inactive; preserveAspect; leftWrapOffset = 18; leftNameWrapOffset = 18; rightWrapOffset = 450] Find approximate values of the solution of the initial value problem y'[t] == 5 t - 3 Sqrt[y[t]], y[0] == 2 at t = 1 1) using the Euler method with h = 0.1; 2) using the Euler method with h = 0.05. Compare these results with the output of NDSolve[] by superimposing the plots of the data. ;[s] 17:0,0;69,1;113,0;116,1;121,0;122,1;126,0;157,1;164,0;166,1;170,0;201,1;209,0;210,1;211,0;252,1;261,0;302,-1; 2:9,13,9,Times,0,12,0,0,0;8,13,10,Courier,1,12,0,0,0; :[font = subsubsection; inactive; noKeepOnOnePage; preserveAspect; leftNameWrapOffset = 18; rightWrapOffset = 450] Solution :[font = text; inactive; preserveAspect] Hints: Define a function that does one step of the Euler method, e.g., EMStep[{t_,y_}] = N[{t+h,y+h*f[t,y]}]; where h is the step size and f[t,y] = 5 t - 3 Sqrt[y]. Then use NestList[EMStep, {t0,y0}, n] to apply EMStep[] successively to its own output, starting at the point {t0,y0} and continuing for n steps. To plot the results use ListPlot[%,PlotJoined->True]. The output of NDSolve[] is a list (in this case a list of one!) of substitution rules of the form {y[t]->InterpolatingFunction[...][t]}. To plot this, do something like sol = NDSolve[...]; Plot[y[t]/.First[sol],{t,0,1}]. You can combine plots with Show[]. ;[s] 27:0,0;71,1;114,0;120,1;121,0;143,1;149,0;150,1;167,0;178,1;206,0;216,1;225,0;279,1;286,0;306,1;307,0;339,1;367,0;384,1;393,0;468,1;505,0;539,1;589,0;618,1;624,0;626,-1; 2:14,13,9,Times,0,12,0,0,0;13,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; endGroup] :[font = subsubsection; inactive; noKeepOnOnePage; preserveAspect; leftNameWrapOffset = 18; rightWrapOffset = 450; startGroup] Problem 9 :[font = text; inactive; preserveAspect; leftWrapOffset = 18; leftNameWrapOffset = 18; rightWrapOffset = 450] Find approximate values of the solution of the initial value problem y'[t] == 5 t - 3 Sqrt[y[t]], y[0] == 2 at t = 1 1) using the Runge-Kutta method with h = 0.1; 2) using the Runge-Kutta method with h = 0.05. Compare these results with the output of NDSolve[] by superimposing the plots of the data. ;[s] 17:0,0;69,1;113,0;116,1;121,0;122,1;126,0;163,1;170,0;172,1;176,0;213,1;221,0;222,1;223,0;264,1;273,0;314,-1; 2:9,13,9,Times,0,12,0,0,0;8,13,10,Courier,1,12,0,0,0; :[font = subsubsection; inactive; noKeepOnOnePage; preserveAspect; leftNameWrapOffset = 18; rightWrapOffset = 450] Solution :[font = text; inactive; preserveAspect; leftWrapOffset = 18; leftNameWrapOffset = 18; rightWrapOffset = 450] Hints: Follow the same ideas as outlined in the hints for Problem 8. Use the program on p.409 of the textbook to create a Runge-Kutta step function: RKStep[{t_,y_}] := ( k1=N[f[t,y]]; k2=...; N[{t+h,y+(h/6)*(k1+...+k4)}]) Notice that several calculations can be defined into the function RKStep[] by grouping them together with parentheses and seperating them with semi-colons. The last statement (without a semi-colon) becomes the final output of RKStep[]. ;[s] 7:0,0;149,1;229,0;295,1;303,0;455,1;463,0;465,-1; 2:4,13,9,Times,0,12,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; endGroup] :[font = subsubsection; inactive; noKeepOnOnePage; preserveAspect; leftNameWrapOffset = 18; rightWrapOffset = 450; startGroup] Problem 10 :[font = text; inactive; preserveAspect; leftWrapOffset = 18; leftNameWrapOffset = 18; rightWrapOffset = 450] Find the Laplace transforms of the functions a) t*E^(2t) b) t*Sin[3t] by integrating, Integrate[E^(-s*t)*f[t],{t,0,Infinity}], and by using LaplaceTransform[f[t],t,s]. Find the inverse Laplace transform of the functions c) 3s/(s^2 - s - 6) d) (2s-3)/(s^2 + 2s + 10) by using partial fraction decompositions (use Apart[]) if necessary and the tables on p.286 of the textbook, and by using InverseLaplaceTransform[Y[s],s,t]. ;[s] 23:0,0;45,1;49,2;51,1;61,0;62,1;66,2;68,1;80,0;96,1;135,0;150,1;176,0;230,1;234,2;236,1;259,2;261,1;286,0;332,1;339,0;409,1;442,0;444,-1; 3:8,13,9,Times,0,12,0,0,0;11,13,10,Courier,1,12,0,0,0;4,13,9,Times,2,12,0,0,0; :[font = subsubsection; inactive; noKeepOnOnePage; preserveAspect; leftNameWrapOffset = 18; rightWrapOffset = 450] Solution :[font = input; preserveAspect; endGroup] ^*)