Finding the Lagrangian for a 3D Spring Pendulum

Click For Summary
Choosing spherical coordinates for a 3D spring pendulum problem is appropriate, despite the resulting lengthy Lagrangian expression. The Lagrangian for a spherical pendulum can be modified to include spring potential energy by subtracting the energy stored in the spring. Simplifying the expression for kinetic energy involves careful arithmetic and recognizing terms that cancel out. While Cartesian coordinates may seem simpler, they are not suitable for this type of problem. Ultimately, the complexity of the Lagrangian is normal for this system, and simplifications can help manage the lengthy calculations.
  • #31
jdwood983 said:
Hmm, I got

\ddot{\theta}=\sin\theta\cos\theta\dot{\phi}-\frac{g\sin\theta}{r}-\frac{2\dot{r}\dot{\theta}}{r}



\ddot{r}=r\dot{\theta}^2+r\sin^2\theta\dot{\phi}^2+g\cos\theta-\frac{k}{m}\left(r-1\right)

and

\ddot{\phi}=-\dot{\phi}\left[\frac{2\dot{r}}{r}+2\cot\theta\right]

I keep getting the same result I had. Did you start with the same motion equations as mine? My \ddot \theta is worth - \ddot \theta of yours. The same apply for \ddot r. And for \ddot \phi, I still get this "r" term in front of the \cot (\theta ) term.
 
Physics news on Phys.org
  • #32
Well your Lagrangian is

L=\frac{1}{2}m\left(\dot{r}^2+r^2\dot{\theta}^2+r^2\sin^2\theta\dot{\phi}^2\right)+mgr\cos\theta-\frac{1}{2}k\left(r-1\right)^2

So then the Euler-Lagrange equations come from

\frac{d}{dt}\left(\frac{\partial L}{\partial\dot{q}}\right)-\frac{\partial L}{\partial q}=0

where q is your coordinate. Looking at \phi (because it's the most simple)

\frac{d}{dt}\left(\frac{\partial L}{\partial\dot{\phi}}\right)-\frac{\partial L}{\partial\phi}=\frac{d}{dt}\left(mr^2\sin^2\theta\dot{\phi}\right)=0

Clearly m doesn't change, this gives that

\frac{d}{dt}\left(mr^2\sin^2\theta\dot{\phi}\right)=2mr\dot{r}\sin^2\theta\dot{\phi}+2mr^2\sin\theta\cos\theta\dot{\theta}\dot{\phi}+mr^2\sin^2\theta\ddot{\phi}=0

So then solving for \phi-double-dot:

mr^2\sin^2\theta\ddot{\phi}=-2mr\dot{r}\sin^2\theta\dot{\phi}-2mr^2\sin\theta\cos\theta\dot{\theta}\dot{\phi}

Canceling m and dividing by r-squared & sine-squared

\ddot{\phi}=-2\frac{\dot{r}\dot{\phi}}{r}-2\cot\theta\dot{\theta}\dot{\phi}

So it seems (being more careful now) that I forgot a term (d\theta/dt), but that r does not belong in front of the cotangent term.
 
  • #33
L=\frac{1}{2}m\left(\dot{r}^2+r^2\dot{\theta}^2+r^2\sin^2\theta\dot{\phi}^2\right)+mgr\cos\theta-\frac{1}{2}k\left(r-1\right)^2

Then looking at the r-coordinate,

\frac{d}{dt}\left(\frac{\partial L}{\partial\dot{r}}\right)-\frac{\partial L}{\partial r}=0

we get

\frac{d}{dt}\left(m\dot{r}\right)-mr\dot{\theta}^2-mr\sin^2\theta\dot{\phi}^2-mg\cos\theta+k\left(r-1\right)=0

Which gives

\ddot{r}=r\dot{\theta}^2+r\sin^2\theta\dot{\phi}^2+g\cos\theta-\frac{k}{m}\left(r-1\right)

Similarly for \theta:

\frac{d}{dt}\left(mr^2\dot{\theta}\right)-mr^2\sin\theta\cos\theta\dot{\phi}^2+mgr\sin\theta=0

\ddot{\theta}=\sin\theta\cos\theta\dot{\phi}^2-\frac{g\sin\theta}{r}-\frac{2\dot{r}\dot{\theta}}{r}<br />
 
Last edited:
  • #34
Hey jdwood983, I agree with your 2 last posts. To convince myself I've redone all the arithmetic from the Lagrangian and I get exactly the same result as yours now. My previous errors were in applying E-L equation.
I think the problem is solved. The remaining part is numerical.
Thanks for all to both. :wink:
 
  • #35
Not a problem, glad I (we) could help!
 
  • #36
Ok before putting an end to this thread, I'd like some help to get the initial conditions.
The initial position of the mass is (0,1,0) in Cartesian coordinates. So it makes (1,\pi /2,\pi /2) in spherical.
The initial velocity of the mass is (0,0,-1/2) in Cartesian coordinates. I'm not sure how to convert this into spherical ones.
An attempt of mine is to write \vec v_0=-\frac{1}{2}\hat z=\frac{\sin (\theta) \hat \theta}{2}-\frac{\cos (\theta)\hat r}{2}. I don't know how to proceed from here.

Edit: Hmm, is it just (1/2,0, \pi)?
Edit 2: Well I think so. This would mean \dot r (0)=1/2, \dot \phi (0)=0 and \dot \theta (0)=\pi. I hope someone can confirm this.
 
Last edited:
  • #37
Any idea? I'm not sure I have the right initial conditions. I hope someone can confirm if they're good.
 
  • #38
It does look fine to me, the (0.5,0,pi):

r=\sqrt{x^2+y^2+z^2}=\sqrt{1/4}=1/2

\theta=\cos^{-1}\left[\frac{z}{r}\right]=\cos^{-1}\left[1\right]=0

\phi=\tan^{-1}\left[\frac{x}{y}\right]\rightarrow\piEDIT: Technically, \phi is undefined because x=0 divided by y=0 is undefined, but given your position it should be okay (note that my \phi is your \theta, I was taught coordinates this way and always use it)
 
  • #39
Ok thank you jdwood983. Problem solved. I'll now tackle the numerical part!
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
9
Views
4K
Replies
3
Views
2K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
Replies
6
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
Replies
7
Views
5K
  • · Replies 2 ·
Replies
2
Views
5K