Simple Harmonic Motion (SHM) With Dry Friction Consider a mass $m$ at position $x(t)$ on a rough horizontal table attached to the origin by a spring with constant $k$ (restoring force $−kx$) and with a dry friction force $f$ 
\begin{equation}
f=
\begin{cases}
 F\quad \quad \quad \quad \quad \quad \,\,\,\, x<0\\
-F \leq f \leq F \quad \quad x = 0\\
 -F \quad \quad \quad \quad \quad \quad  x>0
\end{cases}
\end{equation}
What is the range of $x$ where the mass can rest? Show that if the mass moves, the maximum excursion decreases by
$2F/k$ per half cycle. Discuss the motion.
Up until now i have only dealt with SHM with no friction so I am a bit lost. Any help is appreciated.
 A: Some Hints
The governing differential equation according to Newton's second law of motion will be
$$\begin{cases}
- kx - F  = m\ddot x & \dot x \gt 0 \\
- kx + F  = m\ddot x & \dot x \lt 0
 \end{cases}$$
If $\dot x=0$ then we should investigate that whether the particle moves or not due to the laws of static and kinetic friction. Rearranging the terms will give
$$\begin{cases}
\ddot{x} + \omega^2 x = - \frac{F}{k} & \dot x \gt 0 \\
\ddot{x} + \omega^2 x =  \frac{F}{k} & \dot x \lt 0
 \end{cases}$$
where $\omega = \sqrt{\frac{k}{m}}$ is the natural frequency. The general solution to this ODE is
$$\begin{cases}
x(t) = A \cos (\omega t) + B \sin (\omega t) - \frac{F}{k} & \dot x \gt 0 \\
x(t) = A \cos (\omega t) + B \sin (\omega t) + \frac{F}{k} & \dot x \lt 0
\end{cases}$$
Try to discuss the problem based on initial conditions.

Reference
Here is a nice article that you can refer to it. It explains everything from A to Z. You can take a look at part IV. There is a little mistake in equations 22a, 22b and 23a, 23b. The $\dot{x}$ should be written instead of $\ddot{x}$ for the signs. The text mentions this issue by words right above equations 22a, 22b so it seems to be a simple typo.
