# Math Help - Integration by parts

1. ## Integration by parts

[tex]\int x^2sin\pixdx[\math]

why doesnt this latex thing work for me????

i dont know how to integrate x^2sin(pi)xdx

2. Originally Posted by jeph
[tex]\intx^2sin\pixdx[\math]

why doesnt this latex thing work for me????
Your "slash" for the closing bracket is in the wrong direction:
$\int x^2 sin \pi xdx$

Using spaces would be a good idea, too.

Originally Posted by jeph
i dont know how to integrate x^2sin(pi)xdx
$\int p dq = pq - \int q dp$

So
$\int x^2 sin(\pi x)dx$
Pick
$p = x^2$ ==> $dp = 2x dx$
$dq = sin(\pi x) dx$ ==> $q = -\frac{1}{\pi}cos(\pi x)$

Then
$\int x^2 sin(\pi x)dx = -\frac{1}{\pi} x^2 cos(\pi x) - \int (2x) \cdot -\frac{1}{\pi}cos(\pi x) dx$ $= -\frac{1}{\pi} x^2 cos(\pi x) + \frac{2}{\pi} \int x cos(\pi x) dx$

We can use the same process on the remaining integral:
$\int x cos(\pi x) dx = \frac{x}{\pi}sin(\pi x) - \int \frac{1}{\pi}sin(\pi x) dx$ $= \frac{x}{\pi}sin(\pi x) + \frac{1}{\pi ^2}cos(\pi x)$

Putting this result into our original integral:
$\int x^2 sin(\pi x)dx = -\frac{1}{\pi} x^2 cos(\pi x) + \frac{2}{\pi} \left ( \frac{x}{\pi}sin(\pi x) + \frac{1}{\pi ^2}cos(\pi x) \right )$

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

-Dan

3. nevermind, i got it. thanks!

Originally Posted by topsquark
Your "slash" for the closing bracket is in the wrong direction:
$\int x^2 sin \pi xdx$

Using spaces would be a good idea, too.

$\int p dq = pq - \int q dp$

So
$\int x^2 sin(\pi x)dx$
Pick
$p = x^2$ ==> $dp = 2x dx$
$dq = sin(\pi x) dx$ ==> $q = -\frac{1}{\pi}cos(\pi x)$

Then
$\int x^2 sin(\pi x)dx = -\frac{1}{\pi} x^2 cos(\pi x) - \int (2x) \cdot -\frac{1}{\pi}cos(\pi x) dx$ $= -\frac{1}{\pi} x^2 cos(\pi x) + \frac{2}{\pi} \int x cos(\pi x) dx$

We can use the same process on the remaining integral:
$\int x cos(\pi x) dx = \frac{x}{\pi}sin(\pi x) - \int \frac{1}{\pi}sin(\pi x) dx$ $= \frac{x}{\pi}sin(\pi x) + \frac{1}{\pi ^2}cos(\pi x)$

Putting this result into our original integral:
$\int x^2 sin(\pi x)dx = -\frac{1}{\pi} x^2 cos(\pi x) + \frac{2}{\pi} \left ( \frac{x}{\pi}sin(\pi x) + \frac{1}{\pi ^2}cos(\pi x) \right )$

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

-Dan
how do you integrate the $\int \frac{1}{\pi}sin(\pi x) dx$ into $\frac{1}{\pi ^2}cos(\pi x)$

4. Originally Posted by jeph
nevermind, i got it. thanks!

how do you integrate the $\int \frac{1}{\pi}sin(\pi x) dx$ into $\frac{1}{\pi ^2}cos(\pi x)$
That isn't quite what I did, you are off by a negative.

In detail:
$\int \frac{1}{\pi} sin(\pi x) dx = \frac{1}{\pi} \int sin(\pi x) dx$

Let $y = \pi x$ ==> $dy = \pi dx$

So
$\int \frac{1}{\pi} sin(\pi x) dx = \frac{1}{\pi} \int \frac{dy}{\pi}sin(y) = \frac{1}{\pi ^2}(-cos(y)) = -\frac{1}{\pi ^2}cos(\pi x)$

-Dan

5. Originally Posted by jeph
nevermind, i got it. thanks!

how do you integrate the $\int \frac{1}{\pi}sin(\pi x) dx$ into $\frac{1}{\pi ^2}cos(\pi x)$
A useful rule to remember....

Let $F(x)$ be an antiderivative of $f(x)$.

Then, ( $a\not = 0$),
$\int f(ax+b)dx=\frac{1}{a}F(ax+b)+C$

Meaning whenever you have a linear function (of the form ax+b) you just take the coefficient with the "x" (the slope of line) and invert it.

For example,
$\int (2x+1)^4 dx$
Since this is a linear expression inside,
$2x+1$.
You can use the rule I told you.
Just find the anti-derivative the regular way,
$\int (2x+1)^4 dx = \frac{(2x+1)^5}{5}+C$
But of course this answer is wrong, you need to invert the slope.
Thus,
$\frac{1}{2} \cdot \frac{(2x+1)^5}{5}+C$

Now let us find,
$\int \sin (\pi x) dx$
Note $\pi x=\pi x+0$ is a linear function in the special form we had above because $\pi$ is just a number in front.
Thus, to find the integral you just find the integral of sine which is -cosine and then invert the slope.
Thus,
$\int \sin \pi x dx = -\frac{1}{\pi} \cos x+C$.

Learn, this rule, it saves much time.