Finding the Lagrangian for a 3D Spring Pendulum

In summary, the student attempted to solve a problem involving a spring pendulum by using spherical and Cartesian coordinates, but found that the resulting Lagrangian was too long and complicated to work with. After simplifying the equation, they found that they needed to add two terms to the Lagrangian to make it work.
  • #1
fluidistic
Gold Member
3,923
261

Homework Statement


If I consider a 3 dimensional problem related to a spring pendulum (a mass attached to the end of a spring of constant k and the other end of the spring remains fixed) and I want to find the equations of motion of the mass (for several initial conditions), what system of coordinates would you choose? I'm trying to find the Lagrangian of the system and I chose spherical coordinates to express the position of the mass, its velocity and its kinetic energy. However the expression is really long (5 lines in my draft, I may post what I obtained here if you ask for it), I just wonder if I should have used another coordinate system.
I didn't get any term which canceled out with others. I'm going to redo the arithmetics tomorrow (it's 2 a.m. now) but I don't think I made some error. So is it normal to get an enormous expression for the Lagrangian of the system? Say a roughly 5 times longer Lagrangian than for the common double pendulum system?




Homework Equations





The Attempt at a Solution

 
Physics news on Phys.org
  • #2
I'm not sure but I think Cartesian coordinate in easier than Spherical coordinate.
 
  • #3
IPhO' 2008 said:
I'm not sure but I think Cartesian coordinate in easier than Spherical coordinate.

No, Cartesian coordinates are definitely not the way to go for this spherical pendulum problem.

Consider first the Lagrangian for a spherical pendulum with a rigid (but massless) rod:

[tex]L=\frac{1}{2}mr^2\left(\dot{\theta}^2+\sin^2\theta\dot{\phi}^2\right)+mgr\cos\theta[/tex]

What would you need to change in this Lagrangian to include a spring?
 
Last edited:
  • #4
Thanks to both for the help.
jdwood983 said:
No, Cartesian coordinates are definitely not the way to go for this spherical pendulum problem.

Consider first the Lagrangian for a spherical pendulum with a rigid (but massless) rod:

[tex]L=\frac{1}{2}mr^2\left(\dot{\theta}^2+\sin^2\theta\dot{\phi}^2\right)+mgr\cos\theta[/tex]

What would you need to change in this Lagrangian to include a spring?
I think I'd need to subtract the potential energy stored within the spring from the Lagrangian you gave. Not sure it is all, but I think it's a good start. What else could I add? Maybe the influence on the velocity of the mass due to the movement of the spring.

Anyway, via my way I reached [tex]\dot \vec r = \left [ \dot \theta r \cos (\phi) \cos (\theta) + \dot r \sin (\theta) \cos (\phi )- r \dot \phi \sin (\phi) \sin (\theta) \right ] \hat i + \left [ \dot r \sin (\phi) \sin (\theta) + r \dot \phi \cos (\phi ) \sin (\theta ) + r \dot \theta \sin (\phi) \cos (\theta) \right ] \hat j + \left [ \dot r \cos (\theta) - r \dot \theta \sin (\theta) \right ] \hat k[/tex].
But for the Lagrangian I need the modulus squared of this expression. So I have to sum up each components squared... I got that no term cancel out, you can imagine how large the expression is.
 
  • #5
Don't forget that

[tex]\left|\vec{r}\right|^2=\vec{r}\cdot\vec{r}=r_i^2+r_j^2+r_k^2[/tex]

and that

[tex]r^2\sin^2[\phi]\cos^2[\theta]+r^2\sin^2[\phi]\sin^2[\theta]=r^2\sin^2[\phi]\left(\cos^2[\theta]+\sin^2[\theta]\right)=r^2\sin^2[\phi][/tex]

There are specifically two terms you would need to add (or subtract) to the Lagrangian I gave to make it work for you (you pointed out one, and using the above, you should figure out the other).
 
  • #6
jdwood983 said:
Don't forget that

[tex]\left|\vec{r}\right|^2=\vec{r}\cdot\vec{r}=r_i^2+r_j^2+r_k^2[/tex]
Yeah I'm not forgetting. That's why I said "So I have to sum up each components squared..."
and that

[tex]r^2\sin^2[\phi]\cos^2[\theta]+r^2\sin^2[\phi]\sin^2[\theta]=r^2\sin^2[\phi]\left(\cos^2[\theta]+\sin^2[\theta]\right)=r^2\sin^2[\phi][/tex]

There are specifically two terms you would need to add (or subtract) to the Lagrangian I gave to make it work for you (you pointed out one, and using the above, you should figure out the other).
Ok perfect, I didn't notice I could use this simplification. I'll be looking for it in the "giant" expression.
 
  • #7
fluidistic said:
Yeah I'm not forgetting. That's why I said "So I have to sum up each components squared..."

Now I notice that statement, whoops :blushing:

fluidistic said:
Ok perfect, I didn't notice I could use this simplification. I'll be looking for it in the "giant" expression.

When you finish simplifying, you should pat yourself on the back and then memorize that form for the kinetic energy (assuming it is correct), as it is a very common formula in classical mechanics.
 
  • #8
jdwood983 said:
Now I notice that statement, whoops :blushing:
No problem, your help is very much appreciated.

When you finish simplifying, you should pat yourself on the back and then memorize that form for the kinetic energy (assuming it is correct), as it is a very common formula in classical mechanics.

Ok, good to know. I just want to make sure I'll be memorizing a useful formula instead of an erroneous one!
After a lot of arithmetic and simplification, I reach [tex]|\vec{r}|^2=r^2 \left [ \dot \theta ^2 \cos ^2 (\theta) + (\dot \phi ^2 + \dot \theta ^2) \sin ^2 (\theta) \right ]+ \dot r ^2 + 2 \sin (\theta) \left { (r^2-1) \dot \theta \dot \phi \cos (\phi) \cos (\theta) \sin (\phi) + r \dot r \dot \theta \cos (\theta) \sin ^2 (\phi) \right }[/tex].
I doubt it's correct. Do you get something similar?
 
  • #9
I think you might have made a mistake somewhere. For ease, I'll look at each component individually:

[tex]\dot{r}_x^2=\dot{\theta}^2r^2\cos^2\phi\cos^2\theta+\dot{r}^2\sin^2\phi\cos^2\theta-r^2\dot{\phi}^2\sin^2\phi\sin^2\theta+2r\dot{r}\sin\theta\cos\theta\cos^2\phi-2r^2\dot{\theta}\dot{\phi}\cos\phi\sin\phi\cos\theta\sin\theta-2r\dot{r}\dot{\phi}\cos\phi\sin\phi\sin^2\theta[/tex]

[tex]\dot{r}_y^2=\dot{r}^2\sin^2\theta\sin^2\phi+r^2\dot{\phi}^2\cos^2\phi\sin^2\theta+r^2\dot{\theta}^2\sin^2\phi\cos^2\theta+2r\dot{r}\dot{\phi}\cos\phi\sin\phi\sin^2\theta+2r\dot{r}\dot{\theta}\sin\theta\cos\theta\sin^2\phi+2rr^2\dot{\phi}\dot{\theta}\cos\theta\sin\theta\cos\phi\sin\phi[/tex]

[tex]\dot{r}_z^2=\dot{r}^2\cos^2\theta-r^2\dot{\theta}^2\sin^2\theta-2r\dot{r}\dot{\theta}\sin\theta\cos\theta[/tex]

You can see clearly that a couple terms will cancel. Another three terms will cancel when you use the sine-square plus cosine-square law:

[tex]2r\dot{r}\dot{\theta}\sin\theta\cos\theta\cos^2\phi+2r\dot{r}\dot{\theta}\sin\theta\cos\theta\sin^2-2r\dot{r}\dot{\theta}\sin\theta\cos\theta=2r\dot{r}\dot{\theta}\sin\theta\cos\theta\left(\cos^2\phi+\sin^2\right)-2r\dot{r}\dot{\theta}\sin\theta\cos\theta=2r\dot{r}\dot{\theta}\sin\theta\cos\theta-2r\dot{r}\dot{\theta}\sin\theta\cos\theta=0[/tex]

This will then reduce your equation to

[tex]\dot{r}_{x}^{2}=\dot{\theta}^{2}r^{2}\sin^{2}\phi\cos^{2}\theta+\dot{r}^{2}\sin^{2}\phi\cos^{2}\theta-r^{2}\dot{\phi}^{2}\sin^{2}\phi\sin^{2}\theta[/tex]

[tex]\dot{r}_{y}^{2}=\dot{r}^{2}\sin^{2}\theta\sin^{2}\phi+r^{2}\dot{\phi}^{2}\cos^{2}\phi\sin^{2}\theta+r^{2}\dot{\theta}^{2}\sin^{2}\phi\cos^{2}\theta[/tex]

[tex]\dot{r}_{z}^{2}=\dot{r}^{2}\cos^{2}\theta-r^{2}\dot{\theta}^{2}\sin^{2}\theta[/tex]

When you add these & simplify, you should get

[tex]\left|\dot{\vec{r}}\right|^2=\dot{r}^2+r^2\dot{\theta}^2+r^2\dot{\phi}^2\sin^2\theta[/tex]

EDIT: I keep finding more errors each time I look at this (I wasn't too careful about minus signs and keeping my order straight of sines, cosines, thetas, & phis). The last line is correct, you should redo your math and convince yourself that it is because I could be here all night as well fixing my minor mistakes above.
 
Last edited:
  • #10
jdwood983 said:
I think you might have made a mistake somewhere. For ease, I'll look at each component individually:

[tex]\dot{r}_x^2=\dot{\theta}^2r^2\cos^2\phi\cos^2\theta+\dot{r}^2\sin^2\phi\cos^2\theta-r^2\dot{\phi}^2\sin^2\phi\sin^2\theta+2r\dot{r}\sin\theta\cos\theta\cos^2\phi-2r^2\dot{\theta}\dot{\phi}\cos\phi\sin\phi\cos\theta\sin\theta-2r\dot{r}\dot{\phi}\cos\phi\sin\phi\sin^2\theta[/tex]

[tex]\dot{r}_y^2=\dot{r}^2\sin^2\theta\sin^2\phi+r^2\dot{\phi}^2\cos^2\phi\sin^2\theta+r^2\dot{\theta}^2\sin^2\phi\cos^2\theta+2r\dot{r}\dot{\phi}\cos\phi\sin\phi\sin^2\theta+2r\dot{r}\dot{\theta}\sin\theta\cos\theta\sin^2\phi+2rr^2\dot{\phi}\dot{\theta}\cos\theta\sin\theta\cos\phi\sin\phi[/tex]

[tex]\dot{r}_z^2=\dot{r}^2\cos^2\theta-r^2\dot{\theta}^2\sin^2\theta-2r\dot{r}\dot{\theta}\sin\theta\cos\theta[/tex]

You can see clearly that a couple terms will cancel. Another three terms will cancel when you use the sine-square plus cosine-square law:

[tex]2r\dot{r}\dot{\theta}\sin\theta\cos\theta\cos^2\phi+2r\dot{r}\dot{\theta}\sin\theta\cos\theta\sin^2-2r\dot{r}\dot{\theta}\sin\theta\cos\theta=2r\dot{r}\dot{\theta}\sin\theta\cos\theta\left(\cos^2\phi+\sin^2\right)-2r\dot{r}\dot{\theta}\sin\theta\cos\theta=2r\dot{r}\dot{\theta}\sin\theta\cos\theta-2r\dot{r}\dot{\theta}\sin\theta\cos\theta=0[/tex]

This will then reduce your equation to

[tex]\dot{r}_{x}^{2}=\dot{\theta}^{2}r^{2}\sin^{2}\phi\cos^{2}\theta+\dot{r}^{2}\sin^{2}\phi\cos^{2}\theta-r^{2}\dot{\phi}^{2}\sin^{2}\phi\sin^{2}\theta[/tex]

[tex]\dot{r}_{y}^{2}=\dot{r}^{2}\sin^{2}\theta\sin^{2}\phi+r^{2}\dot{\phi}^{2}\cos^{2}\phi\sin^{2}\theta+r^{2}\dot{\theta}^{2}\sin^{2}\phi\cos^{2}\theta[/tex]

[tex]\dot{r}_{z}^{2}=\dot{r}^{2}\cos^{2}\theta-r^{2}\dot{\theta}^{2}\sin^{2}\theta[/tex]

When you add these & simplify, you should get

[tex]\left|\dot{\vec{r}}\right|^2=\dot{r}^2+r^2\dot{\theta}^2+r^2\dot{\phi}^2\sin^2\theta[/tex]

EDIT: I keep finding more errors each time I look at this (I wasn't too careful about minus signs and keeping my order straight of sines, cosines, thetas, & phis). The last line is correct, you should redo your math and convince yourself that it is because I could be here all night as well fixing my minor mistakes above.
Ok thank you very much for all this (I know how tedious it is to write so much latex and do the math). I'm going to redo the math to see if I can reach your last line.
 
  • #11
A quicker method to calculating [itex]\dot{\mathbf{r}}[/itex], [itex](\dot{\mathbf{r}})^2[/itex] and [itex]\ddot{\mathbf{r}}[/itex] in Spherical coordinates is to first calculate the time derivatives of the spherical unit vectors, and then use those results. For example,

[tex]\begin{aligned}\frac{d \hat{\mathbf{r}} }{dt} &= \frac{d}{dt} \left( \sin\theta \cos\phi \hat{\mathbf{x}}+\sin\theta \sin\phi \hat{\mathbf{y}}+\cos\theta \hat{\mathbf{z}} \right) \\ &= \left( \cos\theta \cos\phi \hat{\mathbf{x}}+\cos\theta \sin\phi \hat{\mathbf{y}}-\sin\theta \hat{\mathbf{z}} \right)\dot{\theta}+\left( -\sin\theta \sin\phi \hat{\mathbf{x}}+\sin\theta \cos\phi \hat{\mathbf{y}} \right)\dot{\phi} \\ &= \dot{\theta}\hat{\mathbf{\theta}}+\sin\theta\dot{\phi}\hat{\mathbf{\phi}}\end{aligned}[/tex]

And so

[tex]\dot{\mathbf{r}}=\frac{d}{dt}\left(r\hat{\mathbf{r}}\right)=\dot{r}\hat{\mathbf{r}}+r\dot{\theta}\hat{\mathbf{\theta}}+r\sin\theta\dot{\phi}\hat{\mathbf{\phi}}[/tex]
 
  • #12
gabbagabbahey said:
A quicker method to calculating [itex]\dot{\mathbf{r}}[/itex], [itex](\dot{\mathbf{r}})^2[/itex] and [itex]\ddot{\mathbf{r}}[/itex] in Spherical coordinates is to first calculate the time derivatives of the spherical unit vectors, and then use those results. For example,

[tex]\begin{aligned}\frac{d \hat{\mathbf{r}} }{dt} &= \frac{d}{dt} \left( \sin\theta \cos\phi \hat{\mathbf{x}}+\sin\theta \sin\phi \hat{\mathbf{y}}+\cos\theta \hat{\mathbf{z}} \right) \\ &= \left( \cos\theta \cos\phi \hat{\mathbf{x}}+\cos\theta \sin\phi \hat{\mathbf{y}}-\sin\theta \hat{\mathbf{z}} \right)\dot{\theta}+\left( -\sin\theta \sin\phi \hat{\mathbf{x}}+\sin\theta \cos\phi \hat{\mathbf{y}} \right)\dot{\phi} \\ &= \dot{\theta}\hat{\mathbf{\theta}}+\sin\theta\dot{\phi}\hat{\mathbf{\phi}}\end{aligned}[/tex]

And so

[tex]\dot{\mathbf{r}}=\frac{d}{dt}\left(r\hat{\mathbf{r}}\right)=\dot{r}\hat{\mathbf{r}}+r\dot{\theta}\hat{\mathbf{\theta}}+r\sin\theta\dot{\phi}\hat{\mathbf{\phi}}[/tex]
Hey there :smile:. Thanks a lot for this shortcut, I was having a very hard time to simplify the expression I had to reach the answer.
I can understand 3 out of the 5 equal sign of your answer. I don't understand why do the 2nd and 3rd equal sign hold. For the second, it seems you considered the x, y and z unit vectors as constant. For the 3rd equal sign, how do you convert the x, y and z unit vectors into the phi and theta unit vectors?
 
  • #13
fluidistic said:
For the second, it seems you considered the x, y and z unit vectors as constant.

Of course! The only reason that curvilinear unit vectors aren't constant is that they depend on position, which in turn depends on time. The Cartesian unit vectors are position independent.(Draw the spherical unit vectors for two different position vectors [itex]\textbf{r}[/itex], and you will see they point in different directions, while the Cartesian unit vectors remain unchanged)

For the 3rd equal sign, how do you convert the x, y and z unit vectors into the phi and theta unit vectors?

Simple:

[tex]\hat{\mathbf{r}}=\sin\theta\cos\phi\hat{\mathbf{x}}+\sin\theta\sin\phi\hat{\mathbf{y}}+\cos\theta\hat{\mathbf{z}}[/tex]

[tex]\hat{\mathbf{\theta}}=\cos\theta\cos\theta\hat{\mathbf{x}}+\cos\theta\sin\phi\hat{\mathbf{y}}-\sin\theta\hat{\mathbf{z}}[/tex]

and

[tex]\hat{\mathbf{\phi}}=-\sin\phi\hat{\mathbf{x}}+\cos\phi\hat{\mathbf{y}}[/tex]
 
  • #14
You're right, I missed those points.
I'll be trying to get the Lagrangian now.
 
  • #15
Someone correct me if I'm wrong: the Lagrangian of the system is worth [tex]\frac{m}{2} (\dot r ^2 + r ^2 \dot \theta ^2+ \dot \phi ^2 r ^2 \sin ^2 \theta )+mg \cos \theta +\frac{k}{2} (\Delta r)^2[/tex].
I'm not sure how to express [tex]\Delta r[/tex]. I think it is [tex]\vec r - \vec r_0[/tex]. I already have [tex]\vec r[/tex], I need to find out [tex]r_0[/tex]. In Cartesian's coordinates I'd just take [tex]\vec r_0=(x_0, y_0, z_0)[/tex]. I'm not sure in spherical coordinates. May I have a bit more of help?
Or maybe it's just [tex](r, \phi , \theta)-(r_0, \phi _0 , \theta _0)=(r-r_0 , \phi - \phi _0 , \theta - \theta _0)[/tex]? But I have nothing like the expression I have for [tex]\vec r[/tex] expressed with spherical unit vectors.
 
  • #16
fluidistic said:
Someone correct me if I'm wrong: the Lagrangian of the system is worth [tex]\frac{m}{2} (\dot r \hat r + r \dot \theta \hat \theta+ \dot \phi r \sin \theta \hat \phi)+mg \cos \theta +\frac{k}{2} (\Delta r)^2[/tex].
I'm not sure how to express [tex]\Delta r[/tex] is. I think it is [tex]\vec r - \vec r_0[/tex]. I already have [tex]\vec r[/tex], I need to find out [tex]r_0[/tex]. In Cartesian's coordinates I'd just take [tex]\vec r_0=(x_0, y_0, z_0)[/tex]. I'm not sure in spherical coordinates. May I have a bit more of help?
Or maybe it's just [tex](r, \phi , \theta)-(r_0, \phi _0 , \theta _0)=(r-r_0 , \phi - \phi _0 , \theta - \theta _0)[/tex]? But I have nothing like the expression I have for [tex]\vec r[/tex] expressed with spherical unit vectors.

First, the kinetic energy should involve [itex](\dot{\mathbf{r}})^2[/itex], not just [itex]\dot{\mathbf{r}}[/itex]. Second, what is the equilibrium length of the spring?
 
  • #17
gabbagabbahey said:
First, the kinetic energy should involve [itex](\dot{\mathbf{r}})^2[/itex], not just [itex]\dot{\mathbf{r}}[/itex]. Second, what is the equilibrium length of the spring?

Yes, you're absolutely right, I corrected it a few minutes after I saw I made the error, just before you replied.
I wanted to solve the problem for an arbitrary equilibrium length. But in the problem it is 1 m, originally on the y axis. (and with an initial velocity different from 0).
 
  • #18
Well, wouldn't the displacement of the spring from equilibrium just be [itex]|r-d|[/itex], where [itex]d[/itex] is the equilibrium length?
 
  • #19
gabbagabbahey said:
Well, wouldn't the displacement of the spring from equilibrium just be [itex]|r-d|[/itex], where [itex]d[/itex] is the equilibrium length?

Looks true. :biggrin:
So the Lagrangian is [tex]L=\frac{m}{2}(\dot r ^2 + r^2 \dot \theta ^2 + \dot \phi ^2 r^2 \sin ^2 \theta)+mg r \cos \theta - \underbrace{\frac{k}{2}(r^4-2r^2+1)}_{\geq 0}[/tex].
Is this right?
 
  • #20
From the Lagrangian I posted (I hope it's right), I reached 3 equations of motions. I'm not really sure what to do from them. Should I calculate the modulus of [tex]\ddot r[/tex]?
Here they are: [tex]m[\dot \theta ^2 r + \dot \phi ^2 r \sin ^2 (\theta ) + g \cos (\theta) + \ddot r]+2kr (1-r^2)=0[/tex].
[tex]mr\sin (\theta)[(\ddot \phi r + \dot \phi 2 \dot r)\sin (\theta)+\dot \phi r^2 2 \cos (\theta)]=0[/tex].
Lastly, [tex]\cos (\theta ) \sin (\theta) \dot \phi r^2 -gr \sin (\theta)-2r \dot r \dot \theta+ r^2 \ddot \theta=0[/tex].
Now if I want to write a program to get say [tex](r, \phi, \theta)[/tex] in function of time, should I reduce these equations? The exercise states to "integrate the motion equations", so I guess I should integrate with respect to time the 3 equations I just posted?
 
  • #21
You should put these in the [tex]\ddot{x}=[/tex] form (where [itex]x=r,\theta,\phi[/tex], clearly) and then integrate. Were you given any initial conditions?
 
  • #22
jdwood983 said:
You should put these in the [tex]\ddot{x}=[/tex] form (where [itex]x=r,\theta,\phi[/tex], clearly) and then integrate. Were you given any initial conditions?
Thanks for helping once again.
Do you mean [tex]\ddot x[/tex], [tex]\ddot y[/tex] and [tex]\ddot z[/tex]? Also, isn't [tex]x=r \cos (\phi ) \sin (\theta)[/tex] instead of [itex]x=r,\theta,\phi[/tex]? I guess I'm misunderstanding you.
Yes I am given initial conditions, though I want to write a program that solve for any given initial condition.
 
  • #23
fluidistic said:
Thanks for helping once again.
Do you mean [tex]\ddot x[/tex], [tex]\ddot y[/tex] and [tex]\ddot z[/tex]? Also, isn't [tex]x=r \cos (\phi ) \sin (\theta)[/tex] instead of [itex]x=r,\theta,\phi[/tex]? I guess I'm misunderstanding you.
Yes I am given initial conditions, though I want to write a program that solve for any given initial condition.

No, sorry to mislead you. I meant you need to solve for [tex]\ddot{r}=[/tex], [tex]\ddot{\theta}=[/tex], and [tex]\ddot{\phi}[/tex] and not for x, y, & z.
 
  • #24
Shouldn't the spring term of your Lagrangian just be [itex]\frac{k}{2}(x-d)^2[/itex]?
 
  • #25
jdwood983 said:
No, sorry to mislead you. I meant you need to solve for [tex]\ddot{r}=[/tex], [tex]\ddot{\theta}=[/tex], and [tex]\ddot{\phi}[/tex] and not for x, y, & z.
Ah ok, perfect. Thank you.

gabbagabbahey said:
Shouldn't the spring term of your Lagrangian just be [itex]\frac{k}{2}(x-d)^2[/itex]?

Hey Gabba Gabba Hey. :smile: Hmm, I really don't see why x would be privileged over y and z. I thought that r instead of x made sense. When r=1, there was no elongation of the spring which made sense to me. Could you precise a bit more why x? I'm clueless.
 
  • #26
fluidistic said:
Ah ok, perfect. Thank you.
Hey Gabba Gabba Hey. :smile: Hmm, I really don't see why x would be privileged over y and z. I thought that r instead of x made sense. When r=1, there was no elongation of the spring which made sense to me. Could you precise a bit more why x? I'm clueless.
It should be [itex]k(r-d)^2/2[/itex], not [itex]x[/itex]. I believe he was just pointing out that it should be linear in your expression inside parenthesis so that you have a [itex]\frac{1}{2}kr^2[/itex] potential from a [itex]-kr[/itex] force.
 
Last edited:
  • #27
Yeah, sorry, I meant k(r-d)^2/2.
 
  • #28
Ah ok, thanks for pointing this out. I've no idea why I wrote [tex](r^2-1)^2[/tex] instead of [tex](r-1)^2[/tex]. So if I'm given the equilibrium length as 1, I can use 1 instead of d, right?
I'm going to modificate the "motion equations" I got. I'll be posting if I feel the need for further help. Up til now, thanks a lot to both!
 
  • #29
I'm glad I've reached the "motion equations", now I just hope they're right.
[tex]\ddot r=\frac{k}{m}(r-1)-\dot \theta ^2 r - \dot \phi ^2 r \sin ^2 (\theta)- g \cos (\theta)[/tex].
[tex]\ddot \phi =- \dot \phi \left [ 2r cot (\theta) + \frac{2 \dot r}{r} \right ], \forall \theta, r \neq 0[/tex].
And lastly [tex]\ddot \theta =\frac{2 \dot r \dot \theta}{r}+\frac{g}{r} \sin (\theta)- \dot \phi \cos (\theta) \sin (\theta)[/tex], [tex]\forall r \neq 0[/tex].
I hope they're right. I'm not interested in approximating [tex]\sin \theta[/tex] by [tex]\theta[/tex] for small angles because I'm thinking about using numerical methods to get an approximated solution for any initial angle. I just want to be sure to have the true equations of motion.
 
  • #30
fluidistic said:
I'm glad I've reached the "motion equations", now I just hope they're right.
[tex]\ddot r=\frac{k}{m}(r-1)-\dot \theta ^2 r - \dot \phi ^2 r \sin ^2 (\theta)- g \cos (\theta)[/tex].
[tex]\ddot \phi =- \dot \phi \left [ 2r cot (\theta) + \frac{2 \dot r}{r} \right ], \forall \theta, r \neq 0[/tex].
And lastly [tex]\ddot \theta =\frac{2 \dot r \dot \theta}{r}+\frac{g}{r} \sin (\theta)- \dot \phi \cos (\theta) \sin (\theta)[/tex], [tex]\forall r \neq 0[/tex].
I hope they're right. I'm not interested in approximating [tex]\sin \theta[/tex] by [tex]\theta[/tex] for small angles because I'm thinking about using numerical methods to get an approximated solution for any initial angle. I just want to be sure to have the true equations of motion.

Hmm, I got

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

and

[tex]\ddot{\phi}=-\dot{\phi}\left[\frac{2\dot{r}}{r}+2\cot\theta\right][/tex]
 
Last edited:
  • #31
jdwood983 said:
Hmm, I got

[tex]\ddot{\theta}=\sin\theta\cos\theta\dot{\phi}-\frac{g\sin\theta}{r}-\frac{2\dot{r}\dot{\theta}}{r}[/tex]



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

and

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

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

[tex]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[/tex]

So then the Euler-Lagrange equations come from

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

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

[tex]\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[/tex]

Clearly m doesn't change, this gives that

[tex]\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[/tex]

So then solving for [itex]\phi[/itex]-double-dot:

[tex]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}[/tex]

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

[tex]\ddot{\phi}=-2\frac{\dot{r}\dot{\phi}}{r}-2\cot\theta\dot{\theta}\dot{\phi}[/tex]

So it seems (being more careful now) that I forgot a term ([itex]d\theta/dt[/itex]), but that r does not belong in front of the cotangent term.
 
  • #33
[tex]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[/tex]

Then looking at the r-coordinate,

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

we get

[tex]\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[/tex]

Which gives

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

Similarly for [itex]\theta[/itex]:

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

[tex]\ddot{\theta}=\sin\theta\cos\theta\dot{\phi}^2-\frac{g\sin\theta}{r}-\frac{2\dot{r}\dot{\theta}}{r}
[/tex]
 
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!
 

Similar threads

  • Advanced Physics Homework Help
Replies
15
Views
2K
  • Advanced Physics Homework Help
Replies
3
Views
2K
  • Advanced Physics Homework Help
Replies
9
Views
3K
  • Advanced Physics Homework Help
Replies
0
Views
662
  • Advanced Physics Homework Help
Replies
6
Views
2K
  • Advanced Physics Homework Help
Replies
3
Views
2K
  • Advanced Physics Homework Help
Replies
2
Views
1K
  • Advanced Physics Homework Help
Replies
9
Views
2K
  • Advanced Physics Homework Help
Replies
7
Views
4K
  • Advanced Physics Homework Help
Replies
4
Views
3K
Back
Top