How do I ask Mathematica to try to solve a recursive relation that defines a sequence of functions? For example, suppose I know that $g_n(x) = g_{n-1}'(x)$ for $n > 0$ and that $g_0(x) = e^{2x}$. How can I ask Mathematica to find a closed form for $g_n(x)$? (This is just a placeholder equation to highlight my question; I know the answer of $g_n(x) = 2^n e^{2x}$, $n\geq 0$.)
A less trivial instance of the problem would be the Hermite polynomial recursion, $$H_{n+1}(x) = 2xH_n(x) - H_n'(x)$$
I don't see how to convince either DSolve
or RSolve
to solve it for me. DSolve
is unhappy because $n-1$ is used on the RHS:
DSolve[{g[n, x] == 2*D[g[n - 1, x], x]}, g, {n, x}]
RSolve
just echoes my input:
RSolve[{g[n, x] == 2*D[g[n - 1, x], x], g[0, x] == Exp[2*x]}, g, {n, x}]
I know finding a closed-form solution is going to be hopeless in most instances, but it seems like some cases like the above $g_n(x)$ should be doable. I have been unable to find any examples in the Mathematica documentation addressing this type of problem.
Solve[{Series[g[n, x], {x, 0, 5}, {n, 0, 5}] == Series[2*D[g[n - 1, x], x], {x, 0, 5}, {n, 0, 5}]}, g, {n, x}]
but didn't found the solution. I think you will try to search a closed form asymptotically. $\endgroup$