Legal Notice, Disclaimer, and Book Ordering Information:

(* Legal Notice, Disclaimer, and Book Ordering Information:

Last Modified: FIO January 1, 1995

Mathematica For Physics
Robert L. Zimmerman and Fredrick I. Olness
MathSource Number: 0206-862 

ISBN 0-201-53796-6
For ordering information, call 1-800-822-6339
Addison-Wesley Publishing Company

Communication with the authors:
Fredrick I. Olness:  olness@mail.physics.smu.edu
Robert L. Zimmerman: bob@zim.uoregon.edu

Copyright 1995, Addison-Wesley Publishing Company, Inc. The material in
this file may be distributed freely  so long as the content remains
unchanged, and the copyright and  reference notices are included. The
publisher grants permission for the noncommercial use of these programs
and program segments.  All other uses require the prior written consent
of the publisher.    

All rights are reserved with regard to the  material in the
"Mathematica For Physics" text, and may not be reproduced, stored in a
retrieval system, or transmitted,  in any form or by any means,
electronic, mechanical, photocopying,  recording, or otherwise, without
the prior written permission  of the publisher. 

The programs and applications presented in this book have been included
for  their instructional value. They have been tested with care but are
not  guaranteed for any particular purpose. The publisher does not
offer any  warranties or representations, nor does it accept any
liabilities with  respect to the programs or applications. 

 *)

Chapter 3, Section 3, Problem 3:   
Double Pendulum  
Code to Generate Animation ONLY!!!

Clear["Global`*"];

line[c1_,c2_]=Line[{{0, 0}, {Sin[(c1*Cos[(2/3)^(1/2)*t] - c2*Cos[2^(1/2)*t])/5^(1/2)], 
 
    -Cos[(c1*Cos[(2/3)^(1/2)*t] - c2*Cos[2^(1/2)*t])/5^(1/2)]}, 
 
   {Sin[(c1*Cos[(2/3)^(1/2)*t] - c2*Cos[2^(1/2)*t])/5^(1/2)] + 
 
     Sin[(2*(c1*Cos[(2/3)^(1/2)*t] + c2*Cos[2^(1/2)*t]))/5^(1/2)], 
 
    -Cos[(c1*Cos[(2/3)^(1/2)*t] - c2*Cos[2^(1/2)*t])/5^(1/2)] - 
 
     Cos[(2*(c1*Cos[(2/3)^(1/2)*t] + c2*Cos[2^(1/2)*t]))/5^(1/2)]}}];

frames=25;
Do[
  Show[ Graphics[ line[0,1] //N ,PlotRange->{{-2,2},{0,-2}}] ] 
,{t,1,25,25/frames}];

frames=25;
Do[
  Show[ Graphics[ line[1,0] //N ,PlotRange->{{-2,2},{0,-2}}] ] 
,{t,1,25,25/frames}];

frames=25;
Do[
  Show[ Graphics[ line[0.5,0.5] //N ,PlotRange->{{-2,2},{0,-2}}] ] 
,{t,1,25,25/frames}];