# How to do taylor series expansion of e^(-x^2"/2")?

Oct 10, 2015

When you construct a Taylor series, you're going to have to take some $n$th order derivatives. To get a substantial way into the series, let's try going to $n = 4$.

The Taylor series can be written out as:

sum_(n=0)^N (f^((n))(a))/(n!)(x-a)^n

You didn't specify what $a$ was, but I will just assume a general case of $a = a$.

$\textcolor{g r e e n}{{f}^{\left(0\right)} \left(x\right)} = f \left(x\right) = \textcolor{g r e e n}{{e}^{- {x}^{2} \text{/2}}}$

color(green)(f'(x)) = e^(-x^2"/2") * -x = color(green)(-xe^(-x^2"/2"))

color(green)(f''(x)) = (-x)[-xe^(-x^2"/2")] + e^(-x^2"/2")(-1)
$= {x}^{2} {e}^{- {x}^{2} \text{/2") - e^(-x^2"/2}}$
$= \textcolor{g r e e n}{\left({x}^{2} - 1\right) {e}^{- {x}^{2} \text{/2}}}$

color(green)(f'''(x)) = (x^2 - 1)(-xe^(-x^2"/2")) + e^(-x^2"/2")(2x)
= (-x^3 + x)(e^(-x^2"/2")) + 2xe^(-x^2"/2")
$= \textcolor{g r e e n}{\left(- {x}^{3} + 3 x\right) {e}^{- {x}^{2} \text{/2}}}$

color(green)(f''''(x)) = (-x^3 + 3x)(-xe^(-x^2"/2")) + e^(-x^2"/2")(-3x^2 + 3)
$= \left({x}^{4} - 3 {x}^{2}\right) {e}^{- {x}^{2} \text{/2") - 3x^2e^(-x^2"/2") + 3e^(-x^2"/2}}$
$= \textcolor{g r e e n}{\left({x}^{4} - 6 {x}^{2} + 3\right) {e}^{- {x}^{2} \text{/2}}}$

Then we can write this out, using $x \to a$ and $n = 4$ terms:

sum_(n=0)^4 (f^((n))(a))/(n!)(x-a)^n

= (f^((0))(a))/(0!)(x-a)^0 + (f'(a))/(1!)(x-a)^1 + (f''(a))/(2!)(x-a)^2 + (f'''(a))/(3!)(x-a)^3 + (f''''(a))/(4!)(x-a)^4 + ...

= e^(-a^2"/2") + (-ae^(-a^2"/2"))(x-a) + ((a^2 - 1)e^(-a^2"/2"))/(2)(x-a)^2 + ((-a^3 + 3a)e^(-a^2"/2"))/(6)(x-a)^3 + ((a^4 - 6a^2 + 3)e^(-a^2"/2"))/(4!)(x-a)^4 + ...

= color(blue)(e^(-a^2"/2") - ae^(-a^2"/2")(x-a) + ((a^2 - 1)e^(-a^2"/2"))/(2)(x-a)^2 + ((-a^3 + 3a)e^(-a^2"/2"))/(6)(x-a)^3 + ((a^4 - 6a^2 + 3)e^(-a^2"/2"))/(4!)(x-a)^4 + ...)

If we have $a = 0$, this simplifies significantly:

$= \textcolor{b l u e}{1 - {x}^{2} / 2 + {x}^{4} / 8 - {x}^{6} / 48 + \ldots}$

Nov 11, 2017

${e}^{- {x}^{2} / 2} = 1 - {x}^{2} / 2 + {x}^{4} / 8 - {x}^{6} / 48 + {x}^{8} / 384 - {x}^{10} / 3840 + \ldots$

or,

 e^(-x^2/2) = sum_(n=0)^oo (-1)^(n)x^(2n)/(2^n n!)

#### Explanation:

Assuming a TS pivoted about $x = 0$ (ie a MacLaurin Series) we start with well known series:

 e^x= 1 + x + (x^2)/(2!) + (x^3)/(3!) + (x^4)/(4!) + (x^5)/(5!) + ...

Replacing "$x$"with $- {x}^{2} / 2$ we get:

 e^(-x^2/2)= 1 + (-x^2/2) + ((-x^2/2)^2)/(2!) + ((-x^2/2)^3)/(3!) + ((-x^2/2)^4)/(4!) + ((-x^2/2)^5)/(5!) + ...

$\setminus \setminus \setminus \setminus \setminus \setminus = 1 - {x}^{2} / 2 + \frac{{x}^{4} / {2}^{2}}{2} - \frac{{x}^{6} / {2}^{3}}{6} + \frac{{x}^{8} / {2}^{4}}{24} - \frac{{x}^{10} / {2}^{5}}{120} + \ldots$

$\setminus \setminus \setminus \setminus \setminus \setminus = 1 - {x}^{2} / 2 + \frac{{x}^{4} / 4}{2} - \frac{{x}^{6} / 8}{6} + \frac{{x}^{8} / 16}{24} - \frac{{x}^{10} / 32}{120} + \ldots$

$\setminus \setminus \setminus \setminus \setminus \setminus = 1 - {x}^{2} / 2 + {x}^{4} / 8 - {x}^{6} / 48 + {x}^{8} / 384 - {x}^{10} / 3840 + \ldots$

And we note that the ${n}^{t h}$ term is given by:

 u_n = (-1)^(n)x^(2n)/(2^n n!)