7

Finding $\displaystyle \int^{\frac{\pi}{2}}_{0}\ln(\sin x)\cdot \sin xdx$

What I try:-> Integration by parts

assuming $\displaystyle I = \int\ln(\sin x)\cdot \sin xdx = -\ln(\sin x)\cdot \cos x+\int\frac{\cos^2 x}{\sin x}dx$

$\displaystyle I = -\ln(\sin x)\cdot \cos x+\int\frac{1-\sin^2 x}{\sin x}dx$

$ = -\ln(\sin x)\cos x+\ln\bigg(\tan\frac{x}{2}\bigg)-\cos x$

$ \displaystyle \int^{\frac{\pi}{2}}_{0}\ln(\sin x)\cos xdx = \bigg[-\ln(\sin x)\cos x+\ln\bigg(\tan\frac{x}{2}\bigg)-\cos x\bigg]\bigg|^{\frac{\pi}{2}}_{0}=-\ln(0)+\ln(0)$

but answer is $\ln(2/e)$

could some explain me why I have got wrong answer,thanks

also explain me How I solve it using double integral

DXT
  • 11,241

4 Answers4

8

\begin{align} I&=\int^{\frac{\pi}{2}}_{0}\ln(\sin x)\cdot \sin x\,dx \tag{1}\label{1} \end{align}

\begin{align} I&=\int^{\frac{\pi}{2}}_{0}\tfrac12\ln(\sin^2 x)\cdot \sin x\,dx \tag{2}\label{2} \\ &= \int^{\frac{\pi}{2}}_{0} \tfrac12\ln(1-\cos^2 x)\cdot \sin x\,dx \tag{3}\label{3} . \end{align}

Let $t=\cos x$, then we have

\begin{align} I&=\tfrac12\int_0^1\ln(1-t^2)\,dt \\ &= \tfrac12\int_0^1\ln(1-t)+\ln(1+t)\,dt \\ &= \left.\tfrac12 ( 1-t-(1-t)\ln(1-t) +(t+1)\ln(t+1)-1-t )\right|_0^1 =\ln2-1 . \end{align}

g.kov
  • 13,581
  • This is the calculus I answer that the user should've gotten in the first place xD. –  Oct 15 '18 at 15:32
5

$\log\sin x$ has a well-known Fourier series: $$ \log\sin x=-\log 2-\sum_{k\geq 1}\frac{\cos(2k x)}{k} $$ and for any $k\in\mathbb{N}^+$ we have $$ \int_{0}^{\pi/2}\cos(2kx)\sin(x)\,dx = -\frac{1}{(2k-1)(2k+1)}, $$ hence $$ \int_{0}^{\pi/2}\sin(x)\log\sin(x)\,dx = -\log(2)+\sum_{k\geq 1}\frac{1}{(2k-1)k(2k+1)} $$ where the last series equals $-1+2\log 2$ by partial fraction decomposition. It follows that $$ \int_{0}^{\pi/2}\sin(x)\log\sin(x)\,dx = \log(2)-1 $$ as wanted.

Jack D'Aurizio
  • 353,855
  • Thanks Jack D'Aurizio. caoul you please explain me how i find $\displaystyle \int^{\frac{\pi}{2}}_{0}\cos(2kx)\cdot \sin (x)dx =\frac{1}{(1+2k)(1-2k)}.$ – DXT Oct 15 '18 at 15:03
  • @DurgeshTiwari: Sine addition formulas and explicit integration. – Jack D'Aurizio Oct 15 '18 at 15:04
  • 2
    It's not that I don't like the elegance of your answer, it's just that the question is probably from a Calc II or Calc III class where, much of the time, Fourier series haven't been properly introduced. – Sam Oct 15 '18 at 15:05
  • 2
    @Leo: that is not my fault. According to my opinion, Fourier series should be introduced as soon as possible, since they provide multiple ways for explicit evaluations, like in this case or in Basel problem. I also do not believe this exercise comes from a Calc-X class: the OP is asking for elementary integrals from quite some time. – Jack D'Aurizio Oct 15 '18 at 15:07
  • Why is this called a 'Fourier' series? Is that just the name for any trigonometric series? or can one find it using the classic method? – clathratus Jan 12 '19 at 23:34
4

Other answers are good but I prefer to talk about yours. You found (with a typo) \begin{align} \int_{0}^{\frac{\pi}{2}}\ln(\sin x)\ \sin x\ dx &= -\ln(\sin x)\cos x+\ln\bigg(\tan\frac{x}{2}\bigg)\color{red}{+}\cos x\Big|_{0}^{\frac{\pi}{2}} \\ &= 0 + \lim_{x\to0}\bigg(\ln(\sin x)\cos x+\ln\tan\frac{x}{2}\bigg)-1 \\ &= 0 + \lim_{x\to0}\bigg(\ln(1+\cos x)-(1-\cos x)\ln\sin x\bigg)-1 \\ &= \ln2-1 \end{align}

Nosrati
  • 29,995
2

Here is an approach following along lines similar to your own answer. There is however a small subtlety used in the first integration by parts step.

On integrating by parts, we have $$\int_0^{\frac{\pi}{2}} \sin x \ln (\sin x) \, dx = (1 - \cos x) \ln (\sin x) \Big{|}_0^{\pi/2} - \int_0^{\frac{\pi}{2}} (1 - \cos x) \cdot \frac{\cos x}{\sin x} \, dx.$$ Note the subtlety here. Having chosen $v' = \sin x$ we have used $v = 1 - \cos x$, that is, a non-zero constant of integration has been selected. Doing so means one has zero at the upper and lower limits of integration.

Continuing, we have \begin{align} \int_0^{\frac{\pi}{2}} \sin x \ln (\sin x) \, dx &= \int_0^{\frac{\pi}{2}} \frac{-\cos x + \cos^2 x}{\sin x} \, dx\\ &= \int_0^{\frac{\pi}{2}} \frac{-\cos x + 1 - \sin^2 x}{\sin x} \, dx\\ &= \int_0^{\frac{\pi}{2}} \left [\text{cosec} \, x - \cot x - \sin x \right ] \, dx\\ &= \left [-\ln (\text{cosec} \,x + \cot x) - \ln (\sin x) + \cos x \right ]_0^{\pi/2}\\ &= \left [-\ln (1 + \cos x) + \cos x \right ]_0^{\pi/2}\\ &= \ln 2 - 1, \end{align} as expected.

omegadot
  • 11,736