Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Coupled harmonic oscillator

  1. Nov 22, 2009 #1
    I've been looking at a coupled harmonic oscillator, and normal modes of this:


    At the bottom of this example it says:

    This corresponds to the masses moving in the opposite directions, while the center of mass remains stationary. The general solution is a superposition of the normal modes where c1, c2, φ1, and φ2, are determined by the initial conditions of the problem.

    What is the best way to determine these coefficients, given some initial conditions (start position and velocity)?

    This is only for two masses, but the method should also work for n equal masses. It is fine if I need to program me out of it, but how should i do this?
  2. jcsd
  3. Nov 22, 2009 #2
    According to that website, the equatios are:

    x1(t) = c1*cos(w1*t+phi1)+c2*cos(w2*t+phi2)
    x2(t) = c1*cos(w1*t+phi1)-c2*cos(w2*t+phi2)

    Taking the derivative, you get 2 more equations

    v1(t) = -c1*w1*sin(w1*t+phi1)-c2*w2*sin(w2*t+phi2)
    v2(t) = -c1*w1*sin(w1*t+phi1)+c2*w2*sin(w2*t+phi2)

    If your initial conditions are:

    x0_1 = x1(t=0)
    x0_2 = x2(t=0)
    v0_1 = v1(t=0)
    v0_2 = v2(t=0)

    then your equations become:

    x0_1 = c1*cos(phi1)+c2*cos(phi2)
    x0_2 = c1*cos(phi1)-c2*cos(phi2)
    v0_1 = -c1*w1*sin(phi1)-c2*w2*sin(phi2)
    v0_2 = -c1*w1*sin(phi1)+c2*w2*sin(phi2)

    Now you have 4 equations and 4 unknowns and can solve the coefficients.
    Last edited: Nov 22, 2009
  4. Nov 22, 2009 #3
    Actually, to solve this you need more variables and more equations. Instead of phi1 and phi2, use these:

    sp1 = sin(phi1)
    cp1 = cos(phi1)
    sp2 = sin(phi2)
    cp2 = cos(phi2)

    Adding 2 new equations, you now have these 6 equations:

    x0_1 = c1*cp1+c2*cp2
    x0_2 = c1*cp1-c2*cp2
    v0_1 = -c1*w1*sp1-c2*w2*sp2
    v0_2 = -c1*w1*sp1+c2*w2*sp2
    sp1^2+cp1^2 = 1
    sp2^2+cp2^2 = 1

    Once you've solved sp1,cp1,sp2, and cp2:

    phi1 = atan2(sp1,cp1)
    phi2 = atan2(sp2,cp2)
  5. Nov 23, 2009 #4
    maybe I was a bit unclear, i know how to set up the equations, but what algorithm should i use to find the coefficients, especially when i need to scale it to n equal masses.
  6. Nov 24, 2009 #5
    I would use http://en.wikipedia.org/wiki/Lagrangian_mechanics" [Broken]. It's basically an energy method approach to solving equations of motion for systems with multiple degrees of freedom much more quickly than using Newtonian mechanics. There are examples at the link above.
    Last edited by a moderator: May 4, 2017
  7. Nov 25, 2009 #6
    ok thanks. I know lagrangian mechanics, but need to solve it with newtonian mechanics, because i need to explain it to someone who doesn't know it.

    I've wrote the complex solution as the real and imaginary part and then i could solve it. Thanks for all your sugestions.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Coupled harmonic oscillator
  1. Coupled Oscillations (Replies: 3)

  2. Coupled oscillators (Replies: 2)