Hi, I'm getting really weird answers for the answer of this integral
$\displaystyle \int_{0}^{\pi}|\frac{1}{2}+cosx|~dx$
remember what absolute values mean. $\displaystyle |x| = \left \{ \begin{array}{cc} x & \mbox{ if } x \ge 0 \\ & \\ -x & \mbox{ if } x < 0 \end{array} \right.$
thus we need to find where our function (without absolute values) is negative, and negate its integral on that region. we can find that 1/2 + cos(x) is negative for [2pi/3, pi], thus:
$\displaystyle \int_0^{\pi} \left| \frac 12 + \cos x \right|~dx = \int_0^{\frac {2 \pi}3} \left( \frac 12 + \cos x \right)~dx - \int_{\frac {2 \pi}3}^{\pi} \left( \frac 12 + \cos x \right)~dx$
Hello, akhayoon!
Did you make a sketch?
$\displaystyle \int_{0}^{\pi}\left|\frac{1}{2}+\cos x\right|\,dx$
It is the cosine curve raised a half-unit.Code:| * |:::* |:::::* |::::::* |::::::: |:::::::* |:::::::: π ---+--------o------+--- | ↑*:::::: | ↑ *:::: | 2π/3 * |
I totally agree with Dan's integrals and his final answer.