# How do I find the integral int(x^2*sin(pix))dx ?

Jul 29, 2014

Using Integration by parts,

$\int {x}^{2} \sin \pi x \mathrm{dx}$

$=$

$\left(- \frac{1}{\pi}\right) {x}^{2} \cos \pi x + \left(\frac{2}{\pi} ^ 2\right) x \sin \pi x + \left(\frac{2}{\pi} ^ 3\right) \cos \pi x + C$

Remember that Integration by parts uses the formula:

$\int u$ $\mathrm{dv}$ = $u v - \int v$ $\mathrm{du}$

Which is based off of the product rule for derivatives:

$u v = v \mathrm{du} + u \mathrm{dv}$

To use this formula, we must decide which term will be $u$, and which will be $\mathrm{dv}$. A useful way to figure out which term goes where is the ILATE method.

Inverse Trig
Logarithms
Algebra
Trig
Exponentials

This gives you an order of priority of which term is used for "$u$", so whatever is left over becomes our $\mathrm{dv}$. Our function contains an ${x}^{2}$ and a $\sin \pi x$, so the ILATE method tells us that ${x}^{2}$ should be used as our $u$, since it is algebraic and higher on the list than $\sin \pi x$, which is trig.

We now have:

$u = {x}^{2}$, $\mathrm{dv} = \sin \pi x$

The next items we need in the formula are "$\mathrm{du}$" and "$v$", which we get by finding the derivative of "$u$" and the integral of "$\mathrm{dv}$".

The derivative is obtained using the power rule:

$\frac{d}{\mathrm{dx}} {x}^{2} = 2 x = \mathrm{du}$

For the integral, we can use substitution.

using $w = \pi x$, we end up with $\left(- \frac{1}{\pi}\right) \cos w$

We now have:

$\mathrm{du} = 2 x \mathrm{dx}$, $v =$$\left(- \frac{1}{\pi}\right) \cos \pi x$

Plugging into our original Integration by Parts formula, we have:

$\int u$ $\mathrm{dv}$ = $u v - \int v$ $\mathrm{du}$

$=$

$\int {x}^{2} \sin \pi x \mathrm{dx} = \left(- \frac{1}{\pi}\right) {x}^{2} \cos \pi x - \left(- \frac{1}{\pi}\right) \int 2 x \cos \pi x \mathrm{dx}$

We are now left with another integral which we must use Integration by Parts once more to resolve. By pulling the $2$ out of the integral, we are left with $u = x$, $\mathrm{dv} = \cos \pi x$. By going through the same process of before, we get:

$\int x \cos \pi x \mathrm{dx} = \left(\frac{1}{\pi}\right) x \sin \pi x - \left(\frac{1}{\pi}\right) \int \sin \pi x \mathrm{dx}$

This last integral we can solve with a final round of substitution, giving us:

$\left(\frac{1}{\pi}\right) \int \sin \pi x \mathrm{dx} = \left(- \frac{1}{\pi} ^ 2\right) \cos \pi x$

Placing everything we've found together, we now have:

$\left(- \frac{1}{\pi}\right) {x}^{2} \cos \pi x - \left(- \frac{2}{\pi}\right) \left[\left(\frac{1}{\pi}\right) x \sin \pi x - \left(- \frac{1}{\pi} ^ 2\right) \cos \pi x\right]$

Now we can simplify the negatives and parenthesis to get our final answer:

$\int {x}^{2} \sin \pi x \mathrm{dx} =$

$\left(- \frac{1}{\pi}\right) {x}^{2} \cos \pi x + \left(\frac{2}{\pi} ^ 2\right) x \sin \pi x + \left(\frac{2}{\pi} ^ 3\right) \cos \pi x + C$

The key is to remember that you will end up with a chain of multiple terms being added or subtracted together. You are continuously splitting the integral into smaller, manageable parts that you must keep track of for the final answer.