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