## What is the integral of [∑n=0∞(−1)ncosnx] ?

To find the integral of the series ∑(n=0 to ∞) (-1)^n * cos(nx), we’ll integrate each term of the series separately with respect to x. The integral of a series is essentially the sum of the integrals of its individual terms:

∫ [∑(n=0 to ∞) (-1)^n * cos(nx)] dx

Let’s integrate each term:

∫ (-1)^0 * cos(0x) dx + ∫ (-1)^1 * cos(x) dx + ∫ (-1)^2 * cos(2x) dx + …

Now, let’s simplify each term:

- ∫ cos(0x) dx = ∫ dx = x + C, where C is the constant of integration.
- ∫ (-1)^1 * cos(x) dx = -∫ cos(x) dx. The integral of cos(x) is sin(x). So, this term becomes -sin(x) + C.
- ∫ (-1)^2 * cos(2x) dx = ∫ cos(2x) dx. The integral of cos(2x) is (1/2)sin(2x). So, this term becomes (1/2)sin(2x) + C.

Now, we need to add up all these individual integrals, which represents the integral of the entire series:

∫ [∑(n=0 to ∞) (-1)^n * cos(nx)] dx = (x – sin(x) + (1/2)sin(2x) + … ) + C

The result is an infinite series of integrated terms, and it can be represented as:

x – sin(x) + (1/2)sin(2x) – (1/3)sin(3x) + (1/4)sin(4x) – (1/5)sin(5x) + …

Please note that this is a power series, and its convergence depends on the value of x. If x falls within a range where the series converges, this expression represents the integral of the given series. If x falls outside that range, the series may not converge, and the integral won’t be valid.