[Math] Maclaurin Series of $e^{-x^2}$

calculuspower seriessequences-and-seriestaylor expansion

The question is:

Find the first 3 non-zero terms in the MacLaurin series for the function:
$$y =e^{-x^2}$$
I have been told to simply substitute the $-x^2$ into the standard MacLaurin series for $e^x$ like so:
$$e^{(-x^2)} = \sum_{n=0}^\infty \frac {x^n}{n!}= 1 + (-x^2) + \frac {{(-x^2)}^2}2 + \frac {{(-x^2)}^3}{3!}+…$$
Giving:
$$e^{-x^2} = \sum_{n=0}^\infty \frac {{(-x^2)}^n}{n!} = 1 – x^2 + \frac {x^4}2 – \frac {x^6}{3!}+…$$
I realise that this is supposed to be the correct answer, but I can't seem to make it work alongside the definition of MacLaurin series given to me in lectures. We were told that the terms of a MacLaurin series were based on the formula:
$$\sum_{n=0}^\infty a_nx^n$$
where
$$a_n = \frac {f^n(0)}{n!}$$
assuming $0!=1$.

However, when I use this formula for $e^{-x^2}$, I get the following:
$$a_0x^0=\frac {f^0(0)}{0!}x^0=\frac {e^{-(0)^2}}{1}\times1=\frac 11=1$$
$$a_1x^1=\frac {f^1(0)}{1!}x=\frac {-2(0)e^{-(0)^2}}{1}x=\frac 01x=0$$
$$a_2x^2=\frac {f^2(0)}{1!}x^2=\frac {4(0)^2e^{-(0)^2}}{1}x^2=\frac 01x^2=0$$
and so on. Giving:$$e^{-x^2}=1+0+0+0+…$$
Can somebody explain this to me?

Best Answer

The substitution method is probably best for what you are trying to do.

On the other hand, if you want to compute the derivatives of $e^{-x^2}$, then you will have to use a combination of the chain rule and the product rule.

$$f(x) = e^{-x^2}$$

$$f'(x) = -2x e^{-x^2}$$

$$f''(x) = - 2 e^{x^2}+ (-2x)^2 e^{-x^2} = (4x^2 -2) e^{-x^2}$$

$$f'''(x) = 8x e^{-x^2} - (4x^2 - 2) (2x) e^{-x^2} = (-8x^3 + 12x) e^{-x^2}$$

This yields:

$f(0)=1$, $f'(0) = 0$, $f''(0) = -2$, $f'''(0) = 0$, etc.

Related Question