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

Harmonic oscillation

  1. Feb 9, 2014 #1
    Hello,

    When I have the differential equation

    [tex]\frac{dY(x)}{dx} = -k^2 Y(x)[/tex]

    The solution is of course harmonic oscillation, however, looking at various places I see the solution given as:
    [tex]Y(x) = A cos(kx) + B sin(kx)[/tex]
    instead of
    [tex]Y(x) = A cos(kx + \phi_1) + B sin(kx + \phi_2)[/tex]

    Isnt Equation 2 a more general solution than Equation 1? Or is there some reasoning (probably is) to make the phase angles go away?

    Thank you.
     
  2. jcsd
  3. Feb 9, 2014 #2

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    The general solution to a second order differential equation has 2 arbitrary coefficients, so you can't have a "more general solution" than ##A \cos kx + B \sin kx##.

    For your second solution, you have ##\cos(kx + \phi_1) = \cos\phi_1\cos kx - \sin\phi_1\sin kx##, and a similar expression for ##\sin(kx + \phi_2)##, so you can rewrite the whole expression as ##P\cos kx + Q\sin kx##, where ##P## and ##Q## are constants containing ##A##, ##B##, and ##\cos## and ##\sin## of ##\phi_1## and ##\phi_2##. That is the same as your first solution.

    Note, ##A\cos(kx + \phi)## or ##A\sin(kx + \phi)## are both general solutions (with two arbitrary constants), and those forms are sometimes nicer to use than ##A \cos kx + B \sin kx##.
     
  4. Feb 9, 2014 #3
    Thank you AlephZero!

    As a side-note then, if I wanted to rewrite the solution in terms of complex exponentials, that the solution would be

    [itex]Y(x) = A \cdot e^{ikx} + A^*\cdot e^{-ikx}[/itex]

    Where the constant A this time is complex.
     
  5. Feb 9, 2014 #4
    I suppose that the equation is [tex]\frac{d^2Y(x)}{dx^2} = -k^2 Y(x)[/tex]
    The two equations :
    [tex]Y(x) = A cos(kx) + B sin(kx)\\
    Y(x) = A cos(kx + \phi_1) + B sin(kx + \phi_2)[/tex]
    are equivalent :
    [tex]A cos(kx + \phi_1) + B sin(kx + \phi_2) = A' cos(kx) + B' sin(kx)\\
    A' =A cos(\phi_1)+B sin(\phi_2)\\
    B' =-A sin(\phi_1)+B cos(\phi_2)[/tex]
     
  6. Feb 9, 2014 #5

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    There is no mathematical reason why the solution has to be real, so you could just write
    [itex]Y(x) = A \cdot e^{ikx} + B\cdot e^{-ikx}[/itex]
    where ##A## and ##B## are complex constants.

    In this case, both the real and imaginary parts of ##Y(x)## satisfy the differential equation.
    You can interpret the real part of ##Y(x)## as a physical displacement, and the real part of ##dY(x)/dx## as a physical velocity, etc.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook