Closed form integral of abs(cos(x))

1 reply · 5K views · last reply
zynga
Messages
1
Reaction score
0
Hi everyone.

Recently, I came across a closed form solution to ∫|cos(x)|dx as
sin(x-∏*floor(x/∏+1/2)) + 2*floor(x/∏+1/2)

I have no idea how to reach this solution but checking this for definite integral from 0 to 3∏/4 or ∏ seems to work. Using |cos(x)| as cos(x)*sgn(cos(x)) doesn't help in reaching at the solution. Does someone know how to get this closed form?

Thanks.
 
zynga said:
Hi everyone.

Recently, I came across a closed form solution to ∫|cos(x)|dx as
sin(x-∏*floor(x/∏+1/2)) + 2*floor(x/∏+1/2)
That is correct as a definite integral,
[tex] \int_0^x \lvert \cos t \rvert \, dt =<br /> \sin\left(x - \pi \left\lfloor \frac x \pi + \frac 1 2\right\rfloor \right)<br /> + 2\left\lfloor \frac x \pi + \frac 1 2\right\rfloor[/tex]

As an indefinite integral it's better to write [itex]\int \lvert\cos x\rvert\,dx = \sin x \operatorname{sgn}(\cos x)+C[/itex]

I have no idea how to reach this solution but checking this for definite integral from 0 to 3∏/4 or ∏ seems to work. Using |cos(x)| as cos(x)*sgn(cos(x)) doesn't help in reaching at the solution. Does someone know how to get this closed form?
How to get that closed form? By being creative. You're not going to find any of the standard integration methods that will yield that nice closed form solution.