4. Lagrangians and Hamiltonians

Legal Notice, Disclaimer, and Book Ordering Information:

Null

Setup

\(Clear["Global`*"]; 
Off[General::spell]; 
Off[General::spell1]; 
    \)

Needs["Calculus`VectorAnalysis`"]

<< "D:\Mma\Inits\ch4init.m"

Clear["Global`*"];

4.2 Problems

4.2.3  Hamilton and Hamilton-Jacobi Problems

Problem 2:  Hamilton's Equation in Cylindrical and Spherical Coordinates

Consider  a particle of mass m moving in a time-independent potential V.

Part (a)   Consider cylindrical coordinates {r,θ,z} and a potential of the form V[r,θ,z].  Find the expressions for the canonical momentum, the Hamiltonian, and Hamilton's equations.

\(rRule = 
      rVector -> 
        \((Evaluate[
              CoordinatesToCartesian[
				{r[#], θ[#], z[#]}, 
                Cylindrical]]&)\)\)

T = 
      ((1/2 m rVector'[t] . rVector'[t]) //. rRule // 
            ExpandAll // Simplify)

L = T - V[r[t], θ[t], z[t]]

{pRule, hamiltonian, eqMotion} = 
      Hamilton[L, {r, θ, z}, {pr, pθ, pz}]

Part (b)   Consider the gravitational potential from a spherical source V = -k/Sqrt[r^2 + z^2].  Assume the orbit can be written in the z=0 plane and write Hamilton's equations.  Find the conditions necessary for circular orbits.

vRule = {V -> ((-k/Sqrt[#1^2 + #3^2])&)}

V[r[t], θ[t], z[t]] //. vRule

zRule = {z -> (0&), pz -> (0&)}

eq1 = (eqMotion) //. vRule //. zRule // PowerExpand

eq2 = eq1 //. {pθ -> (pθ0&)}

constantR = {pr -> (0&), r -> (r0&)}

circleRule = 
      Solve[(eq2 // First) //. constantR, pθ0][[2]]

Part (c)   Derive the power-series solution of the equations in Part (b).  Verify the validity of the series expansion for circular orbits.

rEq = eq2[[{1, 4}]]

initial = {r[0] -> r0, pr[0] -> 0}

pert = firstDiffSeries[rEq, {r, pr}, initial, 4, t]

pert //. circleRule