Mathematica can handle the integral for specific integer values of the first parameter n
, but not for general n
.
Integrate[
x^p Exp[-x^2/2] HermiteH[3, x], {x, -Infinity, Infinity},
Assumptions -> {p >= 0}]
(* Out[246]= -2^(2 + p/2) (-1 + (-1)^p) (1 + 2 p) Gamma[1 + p/2] *)
This has to do with the interplay of how convergence testing is done, and how assumptions are handled-- in effect integrality is replaced by realness so as to avoid nongeneric oversimplifications in case of discrete-valued parameters. For general real n>=0
the convergence test fails at infinity.
Even if the convergence were correctly assessed, I'm not sure a symbolic result would be produced. Below I use GenerateConditions
in a way that, I think, bypasses the convergence assessment. It comes back unevaluated.
Integrate[
x^p Exp[-x^2/2] HermiteH[n, x], {x, -Infinity, Infinity},
Assumptions -> {p >= 0, n >= 0}, GenerateConditions -> False]
Out[247]= Integrate[
E^(-(x^2/2)) x^p HermiteH[n, x], {x, -[Infinity], [Infinity]},
Assumptions -> {p >= 0, n >= 0}, GenerateConditions -> False]
Integrate[
x^p Exp[-x^2/2] HermiteH[n, x], {x, -Infinity, Infinity},
Assumptions -> {p >= 0, n >= 0}, GenerateConditions -> False]
Out[247]= Integrate[
E^(-(x^2/2)) x^p HermiteH[n, x], {x, -\[Infinity], \[Infinity]},
Assumptions -> {p >= 0, n >= 0}, GenerateConditions -> False]