# Thread: Integration by parts and substitution

1. ## Integration by parts and substitution

How do i integrate:

a) x^2*cos x

b) x^2*e^-x

If you could help me on either or both, would be great.

2. Originally Posted by polymerase
How do i integrate:

a) x^2*cos x

b) x^2*e^-x

If you could help me on either or both, would be great.
In both cases use integration by parts:
$\int u dv = uv - \int v du$

For example:
$\int x^2 cos(x) dx$

Let $u = x^2 \implies du = 2x dx$
Let $dv = cos(x) dx \implies v = sin(x)$

So
$\int x^2 cos(x) dx = x^2 sin(x) - \int 2x sin(x) dx$

The idea is to use the "u" to reduce the power of x in front of the other function.

Now use integration by parts on $\int x sin(x) dx$ using the same idea.

Problem b) is done the same way.

-Dan

3. Originally Posted by polymerase
b) x^2*e^-x

\begin{aligned}
\int {x^2 e^{ - x} \,dx} &= \int {\left( {x^2 e^{ - x} + 2xe^{ - x} + 2e^{ - x} - 2xe^{ - x} - 2e^{ - x} } \right)\,dx}\\
&= \int {\left[ {e^{ - x} \left( {x^2 + 2x + 2} \right) - e^{ - x} \left( {2x + 2} \right)} \right]\,dx}\\
&= \int {\left[ { - e^{ - x} \left( {x^2 + 2x + 2} \right)} \right]^{\prime} \,dx} \hfill \\
&= - e^{ - x} \left( {x^2 + 2x + 2} \right) +k
\end{aligned}

4. Originally Posted by Krizalid

\begin{aligned}
\int {x^2 e^{ - x} \,dx} &= \int {\left( {x^2 e^{ - x} + 2xe^{ - x} + 2e^{ - x} - 2xe^{ - x} - 2e^{ - x} } \right)\,dx}\\
&= \int {\left[ {e^{ - x} \left( {x^2 + 2x + 2} \right) - e^{ - x} \left( {2x + 2} \right)} \right]\,dx}\\
&= \int {\left[ { - e^{ - x} \left( {x^2 + 2x + 2} \right)} \right]^{\prime} \,dx} \hfill \\
&= - e^{ - x} \left( {x^2 + 2x + 2} \right) +k
\end{aligned}
Oh that's clever! I've never seen that before.

-Dan

5. Originally Posted by topsquark
Oh that's clever! I've never seen that before.
Look at here

There are another clever solutions.

Don't be afraid about the language, 'cause that solutions don't require explanations

Best Regards

6. Originally Posted by Krizalid
Look at here

There are another clever solutions.

Don't be afraid about the language, 'cause that solutions don't require explanations

Best Regards
Interesante. Esta bueno. Hablo un poco Espanol. Gracias!

-Dan

8. Originally Posted by Krizalid
Krizalid I get your steps up until the 3rd. can u please explain to me how u justify from line 2 to 3. I know that 2x + 2 is the derivative of x^2+2x+2 but i just can't quite see the "proof" so to say.

9. I just turned the integrand into a derivative of product functions.

10. Originally Posted by Krizalid
I just turned the integrand into a derivative of product functions.
Sorry to bother u again but...I still dont understand what u mean

11. As you can see, in the first line I added and subtracted some terms properly.

In the second one I factorised properly. In the third one I used $[f(x)\cdot g(x)]'=f'(x)\cdot g(x)+f(x)\cdot g'(x)$, finally I just integrated.

12. Originally Posted by Krizalid
As you can see, in the first line I added and subtracted some terms properly.

In the second one I factorised properly. In the third one I used $[f(x)\cdot g(x)]'=f'(x)\cdot g(x)+f(x)\cdot g'(x)$, finally I just integrated.
Thank you i see what u did now

PS are u doing a math major?

13. Originally Posted by polymerase
PS are u doing a math major?
What's a math major?

Sorry, it's just I'm chilean

14. Originally Posted by Krizalid
What's a math major?
When you go to University you select an area what you want to study. Like physics, chemistry, .... When someone says "what is your major" he means what area you selected.

By the way, you site has the coolest graphics, I would join but I do not speak Spanish.

15. Ahh ok, now I get it.

Hey Hacker, you'd really be a great value if you register there, 'cause you're a really good mathematician.

Actually you can use Google Language Tools to translate.

Anyway if you desire, I can help you with spanish so you can post there

P.S.: I'm not in the college yet, so I didn't select a math major