# (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.
---
$\int x^2\cos x dx$.
Let $u=x^2$ and $v'=\cos x$
Then,
$u'=2x$ and $v=\sin x$
Thus, by parts,
$x^2\sin x-2\int x \sin xdx$
Now, you do it again,
Let $u=x$ and $v'=\sin x$
Then,
$u'=1$ and $v=-\cos x$
Thus, by parts,
$x^2\sin x-2\left( -x\cos x-\int -\cos xdx \right)$
Simplify,
$x^2\sin x+2x\cos x-2\int \cos xdx$
Thus,
$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:

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

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

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

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

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

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

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

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

Edit: Too fast for me, TPHacker!
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 22, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9857614636421204, "perplexity": 2670.37926050911}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-40/segments/1474738661775.4/warc/CC-MAIN-20160924173741-00211-ip-10-143-35-109.ec2.internal.warc.gz"}