Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

this is a revision problem, not a homework problem. Sincere thanks for help.

Question: Evaluate $\int_0^{\pi/2}\frac{\cos x}{\cos x+\sin x}$.

The answer is $\pi/4$, but I am unable to work out the method.

Sincere thanks for help.

share|cite|improve this question
up vote 5 down vote accepted

Notice that $$\frac{d}{dx} (\log(\cos x + \sin x)) = \frac{\cos x - \sin x}{\cos x + \sin x}.$$ Now if $$I = \int_0^{\pi/2} \frac{\cos x}{\cos x + \sin x} dx= \int_0^{\pi/2} 1 - \frac{\sin x}{\cos x + \sin x}dx$$ then we see that $$2I = \int_0^{\pi/2} 1 + \frac{\cos x - \sin x}{\cos x + \sin x} dx = \pi/2+0.$$

share|cite|improve this answer
Thanks, this method is natural and elegant. – yoyostein Jun 16 '12 at 10:01

Let $f(x)=\dfrac{\cos x}{\cos x+\sin x}$ and $g(x)=\dfrac{\sin x}{\cos x+\sin x}$. Note that $g\left(\frac{\pi}{2}-x\right)=f(x)$, which implies that $\int_0^{\pi/2}f(x)dx=\int_0^{\pi/2}g(x)dx$. Also, $f(x)+g(x)=1$ for all $x$, so $\int_0^{\pi/2}(f(x)+g(x))dx=\pi/2$.



share|cite|improve this answer
Community wiki? – The Chaz 2.0 Jun 16 '12 at 19:22
Phrase with a question mark at the end? – Jonas Meyer Jun 17 '12 at 15:49
Next time I'll be more explicit [interrobang] ¿¡ – The Chaz 2.0 Jun 17 '12 at 22:29
¿¡Sounds good!? – Jonas Meyer Jun 18 '12 at 4:08

Another easy way would be to directly write that:

$$\int_0^{\pi/2}\frac{\cos x}{\cos x+\sin x}=\int_0^{\pi/2}\frac{1}{2}\left(1+\frac{\cos x - \sin x}{\cos x+\sin x}\right)=\frac{1}{2}(x+\ln(\sin x +\cos x))\big|_0^{\pi/2} = \frac{\pi}{4}.$$


share|cite|improve this answer

$$I = \int_0^{\pi/2}\frac{\cos x}{\cos x+\sin x}dx \tag{1}$$

$$I = \int_0^{\pi/2}\frac{\cos( \frac{\pi}{2}-x)}{\cos( \frac{\pi}{2}-x)+sin( \frac{\pi}{2}-x)}dx = \int_0^{\pi/2}\frac{\sin x}{\cos x+\sin x}dx \tag{2}$$

Add (1) and (2) to get

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

Thus, $I$ = $\pi/4$

share|cite|improve this answer

Let $ I:= \displaystyle{ \int_{0}^{\pi /2} \frac{\cos x}{\cos x+ \sin x } dx}$ and $ J:= \displaystyle{ \int_{0}^{\pi /2} \frac{\sin x}{\cos x+ \sin x } dx}$.

Now we can see that: $ I+J =\frac{\pi}{2}$ and $ \displaystyle{I-J= \int_{0}^{\pi /2} \frac{ \cos x - \sin x}{\cos x + \sin x} dx = \log ( \sin x +\cos x) |_0^{\pi /2} } =0$

Solving this algebraic system we get that $ \boxed{ I=J= \frac{\pi}{4}}$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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