Equivalent forms for $\int \csc(x) dx$

This question asked about two common forms commonly given for $$\int \csc(x) dx$$, specifically:

$$(1) \qquad \int \csc(x) dx = \mathbf{{\color{red}-} \ ln|csc(x)+cot(x)| + C},$$

and

$$(2) \qquad \int \csc(x) dx = \mathbf{ln|csc(x) \ {\color{red}-}\ cot(x)| + C}.$$

And the accepted answer is clear and convincing; however, WolframAlpha seems to disagree.

In the past, I've found that trying to understand why Wolfram is giving an answer that is different from what I'd expect generally leads me to learn something new, so I was hoping someone might be able to offer some insight on this one.

Essentially all we need to show is that $$\exists C$$ such that: $$-\ln |\csc x + \cot x| = \ln |\csc x - \cot x| + C$$

This is equivalent to showing that:

$$\ln \left|\frac{1}{\csc x + \cot x}\right| = \ln |\csc x - \cot x| + C$$

Well ... we can actually just show that $$\frac{1}{\csc x + \cot x} = \csc x - \cot x$$.

As usual when dealing with trigonometric functions, things become a lot more clear when we convert everything to $$\cos x$$ and $$\sin x$$ instead. The left-hand side becomes:

$$\frac{1}{\frac{1}{\sin x} + \frac{\cos x}{\sin x}} = \frac{\sin x}{1 + \cos x}$$

and the right-hand side is:

$$\frac{1 - \cos x}{\sin x}$$

We can bring both sides to the same denominator:

$$\begin{cases} LHS &=& \frac{\sin^2 x}{\sin x (1 + \cos x)} \\ RHS &=& \frac{1 - \cos^2 x}{\sin x(1 + \cos x)} \end{cases}$$

It is easy to see that these are equal.

• thank you for the very clear exposition. I’m just going to leave the question open for a day or so, to see if anyone is able to address the point about Wolfram, in particular. Every time I’ve encountered something like this with WA, I’ve ended up learning something new. I knew that the expressions were equivalent as anti-derivatives, just by taking the derivative, but don’t see why WA says they are not. Thanks again for the clear exposition. Commented Oct 2, 2020 at 0:57

Well: $$\frac{1}{\sin x}+\frac{1}{\tan x}=\frac{1+\cos x}{\sin x}\cdot\frac{1-\cos x}{1-\cos x}=\frac{1-\cos^2x}{\sin x(1-\cos x)}$$

$$=\frac{\sin^2 x}{\sin x(1-\cos x)}=\frac{\sin x}{1-\cos x}=\bigg(\frac{1}{\sin x}-\frac{1}{\tan x}\bigg)^{-1} \ a.r.$$ so the identity is clearly true, wherever $$\csc x,\cot x$$ are defined.

My first suspicion was that maybe "inequality" exists when the functions aren't defined, for example at $$x=0$$. But, checking this threw that out the window. It seems like an error to me.

• — thanks for this. I wondered about the undefined points, as well (just after posting), but came to the same conclusion... Appreciate your taking a stab at it and mentioning this point. Thank you for your time and help! Commented Oct 2, 2020 at 0:59