# Question on Taylor Polynomials

Using the Taylor polynomial $P_{3}(x)$ of $e^x$, find a Taylor polynomial $P_{8}(x)$ for $x^{2}e^{-x^{2}}$. Use that to estimate the following integral: $$\int_{0}^{1}x^{2}e^{-x^{2}}dx.$$

• Where are you stuck? Just take $P_3(x)$ and plug in $-x^2$ for $x$ and then raise all powers of $x$ by two. Then you have $P_8(x)$ which as a polynomial is easy to integrate. – Gregory Grant Aug 3 '16 at 7:13

Well first off you'd start off with the definition of a taylor polynomial, and we'll pick ours at a=0.

$$f(x)=f(a)+f'(a)(x-a)+f''(a)\frac{(x-a)^2}{2!}+f'''(a)\frac{(x-a)^3}{3!}...$$

Now let's figure out the things we need to plug in.

$$\left(e^{x}\right)^{n}=e^{x}$$

where n is the nth derivative.

and

$$e^{0}=1$$

Plug it in what we found and you will get:

$$f(x)=1+x+\frac{x^2}{2}...$$

Now since we want $P_3$ we'll take up to and and including the term of degree 3.

Now to find a composition (i.e. $e^{-x^2})$ all you need to do is plug in -$-x^2$ into the polynomial we found above.

To compute the integral, plug in the polynomial we found with $(-x^2)$ plugged in, multiply by $x^2$ and integrate!

........................

By Taylor, $$P_3(x)=1+x+\frac{x^2}2+\frac{x^3}6$$ so that $$x^2P_3(-x^2)=x^2-x^4+\frac{x^6}2-\frac{x^8}6.$$

As

$$\int_0^1 x^kdx=\frac1{k+1},$$ the final answer is

$$\frac13-\frac15+\frac1{14}-\frac1{54}.$$

It is an easy matter to see that the general term is

$$\frac{(-1)^k}{(2k+3)k!}.$$

I couldn't resist to show the approximations to the true function (in blue) from polynomials $\color{green}{P_3}$, $P_4$ and $\color{magenta}{P_5}$.

• why does P4 seem more accurate than P5?? – tuskiomi Aug 3 '16 at 17:41
• @tuskiomi: because I swapped the colors. :) – Yves Daoust Aug 4 '16 at 6:09

$$P_3(x) = 1 + x + x^2/2 + x^3/6$$ Note that $P_8(x) = x^2 P_3(-x^2)$ $$P_8(x) = x^2 \left( 1 -x^2 + x^4/2 -x^6/6 \right) = x^2 - x^4 + x^6/2 - x^8/6$$ Now you can simply integrate $P_8(x)$ using standard anti-derivative of polynomials !

$e^x = \sum \frac {x^n}{n!}\\ x^2 e^{-x^2} = \sum \frac {(-1^n)x^{2n+2}}{n!}\\ \int x^2 e^{-x^2} = \sum \frac {(-1^n)x^{2n+3}}{(2n+3)n!}$

• I believe you're supposed to use the Taylor polynomial, not the Taylor series. – Gregory Grant Aug 3 '16 at 7:18
• @GregoryGrant: with a finite number of terms, these are indeed good ol' polynomials. – Yves Daoust Aug 3 '16 at 7:32
• I think it's the reason your answer is not getting the votes the others are. – Gregory Grant Aug 3 '16 at 7:35
• @GregoryGrant: who are you talking to ? – Yves Daoust Aug 3 '16 at 7:39
• I think it's pretty obvious. – Gregory Grant Aug 3 '16 at 7:45