# 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!

• So are you trying to solve $\cos x=ax$? I'm confused about exactly what the question is. Anyway, Try to roughly draw the graphs. Keep in mind that cosine and sine are bounded by $\pm 1$. Find $a$'s by graphical arguments such that one ends up with one root, two root, etc. Nothing fancy is needed for this. – Hamed Apr 20 '17 at 15:11

With the exception of special cases such as $a=0$ or $a=\frac{2}{\pi}$ the equations you are investigating can not be solved using elementary functions (exponents, logarithms, trigonometry, polynomials, etc.). Even using digital tools you still only get an approximate answer.

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 :)