# Indefinite Integral $\int \sin (x) \ln (\tan (x))dx$

I am trying to get result of this integral, but with no success. I know that I have to use integration by parts, but still I am lost. Thanks for your advice.

$$\int \sin (x) \ln (\tan (x))dx$$

Source (in czech language, it's the second integral):

https://kmd.fp.tul.cz/images/stories/vyuka/finek-matematika2/CviceniL1.pdf

Edit: when I use integration by parts I get

$$- \ln(\tan (x)) \cos (x) +\int \frac{1}{\tan (x)} \frac{1}{\cos (x)}dx$$

• Which integration by parts did you try? Please be specific. – Did Feb 24 '14 at 12:59
• In the formula $\int u \,dv=uv-\int v\,du$, use $dv=\sin x\,dx$, $u=\ln(\tan x)$. – David Mitra Feb 24 '14 at 12:59
• You can also use the change of variable formula setting $u=\cos x$, then do something with the log and then integrate by parts. – Etienne Feb 24 '14 at 13:07
• I edited my usage of integration, in this step I am lost – zdarsky.peter Feb 24 '14 at 13:11
• You should have obtained $$-\ln(\tan x)\cos x +\int {1\over\tan x}{1\over \cos^2 x}\cdot\color{maroon}{\cos x}\,dx=-\ln(\tan x)\cos x +\int\csc x\,dx.$$ – David Mitra Feb 24 '14 at 13:33

Note that the derivative of $\log \tan x$ is $1/( \sin x\cos x) =2/\sin(2x)$ so your formula is wrong.

Using integration by parts, then

$$\int \sin(x) \log \tan(x) dx = -\cos x \log \tan x + \int \frac{1}{\sin x} dx$$

and that

$$\int \frac{1}{\sin x} dx = \int \frac{1}{2\sin (x/2) \cos(x/2)} dx = \log \tan(x/2)$$

• definitely the simplest approach (+1) – robjohn Feb 24 '14 at 14:26

The easiest thing here is to separate the ln $$\ln(\tan x) = \ln \left( \frac{\sin x}{\cos x}\right) = \ln(\sin x) - \ln(\cos x).$$

Then you get: $$\int \sin x \ln(\sin x) \,dx - \int \sin x \ln(\cos x) \,dx.$$

The first one you can solve using integration by parts. A simple substitution will do for the second.