How to get nth derivative of $e^{x^2/2}$

As noted before this is a variant of the Hermite polynomials. Due to subtle differences, we will adapt the standard derivation from Arfken.

Generating function

First \begin{align} \frac{d^n}{dx^n} e^{x^2/2} &= \lim_{t\rightarrow 0} \frac{d^n}{dx^n} e^{(x+t)^2/2} \tag{1} \\ &= \lim_{t\rightarrow 0} \frac{d^n}{dt^n} e^{(x+t)^2/2} \\ &= e^{x^2/2} \lim_{t\rightarrow 0} \frac{d^n}{dt^n} e^{xt + t^2/2}, \end{align} This means that the polynomials $P_n(x)$ we are looking for are just the $n$th coefficients of the Taylor expansion of $e^{xt+t^2/2}$. In other words, \begin{align} e^{xt + t^2/2} = \sum_{n = 0}^\infty \frac{P_n(x)}{n!} t^n. \tag{2} \end{align} The left-hand side is the exponential generating function of $P_n(x)$.

Recurrence relations

If we differentiate (2) with respect to $t$, $$ (x + t) \, e^{xt + t^2/2} = \sum_{n = 1}^\infty \frac{P_n(x)}{(n-1)!} t^{n-1} = \sum_{n = 0}^\infty \frac{P_{n+1}(x)}{n!} t^n. \tag{3} $$ where the previous n = 0 term is simply equal to zero, allowing for a shift in indices. Expanding the left-hand side, \begin{align} (x + t) \, e^{xt + t^2/2} &= (x + t) \sum_{n = 0}^\infty \frac{ P_n(x) }{n!} t^n \\ &= \sum_{n = 0}^\infty \frac{ x \, P_n(x) }{n!} t^n + \sum_{n = 0}^\infty \frac{ P_n(x) }{n!} t^{n+1} \\ &= \sum_{n = 0}^\infty \frac{ x \, P_n(x) }{n!} t^n + \sum_{n = 1}^\infty \frac{ n \, P_{n-1}(x) }{n!} t^{n}. \tag{4} \end{align} Comparing the coefficients of $t^n/n!$ in (3) and (4) yields $$ P_{n+1}(x) = x \, P_n(x) + n P_{n-1}(x). \tag{5} $$

Similarly, by differentiating (2) with respect to $x$, we get $$ P'_n(x) = n P_{n-1}(x), \tag{6} $$ which is noted by Barry Cipra. Combining the two yields the relation by hermes.

Explicit formula

An explicit formula is more readily derived from the generating function instead of the recurrence relations: \begin{align} e^{xt+t^2/2} &= e^{xt} \, e^{t^2/2}\\ &= \sum_{s = 0}^\infty \frac{(xt)^s}{s!} \sum_{m = 0}^\infty \frac{t^{2m}}{2^m \, m!} \\ &= \sum_{n = 0}^\infty \left( \sum_{m = 0}^{[n/2]} \frac{ n! \, x^{n-2m} }{ 2^m \, m! \, (n-2m)! } \right) \frac{t^n}{n!}, \end{align} where $[n/2]$ denotes the largest integer not exceeding $n/2$. Comparing this to (2), we get \begin{align} P_n(x) = \sum_{m = 0}^{[n/2]} \frac{ n! \, x^{n-2m} }{ 2^m \, m! \, (n-2m)! }. \end{align}

Relations to the standard definitions

For reference, $P_n(x)$ is related to the standard Hermite polynomials as \begin{align} P_n(x) &= (-i)^n \, \mathrm{He}_n(ix) \\ &= \frac{1}{(\sqrt{2} \, i)^n} \, H_n\left(\frac{ix}{\sqrt{2}}\right). \end{align}

Notes

I recently discovered that the problem is related to Find an expression for the $n$-th derivative of $f(x)=e^{x^2}$, and the above solution is essentially the same as this one.


Try proving (by induction) that

$$P_{n+1}=xP_n+nP_{n-1}$$

(Note, this is equivalent to proving that $P_n'=nP_{n-1}$.)


Here is another method which will work. You have shown by a simple argument that

$${P_i}(x) = {P'_{i - 1}}(x) + x{P_{i - 1}}(x),\,\,\,\,\,\,\,\,\,\,{P_0}(x) = 1,\,\,\,\,\,\,\,\,\,\,i = 1,2,...,n\tag{1}$$

Now let's take a look at the derivatives of $f(x)$ directly

$$\eqalign{ & {f^{(0)}}(x) = {e^{{{{x^2}} \over 2}}} \cr & {f^{(1)}}(x) = x{e^{{{{x^2}} \over 2}}} \cr & {f^{(2)}}(x) = \left( {1 + {x^2}} \right){e^{{{{x^2}} \over 2}}} \cr & {f^{(3)}}(x) = \left( {3x + {x^3}} \right){e^{{{{x^2}} \over 2}}} \cr & . \cr & . \cr & . \cr & {f^{(n)}}(x) = {P_n}(x){e^{{{{x^2}} \over 2}}} \cr} \tag{2}$$

The first few terms suggest the formula ${{P'}_i}(x) = i{P_{i - 1}}(x)$ to be true. We may prove this easily by using $(1)$ and induction. According to $(2)$, it is clear that the formula is true for $i=1$. Now suppose it is true for $i=k$, ${{P'}_k}(x) = k{P_{k - 1}}(x)$, and then we shall prove it is also true for $i=k+1$. For this purpose, consider the following

$$\eqalign{ & {P_{k + 1}}(x) = {{P'}_k}(x) + x{P_k}(x) = k{P_{k - 1}}(x) + x{P_k}(x) \cr & {{P'}_{k + 1}}(x) = k{{P'}_{k - 1}}(x) + {\left( {x{P_k}(x)} \right)^\prime } \cr & \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, = k{{P'}_{k - 1}}(x) + {P_k}(x) + x{{P'}_k}(x) \cr & \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, = k{{P'}_{k - 1}}(x) + {P_k}(x) + kx{P_{k - 1}}(x) \cr & \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, = k\left( {{{P'}_{k - 1}}(x) + x{P_{k - 1}}(x)} \right) + {P_k}(x) \cr & \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, = k{P_k}(x) + {P_k}(x) \cr & \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, = \left( {k + 1} \right){P_k}(x) \cr}\tag{3} $$

Now combining this new result with $(1)$ we can conclude

$${P_i}(x) = x{P_{i - 1}}(x) + i{P_{i - 2}}(x),\,\,\,\,\,{P_0}(x) = 1,\,\,\,{P_1}(x)=x,\,\,\,\,\,i = 2,3,...,n\tag{4}$$

Finally, you can use $(4)$ as a recursive relation to derive $P_n(x)$ by a usual systematic procedure. That's all.


You could try $P_n(x)=\Sigma^n_{i=0} a_{n,i}x^i$

Then your equation $(1)$ becomes $\Sigma^n_{i=0} a_{n,i}x^i=x\Sigma^{n-1}_{i=0} a_{n-1,i}x^i+\Sigma^n_{i=0} ia_{n-1,i}x^{i-1}$

Comparing coefficients of $x^i$ gives $a_{n,i}=a_{n-1,i-1}+ia_{n-1,i+1}$

Does that help?