- 115

- 0

**1. Homework Statement**

[tex]\int \left|\cos t\right| \ dt[/tex]

**3. The Attempt at a Solution**

I divided the interval (-infinity, +infinity) into 2 types of subintervals where cosine is positive and negative respectively. But I'm not sure how to combine these two integrals to get one formula for the whole interval of real numbers. My textbook gives the result as

[tex]\sin \left(x - \pi \left(\frac{x}{\pi} + \frac{1}{2} \right)\right) + 2\left(\frac{x}{\pi} + \frac{1}{2} \right)[/tex]

Do you have any idea how to arrive at such a formula? Thanks a lot in advance!