Integral of (pi+2x)cos(nx) dx
The solution
The answer (Indefinite)
[src]
// 2 \
|| x |
|| -- for n = 0|
|| 2 |
/ || | // x for n = 0\ // x for n = 0\
| ||/-cos(n*x) | || | || |
| (pi + 2*x)*cos(n*x) dx = C - 2*|<|---------- for n != 0 | + pi*|
$$\int \left(2 x + \pi\right) \cos{\left(n x \right)}\, dx = C + 2 x \left(\begin{cases} x & \text{for}\: n = 0 \\\frac{\sin{\left(n x \right)}}{n} & \text{otherwise} \end{cases}\right) + \pi \left(\begin{cases} x & \text{for}\: n = 0 \\\frac{\sin{\left(n x \right)}}{n} & \text{otherwise} \end{cases}\right) - 2 \left(\begin{cases} \frac{x^{2}}{2} & \text{for}\: n = 0 \\\frac{\begin{cases} - \frac{\cos{\left(n x \right)}}{n} & \text{for}\: n \neq 0 \\0 & \text{otherwise} \end{cases}}{n} & \text{otherwise} \end{cases}\right)$$
/2 2*cos(pi*n) pi*sin(pi*n)
|-- - ----------- - ------------ for And(n > -oo, n < oo, n != 0)
| 2 2 n
$$\begin{cases} - \frac{\pi \sin{\left(\pi n \right)}}{n} - \frac{2 \cos{\left(\pi n \right)}}{n^{2}} + \frac{2}{n^{2}} & \text{for}\: n > -\infty \wedge n < \infty \wedge n \neq 0 \\0 & \text{otherwise} \end{cases}$$
=
/2 2*cos(pi*n) pi*sin(pi*n)
|-- - ----------- - ------------ for And(n > -oo, n < oo, n != 0)
| 2 2 n
$$\begin{cases} - \frac{\pi \sin{\left(\pi n \right)}}{n} - \frac{2 \cos{\left(\pi n \right)}}{n^{2}} + \frac{2}{n^{2}} & \text{for}\: n > -\infty \wedge n < \infty \wedge n \neq 0 \\0 & \text{otherwise} \end{cases}$$
Piecewise((2/n^2 - 2*cos(pi*n)/n^2 - pi*sin(pi*n)/n, (n > -oo)∧(n < oo)∧(Ne(n, 0))), (0, True))
Use the examples entering the upper and lower limits of integration.