What this calculator does
This tool evaluates the physicists' Hermite polynomial \(H_n(x)\) for a single fixed order n across a sequence of x values. It returns a table of \((x, H_n(x))\) pairs and draws the curve. Hermite polynomials appear throughout quantum mechanics (the energy eigenstates of the harmonic oscillator), probability theory, and numerical analysis (Gauss-Hermite quadrature).
How to use it
Enter the polynomial order n (a non-negative integer such as 0, 1, 2, 3, ...), the initial value of x, the increment (step between successive x values), and the number of repetitions (how many rows to generate). The i-th x value is $$x_i = \text{startX} + i \cdot \text{stepX}$$ for i = 0 to count-1. A negative increment produces a descending table; a zero increment repeats the same x.
The formula
These are the physicists' Hermite polynomials, satisfying the differential equation \(y'' - 2x \cdot y' + 2n \cdot y = 0\) and generated by \(\exp(2xt - t^2)\). We compute them with the stable three-term recurrence $$H_0(x) = 1, \quad H_1(x) = 2x, \quad H_{k+1}(x) = 2x \cdot H_k(x) - 2k \cdot H_{k-1}(x).$$ This avoids factorial overflow. Note these are not the probabilists' \(He_n(x)\), which use \(He_{k+1} = x \cdot He_k - k \cdot He_{k-1}\).
Worked example
For n = 3 the recurrence gives \(H_2(x) = 4x^2 - 2\) and \(H_3(x) = 8x^3 - 12x\). At \(x = -2.5\): $$8(-15.625) + 30 = -95.$$ At \(x = 0\) it is 0, and at \(x = 2.5\) it is +95. With startX = −2.5, stepX = 0.1 and 51 repetitions the table runs from \((-2.5, -95)\) through \((0, 0)\) to \((2.5, 95)\), tracing an odd-symmetric cubic-shaped curve.
FAQ
Which convention is used? The physicists' convention \(H_n\), where \(H_1(x) = 2x\). First few: \(H_0 = 1\), \(H_1 = 2x\), \(H_2 = 4x^2 - 2\), \(H_4 = 16x^4 - 48x^2 + 12\), \(H_5 = 32x^5 - 160x^3 + 120x\).
What if n = 0? \(H_0(x) = 1\) for every x, so the table and graph are a flat line at height 1.
Why do values explode for big n? Hermite polynomials grow extremely fast for large order and large \(|x|\); double precision can overflow beyond roughly 1e308. Keep n and the x range modest for sensible plots.