How Do You Derive the Cosine of an Integral in Pendulum Motion?

  • Context: Undergrad 
  • Thread starter Thread starter Andreas C
  • Start date Start date
  • Tags Tags
    Derivative Integral
Click For Summary

Discussion Overview

The discussion revolves around deriving the cosine of an integral in the context of pendulum motion using the Lagrangian approach. Participants explore the mathematical formulation and differentiation involved in the motion of a simple pendulum under gravitational influence, focusing on the derivatives of trigonometric functions and their implications in the Euler-Lagrange equation.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant expresses confusion about the derivative of a cosine function with respect to time and seeks clarification on the expression d(cosθ)/(dθ/dt).
  • Another participant points out the need for using partial derivatives instead of total derivatives in the context of the Lagrangian mechanics.
  • There is a discussion about the correct formulation of the Euler-Lagrange equation and the necessity of differentiating the Lagrangian with respect to both position and velocity variables.
  • Participants explore the implications of signs in derivatives, particularly concerning stable and unstable equilibria in pendulum motion.
  • One participant realizes a mistake in their calculations regarding the kinetic energy term and seeks confirmation on their revised understanding.
  • There is a mention of the relationship between the derived equations of motion and the characteristics of harmonic oscillators, specifically under small amplitude approximations.

Areas of Agreement / Disagreement

Participants generally agree on the need for careful differentiation and the use of partial derivatives in the context of the Lagrangian. However, there are multiple competing views regarding the interpretation of signs in derivatives and the implications for stability in the pendulum's motion. The discussion remains unresolved on some aspects, particularly regarding the transition from the derived equations to their physical interpretations.

Contextual Notes

Limitations include potential misunderstandings about the application of derivatives in the context of Lagrangian mechanics, as well as unresolved mathematical steps in the derivation process. The discussion also highlights the dependency on the assumptions made regarding small angle approximations in pendulum motion.

Who May Find This Useful

This discussion may be useful for students and enthusiasts of classical mechanics, particularly those interested in Lagrangian dynamics and the mathematical treatment of pendulum motion.

Andreas C
Messages
196
Reaction score
20
OK, I lied a bit. It's not JUST the derivative of an integral. It's the derivative of a cosine of an integral. Solving the problem of the motion of a simple pendulum under a gravitational field using the lagrangian, I came into this mess (which I don't know if it's right):
l^2*((dθ/dt)/dt)-mg*d(cosθ)/(dθ/dt)=dL/dθ

The part I want to focus on is d(cosθ)/(dθ/dt). I know d(cosθ) is not a constant, because it depends on dθ/dt, since it's its integral with respect to dt, but how do I find what it is?
 
Physics news on Phys.org
Andreas C said:
(which I don't know if it's right):
Why don't you show us the full problem statement and the way you found this 'mess'
 
BvU said:
Why don't you show us the full problem statement and the way you found this 'mess'

OK, I will, I just have to mention that I meant d(cosθ)/d(dθ/dt), not d(cosθ)/(dθ/dt), that wouldn't make sense anyway.
 
Yes. And then it still doesn't make sense: you also have to mention the same thing for the lefthand side: not (dθ/dt)/dt but d(dθ/dt)/dt :smile:.

Furthermore -- and this is rather important -- you don't really mean d(cosθ)/(dθ/dt) ##\qquad## (or rather $$ {d\cos\theta \over {d{d\theta\over dt} }} $$ but instead you mean $$
{\partial \cos\theta \over {\partial {d\theta\over dt} } }$$ The ##\partial## derivative is different from the ##d## derivative (I think it's called the total derivative). Look it up - it appears a lot more in physics. The Euler Lagrange equation is a partial differential equation.

Meaning you consider ##\mathcal{L}## as a function of independent variables ##q## and ##\dot q## and take partial derivatives (differentiate to the one while keeping the other constant):$$
{ \partial \mathcal{L} \over \partial q} - {d\over dt}\left (\partial L\over\partial \dot q \right ) = 0
$$And what do you get when you do a partial differentiation wrt ##\dot \theta## of your $$\mathcal L = {m\over 2} \left (\ell\dot\theta\right)^2 - mg\ell\left (1-\cos\theta\right ) \ \ \rm ? $$
 
  • Like
