/ 2 \ / 2 \
\-1 - cot (x)/*(cos(x) + 2*cot(x)) + (cot(x) - 1)*\-2 - sin(x) - 2*cot (x)/
$$\left(\cos{\left(x \right)} + 2 \cot{\left(x \right)}\right) \left(- \cot^{2}{\left(x \right)} - 1\right) + \left(\cot{\left(x \right)} - 1\right) \left(- \sin{\left(x \right)} - 2 \cot^{2}{\left(x \right)} - 2\right)$$
/ / 2 \ \ / 2 \ / 2 \ / 2 \
(-1 + cot(x))*\-cos(x) + 4*\1 + cot (x)/*cot(x)/ + 2*\1 + cot (x)/*\2 + 2*cot (x) + sin(x)/ + 2*\1 + cot (x)/*(2*cot(x) + cos(x))*cot(x)
$$\left(4 \left(\cot^{2}{\left(x \right)} + 1\right) \cot{\left(x \right)} - \cos{\left(x \right)}\right) \left(\cot{\left(x \right)} - 1\right) + 2 \left(\cos{\left(x \right)} + 2 \cot{\left(x \right)}\right) \left(\cot^{2}{\left(x \right)} + 1\right) \cot{\left(x \right)} + 2 \left(\cot^{2}{\left(x \right)} + 1\right) \left(\sin{\left(x \right)} + 2 \cot^{2}{\left(x \right)} + 2\right)$$
/ / 2 \ \
| | / 2 \ 2 / 2 \| / 2 \ / / 2 \ \ / 2 \ / 2 \ / 2 \ / 2 \ |
-\(-1 + cot(x))*\-sin(x) + 4*\1 + cot (x)/ + 8*cot (x)*\1 + cot (x)// + 3*\1 + cot (x)/*\-cos(x) + 4*\1 + cot (x)/*cot(x)/ + 2*\1 + cot (x)/*\1 + 3*cot (x)/*(2*cot(x) + cos(x)) + 6*\1 + cot (x)/*\2 + 2*cot (x) + sin(x)/*cot(x)/
$$- (3 \left(4 \left(\cot^{2}{\left(x \right)} + 1\right) \cot{\left(x \right)} - \cos{\left(x \right)}\right) \left(\cot^{2}{\left(x \right)} + 1\right) + 2 \left(\cos{\left(x \right)} + 2 \cot{\left(x \right)}\right) \left(\cot^{2}{\left(x \right)} + 1\right) \left(3 \cot^{2}{\left(x \right)} + 1\right) + \left(\cot{\left(x \right)} - 1\right) \left(4 \left(\cot^{2}{\left(x \right)} + 1\right)^{2} + 8 \left(\cot^{2}{\left(x \right)} + 1\right) \cot^{2}{\left(x \right)} - \sin{\left(x \right)}\right) + 6 \left(\cot^{2}{\left(x \right)} + 1\right) \left(\sin{\left(x \right)} + 2 \cot^{2}{\left(x \right)} + 2\right) \cot{\left(x \right)})$$