# How can I differentiate Hermite polynomial with respect to $n$?

How can I differentiate the function below (where $$\beta$$ and $$\gamma$$ are constants) with respect to $$n$$?

D[HermiteH[n, (Sqrt[β] Log[1 + x γ])/γ]/Sqrt[Sqrt[β]/((2^n)*(n!)*Sqrt[Pi])], n]


It seems that Mathematica cannot do it.

• In Hermite[n,x] n is assumed to be a non negative Integer. You can not take the derivative relative to n, only relative to x and then it is: D[ Hermite[n,x],x]= 2n Hermite[n-1,x] Commented Jul 31, 2023 at 17:04
• @DanielHuber Some of the examples in the Help demonstrate HermiteH[1/2, x]. Commented Jul 31, 2023 at 17:16
• @Ghoster If n is not an integer, H[n,x] is not a polynomial Commented Jul 31, 2023 at 18:30
• I think the problem might be that you believe, incorrectly, that the derivatives of named functions can always be expressed in terms of elementary functions and special functions that have been given names. Nobody has bothered to name the derivative of $H_n(x)$ with respect to $n$. But it still exists as a legitimate function, and probably has integral representations, series representations, etc. If you try differentiating the Riemann zeta function you’ll see that it doesn't have a “simplified” form either. Mathematica just calls it Zeta’(x). Commented Jul 31, 2023 at 23:38
• Note that Derivative[1, 0][HermiteH][n, x] is evaluated by a numerical procedure when n or x is an approximate number. It can be evaluated to arbitrary precision. It is left unevaluated if n and x are exact numbers or symbolic expressions. Not every derivative is known in terms of other functions. Finally, it seems Mathematica does not have built-in algorithms to evaluate 2nd and higher order derivatives of HermitH[n, x] with respect to n. Commented Jul 31, 2023 at 23:43

The derivative is an exact expression. To evaluate further, you must provide numeric input.

\$Version

(* "13.3.0 for Mac OS X ARM (64-bit) (June 3, 2023)" *)

Clear["Global*"]

dHn[β_, γ_, n_, x_] =
D[HermiteH[n, (Sqrt[β] Log[1 + x γ])/γ]/
Sqrt[Sqrt[β]/((2^n)*(n!)*Sqrt[Pi])], n] // FullSimplify


SeedRandom[1234];

dHn @@ RandomInteger[{1, 5}, 4]


% // N

(* -16367.9 *)

dHn @@ RandomReal[1, 4]

(* -0.606802 *)
`