Hi,

I need to express the following integral without the abs.

$\displaystyle \int_0^\pi |\frac{1}{2} + Cos(x)|dx$.

I know that $\displaystyle Cos(x) = \frac{1}{2}$ when $\displaystyle x = \frac{\pi}{3}$ which I am sure is part of the solution.

How do I express this without the absolute value.

What if it wasn't a nice fraction like $\displaystyle \frac{1}{2}$ what if it was

$\displaystyle \int_0^\pi |\frac{3}{7} + Cos(x)|dx$.

How would you solve it then.

Thanks

Regards

Craig.