Department of Applied Mathematics and Theoretical Physics

Numerical Analysis Course

Orthogonal Polynomials



In lectures, examples of orthogonal polynomials for a few weight functions and associated intervals will have been given. This GUI allows you to enter your own weight function and interval and see a few of the associated orthogonal polynomials.

Note: This weight function must be positive on any subset of the interval having positive measure. For example, it could be positive except at a finite number of points.


Refer to "2.3: The three-term recurrence relation" in the lecture notes, in particular Theorem 2.4

The inner products are calculated numerically using a quadrature routine (closed forms for the integrals will not be available, except in special cases).


To open the GUI (after downloading the relevant files below), type


You can select the highest degree polynomial displayed, the weight function, and the interval of interest. You may also select from common families using the drop-down "Presets..." list.

If you change any of these parameters, press "Show Plot" to see the polynomials plotted, or "Show LaTeX" to see them as LaTeX.

The "Rationals" checkbox allows you to display the coefficients in LaTeX mode as rational numbers. If you change this, press "Show LaTeX" to update the display.

WARNING: This GUI is for educational purposes only. In practice there are better was of calculating orthogonal polynomials, depending on the exact application and weight function. See e.g. the Gaussian Quadrature module. This approach suffers from accumulating roundoff error, so the results may not be completely accurate.


All files as .zip archive: