(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of 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[ 4736, 107]*) (*NotebookOutlinePosition[ 5791, 143]*) (* CellTagsIndexPosition[ 5747, 139]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{Cell[TextData[ "Legal Notice, Disclaimer, and Book Ordering Information:"], "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "(* Legal Notice, Disclaimer, and Book Ordering Information:\n\nLast \ Modified: FIO January 1, 1995\n\nMathematica For Physics\nRobert L. Zimmerman \ and Fredrick I. Olness\nMathSource Number: 0206-862 \n\nISBN 0-201-53796-6\n\ For ordering information, call 1-800-822-6339\nAddison-Wesley Publishing \ Company\n\nCommunication with the authors:\nFredrick I. Olness: \ olness@mail.physics.smu.edu\nRobert L. Zimmerman: bob@zim.uoregon.edu\n\n\ Copyright 1995, Addison-Wesley Publishing Company, Inc. The material in\nthis \ file may be distributed freely so long as the content remains\nunchanged, \ and the copyright and reference notices are included. The\npublisher grants \ permission for the noncommercial use of these programs\nand program segments. \ All other uses require the prior written consent\nof the publisher. \n\n\ All rights are reserved with regard to the material in the\n\"Mathematica \ For Physics\" text, and may not be reproduced, stored in a\nretrieval system, \ or transmitted, in any form or by any means,\nelectronic, mechanical, \ photocopying, recording, or otherwise, without\nthe prior written permission \ of the publisher. \n\nThe programs and applications presented in this book \ have been included\nfor their instructional value. They have been tested \ with care but are\nnot guaranteed for any particular purpose. The publisher \ does not\noffer any warranties or representations, nor does it accept any\n\ liabilities with respect to the programs or applications. \n\n *)\n"], "Input", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[ "Chapter 3, Section 3, Problem 2: \n Three Coupled Harmonic Oscillators \n\ Code to Generate Animation ONLY!!!"], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Clear[\"Global`*\"];"], "Input", AspectRatioFixed->True], Cell[TextData[ "allRules={x1[t] -> (phase1 + c1*t)/3^(1/2) + (c2*Cos[phase2 + \ freq2*t])/2^(1/2) + \n \n (c3*M*Cos[phase3 + freq3*t])/(2^(1/2)*(2*m^2 + \ M^2)^(1/2)), \n \n x2[t] -> (phase1 + c1*t)/3^(1/2) - \n \n \ (2^(1/2)*c3*m*Cos[phase3 + freq3*t])/(2*m^2 + M^2)^(1/2), \n \n x3[t] -> \ (phase1 + c1*t)/3^(1/2) - (c2*Cos[phase2 + freq2*t])/2^(1/2) + \n \n \ (c3*M*Cos[phase3 + freq3*t])/(2^(1/2)*(2*m^2 + M^2)^(1/2)), freq1 -> 0, \n \n \ freq2 -> (k/m)^(1/2), freq3 -> (k/m + (2*k)/M)^(1/2), k -> 1, m -> 1, M -> \ 2, \n \n phase1 -> 0, phase2 -> 0, phase3 -> 0};"], "Input", AspectRatioFixed->True], Cell[TextData[ "Do[\n ListPlot[( {{x1[t]-2,0},{x2[t],0},{x3[t]+2,0}} \n \ //.allRules \n //.{c1->0, c2->1, c3->1} \n \ //Evaluate ) \n ,PlotStyle->{PointSize[0.05]}\n \ ,PlotRange->{{-4,4},{-1,1}}\n ]\n,{t,0,4,1/4}];"], "Input", AspectRatioFixed->True] }, FrontEndVersion->"Macintosh 3.0", ScreenRectangle->{{0, 640}, {0, 460}}, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{520, 365}, WindowMargins->{{52, Automatic}, {15, Automatic}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, MacintoshSystemPageSetup->"\<\ AVU/IFiQKFD000000Tn0D09?RA0000000PBJL0901kP0AP1Y06`0I@1^0642Ch1@ 0Tn9<000000219Y@0T07^000000000000000009?P50000000000000000000000 00000000000000000000000000000000\>" ] (*********************************************************************** 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[1731, 51, 140, 3, 70, "Subsubsection", Evaluatable->False], Cell[1874, 56, 1607, 23, 70, "Input", Evaluatable->False] }, Closed]], Cell[3493, 81, 196, 4, 70, "Subsection", Evaluatable->False], Cell[3692, 87, 73, 1, 70, "Input"], Cell[3768, 90, 619, 9, 70, "Input"], Cell[4390, 101, 343, 5, 70, "Input"] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)