3

How would you evaluate the following integral: $$\int_0^{\pi/2} \frac{\ln(\sin x+\cos x)}{\sin x\cos x}\, dx$$

I can't see any helpful by parts or substitution ideas, e.g. $u=\sec x$ or $u=\csc x$ since the other integral that comes out of by parts don't evaluate nicely, so any help would be much appreciated. The integral should come out nicely as it’s part of a problem (at roughly first year undergraduate level) that says show a particular integral comes to something nice, which I’ve simplified to this.

Zacky
  • 27,674
  • 4
    Where does this problem come form? Do you have any reason to believe that it evaluates to something "nice"? Have you actually tried integration by parts? or a substitution? If so, where did you get stuck? At what level are you encountering this problem (the solution given to a student studying integral calculus for the first time will look different than the solution given to someone that finds this integral as an auxiliary step in solving a differential equation, for example)? Your question requires additional context. – Xander Henderson Sep 20 '18 at 20:21

3 Answers3

5

Rewrite the integral as: $$\int_0^\frac{\pi}{2}\frac{2\ln(\sin x+\cos x)}{2\sin x\cos x}dx=\int_0^\frac{\pi}{2}\frac{\ln(1+\sin (2x))}{\sin (2x)}dx=\int_0^\frac{\pi}{2}\frac{\ln (1+\sin x)}{\sin x}dx =\frac{\pi^2}{8}$$ For the last integral look here and take $a=1$.

Zacky
  • 27,674
  • Sorry if I’m missing something obvious but how did 2x suddenly become x – Ginny Mothball Wong Sep 20 '18 at 21:43
  • Sorry but how did you know that $$\int_0^\frac{\pi}{2}\frac{2\ln(\sin x+\cos x)}{2\sin x\cos x}dx=\int_0^\frac{\pi}{2}\frac{\ln(1+\sin (2x))}{\sin (2x)}dx?$$ – Dinesh Shankar Sep 20 '18 at 21:45
  • 1
    Double angle formulae for sine on bottom and using log rules to move the inside to square sinx +cosx gives the first equality – Ginny Mothball Wong Sep 20 '18 at 21:51
  • @GinnyMothballWong by letting $2x=t$ one gets $$\frac12 \int_0^\pi \frac{\ln(1+ \sin x)}{\sin x}dx$$ now split it from $0 \to \frac{\pi}{2} \to \pi$ and in the second part ($\frac{\pi}{2} \to \pi$) put $x-\frac{\pi}{2}=t$ to get $$\frac12 \int_0^\frac{\pi}{2} \frac{\ln(1+ \cos t)}{\cos t}dt$$ finally let $\frac{\pi}{2}-t =x$ to show that the second part of the integral is equal to the integral from $0$ to $\frac{\pi}{2}$. You could also look at the sine graph after you substituted $2x=t$. – Zacky Sep 20 '18 at 21:54
  • 1
    @DineshShankar as OP said I have used the fact that $a \ln b = \ln(b^a)$. $(\sin x+ \cos x)^2= \sin^2 x+\cos ^2 x +2\sin x\cos x= 1+\sin (2x)$ – Zacky Sep 20 '18 at 21:57
1

I do not know if this hint is conclusive, but this is what I got: \begin{align*} \frac{\ln(\sin(x)+\cos(x))}{\sin(x)\cos(x)} & = \frac{\ln[\left(\tan(x) + 1\right)\cos(x)]}{\cos^{2}(x)\tan(x)}\\ & = \frac{\ln(\tan(x)+1)\times\sec^{2}(x)}{\tan(x)} + \frac{\ln(\cos(x))\times\sec^{2}(x)}{\tan(x)} \end{align*} On the one hand, the substitution $u = \tan(x) + 1$ results into \begin{align*} \int\frac{\ln(\tan(x)+1)\times\sec^{2}(x)}{\tan(x)}\mathrm{d}x = \int\frac{\ln(u)}{u-1}\mathrm{d}u \end{align*} On the other hand, since $\sec^{2}(x) = 1 + \tan^{2}(x)$, the same substitution results into \begin{align*} \int\frac{\ln(\cos(x))\times\sec^{2}(x)}{\tan(x)}\mathrm{d}x = \int\frac{\ln(2 - 2u + u^{2})^{-1/2}}{u - 1}\mathrm{d}u = \frac{1}{2}\int\frac{\ln(2-2u+u^{2})^{-1}}{u-1}\mathrm{d}u \end{align*} Thus the problem to be solved is equivalent to \begin{align*} \int_{0}^{\pi/2}\frac{\ln(\sin(x)+\cos(x))}{\sin(x)\cos(x)}\mathrm{d}x = \frac{1}{2}\int_{1}^{+\infty}\ln\left(\frac{u^{2}}{2-2u+u^{2}}\right)\frac{\mathrm{d}u}{1-u} \end{align*}

user0102
  • 21,572
-1

Note that if you use Weierstrass substitution you get: $$I=2\int_0^1\frac{(1+t^2)(\ln(1+2t-t^2)-\ln(1+t^2))}{2t(1-t^2)}dt$$ This may work

EDIT

note: $$\sin(x)+\cos(x)=\sqrt{2}\sin\left(x+\frac{\pi}{4}\right)$$ also, we know the rule: $$\int_a^bf(x)dx=\int_a^bf(a+b-x)dx$$ but when applied to the original integral it does not help us.

Writing our integral as: $$I=\int_0^{\pi/2}\frac{\ln\left(\sqrt{2}\sin\left(x+\frac{\pi}{4}\right)\right)}{\sin(x)\cos(x)}dx$$ we can now apply the substitution: $$u=x+\frac{\pi}{4}$$ to obtain: $$I=2\int\limits_{\pi/4}^{3\pi/4}\frac{\ln\left(\sqrt{2}\sin(u)\right)}{(\sin u+\cos u)(\sin u-\cos u)}du=2\int\limits_{\pi/4}^{3\pi/4}\frac{\ln\left(\sqrt{2}\sin(u)\right)}{\sin^2(u)-\cos^2(u)}du$$ now we would like to substitute with the $\sqrt{2}\sin(u)$ but this doesn't work with the limits. So we are going to try using the substitution $v=\sqrt{2}\sin(u)$ and split the integral up into two parts. $$I_1=2\int\limits_{\pi/4}^{\pi/2}\frac{\ln(\sqrt{2}\sin(u)}{\sin^2(u)-\cos^2(u)}du=\sqrt{2}\int_1^\sqrt{2}\frac{\ln(v)}{\frac{v^2}{2}-\frac{2-v^2}{2}}dv=\sqrt{2}\int_1^\sqrt{2}\frac{\ln(v)}{v^2-1}dv$$$$ =\sqrt{2}\int_1^\sqrt{2}\frac{\ln(v)}{2(v-1)}-\frac{\ln(v)}{2(v+1)}dv$$ and the same can be done for the second part.

Henry Lee
  • 12,215