Hermite polynomials should be orthogonal over a Gaussian measure. However when the orders of the polynomials are larger than a few, Mathematica gets this wrong. Strangely, it seems to hinge on whether orders of the two polynomials are both even or both odd (failure), or if one is even and the other is odd (success).
To illustrate, this gives the correct answer:
In[27]:= Integrate[
HermiteH[9, x] HermiteH[18, x] Exp[- x^2], {x, -Infinity, Infinity}]
Out[27]= 0
But this doesn't:
In[25]:= Integrate[
HermiteH[8, x] HermiteH[18,
x] Exp[-(1/2) x^2] Exp[-(1/2) x^2], {x, -Infinity, Infinity}]
During evaluation of In[25]:= Integrate::idiv: Integral of E^-x^2 (105-840 x^2+840 x^4-224 x^6+16 x^8) (-34459425+620269650 x^2-1654052400 x^4+1543782240 x^6-661620960 x^8+147026880 x^10-17821440 x^12+1175040 x^14-39168 x^16+512 x^18) does not converge on {-\[Infinity],\[Infinity]}. >>
Out[25]= \!\(
\*SubsuperscriptBox[\(\[Integral]\), \(-\[Infinity]\), \
\(\[Infinity]\)]\(\(
\*SuperscriptBox[\(E\), \(-
\*SuperscriptBox[\(x\), \(2\)]\)]\ \((1680 - 13440\
\*SuperscriptBox[\(x\), \(2\)] + 13440\
\*SuperscriptBox[\(x\), \(4\)] - 3584\
\*SuperscriptBox[\(x\), \(6\)] + 256\
\*SuperscriptBox[\(x\), \(8\)])\)\ \((\(-17643225600\) + 317578060800\
\*SuperscriptBox[\(x\), \(2\)] - 846874828800\
\*SuperscriptBox[\(x\), \(4\)] + 790416506880\
\*SuperscriptBox[\(x\), \(6\)] - 338749931520\
\*SuperscriptBox[\(x\), \(8\)] + 75277762560\
\*SuperscriptBox[\(x\), \(10\)] - 9124577280\
\*SuperscriptBox[\(x\), \(12\)] + 601620480\
\*SuperscriptBox[\(x\), \(14\)] - 20054016\
\*SuperscriptBox[\(x\), \(16\)] + 262144\
\*SuperscriptBox[\(x\), \(18\)])\)\) \[DifferentialD]x\)\)