# Question regarding integral involving logarithm and sine [duplicate]

I have to compute the following integral

$$\int_{0}^{\pi/2} \frac{\ln(1-\sin x)}{\sin x} dx$$

I decided to solve this using the Feynman's Trick for integration and parametrized the integral as follows

$$I(t) = \int_{0}^{\pi/2}\frac{\ln(1-t\sin x)}{\sin x} dx$$

Differentiating this gives me the following expression

$$-\int_{0}^{\pi/2}\frac{1}{1-t\sin x} dx$$

I do not understand how to simplify this further any help would be highly appreciated!

• Take a look at this: en.wikipedia.org/wiki/Tangent_half-angle_substitution Commented Jul 14 at 9:35
• For $t=1$, the integral does not converge Commented Jul 14 at 9:46
• @SineoftheTime it does not, but still the improper integral in $t$ may converge. Commented Jul 14 at 9:53
• It's also possible to evaluate this by exploiting Taylor series. Are you interested in methods outside of DUIS? Commented Jul 15 at 21:14

Utilize $$\int^\frac{\pi}{2}_0\frac{1}{\cos x \cos y-1}dx =\frac{y-\pi}{\sin y}$$ to evaluate \begin{align} & \int^\frac{\pi}{2}_0\frac{\ln(1-\sin x)}{\sin x}dx = \int^\frac{\pi}{2}_0\frac{\ln(1-\cos x)}{\cos x}dx\\ =& \int^\frac{\pi}{2}_0\int^\frac{\pi}{2}_0 \frac{\sin y}{\cos x \cos y-1}dy\>dx = \int^\frac{\pi}{2}_0 (y-\pi)dy=-\frac{3\pi^2}8\\ \end{align}

• Elegant, almost classical. Commented Jul 15 at 1:52

$$I(t)=\int_{0}^{\frac{\pi}{2}} \frac{\ln(1-t\sin x)}{sin x} \,dx$$

$$-\frac{dI(t)}{dt}=\int_{0}^{\frac{\pi}{2}} \frac{1}{1-tsin x} \,dx$$

Let's consider;

$$J(a,b)=\int \frac{1}{a+bsin x} \,dx=\frac{2 \arctan\left(\frac{a \tan\left(\frac{x}{2}\right) + b}{\sqrt{a^{2} - b^{2}}}\right)}{\sqrt{a^{2} - b^{2}}}+C$$

Using the Weierstrass substitution(as mentioned in the comments), we can solve the above integral (and a substitution for $$\tan\frac{x}{2}=t$$ then factoring the quadratic formed in the latter steps, i'm avoiding the proof)

Applying $$a=1, b=-t$$

$$J(1,-t)=\int \frac{1}{1-tsin x} \,dx=\frac{2 \arctan\left(\frac{ \tan\left(\frac{x}{2}\right) -t}{\sqrt{1-t^2}}\right)}{\sqrt{1-t^2}}+C$$

Applying the bounds;

$$J(1,-t)|_0^{\frac{\pi}{2}}=\frac{2}{\sqrt{1-t^2}}\left(tan^{-1}\left(\frac{1-t}{\sqrt{1-t^2}}\right)-tan^{-1}\left(\frac{-t}{\sqrt{1-t^2}}\right)\right)$$

$$\frac{dI(t)}{dt}=\frac{2}{\sqrt{1-t^2}}\left(tan^{-1}\left(\frac{-t}{\sqrt{1-t^2}}\right)-tan^{-1}\left(\frac{1-t}{\sqrt{1-t^2}}\right)\right)$$

$$\int\,dI(t)=\int \frac{2}{\sqrt{1-t^2}}tan^{-1}\left(\frac{-t}{\sqrt{1-t^2}}\right)\,dt-\int \frac{2}{\sqrt{1-t^2}}tan^{-1}\left(\frac{1-t}{\sqrt{1-t^2}}\right)\,dt$$

$$I(t)=2tan^{-1}\left(\frac{\sqrt{1-t}}{\sqrt{1+t}}\right)^2-tan^{-1}\left(\frac{-t}{\sqrt{1-t^2}}\right)^2+c$$ $$\boxed{I(0)=0\implies t=0, I(t)=0}$$

$$I(t)=2tan^{-1}\left(\frac{\sqrt{1-t}}{\sqrt{1+t}}\right)^2-tan^{-1}\left(\frac{-t}{\sqrt{1-t^2}}\right)^2-\frac{\pi^2}{8}$$

$$\boxed{\int_0^{\frac{\pi}{2}}\frac{ln(1-sinx)}{sinx}\,dx=\frac{-3\pi^2}{8}\approx -3.7011}$$

which agrees with this

Noting that when $$x\mapsto \frac{\pi}{2}-x$$ transforms

$$I=\int_0^{\frac{\pi}{2}} \frac{\ln (1-\cos x)}{\cos x} d x$$

Via Feynman’s trick by the parametrised integral $$I(\theta)=\int_0^{\frac{\pi}{2}} \frac{\ln (1-\cos \theta \cos x)}{\cos x} d x$$ Differentiating $$I(\theta)$$ w.r.t. $$\theta$$ and then using tangent-half-angle substitution yields \begin{aligned} I^{\prime}(\theta) & =\int_0^{\frac{\pi}{2}} \frac{\sin \theta}{1-\cos \theta \cos x} d x \quad \textrm{, where }t=\tan \frac{x}{2} \\ & =\sin \theta \int_0^1 \frac{1}{1-\cos \theta \cdot \frac{1-t^2}{1+t^2}} \cdot \frac{2 d t}{1+t^2} \\ & =2 \sin \theta \int_0^1 \frac{d t}{t^2(1+\cos \theta)+(1-\cos \theta)} \\ & =\frac{2 \sin \theta}{\sqrt{(1+\cos \theta)(1-\cos \theta)}}\left[\tan ^{-1} \left( t \sqrt{\frac{1+\cos \theta}{1-\cos \theta}}\right)\right]_0^1 \\ & =2 \tan ^{-1}\left(\frac{\cos \frac{\theta}{2}}{\sin \frac{\theta}{2}}\right) \\ & =2\left(\frac{\pi}{2}-\frac{\theta}{2}\right)\\&=\pi-\theta \end{aligned} Integrating back gives

$$I=I(0)-I(\frac {\pi}{ 2})=\int_{\frac \pi 2}^0 \left(\pi-\theta \right)d\theta=\left[\pi \theta - \frac {\theta^2}{ 2}\right]_\frac {\pi}2^0 =-\frac{3\pi^2}{8}$$