Closed form of integral How does one show that, $\forall \ n \in \mathbb{N}$ $$\int \frac{\ln^n|\tan(x)|}{\sin(x)}dx = \frac{e^{i\pi n}(\ln|e^{ix}-1|-\ln|e^{ix}+1|)}{2^n}+C$$
Is this possible to do without using any complex analysis theory like the residue theorem or likewise? I'm looking for a single variable solution, but all the methods are welcome!
Aside from the wise method in the comment, if you did not know the answer, you might write
$$ \frac{\log^n|\tan x|}{\sin x} = \frac{1}{\tan x} \log^n \tan x \sec x.$$ Since the derivative of $\tan$ is $\sec^2,$ you are almost there...
Aside from the wise method in the comment, if you did not know the answer, you might write
$$ \frac{\log^n|\tan x|}{\sin x} = \frac{1}{\tan x} \log^n \tan x \sec x.$$ Since the derivative of $\tan$ is $\sec^2,$ you are almost there...