# Harmonic oscillator shifted origin

1. Apr 7, 2015

### Runei

Hello,

I'm was going through the simple harmonic oscillator, just as a recap, and I stumbled upon something which is causing me wonder.

I'm solving the SHO with a shifted origin, and so I have the differential equation

$$F=-k(x-x_0)$$
$$\ddot{x}=-\frac{k}{m}x+\frac{kx_0}{m}$$

Now, I get that I can solve the physics problem by simply setting X = x-x_0 and then just adding the normal solution to x_0 to get the position of the particle, however, I was wondering, is it possible to solve the differential equation as it stands above and directly get a solution for x?

2. Apr 7, 2015

### MarcusAgrippa

You can make the problem slightly less trivial by not writing the force as F = - k9X-X_0), but as F = - kx + mg. Now the force doesn't look as if you have simply chosen a bad coordinate, but is the result of the action of two forces. The method of solution is now slightly less obvious, but identical to what you have done: transform the equation by getting rid of the constant term: put X = x - mg/k. This changes the equation to the familiar SHO equation. Mathematicians always attempt to solve the problem that they solved yesterday by converting today's problem into yesterday's.

A different method is as follows.Introduce a new variable $v = \dot{x}$ and then use Newton's trick to change the independent variable from t to x:

$\displaystyle \frac{dv}{dt} = \frac{dv}{dx} \ \frac{dx}{dt} = \frac{dv}{dx} \ v = \frac{d}{dx} \left( \frac{1}{2}\ v^2 \right)$

$\displaystyle m \frac{d}{dx} \left( \frac{1}{2}\ v^2 \right) = -kx + mg$
This equation can then be integrated by separation of variables, giving v implicitly as a function of x.

You then need to solve for v in terms of x and perform a second integration, noting that v = dx/dt. This second equation is also separable. (Of course, you may have used this method already to solve the original SHM equation, in which case I am carrying coals to Newcastle. But if you used the method of trial solution to solve the SHO equation, this method will be new to you.)

Incidentally, this is the method by which the work energy theorem is proved. So, if you use the conservation of energy principle to get v as a function of x, you are effectively bypassing the first of the above two integrations. The energy relation is called, accordingly, a "first integral" of Newton II.

While classically this problem is almost trivial, its quantum mechanical counterpart is not so, and it introduces some interesting non-trivial results. For example, the "displaced SHO" is one way of introducing the idea of coherent states of the oscillator. See Haken's book on quantum field theory of solids, chapter 1, for details.

Last edited: Apr 7, 2015