# Evaluate:$\int \limits _0^{\pi/2} \frac{1}{2\cos x+4 \sin x}dx$

Toolbox:
• (i)$\int \limits _a^b f(x)dx=F(b)-F(a)$
• (ii)If we substitute a function f(x) as t, then $f'(x)dx=dt$ hence the function $\int f(x)dx=\int t.dt$
• (iii)$\large\frac{dx}{x^2-a^2}=\frac{1}{2a} log \frac{|x-a|}{|x+a|}$
given $I=\large\int \limits _0^{\pi/2} \frac{dx}{2\cos x+4 \sin x}$
Put $\tan x/2=t$ on differentiating w.r.t x we get
$\frac{1}{2} \sec^2 x/2 dx=dt \qquad=> \sec ^2 x/2 dx=dx/2$
Therefore $dx=\large\frac{2dt}{\sec^2 x/2}$ But $\sec^2 x/2=1+\tan^2 x/2$
Therefore $dx=\large\frac{2dt}{1+t^2}\qquad \cos x=\frac{1-\tan^2 x/2}{1+\tan^2 x/2}=\frac{1-t^2}{1+t^2}$
$\sin x=\large\frac{2\tan^2 x/2}{1+\tan^2 x/2}=\frac{2t}{1+t^2}$
This limits also change
when x=0,t=0; when $x=\pi/2,t=\tan \pi/4=1$
Hence now substituting for $\cos x,\sin x$ and dx we get,
$I=\Large\int \limits_0^1 \frac{\int \limits_0^2 \frac{2dt}{1+t^2}}{2 \bigg(\frac{1-t^2}{1+t^2}\bigg)+4 \bigg(\frac{2t}{1+t^2}\bigg)}$
$=\large \int \limits_0^1 \frac{2dt}{2(1-t^2)+4(2t)}=\int \limits_0^1 \frac{2 dt}{2-2t^2+8t}$
Therefore $I=2\int \limits_0^1 \large\frac{dt}{-2t^2+8t+2}=\frac{2}{-2} \int \frac{dt}{t^2-4t-1}$
$=-\int \limits_0^1 \large\frac{dt}{(t-2)^2-4-1}=-\int \limits_0^1 \frac{dt}{(t-2)^2-(\sqrt 5)^2}$
$I=\int \limits_0^1 \large\frac{dt}{(\sqrt 5)^2-(t-2)^2}$
This is of the form $\int \frac{dx}{a^2-x^2}=\frac{1}{2a} log |\frac{a+x}{a-x}|$ here $a=\sqrt 5\; x=(t-2)$
Hence on integrating we get,
$I=\large\frac{1}{2 \sqrt 5} log \bigg[\frac{\sqrt 5+t-2}{\sqrt 5-t+2} \bigg]_0^1$
Applying the limits we get,
$I=\frac{1}{2 \sqrt 5} \bigg\{log \bigg[\frac{\sqrt 5+1-2}{\sqrt 5-1+2} \bigg]-log \bigg[\frac{\sqrt 5+0-2}{\sqrt 5-0+2} \bigg]\bigg\}$
$I=\frac{1}{2 \sqrt 5} \bigg\{\bigg[log \frac{\sqrt 5-1}{\sqrt 5+1} \bigg]-log \bigg[\frac{\sqrt 5-2}{\sqrt 5+2} \bigg]\bigg\}$
But $log a-log b =log |a/b|$
Therefore $I=\frac{1}{2 \sqrt 5} \bigg\{\bigg[log \bigg(\frac{\sqrt 5-1}{\sqrt 5+1} \times \frac{\sqrt 5+2}{\sqrt 5-2}\bigg) \bigg]\bigg\}$
$=\frac{1}{2 \sqrt 5} \bigg\{\bigg[log \bigg(\frac{3+\sqrt 5}{3-\sqrt 5}\bigg) \bigg]\bigg\}$
Multiplying and dividing by its conjugate
$I=\frac{1}{2 \sqrt 5} \bigg[log \bigg(\frac{3+\sqrt 5}{3-\sqrt 5} \times \frac{3+\sqrt 5}{3+\sqrt 5}\bigg) \bigg]$
$=\frac{1}{2 \sqrt 5} \bigg[log \frac{(3+\sqrt 5)^2}{3^2-(\sqrt 5)^2}\bigg]=\frac{1}{2 \sqrt 5} log \bigg[\bigg(\frac{3+\sqrt 5}{4}\bigg)^2\bigg]$
But $log a^2=2 log a$
Hence $I=\frac{2}{2 \sqrt 5} \bigg[log \frac{3+\sqrt 5}{2}\bigg]$
Therefore $I=\frac{1}{\sqrt 5} log \bigg(\frac{3+\sqrt 5}{2}\bigg)$