# (x^2)cosx

• Sep 4th 2006, 10:52 AM
TexasGirl
(x^2)cosx
Calculate the integral from 0 to pi of (x^2)cosxdx
• Sep 4th 2006, 11:08 AM
ThePerfectHacker
Quote:

Originally Posted by TexasGirl
Calculate the integral from 0 to pi of (x^2)cosxdx

I will find the anti-derivative then you can complete the problem.
---
$\displaystyle \int x^2\cos x dx$.
Let $\displaystyle u=x^2$ and $\displaystyle v'=\cos x$
Then,
$\displaystyle u'=2x$ and $\displaystyle v=\sin x$
Thus, by parts,
$\displaystyle x^2\sin x-2\int x \sin xdx$
Now, you do it again,
Let $\displaystyle u=x$ and $\displaystyle v'=\sin x$
Then,
$\displaystyle u'=1$ and $\displaystyle v=-\cos x$
Thus, by parts,
$\displaystyle x^2\sin x-2\left( -x\cos x-\int -\cos xdx \right)$
Simplify,
$\displaystyle x^2\sin x+2x\cos x-2\int \cos xdx$
Thus,
$\displaystyle x^2\sin x+2x\cos x-2\sin x+C$
• Sep 4th 2006, 11:11 AM
Soroban
Hello, TexasGirl!

You need to integrate by parts . . . twice!

Quote:

$\displaystyle I \;= \;\int_0^{\pi} x^2\cos x\,dx$

Let: $\displaystyle u = x^2\qquad dv = \cos x\,dx$

Then: $\displaystyle du = 2x\,dx\quad v = \sin x$

And we have: .$\displaystyle I\;=\;x^2\sin x - 2\int x\sin x\,dx$

Let: $\displaystyle u = x\qquad dv = \sin x\,dx$

Then: $\displaystyle du = dx\quad v = -\cos x$

And we have: .$\displaystyle I \;= \;x^2\sin x - 2\left[-x\cos x - \int(-\cos x)\,dx\right]$
. . . . . . . . . . $\displaystyle I \;= \;x^2\sin x + 2x\cos x - 2\int\cos x\,dx$

Therefore:. . . $\displaystyle \boxed{I \;= \;x^2\sin x + 2x\cos x - 2\sin x + C}$

Edit: Too fast for me, TPHacker!