My question is can I solve by integrating by parts if I do $u = (x\pi-x^2)$,or first I have to do $∫[x\pi \cos(kx)-x^2\cos(kx)]dx$ and then split it in two integrals $\int x\pi\cos(kx)dx-\int x^2\cos(kx)dx$ ?
2026-04-18 23:24:21.1776554661
On
On
How to integrate $\int(x\pi-x^2)\cos(kx)dx$
387 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
There are 3 best solutions below
0
On
$\textbf{Another way:}$ $$ \pi\frac{d}{dk}\int \sin k x dx + \frac{d^2}{dk^2}\int \cos k x dx = \int \left(\pi x-x^2\right)\cos kx dx $$
1
On
Here is an approach that does not use integration by parts. We observe that
$$\frac{d^2}{dk^2}\int \cos (kx)\,dx=-\int x^2\cos (kx)\,dx$$
and
$$\frac{d}{dk}\int \sin (kx)\,dx=\int x\cos (kx)\,dx$$
Therefore,
$$\int x^2\cos (kx)\,dx=-\frac{d^2}{dk^2}\left(\frac{\sin kx}{k}\right)=\frac{x^2\sin kx}{k}+\frac{2x\cos kx}{k^2}-\frac{2\sin kx}{k^3}$$
and
$$\int x\cos (kx)\,dx=-\frac{d}{dk}\left(\frac{\cos kx}{k}\right)=\frac{x\sin kx}{k}+\frac{x\sin kx}{k^2}$$
You may directly integrate by parts twice, $$ \int(\pi x-x^2) \cos (kx)\:dx=\frac1k(\pi x-x^2)\sin (k x)-\frac1k\int(\pi-2x) \sin (kx)\:dx $$ then $$ \begin{align} &\int(\pi x-x^2) \cos (kx)\:dx\\&=\frac1k(\pi x-x^2)\sin (k x)-\frac1k\left((\pi-2x)(-\frac1k \cos (kx))+\int(-2) \frac1k \cos (kx)\:dx\right) \end{align} $$ getting