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 2, Section 2, Problem 1:   
Coriolis and Centrifugal Forces

<<mainDir:subDir:ch2init.m  (* Mac  Version *)

<<mainDir/subDir/ch2init.m  (* Unix Version *)

Solution

Clear["Global`*"];

w[t_]= {-w0 Sin[theta], 0, w0 Cos[theta]};
fInertial= {0,0,-m g};

r[t_]:= {x[t],y[t],z[t]};

leftHandSide=  m D[r[t],{t,2}];

rightHandSide =
   (( 
      + fInertial 
      -        m CrossProduct[w'[t],r[t]]
      - mCor 2 m CrossProduct[w[t], D[r[t],t] ] 
      - mCen   m CrossProduct[w[t],(CrossProduct[w[t],r[t]])]
     )//ExpandAll
    );

eq1=Thread[leftHandSide==rightHandSide];
eq1[[1]]

nOrder=1;
right=Series[rightHandSide,{t,0,nOrder}]//Normal;
left =Series[leftHandSide ,{t,0,nOrder}]//Normal

eqs=Thread[
(CoefficientList[left ,{t}]//Flatten)
==
(CoefficientList[right,{t}]//Flatten)
];

initial={ x[0]==0,    y[0]==0,    z[0]==0,
         x'[0]==vx0, y'[0]==vy0, z'[0]==vz0};

vars=(Table[ D[{x[t],y[t],z[t]},{t,i}],{i,0,nOrder+2}]
          /.t->0
          //Flatten 
      )

sol= Solve[Join[eqs,initial],vars][[1]] //Simplify;

genSolution=
(( {x[t],y[t],z[t]}  
         // Map[Series[#,{t,0,nOrder+2}]&,#]&
         //Normal
       ) //.sol 
         //Expand
         //Collect[#,{t}]&
         //Map[Simplify,#,{2}]&
      )

initial={ x[0]==x0,   y[0]==y0,   z[0]==z0,
         x'[0]==vx0, y'[0]==vy0, z'[0]==vz0};

eq2= Join[eq1,initial] /.{theta->0, mCen->1, mCor->1}

dsol2=( DSolve[eq2, {x[t],y[t],z[t]},t][[1]]
          //ComplexToTrig 
          //Simplify
       )

values={ g->9.8, w0->1/100, 
         x0->0,  y0->0,  z0->500, 
         vx0->1, vy0->0, vz0->0
       };

p1=ParametricPlot3D[
    Evaluate[{x[t],y[t],z[t]}//.dsol2//.values]
      ,{t,0,10}
      ,BoxRatios->{1,1,1}];

p2=ParametricPlot3D[
    Evaluate[{x[t],y[t],0}//.dsol2//.values]
      ,{t,0,10}
      ,BoxRatios->{1,1,1}];

p3=ParametricPlot3D[
    Evaluate[{x[t],y[t],z[t]}//.dsol2 /.{w0->0} //.values]
      ,{t,0,10}
      ,BoxRatios->{1,1,1}];

Show[ p1,p2,p3
   ,PlotLabel->FontForm["Coriolis Deflection at North-Pole"
                                        ,{"CourierB",10}]
   ,FaceGrids->{{0,1,0},{-1,0,0}}
   ,BoxRatios->{1,1,1}
   ,ViewPoint->{1,-1,0.7}
   ,AxesLabel->{"x-south","y-east","z-vertical"}];

eq3= Join[eq1,initial] /.{theta->Pi/2, mCen->1, mCor->1};

dsol3=( DSolve[eq3, {x[t],y[t],z[t]},t][[1]]
          //ComplexToTrig 
          //Simplify
       );

p1=ParametricPlot3D[
    Evaluate[{x[t],y[t],z[t]}//.dsol3//.values]
      ,{t,0,10}
      ,BoxRatios->{1,1,1}];

p2=ParametricPlot3D[
    Evaluate[{x[t],y[t],0}//.dsol3//.values]
      ,{t,0,10}
      ,BoxRatios->{1,1,1}];

Limit[{x[t],y[t],z[t]}//.dsol3 ,w0->0]

p3=ParametricPlot3D[
    Limit[ {x[t],y[t],z[t]}//.dsol3,w0->0] //.values //Evaluate
      ,{t,0,10}
      ,BoxRatios->{1,1,1}];

Show[ p1,p2,p3
   ,PlotLabel->FontForm["Coriolis Deflection at Equator"
                                        ,{"CourierB",10}]
   ,FaceGrids->{{0,-1,0},{-1,0,0},{0,1,0},{0,0,1}}
   ,BoxRatios->{1,1,1}
   ,ViewPoint->{1,0,0}
   ,AxesLabel->{"x-south","y-east","z-vertical"}];