3
$\begingroup$

My friend showed me this integral (and a neat way he evaluated it) and I am interested in seeing a few ways of evaluating it, especially if they are "often" used tricks.

I can't quite recall his way, but it had something to do with an identity for phase shifting sine or cosine, like noting that $\cos(x+\pi/2)=-\sin(x)$ we get: $$ I=\int_{0}^{\pi/2}\frac{\cos(x)}{\sin(x)+\cos(x)}dx=\int_{\pi/2}^{\pi}\frac{-\sin(x)}{-\sin(x)+\cos(x)}dx\\ $$ Except for as I have tried, my signs don't work out well. The end result was finding $$ 2I=\int_{0}^{\pi/2}dx\Rightarrow I=\pi/4 $$ Any help is appreciated! Thanks.

$\endgroup$
8
4
$\begingroup$

$$\int_{0}^{a}{\frac{f(x)}{f(x)+f(a-x)}}dx=\frac{a}{2}$$ let $f(x)=\sin x$ and $a=\frac\pi2$

$\endgroup$
3
  • $\begingroup$ Is there a name for this formula? Where can I find more? $\endgroup$ Jun 18 '16 at 21:06
  • $\begingroup$ No there is not $\endgroup$ Jun 18 '16 at 21:08
  • 1
    $\begingroup$ @qbert The formula arises from another one: $\int_{0}^{a}\mathrm{F}\left(x\right)\,\mathrm{d}x = \int_{0}^{a}\mathrm{F}\left(a - x\right)\,\mathrm{d}x$ which sometimes we say "by reflection in the mirror" especially by people that computes MonteCarlo integrals. By adding ( to the original one ) and dividing by two we usually arrives to an integrand which is somehow smooth which the MC-people like a lot because it can reduce computing time. $\endgroup$ Jun 19 '16 at 2:31
3
$\begingroup$

Let

\begin{equation} I=\int_0^{\pi/2}\frac{\cos x}{\sin x+\cos x}\ dx \end{equation}

and

\begin{equation} J=\int_0^{\pi/2}\frac{\sin x}{\sin x+\cos x}\ dx \end{equation}

then

\begin{equation} I+J=\frac{\pi}{2}\tag1 \end{equation}

and

\begin{align} I-J&=\int_0^{\pi/2}\frac{\cos x-\sin x}{\sin x+\cos x}\ dx\\[10pt] &=\int_0^{\pi/2}\frac{1}{\sin x+\cos x}\ d(\sin x+\cos x)\\[10pt] &=0\tag2 \end{align}

Hence, $$I=J=\frac\pi4$$by linear combinations $(1)$ and $(2)$.

$\endgroup$
2
  • $\begingroup$ You might also be interested in seeing the general method $\endgroup$ Jun 18 '16 at 22:54
  • $\begingroup$ I came back to this question, and you're answer, and the link you provided is really fantastic, and quite general $\endgroup$ Jul 7 '16 at 2:40
2
$\begingroup$

Hint: Substitute $2i\sin(x)=e^{ix}-e^{-ix}$ and $2\cos(x)=e^{ix}+e^{-ix}$

$$ I=\int_{0}^{\pi/2}\frac{2\cos(x)}{2\sin(x)+2\cos(x)}dx=\int_{0}^{\pi/2}\frac{e^{ix}+e^{-ix}}{\frac{e^{ix}-e^{-ix}}{i}+e^{ix}+e^{-ix}}dx$$

Now substitute $u=e^{ix} \implies du = ie^{ix}dx=iudx$

$$ I=\int\frac{u+1/u}{\frac{u-1/u}{i}+u+1/u}\frac{du}{iu}$$


Alternative method: $$ I=\int_{0}^{\pi/2}\frac{\cos(x)}{\sin(x)+\cos(x)}dx=\int_{0}^{\pi/2}\frac{1}{\tan(x)+1}dx$$

Substitute: $u=\tan(x) \implies du=(1+\tan^2(x))dx=(1+u^2)dx$

$$ I=\int\frac{1}{u+1}\frac{du}{1+u^2}$$

$\endgroup$
2
  • $\begingroup$ Ah I love it when complex makes integration easy. Thanks! $\endgroup$ Jun 18 '16 at 21:01
  • $\begingroup$ Added second method. $\endgroup$
    – MrYouMath
    Jun 18 '16 at 21:24
2
$\begingroup$

You're integrating on $[0, \pi/2]$ so replacing $x$ by $\pi/2 -x$ we see that $$I=\int_0^{\pi/2} \frac{\sin{x}}{\cos{x}+\sin{x}}dx.$$ Now sum this integral with the initial expression and notice that $2I=\pi/2$ hence...

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.