Finding the solutions for $\cot(x) = -x$ without digital tools All day I've been stuck with the following question where we're not allowed to use any digital tools. How does the amount of roots depend on the constant $a$?
$\cos(x) = ax$.


*

*$a = \frac{\cos(x)}{x}$,

*$a' = \Big(\frac{1}{x}\Big)\Big(\frac{\cos(x)}{x}+\sin(x)\Big)$,

*$a' = 0 = \frac{\cos(x)}{x}+\sin(x) \implies \cot(x) + x = 0$.


I cheated and used digital tools to find a approximate way of describing the extreme values:


*

*$x(n) = n\big(\frac{2.8}{n} + \pi \big)$


where $\pm2.8$ is the first solution on either side of the $y$-axis rounded of course. 
What I'm wondering is:


*

*Is there a way to find the first solution without digital tools or a lot of testing? I've tried to find a common term by extending and flipping the functions.

*Is there a more accurate way to describe the solutions? Since there is not exactly pi steps between every one of them.


Sorry if my english doesn't make sense somewhere, it's not my first language. 
Would be grateful for any leads. Thanks!

I reversed the question and found a way of describing how the value of 'a' varies depending on the number of roots. 
n = number of roots
//output 'a'


*

*if(n = ∞) => 0

*if(n is even): find the x that solves cos(x) = -sin(x)*x, (n-1)(π/2) <= x <=
(n+1)(π/2) => ± sin(x)

*if(n is odd): find a for (n+1)=a1 and (n-1)=a2 =>  ±|a2| <= a <= ±|a1| 


I am not sure if this answers the question, but with the motivation that this simple algorithm easily can be computed and that all a-values for the even number of roots is irrational I think it will do.
Thanks guys for helping me change approach :)
