How this calculation works
A Heun equation normally has solutions expressed by infinite series or analytic continuation. A polynomial solution occurs only when a termination condition and an accessory-parameter condition hold together. Setting one exponent to a negative integer supplies only the first part.
HeunODE y''+[γ/z+δ/(z-1)+ε/(z-a)]y'+(αβz-q)/(z(z-1)(z-a))y=0, ε=α+β+1-γ-δ, α=-N. CoeffrecurrenceR_j c_{j+1}-Q_j c_j+P_j c_{j-1}=q c_j; R_j=a(j+1)(j+γ),Q_j=j[(j-1+γ)(1+a)+aδ+ε],P_j=(j-1+α)(j-1+β). Buildmatrixj0..N. Onlyreal symmetrizablecaseR_{j-1}P_j>0 withnonzeroR requiredifusingrealeigh; transformdiag scaling sqrt(P_j/R_{j-1}). Recoverpoly eigenvectornormalizec0=1 andresidualmultiplyODEdenominators exactly/float. Ifcomplex/defectiveunsupportedrejectnotdrop roots.A worked example
With the prefilled inputs, solutions = [{"accessoryQ":-1.0000000000000002,"coefficients":[1,1],"ODEPolynomialResidual":4.718447854656915e-16},{"accessoryQ":2,"coefficients":[1,-2],"ODEPolynomialResidual":4.440892098500626e-16}]. alpha=-N automatically; supported real symmetrizable termination cases only.
Good to know
Coefficients ascending powers with c₀=1. Only symmetrizable real q families supported; not arbitrary Heun evaluation or complex spectral roots.
Reference: Primary method reference or author-maintained documentation (opens in a new tab) ↗
Polynomial solutions require a special parameter
A Heun equation normally has solutions expressed by infinite series or analytic continuation. A polynomial solution occurs only when a termination condition and an accessory-parameter condition hold together. Setting one exponent to a negative integer supplies only the first part.
The calculator finds the accessory values q that make a degree-bounded recurrence terminate. It does not evaluate every general Heun function. Each returned q belongs to a particular polynomial and must be interpreted with the other entered parameters unchanged.
Compare with the Gauss hypergeometric 2F1 calculator with convergence checks. Find accessoryparameters makingageneralHeunsolutionterminate; Gauss2F1hasthreeregularsingularpointsandnoindependentHeunaccessoryspectrum.
Singular points and exponent balance
alpha=-N automatically; supported real symmetrizable termination cases only.The standard equation has singular points at zero, one, a and infinity. The parameter a must differ from zero and one. The finite polynomial degree N fixes alpha equal to minus N, and the remaining exponent parameter follows the stated balance relation.
Some recurrence coefficients vanish for special exponent inputs. These cases can require separate normalizations or degenerate analysis. A bounded implementation should reject unsupported singular cases explicitly instead of dividing by zero or silently losing one of the accessory roots.
A finite tridiagonal eigenproblem
Substitute a power-series polynomial into the equation after multiplying away its denominators. Collecting coefficients links each coefficient to its two neighbors. Termination turns those relations into an eigenvalue problem for q on a finite tridiagonal matrix.
When that matrix is diagonally similar to a real symmetric matrix, a symmetric eigensolver provides real roots and stable eigenvectors. Outside that admissible case, a real-only implementation cannot simply discard complex accessory values and claim to have found all solutions.
Reconstructing and checking a polynomial
Each eigenvector is rescaled so its constant coefficient is one, provided that component is large enough for the normalization to be numerically resolved. The remaining entries are coefficients in ascending powers. The output pairs every real accessory value with its reconstructed polynomial, preserving the correspondence rather than returning an unlabeled root list.
The engine evaluates the denominator-cleared ODE residual at nine interior sample points. The field named ODEPolynomialResidual is therefore a sampled substitution diagnostic, not the maximum residual coefficient of the full polynomial identity. An independent coefficientwise check remains a stronger test, especially when coefficients are large or a sampled value happens to cancel.
A degree-one worked case
Choose N equal to one, a equal to minus one, beta equal to two, gamma equal to one and delta equal to one. The balance gives epsilon zero. The finite matrix is zero, minus one in its first row and minus two, one in its second row.
Its accessory values are minus one and two. With constant coefficient one, the corresponding polynomials are one plus z and one minus twice z. Both satisfy the denominator-cleared equation by direct coefficient substitution.
Reading roots and repeated cases
A table should pair every accessory root with its coefficient vector and residual. Roots close together deserve conditioning attention. A small eigenvalue residual does not automatically establish a well-separated root or guarantee stable normalized polynomial coefficients.
A static figure can show the accessory spectrum and selected polynomial over a nonsingular interval. Avoid drawing a line through a singular point as though a general solution were regular there; polynomial termination is the special feature under examination. The singular-point parameter a is different from the accessory eigenparameter q. Entering one in place of the other changes the differential equation rather than selecting another polynomial solution. The program fixes alpha from the requested degree and derives epsilon from the Fuchs relation. The supported real symmetric reduction is deliberately narrower than the full complex Heun problem and rejects unsupported termination matrices.
Bounded completeness claims
Within the supported nondegenerate symmetric case, the finite matrix has the stated dimension and supplies the full accessory spectrum. Outside that case, the page should identify what additional solver or degeneracy treatment is needed.
The calculator does not infer physical boundary conditions or select one accessory value as the scientifically correct one. A physical application may need normalization, endpoint behavior or other constraints. Those choices are separate from finding the terminating polynomial family. Coefficients ascending powers with c₀=1. Only symmetrizable real q families supported; not arbitrary Heun evaluation or complex spectral roots.
A few questions, answered
Does alpha equal to minus N guarantee a polynomial?
No; q must also satisfy the finite accessory eigenproblem.
Why might a real input still be rejected?
The supported eigensolver may require a nondegenerate symmetrizable recurrence; general real matrices can have complex roots.
What coefficient order is displayed?
Ascending powers beginning with the normalized constant coefficient, which must be stated beside the table.
What does the displayed ODE residual measure?
The maximum absolute denominator-cleared substitution residual at nine sample points; it is not a coefficientwise polynomial identity certificate.