1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Solving for the motion of a 2 mass system using Lagrangian mech.

  1. Mar 27, 2014 #1
    1. The problem statement, all variables and given/known data

    Two equal masses are constrained by the spring-and-pulley system shown in the accompanying
    sketch. Assume a massless pulley and a frictionless surface. Let [itex]x[/itex] be the extension of the
    spring from its relaxed length. Derive the equations of motion by Lagrangian methods. Solve
    for x as a function of time with the boundary conditions [itex]x = 0[/itex],[itex] \frac{dx}{dt} = 0[/itex] at [itex]t =0[/itex]

    2. Relevant equations

    (1)[itex] \frac{∂L}{∂q_j}-\frac{d}{dt}\frac{∂L}{∂\dot{q_j}}+\sum_k λ_k(t)\frac{∂f_k}{∂q_j} = 0 [/itex]

    3. The attempt at a solution
    First I'll construct the Lagrangian [itex] L=T-U [/itex] , [itex] T= \frac{m}{2}[\dot{x}^2+\dot{y}^2] [/itex] , [itex] U = \frac{kx}{2}+mgy → L = \frac{m}{2}[\dot{x}^2+\dot{y}^2] - \frac{kx}{2}-mgy [/itex]

    Okay now, I also have the constraint that the total length of the string doesn't change. Also when I shift the x-coordinate in the positive direction the shift in the y-coordinate will be negative which implies:

    [itex] dx=-dy → x = -y+C [/itex] and let [itex] C=0 [/itex] so that [itex] x+y = 0 [/itex]

    Now, I have my constraint [itex] f(x,y) = 0 [/itex] so now I can use (1) in order to find the equations of motion for the system:

    (2) [itex] \frac{∂L}{∂x} = -kx [/itex], [itex] \frac{d}{dt}\frac{∂L}{∂\dot{x}} = \frac{d}{dt}[m\dot{x}] = m\ddot{x} [/itex], and [itex] λ\frac{∂f}{∂x} = λ [/itex]

    (3) [itex] \frac{∂L}{∂y} = -mg [/itex], [itex] \frac{d}{dt}\frac{∂L}{∂\dot{y}} = \frac{d}{dt}[m\dot{y}] = m\ddot{y} [/itex], and [itex] λ\frac{∂f}{∂y} = λ [/itex]

    Now, I simply add the corresponding pieces together:

    (2') [itex] -kx-m\ddot{x}+λ = 0 [/itex]

    (3') [itex] -mg-m\ddot{y}+λ = 0 [/itex]

    From my constraint I can replace [itex] \ddot{y} [/itex] with [itex] -\ddot{x} [/itex] and add the two equations to solve for [itex] λ [/itex] doing so gives:

    (2')+(3'): [itex] -kx-mg+2λ = 0 → λ = \frac{kx+mg}{2} [/itex]

    Now that I have [itex] λ [/itex] I can plug it into either (2') or (3') to solve for [itex] x [/itex] I'll choose (2'):

    [itex] -\frac{kx}{2} + \frac{mg}{2} - m\ddot{x} = 0 → \ddot{x}+\frac{k}{2m}x = \frac{g}{2} [/itex]

    I'll define [itex] ω\equiv \sqrt{\frac{k}{2m}} [/itex] so that now the above DE is of the form of a simple harmonic oscillator with a constant driving force:

    [itex] x(t)= x_c(t) + x_p(t) [/itex], [itex] x_c(t) = Acos(ωt)+Bsin(ωt) [/itex], and [itex] x_p(t) = C [/itex]

    [itex] \ddot{x_p}+ω^2x_p = \frac{g}{2} → C=\frac{g}{2ω^2} = \frac{gm}{k} [/itex]

    Then [itex] x(t) = Acos(ωt)+Bsin(ωt)+ \frac{gm}{k} [/itex]

    Now apply the boundary conditions:

    [itex] 0 = A+\frac{gm}{k} [/itex]

    [itex] \dot{x} = -Aωsin(ωt)+Bωcos(ωt) → 0=Bω → x(t)=-\frac{gm}{k}cos(ωt)+\frac{gm}{k} [/itex]

    Finally, [itex] x(t) = \frac{gm}{k}[1-cos(\sqrt{\frac{k}{2m}}t)] [/itex] and of course [itex] y(t) = -x(t) [/itex] so
    [itex] y(t) = -\frac{gm}{k}[1-cos(\sqrt{\frac{k}{2m}}t)] [/itex]

    So I'm fairly certain I got this correct (but it never hurts to check!) I'm fairly certain because my forces of constraint are the same for both coordinates (i.e tension in the string is the same everywhere) Also I ended up having only one canonical coordinate which corresponds to one dof : [itex] s=Dn-m [/itex] where [itex] s [/itex] is the number of degrees of freedom, [itex] D [/itex] is the number of dimensions each particle is allowed to move in, [itex] n [/itex] is the number of particles, and [itex] m [/itex] is the number of constraints on the coordinate(s). Using this relation: [itex] s=(1)(2)-(1)=1 [/itex] which is exactly the number of coordinates I ended up with at the end. Thank you in advance for looking over my work. (:
  2. jcsd
  3. Mar 28, 2014 #2
    Where's the sketch?
  4. Mar 28, 2014 #3
    I have attached the image in this message.

    Attached Files:

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted