I want to calculate the nth derivative of $e^{x^2/2}$. It is as follow: $$ \frac{d}{dx} e^{x^2/2} = x e^{x^2/2} = P_1(x) e^{x^2/2} $$ $$ \frac{d^n}{dx^n} e^{x^2/2} = \frac{d}{dx} (P_{n-1}(x) e^{x^2/2}) = (x P_{n-1}(x) + \frac{dP_{n-1}}{dx})e^{x^2/2} = P_n(x) e^{x^2/2} $$ So we get recursive relation of $P_n$: $$ P_n(x) = xP_{n-1} + \frac{dP_{n-1}}{dx}, P_0(x) = 1\tag1 $$ My question is how to solve the recursive relation involving function and derivative. I know generating function for recursion like $a_{n+1}=a_{n}+a_{n-1}$. But I am not sure how to solve $(1)$.
-
2I think we are looking at the Hermite polynomials (coincidence?) with imaginary argument, cf. Eqs. (30) in the link with $x \rightarrow i x/\sqrt{2}$. – hbp Oct 19 '15 at 23:03
6 Answers
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.

- 13

- 157
-
This is a good and clear answer! You deserve some points for it so you shouldn't have made it community wiki:) – Winther Oct 20 '15 at 00:22
-
How do you go from derivating respect x to derivatig respect t? Why are they equal? – skan Apr 25 '20 at 17:35
-
@skan We can do this because the function $\exp[(x+t)^2/2]$ depends on $x$ or $t$ through $x+t$ only, we can then apply the chain rule. – hbp Jan 08 '21 at 09:56
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}$.)

- 79,832
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.

- 14,882
-
-
@hbp: You're welcome. Thank you too as I noticed some typo errors in Eq.(4) by looking to my answer again due to your notification. I just fixed them! :) – Hosein Rahnama Dec 23 '15 at 17:02
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?

- 9,594
We have the multiplicative rule for differentiation: $$\frac{\partial fg}{\partial x} = \frac{\partial f}{\partial x} g + f \frac{\partial g }{\partial x}$$
Also the "chain rule" or rule for function composition: $$\frac{\partial (g(h))}{\partial x} = \frac{\partial g}{\partial h}\frac{\partial h}{\partial x}$$
So we let $g = \exp(h)$, $h = x^2/2$. We see that $\frac{\partial h}{\partial x} = x$ and $\frac{\partial g}{\partial h} = g$
Now we let $f$ be a polynomial. Differentiating a polynomial and expressing the result is a simple linear thing to do. Each exponent is reduced by one and coefficient multiplied by the old exponent so we can write this as a matrix with the numbers $1,2,3$ in one of the superdiagonals. But multiplication with $x$ is also a matrix operation on the coefficients of a polynomial. So we can rewrite each differentiation as a matrix-vector product and then investigate it's properties in terms of matrix properties and linear algebra.

- 25,824
By the Faa di Bruno formula, we have \begin{align} \bigl(\operatorname{e}^{x^2/2}\bigr)^{(n)} &=\sum_{k=0}^n\operatorname{e}^{x^2/2} B_{n,k}(x,1,0,\dotsc,0)\\ &=\operatorname{e}^{x^2/2} \sum_{k=0}^n \frac{1}{2^{n-k}}\frac{n!}{k!}\binom{k}{n-k}x^{2k-n}. \end{align} Therefore, we obtain \begin{equation} P_n(x)=\frac{n!}{(2x)^n}\sum_{k=0}^n \frac{2^k}{k!}\binom{k}{n-k}x^{2k}. \end{equation}
References
- F. Qi and B.-N. Guo, Explicit formulas for special values of the Bell polynomials of the second kind and for the Euler numbers and polynomials, Mediterr. J. Math. 14 (2017), no. 3, Art. 140, 14 pages; available online at https://doi.org/10.1007/s00009-017-0939-1.
- F. Qi and M.-M. Zheng, Explicit expressions for a family of the Bell polynomials and applications, Appl. Math. Comput. 258 (2015), 597--607; available online at https://doi.org/10.1016/j.amc.2015.02.027.
- Feng Qi, Da-Wei Niu, Dongkyu Lim, and Yong-Hong Yao, Special values of the Bell polynomials of the second kind for some sequences and functions, Journal of Mathematical Analysis and Applications 491 (2020), no. 2, Paper No. 124382, 31 pages; available online at https://doi.org/10.1016/j.jmaa.2020.124382.
- Feng Qi and Bai-Ni Guo, Some properties of the Hermite polynomials, Georgian Mathematical Journal 28 (2021), no. 6, 925--935; available online at https://doi.org/10.1515/gmj-2020-2088.

- 1,691
-
Thanks for your post. Here is another similar problem How to get nth derivative of arcsinx. – Eugene Zhang Mar 12 '23 at 18:27
-
@EugeneZhang See the site at https://math.stackexchange.com/a/4657751: \begin{equation} (\arcsin x)^{(n)}=\frac1{\sqrt{1-x^2},}\frac{(n-1)!}{(2x)^{n-1}} \sum_{j=0}^{n-1}\frac{2^{j}(2j-1)!!}{j!}\binom{j}{n-j-1}\frac{x^{2j}}{(1-x^2)^{j}}, \quad n\ge1. \end{equation} – qifeng618 Mar 12 '23 at 21:28