Home » Blog » Find the integral from -π to x of |1/2 + cos t|

Find the integral from -π to x of |1/2 + cos t|

For 0 \leq x \leq \pi, compute the following integral:

    \[ \int_{-\pi}^x \left| \frac{1}{2} + \cos t \right| \, dt. \]


Since we are taking the integral of an absolute value, first we want to determine on which intervals \frac{1}{2} + \cos t is positive and on which it is negative. We have,

    \[ \left| \frac{1}{2} + \cos t \right| =  \begin{dcases} \frac{1}{2} + \cos t & \text{if } -\pi \leq x \leq -\frac{2 \pi}{3}, \text{ or } \frac{2 \pi}{3} \leq x \leq \pi \\  - \left( \frac{1}{2} + \cos t \right) & \text{if } -\frac{2 \pi}{3} \leq x \leq \frac{2 \pi}{3} \end{dcases}. \]

Now must consider two cases. First, if 0 \leq x \leq \frac{2 \pi}{3}, then,

    \begin{align*}  \int_{-\pi}^x \left| \frac{1}{2} + \cos t \right| \, dt &= - \int_{-\pi}^{- \frac{2 \pi}{3}} \left( \frac{1}{2} + \cos t \right) \, dt + \int_{- \frac{2 \pi}{3}}^x \left( \frac{1}{2} + \cos t \right) \, dt \\  &= - \left( - \frac{\pi}{3} + \frac{\pi}{2} \right) - \left( \sin \left(-\frac{2 \pi}{3} \right) - \sin (- \pi) \right) + \left( \frac{x}{2} + \frac{\pi}{3} \right) + \left( \sin x - \sin \left(-\frac{2 \pi}{3} \right) \right) \\  &= \frac{\pi}{6} + \sqrt{3} + \frac{x}{2} + \sin x. \end{align*}

In the other case, that \frac{2 \pi}{3} \leq x \leq \pi, then,

    \begin{align*}  \int_{-\pi}^x \left| \frac{1}{2} + \cos t \right| \, dt &= -\int_{-\pi}^{-\frac{2 \pi}{3}} \left( \frac{1}{2} + \cos t \right) \, dt + \int_{- \frac{2 \pi}{3}}^{\frac{2 \pi}{3}} \left( \frac{1}{2} + \cos t \right) \,dt - \int_{\frac{2 \pi}{3}}^x \left( \frac{1}{2} + \cos t \right) \, dt \\  &= \left( - \frac{\pi}{6} + \frac{\sqrt{3}}{2} \right) + \left( \frac{2 \pi}{3} + \sqrt{3} \right) - \left( \frac{x}{2} - \frac{\pi}{3} \right) - \left( \sin x - \frac{\sqrt{3}}{2} \right) \\  &= \frac{5 \pi}{6} + 2 \sqrt{3} - \frac{x}{2} - \sin x. \end{align*}

One comment

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):