int_0^pi max(sin(x),cos(x)) dx =?

Apr 12, 2017

Assuming I've read the expression correctly: $\textcolor{g r e e n}{0}$

Explanation:

${0}^{\pi} = 0$
So
$\textcolor{w h i t e}{\text{XXX")intcolor(white)("x")0^picolor(white)("x")max(sin(x),cos(x))color(white)("x")dx=int color(white)("x")0 color(white)("x}} \mathrm{dx} = 0$

Apr 12, 2017

$1 + \sqrt{2}$

Explanation:

${\int}_{0}^{\pi} \max \left(\cos x , \sin x\right) \mathrm{dx} = {\int}_{0}^{\frac{\pi}{4}} \cos x \mathrm{dx} + {\int}_{\frac{\pi}{4}}^{\pi} \sin x \mathrm{dx} = 1 + \sqrt{2}$

Apr 12, 2017

I get $1 + \sqrt{2}$. Please see below.

Explanation:

Here are the graphs of sine (red) and cosine (blue).

On $\left[0 , \pi\right]$, we have

$\max \left(\sin x , \cos x\right) = \left\{\begin{matrix}\sin x & \text{if" & 0 <= x <= pi/4 \\ cosx & "if} & \frac{\pi}{4} < x \le \pi\end{matrix}\right.$

Therefore,

${\int}_{0}^{\pi} \max \left(\sin x , \cos x\right) \mathrm{dx} = {\int}_{0}^{\frac{\pi}{4}} \sin x \mathrm{dx} + {\int}_{\frac{\pi}{4}}^{\pi} \cos x \mathrm{dx}$

$= \left[\frac{\sqrt{2}}{2}\right] + \left[1 + \frac{\sqrt{2}}{2}\right] = 1 + \sqrt{2}$