Likes   Reactions: Andreas C
BvU said:
Yes. And then it still doesn't make sense: you also have to mention the same thing for the lefthand side: not (dθ/dt)/dt but d(dθ/dt)/dt :smile:.

Furthermore -- and this is rather important -- you don't really mean d(cosθ)/(dθ/dt) ##\qquad## (or rather $$ {d\cos\theta \over {d{d\theta\over dt} }} $$ but instead you mean $$
{\partial \cos\theta \over {\partial {d\theta\over dt} } }$$ The ##\partial## derivative is different from the ##d## derivative (I think it's called the total derivative). Look it up - it appears a lot more in physics. The Euler Lagrange equation is a partial differential equation.

Meaning you consider ##\mathcal{L}## as a function of independent variables ##q## and ##\dot q## and take partial derivatives (differentiate to the one while keeping the other constant):$$
{ \partial \mathcal{L} \over \partial q} - {d\over dt}\left (\partial L\over\partial \dot q \right ) = 0
$$And what do you get when you do a partial differentiation wrt ##\dot \theta## of your $$\mathcal L = {m\over 2} \left (\ell\dot\theta\right)^2 - mg\ell\left (1-\cos\theta\right ) \ \ \rm ? $$

That is actually exactly what I meant. That symbol is called the partial derivative, but I didn't know how to insert it, and I thought it would be the same, thanks :) I'm going to work it out.
 
Hint: shouldn't take long !
 
BvU said:
Hint: shouldn't take long !
I'm going to do it when I'm back home, I am on my phone now!
 
BvU said:
Hint: shouldn't take long !

I got (m*l^2*(dθ/dt))/2, is that right?

Edit: for ∂L/∂θ I got -mgl*sinθ, should I worry about the minus sign? Don't worry, it's not for homework, I'm teaching myself classical mechanics.
 
Last edited:
  • Like
Likes   Reactions: BvU
Andreas C said:
I got (m*l^2*(dθ/dt))/2, is that right?
no, you still want to differentiate it !
The hint was a nudge to make you see (which you did) that ##\cos\theta## is not a function of ##\dot\theta## so the partial derivative of ##V## wrt ##\dot\theta## is zero.
for ∂L/∂θ I got -mgl*sinθ, should I worry about the minus sign?
Yes you should. It's the difference beteween a stable equilibrium at ##\theta = 0## and an unstable one.
Don't worry, it's not for homework, I'm teaching myself classical mechanics.
Kudos! Not an easy subject all on your own. Good thing there is PF :smile:!
 
  • #10
BvU said:
no, you still want to differentiate it !
The hint was a nudge to make you see (which you did) that ##\cos\theta## is not a function of ##\dot\theta## so the partial derivative of ##V## wrt ##\dot\theta## is zero.
Yes you should. It's the difference beteween a stable equilibrium at ##\theta = 0## and an unstable one.
Kudos! Not an easy subject all on your own. Good thing there is PF :smile:!

Ηmmm... I'm a bit confused now... Are you saying I have to differentiate (m*l^2*(dθ/dt))/2 again?

BvU said:
Yes you should.

So I should have a plus sign instead of a minus one?
 
  • #11
Ok, I think I found the mistake, I forgot to cancel out the *1/2 with the *2, so in the case of ∂L/∂(dθ/dt) it's just ((m*l^2)/2)*(∂(dθ/dt)^2/∂(dθ/dt)), right? Well, (∂(dθ/dt)^2/∂(dθ/dt))=2*(dθ/dt), so ((m*l^2)/2)*((dθ/dt)^2/(dθ/dt))=m*l^2*(dθ/dt). That's correct, isn't it?
 
  • #12
