Message Boards Message Boards

0
|
6685 Views
|
12 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Calculations with Hermite Polynomials

Posted 9 years ago
POSTED BY: alan barnett
12 Replies
Posted 9 years ago
POSTED BY: alan barnett
POSTED BY: Daniel Lichtblau
Posted 9 years ago

Any suggestions for the second problem?

POSTED BY: alan barnett

Are you looking for a symbolic Sum result for unspecified parameter values of p, or for code that does the decomposition into an explicit Plus expression when given specific integer values for p?

If the latter, could use a replacement rule, applied repeatedly.

rul = (x_^p_.* HermiteH[n_, x_] /; IntegerQ[p] && p >= 1) :> 
   x^(p - 1)*HermiteH[n + 1, x]/2 - n *x^(p - 1)*HermiteH[n - 1, x];

Example:

In[187]:= Expand[x^3*HermiteH[n, x] //. rul]

(* Out[187]= -2 n HermiteH[-3 + n, x] + 3 n^2 HermiteH[-3 + n, x] - 
 n^3 HermiteH[-3 + n, x] + 3/2 n^2 HermiteH[-1 + n, x] - 
 3/4 HermiteH[1 + n, x] - 3/4 n HermiteH[1 + n, x] + 
 1/8 HermiteH[3 + n, x] *)
POSTED BY: Daniel Lichtblau

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]
POSTED BY: Daniel Lichtblau

Moments involve the square of the wave function. For example, the m^th moment is given by Integrate[x^m psi_n(x)^2, {x, -inf, inf}].

Many results involving Hermite polynomials can be found by making use of the generating function exp(2xt-t^2) = sum ...

POSTED BY: S M Blinder
Posted 9 years ago

I'm not interested in calculating the quantum mechanical expectation value, which is the moment of the square of the wave function. I'm using the QM Harmonic oscillator wave functions as a basis set in which to expand a function I want to compute the moments of, so I want the moments of the HO wave functions, not its square.

POSTED BY: alan barnett

It's hard to tell if you correctly specified the restriction since you didn't put your code in a code sample window.

POSTED BY: Frank Kampas
Posted 9 years ago

In my Mathematica Integrate command I included the restriction that n and p both be positive integers.

POSTED BY: alan barnett

As I remember, it's of degree n if n is an integer.

POSTED BY: Frank Kampas
Posted 9 years ago

Since HermiteH[n,x] is a polynomial of degree n, the coefficient of Exp[-x^2/2] in the integrand is a polynomial of degree n+p. For large x, this behaves as x^(n+p) Exp[-x^2/2], which clearly goes to 0 faster than 1/x, so the integral converges..

POSTED BY: alan barnett

The result that the harmonic oscillator energies are quantized is often derived from the necessity of the wave function not diverging at infinity, so I'm skeptical of your statement that Mathematica's statement about convergence is false.

POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract