|
|
Line 1: |
Line 1: |
| In [[numerical analysis]], the '''Clenshaw algorithm'''<ref name="Clenshaw55">{{Cite doi|10.1090/S0025-5718-1955-0071856-0}} Note that this paper is written in terms of the ''Shifted'' Chebyshev polynomials of the first kind <math>T^*_n(x) = T_n(2x-1)</math>.</ref> is a [[Recursion|recursive]] method to evaluate a linear combination of [[Chebyshev polynomials]]. It is a generalization of [[Horner's method]] for evaluating a linear combination of [[monomial]]s.
| | Oscar is what my wife loves to contact me and I completely dig that name. Doing ceramics is what my family and I enjoy. Years ago we moved to North Dakota. For years he's been operating as a meter reader and it's some thing he really enjoy.<br><br>my site [https://Tomjones1190.wordpress.com/ https://Tomjones1190.wordpress.com/] |
| | |
| It generalizes to more than just Chebyshev polynomials; it applies to any class of functions that can be defined by a three-term [[recurrence relation]].<ref>{{Citation |last1=Press |first1=WH |last2=Teukolsky |first2=SA |last3=Vetterling |first3=WT |last4=Flannery |first4=BP |year=2007 |title=Numerical Recipes: The Art of Scientific Computing |edition=3rd |publisher=Cambridge University Press |publication-place=New York |isbn=978-0-521-88068-8 |chapter=Section 5.4.2. Clenshaw's Recurrence Formula |chapter-url=http://apps.nrbook.com/empanel/index.html?pg=222}}</ref>
| |
| | |
| ==Clenshaw algorithm==
| |
| | |
| Suppose that <math>\phi_k,\; k=0, 1, \ldots</math> is a sequence of functions that satisfy the linear recurrence relation
| |
| | |
| :<math>\phi_{k+1}(x) = \alpha_k(x)\,\phi_k(x) + \beta_k(x)\,\phi_{k-1}(x),</math>
| |
| | |
| where the coefficients <math>\alpha_k</math> and <math>\beta_k</math> are known in advance. Note that in the most common applications, <math>\alpha(x)</math> does not depend on <math>k</math>, and <math>\beta</math> is a constant that depends on neither <math>x</math> nor <math>k</math>.
| |
| | |
| Our goal is to evaluate a weighted sum of these functions
| |
| :<math>S(x) = \sum_{k=0}^n a_k \phi_k(x)</math>
| |
| | |
| Given the coefficients <math>a_0, \ldots, a_n</math>, compute the values <math>b_k(x)</math> by the "reverse" recurrence formula:
| |
| | |
| :<math>\begin{align}
| |
| b_{n+1}(x) &= b_{n+2}(x) = 0, \\[.5em]
| |
| b_{k}(x) &= a_k + \alpha_k(x)\,b_{k+1}(x) + \beta_{k+1}(x)\,b_{k+2}(x).
| |
| \end{align}</math>
| |
| | |
| The linear combination of the <math>\phi_k</math> satisfies:
| |
| | |
| :<math>S(x) = \phi_0(x)a_0 + \phi_1(x)b_1(x) + \beta_1(x)\phi_0(x)b_2(x).</math>
| |
| | |
| See Fox and Parker<ref name="FoxParker">{{Citation |author1=L. Fox |author2=I. B. Parker |title=Chebyshev Polynomials in Numerical Analysis |publisher=Oxford University Press |year=1968 |isbn=0-19-859614-6}}</ref> for more information and stability analyses.
| |
| | |
| ===Horner as a special case of Clenshaw===
| |
| A particularly simple case occurs when evaluating a polynomial of the form
| |
| :<math>S(x) = \sum_{k=0}^n a_k x^k</math>.
| |
| The functions are simply
| |
| :<math>\begin{align}
| |
| \phi_0(x) &= 1, \\
| |
| \phi_k(x) &= x^k = x\phi_{k-1}(x)
| |
| \end{align}</math>
| |
| and are produced by the recurrence coefficients <math>\alpha(x) = x</math> and <math>\beta = 0</math>.
| |
| | |
| In this case, the recurrence formula to compute the sum is
| |
| :<math>b_k(x) = a_k + x b_{k+1}(x)</math>
| |
| and, in this case, the sum is simply
| |
| :<math>S(x) = a_0 + x b_1(x) = b_0(x)</math>,
| |
| which is exactly the usual [[Horner's method]].
| |
| | |
| ===Special case for Chebyshev series===
| |
| Consider a truncated [[Chebyshev series]]
| |
| | |
| :<math>p_n(x) = a_0 + a_1T_1(x) + a_2T_2(x) + \cdots + a_nT_n(x).</math>
| |
| | |
| The coefficients in the recursion relation for the [[Chebyshev polynomials]] are
| |
| | |
| :<math>\alpha(x) = 2x, \quad \beta = -1,</math>
| |
| with the initial conditions
| |
| :<math>T_0(x) = 1, \quad T_1(x) = x.</math>
| |
| | |
| Thus, the recurrence is
| |
| :<math>b_k(x) = a_k + 2xb_{k+1}(x) - b_{k+2}(x)</math>
| |
| and the final sum is | |
| :<math>p_n(x) = a_0 + xb_1(x) - b_2(x).</math>
| |
| | |
| One way to evaluate this is to continue the recurrence one more step, and compute
| |
| :<math>b_0(x) = 2a_0 + 2xb_1(x) - b_2(x),</math>
| |
| (note the doubled ''a''<sub>0</sub> coefficient) followed by
| |
| :<math>p_n(x) = b_0(x)-x b_1(x)-a_0=\frac{1}{2}\left[b_0(x) - b_2(x)\right].</math>
| |
| | |
| ===Geodetic applications===
| |
| | |
| Clenshaw's algorithm is extensively used in geodetic applications
| |
| where it is usually referred to as '''Clenshaw summation'''.<ref>
| |
| {{Citation
| |
| | last1=Tscherning
| |
| | first1=C. C.
| |
| | last2=Poder
| |
| | first2=K.
| |
| | year=1982
| |
| | title=Some Geodetic applications of Clenshaw Summation
| |
| | journal=Bolletino di Geodesia e Scienze Affini
| |
| | volume=41
| |
| | number=4
| |
| | pages=349–375
| |
| | url=http://cct.gfy.ku.dk/publ_cct/cct80.pdf
| |
| }}</ref> A simple application is summing the trigonometric series to compute
| |
| the [[meridian arc]]. These have the form
| |
| | |
| :<math>m(\theta) = C_0\,\theta + C_1\sin \theta + C_2\sin 2\theta + \cdots + C_n\sin n\theta.</math> | |
| | |
| Leaving off the initial <math>C_0\,\theta</math> term, the remainder is a summation of the appropriate form. There is no leading term because <math>\phi_0(\theta) = \sin 0\theta = \sin 0 = 0</math>.
| |
| | |
| The [[List of trigonometric identities#Chebyshev method|recurrence relation for <math>\sin k\theta</math>]] is
| |
| :<math>\sin k\theta = 2 \cos\theta \sin (k-1)\theta - \sin (k-2)\theta</math>, | |
| | |
| making the coefficients in the recursion relation
| |
| | |
| :<math>\alpha_k(\theta) = 2\cos\theta, \quad \beta_k = -1.</math>
| |
| | |
| and the evaluation of the series is given by
| |
| | |
| :<math>\begin{align}
| |
| b_{n+1}(\theta) &= b_{n+2}(\theta) = 0,\\[.3em]
| |
| b_k(\theta) &= C_k + 2 b_{k+1}(\theta)\cos \theta - b_{k+2}(\theta)\quad(n\ge k \ge 1).
| |
| \end{align}</math>
| |
| | |
| The final step is made particularly simple because <math>\phi_0(\theta) = \sin 0 = 0</math>, so the end of the recurrence is simply <math>b_1(\theta)\sin(\theta)</math>; the <math>C_0\,\theta</math> term is added separately:
| |
| | |
| :<math>m(\theta) = C_0\,\theta + b_1(\theta)\sin \theta.</math>
| |
| | |
| Note that the algorithm requires only the evaluation of two trigonometric quantities <math>\cos \theta</math> and <math>\sin \theta</math>.
| |
| | |
| ==See also==
| |
| *[[Horner scheme]] to evaluate polynomials in [[monomial form]]
| |
| *[[De Casteljau's algorithm]] to evaluate polynomials in [[Bézier form]]
| |
| | |
| ==References==
| |
| <references/>
| |
| | |
| {{DEFAULTSORT:Clenshaw Algorithm}}
| |
| [[Category:Numerical analysis]]
| |
Oscar is what my wife loves to contact me and I completely dig that name. Doing ceramics is what my family and I enjoy. Years ago we moved to North Dakota. For years he's been operating as a meter reader and it's some thing he really enjoy.
my site https://Tomjones1190.wordpress.com/