# Multiple solutions for the indefinite integral $\int \frac{\csc(x)\cot(x)}{1+\csc^2(x)} \, dx$

For this indefinite integral:

$$\int \frac{\csc(x)\cot(x)}{1+\csc^2(x)} \, dx$$

I first used $$u$$-substitution and set $$u =\csc(x)$$. Using this I got the integration to be:

$$-\arctan(\csc(x))+C$$

This answer appears to be correct, however on the solutions it appears to be,

$$\arctan(\sin(x))+C$$

I searched online and found that the second solution was found using trigonometric substitution. If anyone could explain to me how the second solution was worked out it would be greatly appreciated.

• Both are correct; they differ by a constant. Commented Apr 13, 2021 at 6:07
• Incidentally, this is a nice demonstration that "differing by a constant" applies to separate continuous intervals; the constant for $(-\pi,0)$ is different from the constant for $(0,\pi)$, for example. Commented Apr 13, 2021 at 6:13
• $$\arctan(y)+\arctan(1/y)=\pm\frac{\pi}2$$ where the sign depends on $y.$ Then remember that $\csc(x)=\frac1{\sin x}.$ Commented Apr 13, 2021 at 6:36

You can go ahead and reduce the $$\csc$$ and $$\cot$$ in the expression to $$\cos$$ and $$\sin$$. You will get the second result.
And both are correct as $$\arctan(\sin x)-\big(-\arctan(\csc x)\big)$$ $$=\arctan(\sin x)+\arctan\left(\frac{1}{\sin x}\right)=\pm\frac{\pi}{2}$$
Since the arbitrary constant $$C$$ is arbitrary, it doesn't matter whether you add or subtract $$\pi/2$$ from it.
• Technically, you don’t need the full arctan sum formula, because $\arctan(y)+\arctan(1/y)=\pm\frac{\pi}2.$ Also, the sum is $-\frac{\pi}2$ when $\sin x <0.$ That’s the risk of treating $\infty$ as a number. Commented Apr 13, 2021 at 6:46
We get $$\dfrac {\dfrac {\cos x}{\sin^2x}}{\dfrac {\sin^2x+1}{\sin^2x}}=\dfrac {\cos x}{1+\sin^2x}$$ for the integrand, and the result follows.