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