Integral of x*sin(x)cos(n*x) dx
The solution
The answer (Indefinite)
[src]
// 2 2 \
|| x*cos (x) x*sin (x) cos(x)*sin(x) |
|| - --------- + --------- + ------------- for Or(n = -1, n = 1)|
/ || 4 4 4 |
| || |
| x*sin(x)*cos(n*x) dx = C + |< 2 2 3 |
| ||cos(n*x)*sin(x) n *cos(n*x)*sin(x) x*cos(x)*cos(n*x) 2*n*cos(x)*sin(n*x) x*n *cos(x)*cos(n*x) x*n *sin(x)*sin(n*x) n*x*sin(x)*sin(n*x) |
/ ||--------------- + ------------------ - ----------------- - ------------------- + -------------------- + -------------------- - ------------------- otherwise |
|| 4 2 4 2 4 2 4 2 4 2 4 2 4 2 |
|| 1 + n - 2*n 1 + n - 2*n 1 + n - 2*n 1 + n - 2*n 1 + n - 2*n 1 + n - 2*n 1 + n - 2*n |
\\ /
$$\int x \sin{\left(x \right)} \cos{\left(n x \right)}\, dx = C + \begin{cases} \frac{x \sin^{2}{\left(x \right)}}{4} - \frac{x \cos^{2}{\left(x \right)}}{4} + \frac{\sin{\left(x \right)} \cos{\left(x \right)}}{4} & \text{for}\: n = -1 \vee n = 1 \\\frac{n^{3} x \sin{\left(x \right)} \sin{\left(n x \right)}}{n^{4} - 2 n^{2} + 1} + \frac{n^{2} x \cos{\left(x \right)} \cos{\left(n x \right)}}{n^{4} - 2 n^{2} + 1} + \frac{n^{2} \sin{\left(x \right)} \cos{\left(n x \right)}}{n^{4} - 2 n^{2} + 1} - \frac{n x \sin{\left(x \right)} \sin{\left(n x \right)}}{n^{4} - 2 n^{2} + 1} - \frac{2 n \sin{\left(n x \right)} \cos{\left(x \right)}}{n^{4} - 2 n^{2} + 1} - \frac{x \cos{\left(x \right)} \cos{\left(n x \right)}}{n^{4} - 2 n^{2} + 1} + \frac{\sin{\left(x \right)} \cos{\left(n x \right)}}{n^{4} - 2 n^{2} + 1} & \text{otherwise} \end{cases}$$
/ -pi
| ---- for Or(n = -1, n = 1)
| 2
|
< 2
|2*pi*cos(pi*n) 4*n*sin(pi*n) 2*pi*n *cos(pi*n)
|-------------- + ------------- - ----------------- otherwise
| 4 2 4 2 4 2
\1 + n - 2*n 1 + n - 2*n 1 + n - 2*n
$$\begin{cases} - \frac{\pi}{2} & \text{for}\: n = -1 \vee n = 1 \\- \frac{2 \pi n^{2} \cos{\left(\pi n \right)}}{n^{4} - 2 n^{2} + 1} + \frac{4 n \sin{\left(\pi n \right)}}{n^{4} - 2 n^{2} + 1} + \frac{2 \pi \cos{\left(\pi n \right)}}{n^{4} - 2 n^{2} + 1} & \text{otherwise} \end{cases}$$
=
/ -pi
| ---- for Or(n = -1, n = 1)
| 2
|
< 2
|2*pi*cos(pi*n) 4*n*sin(pi*n) 2*pi*n *cos(pi*n)
|-------------- + ------------- - ----------------- otherwise
| 4 2 4 2 4 2
\1 + n - 2*n 1 + n - 2*n 1 + n - 2*n
$$\begin{cases} - \frac{\pi}{2} & \text{for}\: n = -1 \vee n = 1 \\- \frac{2 \pi n^{2} \cos{\left(\pi n \right)}}{n^{4} - 2 n^{2} + 1} + \frac{4 n \sin{\left(\pi n \right)}}{n^{4} - 2 n^{2} + 1} + \frac{2 \pi \cos{\left(\pi n \right)}}{n^{4} - 2 n^{2} + 1} & \text{otherwise} \end{cases}$$
Piecewise((-pi/2, (n = -1)∨(n = 1)), (2*pi*cos(pi*n)/(1 + n^4 - 2*n^2) + 4*n*sin(pi*n)/(1 + n^4 - 2*n^2) - 2*pi*n^2*cos(pi*n)/(1 + n^4 - 2*n^2), True))
Use the examples entering the upper and lower limits of integration.