math/doc/html/math_toolkit/sf_poly/legendre_stieltjes.html
2019-10-31 17:55:35 +00:00

145 lines
10 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Legendre-Stieltjes Polynomials</title>
<link rel="stylesheet" href="../../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Math Toolkit 2.11.0">
<link rel="up" href="../sf_poly.html" title="Polynomials">
<link rel="prev" href="legendre.html" title="Legendre (and Associated) Polynomials">
<link rel="next" href="laguerre.html" title="Laguerre (and Associated) Polynomials">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="legendre.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../sf_poly.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="laguerre.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="math_toolkit.sf_poly.legendre_stieltjes"></a><a class="link" href="legendre_stieltjes.html" title="Legendre-Stieltjes Polynomials">Legendre-Stieltjes
Polynomials</a>
</h3></div></div></div>
<h5>
<a name="math_toolkit.sf_poly.legendre_stieltjes.h0"></a>
<span class="phrase"><a name="math_toolkit.sf_poly.legendre_stieltjes.synopsis"></a></span><a class="link" href="legendre_stieltjes.html#math_toolkit.sf_poly.legendre_stieltjes.synopsis">Synopsis</a>
</h5>
<pre class="programlisting">
#include &lt;boost/math/special_functions/legendre_stieltjes.hpp&gt;
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">math</span><span class="special">{</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">legendre_stieltjes</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="identifier">legendre_stieltjes</span><span class="special">(</span><span class="identifier">size_t</span> <span class="identifier">m</span><span class="special">);</span>
<span class="identifier">Real</span> <span class="identifier">norm_sq</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
<span class="identifier">Real</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Real</span> <span class="identifier">x</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="identifier">Real</span> <span class="identifier">prime</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">x</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">Real</span><span class="special">&gt;</span> <span class="identifier">zeros</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span>
<span class="special">}}</span>
</pre>
<h5>
<a name="math_toolkit.sf_poly.legendre_stieltjes.h1"></a>
<span class="phrase"><a name="math_toolkit.sf_poly.legendre_stieltjes.description"></a></span><a class="link" href="legendre_stieltjes.html#math_toolkit.sf_poly.legendre_stieltjes.description">Description</a>
</h5>
<p>
The Legendre-Stieltjes polynomials are a family of polynomials used to generate
Gauss-Konrod quadrature formulas. Gauss-Konrod quadratures are algorithms
which extend a Gaussian quadrature in such a way that all abscissas are reused
when computed a higher-order estimate of the integral, allowing efficient
calculation of an error estimate. The Legendre-Stieltjes polynomials assist
with this task because their zeros <span class="emphasis"><em>interlace</em></span> the zeros
of the Legendre polynomials, meaning that between any two zeros of a Legendre
polynomial of degree n, there exists a zero of the Legendre-Stieltjes polynomial
of degree n+1.
</p>
<p>
The Legendre-Stieltjes polynomials <span class="emphasis"><em>E<sub>n+1</sub></em></span> are defined
by the property that they have <span class="emphasis"><em>n</em></span> vanishing moments against
the oscillatory measure <span class="emphasis"><em>P<sub>n</sub></em></span>, i.e.,
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="serif_italic">&#8747; <sub>-1</sub><sup>1</sup> E<sub>n+1</sub>(x)P<sub>n</sub>(x) x<sup>k</sup>dx = 0</span>
</p></blockquote></div>
<p>
for <span class="emphasis"><em>k = 0, 1, ..., n</em></span>.
</p>
<p>
The first few are
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="serif_italic">E<sub>1</sub>(x) = P<sub>1</sub>(x)</span>
</p></blockquote></div>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="serif_italic">E<sub>2</sub>(x) = P<sub>2</sub>(x) - 2P<sub>0</sub>(x)/5</span>
</p></blockquote></div>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="serif_italic">E<sub>3</sub>(x) = P<sub>3</sub>(x) - 9P<sub>1</sub>(x)/14</span>
</p></blockquote></div>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="serif_italic">E<sub>4</sub>(x) = P<sub>4</sub>(x) - 20P<sub>2</sub>(x)/27 + 14P<sub>0</sub>(x)/891</span>
</p></blockquote></div>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="serif_italic">E<sub>5</sub>(x) = P<sub>5</sub>(x) - 35P<sub>3</sub>(x)/44 + 135P<sub>1</sub>(x)/12584</span>
</p></blockquote></div>
<p>
where <span class="emphasis"><em>P<sub>i</sub></em></span> are the Legendre polynomials. The scaling follows
<a href="http://www.ams.org/journals/mcom/1968-22-104/S0025-5718-68-99866-9/S0025-5718-68-99866-9.pdf" target="_top">Patterson</a>,
who expanded the Legendre-Stieltjes polynomials in a Legendre series and
took the coefficient of the highest-order Legendre polynomial in the series
to be unity.
</p>
<p>
The Legendre-Stieltjes polynomials do not satisfy three-term recurrence relations
or have a particulary simple representation. Hence the constructor call determines
what, in fact, the polynomial is. Once the constructor comes back, the polynomial
can be evaluated via the Legendre series.
</p>
<p>
Example usage:
</p>
<pre class="programlisting"><span class="comment">// Call to the constructor determines the coefficients in the Legendre expansion</span>
<span class="identifier">legendre_stieltjes</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">E</span><span class="special">(</span><span class="number">12</span><span class="special">);</span>
<span class="comment">// Evaluate the polynomial at a point:</span>
<span class="keyword">double</span> <span class="identifier">x</span> <span class="special">=</span> <span class="identifier">E</span><span class="special">(</span><span class="number">0.3</span><span class="special">);</span>
<span class="comment">// Evaluate the derivative at a point:</span>
<span class="keyword">double</span> <span class="identifier">x_p</span> <span class="special">=</span> <span class="identifier">E</span><span class="special">.</span><span class="identifier">prime</span><span class="special">(</span><span class="number">0.3</span><span class="special">);</span>
<span class="comment">// Use the norm_sq to change between scalings, if desired:</span>
<span class="keyword">double</span> <span class="identifier">norm</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">sqrt</span><span class="special">(</span><span class="identifier">E</span><span class="special">.</span><span class="identifier">norm_sq</span><span class="special">());</span>
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2006-2019 Nikhar
Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos,
Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan
R&#229;de, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg,
Daryle Walker and Xiaogang Zhang<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="legendre.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../sf_poly.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="laguerre.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>