I plotted the graphs of $y=\cot x$ and $y=x$. Its clear that they have infinite intersections. I tried to solve for the first root but it doesn't seem to be any known number to me. Even Wolfram Alpha gives no closed form. Is there even a closed form for these solutions or are they some irrational number like the solution of $\cos x=x$?
2 Answers
This kind of equations which mix polynomial and trigonometric terms do not, in general, show solutions which have a closed form expression and almost only numerical methods would solve the problem. Newton method is among the simplest root-finding methods. Starting from a reasonable guess $x_0$, the method will update it according to $$x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}$$ For illustration purposes, let us apply it to $$f(x)=x-\cot(x)$$ As you noticed from the plot, the first root is located around $1$; so, let us start iterations from $x_0=1$. The successive iterates are then $0.851631$, $0.860292$, $0.860334$ which is the solution for six significant figures.
From the plot, you probably noticed that the next positive roots are closer and closer to $n \pi$ and the solution will be difficult to find without very good guesses. But, if you look at $$g(x)=f(x)\sin(x)=x \sin(x)-\cos(x)$$ you will notice that it is much better conditionned.
You can also approximate the solution using Taylor series built close to a solution. For example, for the first root, building the series at $x=\frac{\pi}{4}$, you find $$f(x) \approx \left(\frac{\pi }{4}-1\right)+3 \left(x-\frac{\pi }{4}\right)-2 \left(x-\frac{\pi }{4}\right)^2+O\left(\left(x-\frac{\pi }{4}\right)^3\right)$$ and solving the quadratic gives as an approximate solution $$x=\frac{1}{4} \left(3+\pi -\sqrt{1+2 \pi }\right)\approx 0.860714$$ which not bad at all.
Similarly, for the newt root, centering the expansion of g(x) at $x=n \pi$, you would get $$x_1=\frac{1}{3} \left(2 \pi +\sqrt{6+\pi ^2}\right)\approx 3.42228$$ $$x_2=\frac{1}{3} \left(4 \pi +\sqrt{6+4 \pi ^2}\right)\approx 6.43671$$ $$x_3=\frac{1}{3} \left(6 \pi +\sqrt{6+9 \pi ^2}\right)\approx 9.52915$$ while the exact values (to six decimal places) would be $3.42562$, $6.43730$ and $9.52933$.
Please notice the quite nice pattern given by the approximate solution $$x_n=\frac{1}{3} \left(2 \pi n+\sqrt{6+n^2\pi ^2 }\right)$$ which, for large values of $n$, write $$x_n=\pi n+\frac{1}{\pi n}-\frac{3}{2 \pi ^3 n^3}+O\left(\left(\frac{1}{n}\right)^4\right)$$

- 260,315
Your equation is an equation of Elementary functions. The elementary functions are generated from their complex argument by applying finite numbers of $\exp$, $\ln$ and/or algebraic functions. Also, each of the elementary standard functions can be represented in this form.
$$\cot \left( x \right) ={\frac {i \left( {{\rm e}^{ix}}+{{\rm e}^{-ix}} \right) }{{{\rm e}^{ix}}-{{\rm e}^{-ix}}}}$$
Your equation can be represented as irreducible polynomial equation of $x$ and $e^x$ over the algebraic numbers.
[Lin 1983] proves, assuming Schanuel's conjecture is true, that this kind of equations cannot have solutions except $0$ that are elementary numbers ([Chow 1999]).
$$\cot(x)=x$$ $$i\frac{e^{ix}+e^{-ix}}{e^{ix}-e^{-ix}}=x$$ $$i(e^{ix})^2-x(e^{ix})^2+x+i=0$$ $$e^{ix}=\pm\frac{\sqrt{1+x^2}}{i-x}$$
We see, your equation cannot be solved in terms of Lambert W and also not by generalized Lambert W of [Mezö 2017], [Mezö/Baricz 2017]. But perhaps by generalized Lambert W of [Castle 2018].
See also my answer at Trigonometric/polynomial equations and the algebraic nature of trig functions.
$\ $
[Lin 1983] Ferng-Ching Lin: Schanuel's Conjecture Implies Ritt's Conjectures. Chin. J. Math. 11 (1983) (1) 41-50
[Chow 1999] Chow, T.: What is a closed-form number. Am. Math. Monthly 106 (1999) (5) 440-448
[Mezö 2017] Mezö, I.: On the structure of the solution set of a generalized Euler-Lambert equation. J. Math. Anal. Appl. 455 (2017) (1) 538-553
[Mezö/Baricz 2017] Mezö, I.; Baricz, A.: On the generalization of the Lambert W function. Transact. Amer. Math. Soc. 369 (2017) (11) 7917–7934 (On the generalization of the Lambert W function with applications in theoretical physics. 2015)
[Castle 2018] Castle, P.: Taylor series for generalized Lambert W functions. 2018

- 6,964