pi -- 3 / | | / x\ | |pi - -|*cos(n*x) dx | \ 2/ | / pi
Integral((pi - x/2)*cos(n*x), (x, pi, pi/3))
/ 2
| x
| -- for n = 0
| 2
|
|/-cos(n*x)
<|---------- for n != 0
|< n
|| // x for n = 0\
|\ 0 otherwise || |
/ |----------------------- otherwise x*|
/ /pi*n\ /pi*n\ | cos|----| 5*pi*sin|----| |cos(pi*n) \ 3 / pi*sin(pi*n) \ 3 / |--------- - --------- - ------------ + -------------- for And(n > -oo, n < oo, n != 0) | 2 2 2*n 6*n < 2*n 2*n | | 2 | -4*pi | ------ otherwise \ 9
=
/ /pi*n\ /pi*n\ | cos|----| 5*pi*sin|----| |cos(pi*n) \ 3 / pi*sin(pi*n) \ 3 / |--------- - --------- - ------------ + -------------- for And(n > -oo, n < oo, n != 0) | 2 2 2*n 6*n < 2*n 2*n | | 2 | -4*pi | ------ otherwise \ 9
Piecewise((cos(pi*n)/(2*n^2) - cos(pi*n/3)/(2*n^2) - pi*sin(pi*n)/(2*n) + 5*pi*sin(pi*n/3)/(6*n), (n > -oo)∧(n < oo)∧(Ne(n, 0))), (-4*pi^2/9, True))
Use the examples entering the upper and lower limits of integration.