Closed form integral of abs(cos(x))

In summary: The key is to use the fact that |cos(x)| is equal to cos(x) for x ∈ [0, π/2] and -cos(x) for x ∈ (π/2, π]. Essentially, you need to split the interval of integration into two parts and then use the properties of the cosine function to manipulate the integrand and get it into the desired form.
  • #1
zynga
1
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.
 
Physics news on Phys.org
  • #2
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 =
\sin\left(x - \pi \left\lfloor \frac x \pi + \frac 1 2\right\rfloor \right)
+ 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.
 

1. What is the closed form integral of abs(cos(x))?

The closed form integral of abs(cos(x)) is sin(x) + C, where C is a constant of integration.

2. How do you solve the closed form integral of abs(cos(x))?

To solve the closed form integral of abs(cos(x)), you can use the trigonometric identity cos(x) = abs(cos(x)) * sign(cos(x)) and then integrate each term separately.

3. Can the closed form integral of abs(cos(x)) be simplified further?

The closed form integral of abs(cos(x)) cannot be simplified further, as it is already in its simplest form.

4. Is the closed form integral of abs(cos(x)) valid for all values of x?

Yes, the closed form integral of abs(cos(x)) is valid for all values of x, as long as it is within the domain of the function, which is all real numbers.

5. Are there any special cases when solving the closed form integral of abs(cos(x))?

There are no special cases when solving the closed form integral of abs(cos(x)), as the function does not have any singularities or discontinuities.

Similar threads

Replies
8
Views
180
Replies
2
Views
293
  • Calculus
Replies
29
Views
722
Replies
3
Views
649
Replies
4
Views
1K
  • Calculus
Replies
6
Views
1K
Replies
3
Views
1K
Replies
8
Views
308
Replies
16
Views
1K
Back
Top