<s>[INST] Roots of $f(x)=\sin(x)-ax$ How many roots are there of the function $f(x)=\sin(x)-ax$, where $a$ is a positive number? Clearly for all $a$, $x=0$ is a root; if $a>1$ that is the only root. The roots will also be symmetric about the origin. I conjecture that there are $2\lfloor 1/(a\pi)\rfloor+1$, but I'm not sure how to prove this.
 [/INST] Let $\#(a)$ be the number of real solutions to the equation $\sin x = ax$.
For $a \lesssim 1$ we have $\#(a) = 3$, and this remains constant as $a$ decreases until $a = a_0$, when the line $y = ax$ is tangent to the curve $y = \sin x$.  This point of tangency occurs just to the left of $x = 2\pi + \tfrac{\pi}{2}$.  Here $\#(a_0) = 5$, and then for $a \lesssim a_0$ we have $\#(a) = 7$.

The function $\#(a)$ continues in this manner, increasing by $2$ when $a$ decreases to a value for which the graphs are tangent, then increases by $2$ again when $a$ becomes smaller than that.
The value of $a$ for which $\#(a) = 4n+1$, which is when the line $y = ax$ is tangent to the graph $\sin x$, is the unique real solution to the equation
$$
\sqrt{1-a^2} = a (2\pi n + \arccos a). \tag{$*$}
$$
We can express this solution as
$$
a = \frac{1}{2\pi n + \frac{\pi}{2} - \epsilon_n},
$$
where $\epsilon_n > 0$ and $\epsilon_n \to 0$ as $n \to \infty$.  Further,
$$
\#\left(\frac{1}{2\pi n + \frac{\pi}{2}}\right) = 4n+3.
$$
In this sense,
$$
\begin{align}
\#(a) &= 3 + 4\sum_{n=1}^{\infty} \left[1 - H\left(a - \frac{1}{2\pi n + \frac{\pi}{2} - \epsilon_n}\right)\right] \\
&\approx 3 + 4\sum_{n=1}^{\infty} \left[1 - H\left(a - \frac{1}{2\pi n + \frac{\pi}{2}}\right)\right] \tag{$**$}
\end{align}
$$
for small $a$, where $H$ is the Heaviside step function.  Here's a plot of this approximation:

Of course we don't need every term of the infinite sum to calculate $\#(a)$, we only need to sum to the largest $n$ such that
$$
a \leq \frac{1}{2\pi n+ \frac{\pi}{2} - \epsilon_n} \approx \frac{1}{2\pi n+ \frac{\pi}{2}},
$$
which is
$$
n \approx \left\lfloor \frac{1}{2\pi a} - \frac{1}{4}\right\rfloor.
$$
Thus we get the approximation
$$
\#(a) \approx 3 + 4 \left\lfloor \frac{1}{2\pi a} - \frac{1}{4}\right\rfloor, \tag{$***$}
$$
which, unfortunately, skips the values of $\#(a)$ where $ax$ is tangent to $\sin x$.
I would expect that finding a closed form for the value of $a$ which solves $(*)$ would be difficult, if not impossible.
</s>