# $n$th derivative of $e^{-x^2}$

I observed that $f^{(n)}(x)= \begin{cases} e^{-x^2} & \text{if$n=0$}\\ -2xe^{-x^2} & \text{if$n=1$}\\ f^{(n-1)}(x)-f^{(n-2)}(x) & \text{otherwise.} \end{cases}$

How to get the closed form?
Edit: This recurrence does not hold.

• How did you find this recurrence relation ? – lmsteffan Sep 6 '14 at 12:12
• I guessed it and proved by induction. Is it wrong? – k5f Sep 6 '14 at 12:18
• I think it is wrong. $f^{(2)}(x)=-2e^{-x^2}+(-2x)^2e^{-x^2}$. – punctured dusk Sep 6 '14 at 12:20
• Did you try to validate it by applying it to $f^{(2)}$ ? I think it is not equal to $f^{(1)} - f^{(0)}$ – lmsteffan Sep 6 '14 at 12:21
• I don't think that recurrence is true, since that would mean that $f^{(n)}(x)=(a_nx+b_n))f(x)$ for some $a_n,b_n$, and that is not the case- $f^{(2)}(x)=(4x^2-2)e^{-x^2}$. – Thomas Andrews Sep 6 '14 at 12:28

Hint: the recursion $f_n=f_{n-1}-f_{n-2}$ always has a solution of the form

$$C_1(1/2+i\sqrt{3}/2)^n + C_2(1/2-i\sqrt{3}/2)^n,$$

with $C_1,C_2$ constants to be determined from the initial values $f_0,f_1$.

Edit: Your recurrence does not hold.

• He mentioned that the $n$-th derivatives obey a certain recurrence formula, with $f_n = D^n(e^{-x^2})$. Thus $f_n$ would be a legitimate sequence (of functions). But the point is moot anyway, since the recurrence he derived turns out to be incorrect. – Kim Fierens Sep 6 '14 at 12:55
• Why not? The recurrence holds for every $x$ separately, and only the initial values explicitly depend on $x$. Example: $f_n(x)=2f_{n-1}(x)$, with $f_0(x)=x$. Then $f_n=2^nx=f_n(x)$. – Kim Fierens Sep 6 '14 at 13:05
• I mean you cannot solve it that way unless you have had enough caffeine. – copper.hat Sep 6 '14 at 13:14

Hint: If the recurrence relation holds then the $n$-th derivative is a telescopic sum