Taylor series for $\cot x$

You're right we use the equality $$\cot x=\frac{\cos x}{\sin x}$$ and since $$\frac{1}{\sin x}=\frac{1}{x-\frac{x^3}{6}+o(x^3)}=\frac{1}{x}\left(1+\frac{x^2}{6}+o(x^3)\right)$$ hence we expand and we find $$\cot x=\left(1-\frac{x^2}{2}+o(x^3)\right)\frac{1}{x}\left(1+\frac{x^2}{6}+o(x^3)\right)=\frac{1}{x}-\frac{x}{3}+o(x)$$


You should consider the Taylor expansion series for both $\cos{x}$ and $\sin{x}$ at $x=0$, separately. Then, divide term by term to obtain the Taylor series for $\cot{x}$.

Cheers!

Edit:

By using division term by term, I meant this:

$$ (1-x^2/2 + x^4/24 + O(x^6) : (x-x^3/6 + x^5/120 + O(x^6)) \approx 1/x-x/3,$$

being the rest of the polynomial long division:

$$r = -x^4/45 + O(x^6)$$

I hope this is useful.