# Find the integral $\int_{0}^{\frac{\pi}{4}}\frac{\sin{x}\cos{x}}{\sin{x}+\cos{x}}dx$

find the integeral $$\int_{0}^{\frac{\pi}{4}}\dfrac{\sin{x}\cos{x}}{\sin{x}+\cos{x}}dx$$

I know $$\dfrac{2\sin{x}\cos{x}}{\sin{x}+\cos{x}}=\dfrac{(\sin{x}+\cos{x})^2-1}{\sin{x}+\cos{x}}=\sin{x}+\cos{x}-\dfrac{1}{\sin{x}+\cos{x}}$$

and $$\int(\sin{x}+\cos{x})dx=\sin{x}-\cos{x}+C$$ and $$\int\dfrac{1}{\sin{x}+\cos{x}}dx=\int\dfrac{1}{\sqrt{2}}\csc{(x+\dfrac{\pi}{4})}dx=\dfrac{1}{\sqrt{2}}\cdot(-\ln{(\cot{x}-\csc{x})})+C$$

I think this intgral have other methods.because this is simple form,

so My Question: can you have other methods?

• What is your question ? – Pierre Alvarez Sep 12 '14 at 15:22
• Your method is right and cool. Moreover, Wolfram can't do it :) That second integral can also be done with tangent half angle substitution (Weierstrass sub). – imranfat Sep 12 '14 at 15:24

$$I=\int_0^{\dfrac\pi4}\frac{\sin x\cos x}{\sin x+\cos x}dx\iff2I=\frac1{\sqrt2}\int_0^{\dfrac\pi4}\frac{\sin2x}{\cos\left(\dfrac\pi4-x\right)}dx$$

Using $\displaystyle\int_a^bf(x)dx=\int_a^bf(a+b-x)dx,$

$$2I=\frac1{\sqrt2}\int_0^{\dfrac\pi4}\frac{\cos2x}{\cos x}dx$$

But $\displaystyle\cos2x=2\cos^2x-1$

You may use Integral of the secant function

Hope you can take it home from here

• This doesn't seem to give the correct answer. – user84413 Sep 12 '14 at 21:44
• @user84413, Thanks for your feedback, please find the edited version – lab bhattacharjee Sep 13 '14 at 5:14
• Thanks for your reply; this looks right now. (I will delete my answer.) – user84413 Sep 13 '14 at 19:40

Hint: $$\frac{\sin{x}\cos{x}}{\sin{x}+\cos{x}}\frac{\cos x-\sin x}{\cos x-\sin x}=$$ $$=\frac{2\sin{x}\cos{x}(\cos x-\sin x)}{2(\cos x-\sin x)(\sin{x}+\cos{x})}=$$ $$=\frac{\sin{2x}(\cos x-\sin x)}{2(\cos^2 x-\sin^2 x)}=\frac{\sin{2x}(\cos x-\sin x)}{2\cos2 x}$$ then

$\cos2x=t\implies-2\sin2xdx=dt,\sin x=\sqrt{(1-t)/2},\cos x=\sqrt{(1+t)/2}$

An other method would be the substitution $u=tan(\frac{x}{2})$ and then a partial fraction decomposition.

As Pierre Alvarez already said, this kind of integrals are really candidates for tangent half-angle substitution (Weierstrass substitution). Using $t=tan(\frac{x}{2})$ and brutal force from the beginning (what you did is very good for the reduction of the complexity of the problem), after simplification, you get $$I=\int\dfrac{\sin{(x)}\cos{(x)}}{\sin{(x)}+\cos{(x)}}dx=\int\frac{4 t \left(t^2-1\right)}{(t^2-2 t-1) \left(t^2+1\right)^2}dt$$ Using partial fraction decomposition, the integrand write $$\frac{2 (t+1)}{\left(t^2+1\right)^2}-\frac{1}{t^2+1}+\frac{1}{t^2-2 t-1}$$ from which $$I=\frac{1}{4} \left(\frac{4 (t-1)}{t^2+1}+\sqrt{2} \log \left(-t+\sqrt{2}+1\right)-\sqrt{2} \log \left(t+\sqrt{2}-1\right)\right)$$which, after some simplication work, gives $$I=\frac{t-1}{t^2+1}-\frac{\tanh ^{-1}\left(\frac{t-1}{\sqrt{2}}\right)}{\sqrt{2}}$$ I hope and wish I did not make any mistake (but the idea is that).

$$I=\int_{0}^{\pi/4}\dfrac{\sin{x}\cos{x}}{\sin{x}+\cos{x}}dx$$ Let $t=\sin x-\cos x$, $dt=(\cos x+\sin x)dx$ $$I=\frac12\int_{-1}^{0}\frac{1-t^2}{2-t^2}dt=\frac12\int_{-1}^0\left(1+\frac{1}{t^2-2}\right)dt=\frac12\left[t-\frac1{2\sqrt2}\ln\left|\frac{t-\sqrt2}{t+\sqrt2}\right|\right]_{-1}^0=\frac12\left[1-\frac1{2\sqrt2}\left(\ln1-\ln\frac{\sqrt2-1}{\sqrt2+1}\right)\right]=\frac18(4+\sqrt2\ln(3-2\sqrt2))\approx0.188838$$

• @chinamath edited – RE60K Sep 13 '14 at 7:47

Here is a very slightly (and I mean very slightly) different approach compared to those already given.

Recognising $$\sin x + \cos x = \sqrt{2} \sin \left (x + \frac{\pi}{4} \right ).$$ Now \begin{align*} (\sin x + \cos x)^2 &= \sin^2 x + 2 \sin x \cos x + cos^2 x\\ \Rightarrow 2 \sin^2 \left (x + \frac{\pi}{4} \right ) &= 1 + 2 \sin x \cos x\\ \Rightarrow \sin x \cos x &= \sin^2 \left (x + \frac{\pi}{4} \right ) - \frac{1}{2}. \end{align*}

So our integral becomes \begin{align*} \int^{\frac{\pi}{4}}_0 \frac{\sin x \cos x}{\sin x + \cos x} \,dx &= \int^{\frac{\pi}{4}}_0 \frac{\sin^2 \left (x + \frac{\pi}{4} \right ) - \frac{1}{2}}{\sqrt{2} \sin \left (x + \frac{\pi}{4} \right )} \, dx\\ &= \frac{1}{\sqrt{2}} \int^{\frac{\pi}{4}}_0 \sin \left (x + \frac{\pi}{4} \right ) \, dx - \frac{1}{2 \sqrt{2}} \int^{\frac{\pi}{4}}_0 \text{cosec} \left (x + \frac{\pi}{4} \right ) \, dx\\ &= \frac{1}{\sqrt{2}} \left [- \cos \left (x + \frac{\pi}{4} \right ) \right ]^{\pi/4}_0 + \frac{1}{2\sqrt{2}} \ln \left (\text{cosec} \left (x + \frac{\pi}{4} \right ) + \cot \left (x + \frac{\pi}{4} \right ) \right ) \Big{|}^{\pi/4}_0\\ &= \frac{1}{2} - \frac{1}{2\sqrt{2}} \ln (1 + \sqrt{2}). \end{align*}