Harmonic oscillation with varying acceleration 
Consider a body inside an elevator. If the elevator is going at a constant speed and starts to accelerate or deccelerate, a body inside it perceives the resulting inertia as a change in $g$. Now, let us attach this body to the elevator with a spring. What would be its equation of motion?
Normally, a motion of a weight on a spring is described by a well known equation:
$$\frac{d^2x}{dt^2} + \frac{k}{m}x=0$$
And its general solution is:
$$x=Acos(\omega_0t)+Bsin(\omega_0t),\qquad\omega_0=\sqrt{k \over m}$$
This equation is valid in a gravitational field although it does not take $g$ into account. The question is: will it be valid, it $g$ is not constant but varies in time, like in an elevator or another inertial frame?
On one hand, the equation does not make any assumption about the acceleration function, it is simply a second derivative of $x$, so it seems that the solution will be valid.
On the other hand, in terms of forces, varying acceleration at constant mass is equivalent to varying mass at constant acceleration. So, if mass varies $\omega_0$ is no longer constant in time and the equation has probably a totally different solution. What would it be?
 A: No, if the acceleration of the lift changes in time the solution will not be simple harmonic, and in general will not be simple at all: you need to specify how the lift moves.
The easy way to see this is to get the equations of motion of the system into the simplest form.  Let the acceleration of the lift be $\gamma$ (vertically, upwards is positive) and the mass $m$ be attached, vertically, to a spring with spring constant $k$ with its neutral position at $y = 0$.  $y$ is positive upwards as well.  Note that the spring pulls downwards on the mass if $y>0$: the force on the mass from the spring is $-ky$.  $g$ is the acceleration due to gravity, so the effective acceleration in the lift is $g+\gamma$.
Then the equation of motion for the mass is
$$m\ddot{y} + ky + m(g+\gamma) = 0$$
or 
$$\ddot{y} + \frac{k}{m}y + (g+\gamma) = 0$$
Making the substitution $y' = y + (g+\gamma)\frac{m}{k}$ this reduces to
$$\ddot{y'} + \frac{k}{m}y' = 0$$
which is a linear, homogeneous differential equation that we can trivially solve for $y'$ and hence $y$.  And the general solution (for $y$) is
$$y(t) = -(g+\gamma)\frac{m}{k} + c_1\cos\left(\sqrt{\frac{k}{m}}t\right) + c_2\sin\left(\sqrt{\frac{k}{m}}t\right)$$
But if the lift's acceleration is not constant then we can't do this.  The equation is now
$$\ddot{y} + \frac{k}{m}y + g = -\gamma(t)$$
And letting $y' = y + g\frac{m}{k}$ we get
$$\ddot{y'} + \frac{k}{m}y' = -\gamma(t)$$
Well, we can't get much further unless we know what $\gamma(t)$ is.  If we know what it is then we may be able to solve the equation using standard techniques for solving inhomogeneous linear differential equations, which come down to guessing a particular solution based on $\gamma(t)$ and then combining it with the solution to the homogeneous equation (which is SHM here, obviously).
In general this thing is a driven oscillator, where $\gamma(t)$ is the  thing doing the driving.  There is a lot of literature on driven oscillators, and some quite general solutions (they are terribly important in many fields of engineering), but I think you need to know more about $\gamma$ to say anything really useful: there are nice solutions if $\gamma$ itself is periodic, or if it's something like a step function, and you can compose these in various ways.