Andreas C said:
Are you saying I have to differentiate (m*l^2*(dθ/dt))/2 again?
Not 'again'. m*l^2*(dθ/dt))/2 is the kinetic energy T in ##\mathcal L = T - V\ ##. You haven't differentiated it yet.
[edit] My mistake, I misread the /2 for ^2. Anyway, you found it and fixed it.
Andreas C said:
So I should have a plus sign instead of a minus one?
Certainly not. You got a minus sign for ##{d\mathcal L\over d\theta}## and you want to keep it. The Euler Lagrange equation is $${ \partial \mathcal{L} \over \partial q} - {d\over dt}\left (\partial L\over\partial \dot q \right ) = 0$$ and if you do it right you automatically end up with ##\ddot \theta + \omega^2 \sin\theta = 0##.

(or, of course ##- \omega^2 \sin\theta - \ddot \theta = 0## :smile: ) .
 
  • Like
Likes   Reactions: Andreas C
  • #13
BvU said:
Not 'again'. m*l^2*(dθ/dt))/2 is the kinetic energy T in ##\mathcal L = T - V\ ##. You haven't differentiated it yet.
Certainly not. You got a minus sign for ##{d\mathcal L\over d\theta}## and you want to keep it. The Euler Lagrange equation is $${ \partial \mathcal{L} \over \partial q} - {d\over dt}\left (\partial L\over\partial \dot q \right ) = 0$$ and if you do it right you automatically end up with ##\ddot \theta + \omega^2 \sin\theta = 0##.

