# Evaluate the following:$\int\limits_ {\Large\frac{-\pi}{4}}^{\Large\frac{\pi}{4}} \log(\sin x+\cos x)dx$

$\begin{array}{1 1} (A) \large\frac{\pi}{2}\log\large\frac{1}{2} \\ (B) \large\frac{\pi}{4}\log\large\frac{1}{2} \\(C) \large\frac{\pi}{2}\log 2 \\ (D) \large\frac{\pi}{4}\log 2 \end{array}$

Toolbox:
• $\int_0^a f(a-x)=2\int_0^{\Large\frac{a}{2}}f(x)dx$
• $\int_a^b f(a+b-x)=\int_a^b f(x)dx$
• $\int_{-a}^a f(x)dx=2\int_0^a f(x)dx$ if $f(x)$ is an even function.
• $\cos^2x-\sin^2x=\cos 2x$
Step 1:
Let $I=\int\limits_ {\Large\frac{-\pi}{4}}^{\Large\frac{\pi}{4}} \log(\sin x+\cos x)dx$-----(1)
Apply the property $\int_a^b f(a+b-x)=\int_a^b f(x)dx$
$I=\int\limits_ {\Large\frac{-\pi}{4}}^{\Large\frac{\pi}{4}} \log[\sin (\large\frac{\pi}{4}-\frac{\pi}{4}-x)$$+\cos(\large\frac{\pi}{4}-\frac{\pi}{4}-$$ x)dx$
But $\sin(-x)=-\sin x$ and $\cos(-x)=\cos x$
Therefore $I=\int\limits_ {\Large\frac{-\pi}{4}}^{\Large\frac{\pi}{4}} \log(\cos x-\sin x)dx$-----(2)
Adding eq(1) & (2) we get
$2I=\int\limits_ {\Large\frac{-\pi}{4}}^{\Large\frac{\pi}{4}} [\log(\sin x+\cos x)+\log(\cos x-\sin x)]dx$
But $\log a+\log b=\log ab$
$2I=\int\limits_ {\Large\frac{-\pi}{4}}^{\Large\frac{\pi}{4}} [\log(\sin x+\cos x)(\cos x-\sin x)]dx$
$(a+b)(a-b)=a^2-b^2$
$2I=\int\limits_ {\Large\frac{-\pi}{4}}^{\Large\frac{\pi}{4}} [\log(\cos^2 x-\sin^2 x)]dx$
But $\cos^2x-\sin^2x=\cos 2x$
Hence $2I=\int\limits_ {\Large\frac{-\pi}{4}}^{\Large\frac{\pi}{4}} \log\cos 2xdx$
Step 2:
We know $\cos x$ is an even function.
Hence $\int_{-a}^a f(x)dx=2\int_0^a f(x)dx$ if $f(x)$ is an even function.
Therefore $2I=2\int\limits_ 0^{\Large\frac{\pi}{4}} \log\cos 2xdx$
$I=\int\limits_ 0^{\Large\frac{\pi}{4}} \log\cos 2xdx$------(3)
Apply the property $\int_0^a f(a-x)dx=2\int_0^af(x)dx$
$I=\int_0^{\Large\frac{\pi}{4}}\log(\cos2\big[\large\frac{\pi}{4}$$-x\big])dx=\int_0^{\large\frac{\pi}{4}}\log(\cos\large\frac{\pi}{2}$$-2x)dx.$
But $\cos(\large\frac{\pi}{2}-$$\theta)=\sin\theta I=\int\limits_ 0^{\Large\frac{\pi}{4}} \log\sin 2xdx------(4) Adding eq(3) &(4) we get 2I=\int\limits_ 0^{\Large\frac{\pi}{4}} (\log\sin 2x+\log\cos 2xdx) Again applying the law of logarithm 2I=\int\limits_ 0^{\Large\frac{\pi}{4}} \log(\sin 2x\cos 2x)dx But \sin 2x=2\sin x\cos x 2I=\int\limits_ 0^{\Large\frac{\pi}{4}} \log(\large\frac{1}{2}$$\sin 4x)dx$
Step 3:
This can be written as
$2I=\int\limits_ 0^{\Large\frac{\pi}{4}} \log\sin 4xdx+\int\limits_ 0^{\Large\frac{\pi}{4}}\log\large\frac{1}{2}$$dx 2I=\int\limits_ 0^{\Large\frac{\pi}{4}} \log\sin 4xdx+\big[x\big]_ 0^{\Large\frac{\pi}{4}}\log\large\frac{1}{2} On applying limits 2I=\int\limits_ 0^{\Large\frac{\pi}{4}} \log\sin 4xdx+\large\frac{\pi}{4}$$\log\large\frac{1}{2}$
Let $\int\limits_ 0^{\Large\frac{\pi}{4}} \log\sin 4xdx=I_1$
$2I=I_1+\large\frac{\pi}{4}$$\log\large\frac{1}{2} Step 4: Put 2x=t On differentiating with respect to x we get 2xdx=dt\Rightarrow dx=\large\frac{dt}{2} The limits also change as we substitute t When x=0,t=0 When x=\large\frac{\pi}{4},t=\large\frac{\pi}{2} I_1=\large\frac{1}{2}\int_0^{\large\frac{\pi}{2}}$$\log\sin 2t dt.$
Apply $\int_{0}^{2a }f(x)dx=2\int_0^a f(x)dx$ .
$I_1=\large\frac{1}{2}$$2\int_0^{\large\frac{\pi}{4}}$$\log\sin 2t dt.$
$\;\;=\int_0^{\large\frac{\pi}{4}}$$\log\sin 2t dt. But \int_0^af(x)dx=\int_0^af(t)dt I_1=\int_0^{\large\frac{\pi}{4}}$$\log\sin 2x dx.$
Hence $2I=\int_0^{\large\frac{\pi}{4}}\log \sin 2xdx+\large\frac{\pi}{4}$$\log\large\frac{1}{2} But I=\int\limits_ 0^{\Large\frac{\pi}{4}} \log\sin 2xdx Therefore 2I=I+\large\frac{\pi}{4}$$\log\large\frac{1}{2}$
$I=\large\frac{\pi}{4}$$\log\large\frac{1}{2}$