Consider a block of mass $m$ moving with initial velocity $v_o$ attached to a spring with spring constant $k$, on a terrain which has a coefficient of kinetic friction $\eta$ and coefficient of static friction $\epsilon$. Find the time taken for oscillations to die off.
If we write the force equation of block when it's moving to right, we get:
$$ ma = -kx - \eta mg$$
Or,
$$ a = -\frac{k}{m} x - \eta g$$
For a shifted harmonic oscillator of form:
$$ x(t) = A \cos(\omega t + \phi) + x_0 \tag{1}$$
$$ \ddot{x} = -\omega^2 ( x(t) - x_0) $$
Comparing with previous equation,
$$ - \eta g = - \omega^2 x_0$$
Hence,
$$ \frac{ \eta g}{\omega^2} = x_0 \tag{2}$$
By the fundamental equation of springs,
$$ \omega^2 = \sqrt{\frac{k}{m}} \tag{3}$$
Combining 1,2,3:
$$ x = A \cos( \frac{k}{m} t + \phi) + \frac{m \eta g}{k}$$
Now the weird part:
This would suggest that the oscillation would go on forever! However is well known that friction is a dissipative force and removes energy from the system, so if energy is being removed from the system in every cycle, why does the equation not show it?
Possible resolutions
Deeply thinking about the problem, I realized that my differential equation breaks whenever the velocity of the block drops to zero because then all of a sudden the static friction replaces the kinetic friction. I think so this sudden shift shouldn't cause too many problems but I'm not sure. How do you deal with the differential equation of motion suddenly shifting? Or is it some other problem which caused this strange result which I got?
I'm mainly looking for an answer which discusses the break ups of the equation governing motion at when v drops to zero and sign of friction
Update: I found a paper discussing this, may write an answer later based on it (see here)