(*^ ::[ 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-4, 12, "Courier"; fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-4, 12, "Courier"; fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, R32768, L-4, 12, "Courier"; fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-4, 12, "Courier"; fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, B32768, L-4, 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 = title; inactive; preserveAspect; fontSize = 19; startGroup] Linear Methods of Applied Mathematics Some normal modes of vibration :[font = text; inactive; preserveAspect; plain; bold] (c) Copyright 1994-1997 by Evans M. Harrell II and James V. Herod. All rights reserved. :[font = text; inactive; Cclosed; preserveAspect; plain; bold; fontSize = 13; startGroup] Notes for the instructor. :[font = text; inactive; preserveAspect; fontSize = 13; endGroup] This contains calculations and examples which correlate with chapter 10 of the WWW text by Harrell and Herod. Students can be encouraged to cut and paste from this notebook to do homework. :[font = subsubsection; inactive; Cclosed; preserveAspect; fontSize = 11; startGroup] Instructions :[font = text; inactive; preserveAspect; fontSize = 13; endGroup] This notebook uses Mathematica to perform calculations for Harrell and Herod's hypertext book, Linear Methods of Applied Mathematics. The student needs only a basic knowledge of Mathematica to use the notebook, which is designed both to show how to work problems in the text and to provide a template for using Mathematica to work other problems of the student's own design. Calculations will be performed when the reader presses enter in a given calculation cell (bold print). It is best to activate the cells in order, so that Mathematica will be able to call on operators and functions defined in earlier cells. Red color coding is used to warn the reader when a given calculation relies on an earlier one. ;[s] 11:0,0;19,1;30,0;96,1;133,0;181,1;192,0;315,1;326,0;538,1;549,0;721,-1; 2:6,14,10,Times,0,13,0,0,0;5,14,10,Times,2,13,0,0,0; :[font = text; inactive; preserveAspect; fontSize = 14] Let us begin with some representative normal modes for the vibrations of a rectangular membrane, after which we will compare with those of a circular membrane, like a drum. In the x-direction the rectangle has length 1 and in the y-direction it has length 2. Dirichlet boundary conditions are imposed on the entire edge. :[font = input; preserveAspect; fontSize = 14; startGroup] Plot3D[Sin[Pi x] Sin[3 Pi y/2], {x,0,1},{y,0,2}] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup] The Unformatted text for this cell was not generated. Use options in the Actions Preferences dialog box to control when Unformatted text is generated. ;[o] -SurfaceGraphics- :[font = input; preserveAspect; fontSize = 14; startGroup] Plot3D[Sin[2 Pi x] Sin[5 Pi y/2], {x,0,1},{y,0,2}] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup] The Unformatted text for this cell was not generated. Use options in the Actions Preferences dialog box to control when Unformatted text is generated. ;[o] -SurfaceGraphics- :[font = text; inactive; preserveAspect; fontSize = 14] When we separate variables in polar coordinates, instead of sines and cosines, we encounter products of trigonometric functions of theta with radial functions of a new sort. The radial equation leads to Bessel functions. Here are some graphs to show what Bessel functions are like. :[font = input; preserveAspect; fontSize = 14; startGroup] Plot[{BesselJ[0,r], BesselJ[1,r], BesselJ[2,r]},{r,0,4}] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup] Graphics["<<>>"] ;[o] -Graphics- :[font = input; preserveAspect; fontSize = 14; startGroup] Plot[BesselJ[0,r],{r,0,40}] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup] The Unformatted text for this cell was not generated. Use options in the Actions Preferences dialog box to control when Unformatted text is generated. ;[o] -Graphics- :[font = text; inactive; preserveAspect; fontSize = 14] Notice that the Bessel function oscillates qualitatively like a sine or cosine. It drops off as the variable increases, and the oscillations are not quite as regular. We can calculate the positions of the zeroes quite easily. They are called :[font = input; preserveAspect; fontSize = 14] j0[n_] := x /. FindRoot[BesselJ[0,x] == 0, {x, n 2.5}] :[font = input; preserveAspect; fontSize = 14; startGroup] jvals = Array[j0, 5] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup] {2.404825557695579, 5.52007811028631, 8.65372791291094, 8.65372791291101, 11.79153443901428} ;[o] {2.40483, 5.52008, 8.65373, 8.65373, 11.7915} :[font = input; preserveAspect; fontSize = 14] j01 := 2.4048255577 j02 := 5.5200781103 j11 := 3.83171 j12 := 7.01559 :[font = text; inactive; preserveAspect; fontSize = 14] The normal modes of the disk problem are products of radial functions of the form BesselJ[m, jm[n] r] times Sin[m theta] or Cos[m theta] . Let's now look at some of the normal modes: :[font = input; preserveAspect; fontSize = 14] Needs["Graphics`ParametricPlot3D`"] :[font = input; preserveAspect; fontSize = 14; startGroup] CylindricalPlot3D[BesselJ[0,j01 r] , {r, 0, 1}, {phi, 0, 2 Pi}] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup] The Unformatted text for this cell was not generated. Use options in the Actions Preferences dialog box to control when Unformatted text is generated. ;[o] -Graphics3D- :[font = input; preserveAspect; fontSize = 14; startGroup] CylindricalPlot3D[BesselJ[0,j02 r] , {r, 0, 1}, {phi, 0, 2 Pi}] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup] The Unformatted text for this cell was not generated. Use options in the Actions Preferences dialog box to control when Unformatted text is generated. ;[o] -Graphics3D- :[font = input; preserveAspect; fontSize = 14; startGroup] CylindricalPlot3D[BesselJ[1,j11 r] Cos[phi], {r, 0, 1}, {phi, 0, 2 Pi}] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup] Graphics3D["<<>>"] ;[o] -Graphics3D- :[font = input; preserveAspect; fontSize = 14] j21 := 5.13562 j22 := 8.41724 :[font = input; preserveAspect; fontSize = 14; startGroup] CylindricalPlot3D[BesselJ[2,j21 r] Cos[2 phi], {r, 0, 1}, {phi, 0, 2 Pi}] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup] Graphics3D["<<>>"] ;[o] -Graphics3D- :[font = input; preserveAspect; fontSize = 14; startGroup] CylindricalPlot3D[BesselJ[2,j22 r] Cos[2 phi], {r, 0, 1}, {phi, 0, 2 Pi}] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup] Graphics3D["<<>>"] ;[o] -Graphics3D- :[font = text; inactive; preserveAspect; fontSize = 14] As a representative Disk problem, let us consider the heat equation on a disk, with zero DBC at r = 1, and initial conditions u[r,theta, t=0] = 1. We need to expand the function f[r] = 1 in a Fourier Bessel series. Since the function is radial (independent of theta) only m=0 modes contribute. :[font = input; preserveAspect; fontSize = 14] Clear[j0] j0[1] := 2.4048255577 j0[2] := 5.5200781103 j0[3] := 8.65373 j0[4] := 11.7915 :[font = input; preserveAspect; fontSize = 14] BesselCoeffs[n_] := (2/(BesselJ[1,j0[n]]^2)) \ Integrate[BesselJ[0,j0[n] x] x, {x,0,1}] :[font = input; preserveAspect; fontSize = 14; startGroup] Array[BesselCoeffs, 4] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup] {1.601974696928047, -1.06479925842241, 0.85139919233903, -0.7296452402503421} ;[o] {1.60197, -1.0648, 0.851399, -0.729645} :[font = input; preserveAspect; fontSize = 14] Needs["Graphics`ParametricPlot3D`"] :[font = input; preserveAspect; fontSize = 14; startGroup] CylindricalPlot3D[Sum[BesselCoeffs[n] BesselJ[0,j0[n] r], {n,1,4}] , {r, 0, 1}, {phi, 0, 2 Pi}] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup] The Unformatted text for this cell was not generated. Use options in the Actions Preferences dialog box to control when Unformatted text is generated. ;[o] -Graphics3D- :[font = text; inactive; preserveAspect; fontSize = 14] This is meant to be the initial condition, which should be at constant height 1, but we have kept only a few terms in the series. Notice that the boundary conditions are verified (0 when r = 1), but that the function rises up to the vicinity of 1 quite steeply. There are a few oscillations at the top of the "mesa," which is theoretically flat. A short time later the temperature distribution smooths out and the dominant mode controls the shape: :[font = input; preserveAspect; fontSize = 14; startGroup] CylindricalPlot3D[Sum[BesselCoeffs[n] BesselJ[0,j0[n] r] Exp[-j0[n]^2 .1], {n,1,4}], {r, 0, 1}, {phi, 0, 2 Pi}] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup] The Unformatted text for this cell was not generated. Use options in the Actions Preferences dialog box to control when Unformatted text is generated. ;[o] -Graphics3D- :[font = text; inactive; preserveAspect; fontSize = 14] After a long time, the heat profile is settling down to its equilibrium situation, 0: :[font = input; preserveAspect; fontSize = 14; startGroup] CylindricalPlot3D[Sum[BesselCoeffs[n] BesselJ[0,j0[n] r] Exp[-j0[n]^2 .5], {n,1,4}], {r, 0, 1}, {phi, 0, 2 Pi}] :[font = output; output; inactive; preserveAspect; fontSize = 14; endGroup; endGroup] The Unformatted text for this cell was not generated. Use options in the Actions Preferences dialog box to control when Unformatted text is generated. ;[o] -Graphics3D- ^*)