How Zernike, Legendre, and Chebychev Polynomials relate to Jacobi Polynomials

Jacobi Differential Equation
Before we jump into this, fair warning, its going to get mathy.

It was recently brought to my attention by @bdube that there is a beautiful connection between the polynomial sets we as optical engineers are probably (hopefully) familiar with for data analysis, namely, Zernike , Chebychev, and Legendre polynomials and Jacobi polynomials. After talking with @Salsbury about how helpful this was to learn, and how useful it is I decided to make a brief writeup . So thank you for that, and I hope that this brief write up is useful and interesting!

The classic Jacobi Polynomial [1] is a solution to the Jacobi Differential Equation, which is itself a singular Sturm-Liouville eigenvalue problem [2] of the form:

\frac{d}{dx}[(1-x)^{\alpha+1}(1+x)^{\beta+1}y'] + n(n+\alpha + \beta + 1)(1-x)^\alpha (1+x)^\beta y = 0 \tag{1}

If we plug in the following:

y = \sum_{v=0}^{\infty}a_v(x-1)^v \tag{2}

we get the following recurrence relation [3]:

[\gamma -v(v+\alpha+\beta+1]a_v-2(v+1)(v+\alpha+1)a_{v+1}=0 \tag{3}

for the set v=0,1,.... We define \gamma as

\gamma \equiv n(n+\alpha+\beta+1)\tag{4}

Solving the recurrence relationship gives us the general form of the Jacobi polynomial:

P_n^{(\alpha, \beta)}(x) = \frac{-1^n}{2^n n!} (1-x)^{-\alpha}(a+x)^{-\beta}\frac{d^n}{dx^n}[{(1-x)^{\alpha + n}(1+x)^{\beta + n}}] \tag{5}

If you are interested, there is no known simple solution to equation 1, thus the recurrence relationship is required to arrive at equation 5. Wow, very cool! Jacobi Polynomials solve the Jacobi Differential Equation, and we have found how we can calculate them using the Recurrence Relationship. So, we are good to go right?

There are some important caveats that we should already be expecting. Namely, equation 5 holds for cases where \alpha, \beta > -1. Further, we need to know if they are orthogonal and over what range they are. Jacobi polynomials as showing in equation 5 form a complete orthogonal set in the interval x \in [-1, 1] with respect to the following weighting function, w(x) :

w(x) = (1-x)^\alpha(1+x)^\beta \tag{6}

As one of my previous professors Dr. Yuzuru Takeshima would say, ‘So far, so good!’. We have an orthogonal polynomial set from the interval -1 to 1, which works well for us as we typically normalize our datasets over said interval. What about normalization? Well, the Jacobi Polynomials are normalized via:

P_n^{(\alpha,\beta)}(1)=\binom{n+\alpha}{n} \tag{7}

and they satisfy orthonormality by:

\int_1^1P_i^{(\alpha, \beta)}(x)P_j^{(\alpha,\beta)}(x)w(x)dx=\delta_{i,j} \tag{8}

But, how does this help us with general polynomial sets? Specifically, we have probably all heard about Zernike polynomials, and how well they fit a unit circle. Another way of phrasing that is we know Zernike polynomials are orthonormal over a circle defined from -1 to 1. Huh, interesting, we are seeing some similarities. What about those funny cases when we don’t have circular data that we care about. You know, like cases in almost every imaging device which have rectangular detectors? What about Chebychev polynomials of the first kind. Dr. Maham Aftab demonstrated that in fact 2D Chebychev polynomials of the first kind can well fit wavefronts (particularly for high frequency features when a sufficient number of terms are used) [4,5]. We know Chebychev polynomials are orthonormal over the domain of [-1,1] over a rectangular domain. Again, the similarities to the Jacobi are obvious. You may have already made the mental leap, or known this before, but without further delay, I reveal…
Zernike, Chebyshev, and Legendre polynomials can all be view as special cases of the Jacobi Polynomials!

How do we get from the general Jacobi polynomial to the specific cases we care about? The Jacobi Polynomial reduces to the

  • Legendre Polynomial when \alpha=\beta=0
P_n^{(0, 0)}(x) = \frac{-1^n}{2^n n!} \frac{d^n}{dx^n}[{(1-x)^{n}(1+x)^{n}}] \tag{9}

and

w(x) = 1 \tag{10}
  • Chebychev Polynomial of the first kind when \alpha=\beta=-1/2, such that:
T_n(x) = \frac{P_n^{(-1/2,-1/2)}(x)}{P_n^{(-1/2,-1/2)}} \tag{11}
  • Zernike Polynomial when
  1. x = 1-2\rho^2
  2. \alpha = m
  3. \beta = 0
  4. n' = \frac{1}{2}(n-m)
    resulting in :
P_{n'}^{(\alpha,\beta)}(x) = (-1)^{n'}\frac{R_n^m(\rho)}{\rho^\alpha} \tag{12}

And with that, we can now see there is a unifying back drop polynomial set for these common fitting polynomials.

For any readers that are interested (as I was) in refreshing where Jacobi functions arise from, Professor William Schwalm has a fantastic youtube lecture on the trigonometric derivation of the Jacobi Elliptic functions:

and the course notes are great as well (and free to the public from what I can see) [6]

As always, if you find any errors please point them out so we can correct them!

References

  1. “Jacobi Polynomial.” Accessed July 16, 2020. Jacobi Polynomial.

  2. Hesthaven, Jan S., and Tim Warburton. Nodal Discontinuous Galerkin Methods: Algorithms, Analysis, and Applications . Appendix A. Texts in Applied Mathematics. New York: Springer-Verlag, 2008. Nodal Discontinuous Galerkin Methods | SpringerLink.

  3. Levin, Oscar. “Discrete MathematicsAn Open Introduction.” Discrete Mathematics: An Open Introduction , OpenMath Books, Solving Recurrence Relations.

  4. Aftab, Maham, Logan R. Graves, James H. Burge, Greg A. Smith, Chang Jin Oh, and Dae Wook Kim. “Rectangular Domain Curl Polynomial Set for Optical Vector Data Processing and Analysis.” Optical Engineering 58, no. 9 (September 2019): 095105. Rectangular domain curl polynomial set for optical vector data processing and analysis.

  5. Aftab, Maham, James H. Burge, Gregory A. Smith, Logan Graves, Chang Jin Oh, and Dae Wook Kim. “Modal Data Processing for High Resolution Deflectometry.” International Journal of Precision Engineering and Manufacturing - Green Technology Volume 6, no. 2 (April 1, 2019): 255–70. https://doi.org/10.1007/s40684-019-00047-y.

  6. Schwalm, W.A.: Lectures on Selected Topics in Mathematical Physics: Elliptic Function-sand Elliptic Integrals, vol. 68. Morgan & Claypool publication as part of IOP Concise Physics, San Rafael (2015)

  7. Boyd, John P., and Rolfe Petschek. “The Relationships Between Chebyshev, Legendre and Jacobi Polynomials: The Generic Superiority of Chebyshev Polynomials and Three Important Exceptions.” Journal of Scientific Computing 59, no. 1 (April 1, 2014): 1–27. https://doi.org/10.1007/s10915-013-9751-7.

  8. Lewanowicz, S. “Properties of the Polynomials Associated with the Jacobi Polynomials.” Mathematics of Computation 47, no. 176 (1986): 669–82. https://doi.org/10.2307/2008181.

  9. Defez, E., L. Jódar, and A. Law. “Jacobi Matrix Differential Equation, Polynomial Solutions, and Their Properties.” Computers & Mathematics with Applications 48, no. 5 (September 1, 2004): 789–803. Redirecting.

  10. Koekoek, J., and R. Koekoek. “Differential Equations for Generalized Jacobi Polynomials.” Journal of Computational and Applied Mathematics 126, no. 1–2 (December 2000): 1–31. Redirecting.

  11. Forbes, G. W. “Robust, Efficient Computational Methods for Axially Symmetric Optical Aspheres.” Optics Express 18, no. 19 (September 13, 2010): 19700–712. Robust, efficient computational methods for axially symmetric optical aspheres.