# Homework Help: Abs(Cos(x)) Integral

1. Mar 25, 2008

### dobry_den

1. The problem statement, all variables and given/known data

$$\int \left|\cos t\right| \ dt$$

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

$$\sin \left(x - \pi \left(\frac{x}{\pi} + \frac{1}{2} \right)\right) + 2\left(\frac{x}{\pi} + \frac{1}{2} \right)$$

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

2. Mar 25, 2008

### gamesguru

That answer can be greatly simplified. It simplifies to $\frac{2x}{\pi}$. Try it on your calculator.

3. Mar 25, 2008

### sutupidmath

Is this supposed to be a definite or indefinite integral? Because if it is just indefinite then i think you missed something, because the answer you provided is defenitely wrong. Since if you take the derivative of your answer you defenitely won't end up with the integrand.
YOu only need to determine where cos(t) changes it's sign, and then integrate separately on those intervals, and you should end up with two answers: -sin(t)+c, on some interval where cos(t) is positive, and sin(t)+c,on the interval where cos(t) is negative.

Last edited: Mar 25, 2008
4. Mar 25, 2008

### Schrodinger's Dog

That's what I thought because

$\int_{-\infty}^{\infty}\mid\cos(t)\mid=?$

Does not converge so the answer their would be some sort of Taylor series I would imagine.

I don't understand the question?

And the general solution is obvious as said above.

Last edited: Mar 25, 2008
5. Mar 25, 2008

### HallsofIvy

No, it does not. You've missed a parenthesis.

6. Mar 25, 2008

### Schrodinger's Dog

Oh yeah, I was going to say that as well it actually simplifies to

$\sin\left [\frac{(-\pi^2+4x+2\pi)}{2\pi}\right ]$

I'd try doing it by hand myself.

But since I don't understand the question anyway seemed a bit pointless?

Last edited: Mar 25, 2008
7. Mar 25, 2008

### sutupidmath

Well, if someone missed a parenthesis, i would say that the OP missed it.

8. Mar 25, 2008

### Schrodinger's Dog

Indeed. It's either that or $\sin(\frac{2x}{\pi}+1)$ though.

Last edited: Mar 25, 2008
9. Mar 25, 2008

### dobry_den

it's an indefinite integral

10. Mar 25, 2008

### sutupidmath

Well, i would again say that, that answer as it is given is not correct. But i might be missing something and those answers could be equivalent, i just can't see at first sight that those two answers actually are equivalent.

11. Mar 25, 2008

### dobry_den

the same with me, that's why i'm confused about it.. but still, thanks a lot!

12. Mar 25, 2008

### Schrodinger's Dog

Must be a misprint then. Because no combination of playing around with brackets produces the actual result of $\int \mid\cos(t)\mid\;dt$.

13. Mar 25, 2008

### gamesguru

Am I missing something? Because as far as I can see,
$$\sin \left(x - \pi \left(\frac{x}{\pi} + \frac{1}{2} \right)\right) + 2\left(\frac{x}{\pi} + \frac{1}{2} \right)=\frac{2x}{\pi}$$

14. Mar 25, 2008

### sutupidmath

No you are not missing anything, from what the OP originally stated, Halls thought though that the OP misplaced parenthesees.

Halls might have thought that the expression reads like this:

$$\sin \left(x - \pi \left(\frac{x}{\pi} + \frac{1}{2} \right) + 2\left(\frac{x}{\pi} + \frac{1}{2} \right)\right)$$

which is not what the op indeed wrote.

Last edited: Mar 25, 2008
15. Mar 25, 2008

### gamesguru

Ok, thanks for the clarification. And $\frac{2x}{\pi}$ actually works for any multiple of $\pi$, but that's not good enough to be the real integral.

16. Mar 25, 2008

### Schrodinger's Dog

That's my fault, because that equation does not match the integral, I assumed there might of been a mistake. Blame me not HOI. However it's still correct that neither equation yields the correct result. Thus the first post from stupidmath is correct, the answer is the absolute value when cos(t) is positive or negative on the intervals given there, not the text book answer, which might be a misprint?

Last edited: Mar 25, 2008
17. Mar 25, 2008

### sutupidmath

Yeah, defenitely, there seems to be no reasonable way that $$\int|cos(t)|dt=\sin \left(x - \pi \left(\frac{x}{\pi} + \frac{1}{2} \right)\right) + 2\left(\frac{x}{\pi} + \frac{1}{2} \right)$$ Or the other one, when we change the place of parenteses.

I would say there might been a misplacement of results at the back of the book, because it is not correct this way. End of story!!