(or, of course ##- \omega^2 \sin\theta - \ddot \theta = 0## :smile: ) .

Ok, I think I've got it: ##\ddot \theta##=-mgl*sinθ. Is that what you mean?
 
  • #14
Yes! Well done.

(you lost a factor ml2 on the left, however...)
 
  • Like
Likes   Reactions: Andreas C
  • #15
BvU said:
Yes! Well done.

(you lost a factor ml2 on the left, however...)

Hmmm... ∂L/∂θ=∂V/∂θ=mgl*(∂(1-cosθ)/∂θ)=-mgl*sinθ, where does l^2 come from?
 
Last edited:
  • #16
Ooooh, I just realized what you meant! Well, since it was ##ml^2 \ddot θ =-mgl*sinθ##, l^2 cancels out with l, and we're left with just l.
 
  • #17
Oh my god, what a tangle I have gotten myself into! Well, it's the first problem I solve using the lagrangian, so I guess it is to be expected...
If my calculations are correct, then ##ml^2 \ddot θ =-mgl*sinθ##, which means that ##\ddot θ = -(g*sinθ)/l##, which doesn't sound right at all...
 
  • #18
Actually, I looked it up and it IS correct! Yay! Thanks a lot for your patience, you were very helpful! However, there's one thing I don't understand: how does g/l become ω^2?
 
  • #19
For a harmonic oscillator (pendulum with small amplitude, ##\ \theta\approx \sin\theta\ ##) the equation is ##\ddot\theta + \omega^2\theta=0\ ## with solution ##\theta = a \sin\omega t + b\cos\omega t##.

The period is ##T = {2\pi\over \omega} = 2\pi\sqrt{\ell/g}##.
 
  • Like
Likes   Reactions: Andreas C
  • #20
BvU said:
For a harmonic oscillator (pendulum with small amplitude, ##\ \theta\approx \sin\theta\ ##) the equation is ##\ddot\theta + \omega^2\theta=0\ ## with solution ##\theta = a \sin\omega t + b\cos\omega t##.

The period is ##T = {2\pi\over \omega} = 2\pi\sqrt{\ell/g}##.

Ah, ok, so it's a special case. However, the equation of motion I found here is for any amplitude, right?

Also, say I now want to find the x and y components of acceleration and velocity. How do I do that? I had a couple of ideas but I'm not sure if they are going to be fruitful...
 
  • #21
Andreas C said:
However, the equation of motion I found here is for any amplitude, right
the equation of motion is a second order differential equation. A solution needs two boundary conditions, e.g. an amplitude and a phase (or the a and b in the expression above).
Andreas C said:
Also, say I now want to find the x and y components of acceleration and velocity
For that you need to express x and y in ##\theta## ; rather straightforward !
 
  • #22
BvU said:
the equation of motion is a second order differential equation. A solution needs two boundary conditions, e.g. an amplitude and a phase (or the a and b in the expression above).
For that you need to express x and y in ##\theta## ; rather straightforward !

So I have to know the initial θ in the case of a pendulum starting from a stationary position, because that would be the amplitude. What about the phase?

Also, what do you mean by "For that you need to express x and y in ##\theta## ; rather straightforward !"?
Does that mean that ##\ddot x = l*sin\ddotθ##?
 
Last edited:
  • #23
Andreas C said:
So I have to know the initial θ in the case of a pendulum starting from a stationary position, because that would be the amplitude. What about the phase?
Never done a mass and spring oscillator before ?
##\ \ddot\theta = -\omega^2\theta\ ## with ##\ \theta(0) = \theta_0\ ## and ##\ \dot \theta(0) = 0\ ## gives ##\ \theta(t) = \theta_0\cos(\omega t) = \theta_0\sin(\omega t + {\pi\over 2})##
Andreas C said:
Does that mean that ##\ddot x = l*\sin\ddot\theta \rm ?##
As long as ##\sin\theta\approx\theta## you have ##x=\ell\theta## so ##\dot x = \ell\dot\theta## and ##\ddot x = \ell\ddot\theta## etc. With ##x=\ell\sin\theta## things get more complicated (http://web.mit.edu/8.01t/www/materials/modules/chapter24.pdf).
 
  • #24
BvU said:
Never done a mass and spring oscillator before ?
##\ \ddot\theta = -\omega^2\theta\ ## with ##\ \theta(0) = \theta_0\ ## and ##\ \dot \theta(0) = 0\ ## gives ##\ \theta(t) = \theta_0\cos(\omega t) = \theta_0\sin(\omega t + {\pi\over 2})##
As long as ##\sin\theta\approx\theta## you have ##x=\ell\theta## so ##\dot x = \ell\dot\theta## and ##\ddot x = \ell\ddot\theta## etc. With ##x=\ell\sin\theta## things get more complicated (http://web.mit.edu/8.01t/www/materials/modules/chapter24.pdf).

Yeah, but that would be the phase for sinθ approaching θ, and I'm looking to find the equations for any amplitude, not just very small ones... It also bugs me how for some reason, the angular acceleration always turns out to be negative, shouldn't it be positive when the angular speed is increasing, like after it reaches the maximum height?
 
  • #25
Andreas C said:
I'm looking to find the equations for any amplitude, not just very small ones...
Well, what of the link? There are more of those (google mathematical pendulum, physical pendulum or just pendulum). If you just want the equations: yoeru can differentiate ##\ x =\ell\sin\theta\ ## yourself, I expect ? Is there a specific question ?
It also bugs me how for some reason, the angular acceleration always turns out to be negative, shouldn't it be positive when the angular speed is increasing, like after it reaches the maximum height?
Where did you get that idea ? The minus sign only indicates the restoring force (and hence the acceleration) is opposite to the deviation from equilibrium ! If the deviation is negative, the acceleration is positive.

A thorough understanding of harmonic oscillators is very important for many areas of physics. If you have energy left over, studying things like damping is more useful than studying the implications of ##\ \sin\theta\ ##not ## \ \approx\theta\ ## (my opinion).
 
  • Like
Likes   Reactions: Andreas C
  • #26
BvU said:
Well, what of the link? There are more of those (google mathematical pendulum, physical pendulum or just pendulum). If you just want the equations: yoeru can differentiate x=ℓsinθ x=ℓsin⁡θ \ x =\ell\sin\theta\ yourself, I expect ? Is there a specific question ?

Oh, so I have to do the differentiation all over again... Ok, I thought there would be a more immediate way to do it, but yeah, I can differentiate that... Not that it's easy...

BvU said:
Where did you get that idea ? The minus sign only indicates the restoring force (and hence the acceleration) is opposite to the deviation from equilibrium ! If the deviation is negative, the acceleration is positive.

Would there ever be a negative deviation? Anyway, I think I got it: It IS always negative, and that is to be expected, why? Because there are two cases: when the pendulum is "falling" (1), and when it is "climbing" back to its maximum height (2). In case (1), we've got an increasing negative angular velocity (the angle is decreasing at an increasing rate), so the angular acceleration is negative as well. Then, in case (2), we've got a decreasing positive angular velocity (the angle is increasing at a decreasing way), so in both cases, the angular acceleration is negative.

Is this right? Because conceptually, it seems to be right...

BvU said:
A thorough understanding of harmonic oscillators is very important for many areas of physics. If you have energy left over, studying things like damping is more useful than studying the implications of sinθ sin⁡θ \ \sin\theta\ not ≈θ ≈θ \ \approx\theta\ (my opinion).

Oh don't worry, I'm doing that as well! :)
 
  • #27
Andreas C said:
Not that it's easy...
? Try it and post if in doubt.
Andreas C said:
Would there ever be a negative deviation?
Yes, half the time ##\theta < 0## (when it is to the left of the vertical :smile:). Perhaps the word 'deviation' can be misleading. Does F = ##-##kx with a mass/spring give you the same difficulties ?
Andreas C said:
when the pendulum is "falling"
When it's on the left and falling, ##\theta < 0##, ##\dot\theta > 0## and ##\ddot\theta > 0##.
When it's on the right and falling, ##\theta > 0##, ##\dot\theta < 0## and ##\ddot\theta < 0##.
When it's on the right and going up, ##\theta > 0##, ##\dot\theta > 0## and ##\ddot\theta < 0##.
When it's on the leftt and going up, ##\theta < 0##, ##\dot\theta < 0## and ##\ddot\theta > 0##.

All nicely summarized with $$\theta = \cos(\omega t) \\ \dot\theta = -\omega\sin(\omega t) \\ \ddot\theta =-\omega^2\cos(\omega t) = -\omega^2\theta$$
Andreas C said:
Oh don't worry, I'm doing that as well!
Good ! So, are you currently doing Lagrangian and Hamiltionian mechanics or the more basic conventional mechanics ?
 
  • #28
BvU said:
? Try it and post if in doubt.

With respect to what do I have to differentiate it? With respect to time, right? But then it's a mess, because θ is a function of time...

BvU said:
Yes, half the time θ<0θ<0\theta < 0 (when it is to the left of the vertical :smile:). Perhaps the word 'deviation' can be misleading. Does F = −−-kx with a mass/spring give you the same difficulties ?

Uh... Not really, it's just that negative angles don't make much sense to me, I prefer to think them as reflex angles, as in this shape: https://www.dropbox.com/s/izc1t8vnidfw5tj/Screen Shot 2016-05-25 at 3.37.26 PM.png?dl=0 (not sure how to import pictures on this site).

BvU said:
Good ! So, are you currently doing Lagrangian and Hamiltionian mechanics or the more basic conventional mechanics ?

Some basic (just filling in the gaps), mostly Lagrangian (just started), and I've read up a couple of concepts of Hamiltonian mechanics.
 
  • #29
Andreas C said:
negative angles don't make much sense to me
For Euler-Lagrange you need a continuous coordinate at the equilibrium point.
And for simple physics too: if you let the pendulum go at A', then at A it has ##\dot\theta <0## so it will move into ##\theta < 0##. With your angles you get a very jumpy and weird looking graph of ##\theta(t)## !
 
  • Like
Likes   Reactions: Andreas C
  • #30
BvU said:
For Euler-Lagrange you need a continuous coordinate at the equilibrium point.
And for simple physics too: if you let the pendulum go at A', then at A it has ##\dot\theta <0## so it will move into ##\theta < 0##. With your angles you get a very jumpy and weird looking graph of ##\theta(t)## !

Ok, I'll keep it in mind. Now if I want to differentiate ##x=ℓsinθ ## to find the x components of acceleration, with respect to what do I differentiate it? Time right? Well, I will have to find θ as a function of time then, right?
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
Replies
5
Views
1K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K