# Thread: split integral of abs + trig.

1. ## split integral of abs + trig.

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.

2. Hello,

See on a unit circle, how cos fluctuates between 0 and $\displaystyle \pi$ : it's always decreasing. (in another way, the arccos function is strictly decreasing in this interval)

So if you're studying $\displaystyle \int_0^\pi |a+\cos(x)| ~dx$, you have to see where $\displaystyle a+\cos(x)<0$, that is $\displaystyle \cos(x)<{\color{red}-}a$

Thanks to this unit circle, it's easy (and by knowing that arccos is strictly decreasing, it's easy too) : $\displaystyle \forall x\in[0,\pi] ~,~ \cos(x)<-a \Leftrightarrow x>\arccos(-a)$

So we'll have $\displaystyle \int_0^\pi |a+\cos(x)| ~dx=\int_0^{\arccos(-a)} a+\cos(x) ~dx-\int_{\arccos(-a)}^\pi a+\cos(x) ~dx$