<?xml-stylesheet type="text/xsl" href="../styles/pmathml.xsl"?>
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:dsi="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xml:space="preserve"><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/><title>D01 Chapter Introduction : NAG Library, Mark 23</title><link rel="stylesheet" href="../styles/libdoc.css" type="text/css"/><script type="text/javascript">
   function showLevel(_levelId){
    var thisLevel = document.getElementById(_levelId);
    var thisplus = document.getElementById( _levelId.concat('plus'));
    var thisminus = document.getElementById( _levelId.concat('minus'));
    if(thisLevel.style.display != "block"){
     thisLevel.style.display = "block";
     thisplus.style.display = "none";
     thisminus.style.display = "inline";
     }
    else{
     thisLevel.style.display = "none";
     thisminus.style.display = "none";
     thisplus.style.display = "inline";
     }
    }
  </script></head><body><hr/><div><a class="chap" href="d01conts.xml">D01 Chapter Contents</a></div><div><a class="chapint" href="../../pdf/D01/d01intro.pdf">D01 Chapter Introduction (PDF version)</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div><hr/><h1 class="libdoc">NAG Library Chapter Introduction<br/><br/>D01 &#8211; Quadrature</h1><div class="htmltoc">
<h2 class="htmltoc"><span class="htmltochead" onclick="showLevel('htmltoc');"><span class="htmltocplus" id="htmltocplus">+</span><span class="htmltocminus" id="htmltocminus">&#8722;</span></span>&#160;Contents</h2>
<div class="htmltocitem" id="htmltoc">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#scope">1&#160;&#160;<b>Scope of the Chapter</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocbackground');"><span class="htmltocplus" id="tocbackgroundplus">+</span><span class="htmltocminus" id="tocbackgroundminus">&#8722;</span></span>
<a class="htmltoc" href="#background">2&#160;&#160;<b>Background to the Problems</b></a>
<div class="htmltocitem" id="tocbackground">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#intbackground1">2.1&#160;&#160;<b>One-dimensional Integrals</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#intbackground2">2.2&#160;&#160;<b>Multidimensional Integrals</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocavailable');"><span class="htmltocplus" id="tocavailableplus">+</span><span class="htmltocminus" id="tocavailableminus">&#8722;</span></span>
<a class="htmltoc" href="#available">3&#160;&#160;<b>Recommendations on Choice and Use of Available Routines</b></a>
<div class="htmltocitem" id="tocavailable">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#intrecomm_1">3.1&#160;&#160;<b>One-dimensional Integrals over a Finite Interval</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#intrecomm_2">3.2&#160;&#160;<b>One-dimensional Integrals over a Semi-infinite or Infinite Interval</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#intrecomm_3">3.3&#160;&#160;<b>Multidimensional Integrals</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#dtree">4&#160;&#160;<b>Decision Trees</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#index">5&#160;&#160;<b>Functionality Index</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#auxindex">6&#160;&#160;<b>Auxiliary Routines Associated with Library Routine Parameters</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#withdrawn">7&#160;&#160;<b>Routines Withdrawn or Scheduled for Withdrawal</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">8&#160;&#160;<b>References</b></a>
</div>
</div>
</div><h2 class="standard"><a class="sec" name="scope" id="scope"/>1&#160;&#160;Scope of the Chapter</h2>
<div class="paramtext">This chapter provides routines for the numerical evaluation of definite integrals in one or more dimensions and for evaluating weights and abscissae of integration rules.</div><h2 class="standard"><a class="sec" name="background" id="background"/>2&#160;&#160;Background to the Problems</h2>
<div class="paramtext">The routines in this chapter are designed to estimate:
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(a)</td>
<td valign="top">the value of a one-dimensional definite integral of the form

<div class="formula-eqn"><a name="eqn1" id="eqn1"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>b</m:mi></m:munderover><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow>
</m:math></td><td class="formula-eqn2">
      (1)
     </td></tr></table></div>

where <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is defined by you, either at a set of points <m:math><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mi mathvariant="italic">i</m:mi></m:msub><m:mo>,</m:mo><m:mrow><m:mi>f</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mi mathvariant="italic">i</m:mi></m:msub></m:mfenced></m:mrow></m:mfenced></m:math>, for <m:math><m:mi mathvariant="italic">i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi></m:math>, where <m:math><m:mi>a</m:mi><m:mo>=</m:mo><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>&lt;</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>&lt;</m:mo><m:mo>&#8943;</m:mo><m:mo>&lt;</m:mo><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub><m:mo>=</m:mo><m:mi>b</m:mi></m:math>, or in the form of a function; and the limits of integration <m:math><m:mi>a</m:mi><m:mo>,</m:mo><m:mi>b</m:mi></m:math>&#160;may be finite or infinite.
 <div class="paramtext">Some methods are specially designed for integrands of the form

<div class="formula-eqn"><a name="eqn2" id="eqn2"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mi>w</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mi>g</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math></td><td class="formula-eqn2">
      (2)
     </td></tr></table></div>

which contain a factor <m:math><m:mi>w</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>, called the weight-function,  of a specific form.  These methods take full account of any peculiar behaviour attributable to the <m:math><m:mi>w</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;factor.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(b)</td>
<td valign="top">the values of the one-dimensional indefinite integrals arising from  <a class="eqn" href="#eqn1">(1)</a> where the ranges of integration are interior to the interval <m:math><m:mfenced separators="" open="[" close="]"><m:mi>a</m:mi><m:mo>,</m:mo><m:mi>b</m:mi></m:mfenced></m:math>.</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(c)</td>
<td valign="top">the value of a multidimensional definite integral of the form

<div class="formula-eqn"><a name="eqn3" id="eqn3"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msub><m:mo>&#8747;</m:mo><m:msub><m:mi>R</m:mi><m:mi>n</m:mi></m:msub></m:msub><m:mi>f</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mfenced><m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mrow><m:mo>&#8943;</m:mo><m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub>
</m:math></td><td class="formula-eqn2">
      (3)
     </td></tr></table></div>

where <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mfenced></m:math>&#160;is a function defined by you and <m:math><m:msub><m:mi>R</m:mi><m:mi>n</m:mi></m:msub></m:math>&#160;is some region of <m:math><m:mi>n</m:mi></m:math>-dimensional space.
 <div class="paramtext">The simplest form of <m:math><m:msub><m:mi>R</m:mi><m:mi>n</m:mi></m:msub></m:math>&#160;is the <m:math><m:mi>n</m:mi></m:math>-rectangle defined by

<div class="formula-eqn"><a name="eqn4" id="eqn4"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msub><m:mi>a</m:mi><m:mi>i</m:mi></m:msub><m:mo>&#8804;</m:mo><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub><m:mo>&#8804;</m:mo><m:msub><m:mi>b</m:mi><m:mi>i</m:mi></m:msub><m:mtext>, &#8195;</m:mtext><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi>
</m:math></td><td class="formula-eqn2">
      (4)
     </td></tr></table></div>

where <m:math><m:msub><m:mi>a</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>b</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;are constants.  When <m:math><m:msub><m:mi>a</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>b</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;are functions of  <m:math><m:msub><m:mi>x</m:mi><m:mi>j</m:mi></m:msub></m:math>&#160;(<m:math><m:mi>j</m:mi><m:mo>&lt;</m:mo><m:mi>i</m:mi></m:math>), the region can easily be transformed to the rectangular form (see page 266 of <a class="ref" href="#ref201">Davis and Rabinowitz (1975)</a>).  Some of the methods described incorporate the transformation procedure.</div></td>
</tr></table>
</div><h3 class="standard"><a class="sec" name="intbackground1" id="intbackground1"/>2.1&#160;&#160;One-dimensional Integrals</h3>
<div class="paramtext">To estimate the value of a one-dimensional integral, a quadrature rule uses an approximation in the form of a weighted sum of integrand values, i.e.,

<div class="formula-eqn"><a name="eqn5" id="eqn5"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>b</m:mi></m:munderover><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8721;</m:mo><m:mrow><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:mrow><m:mi>N</m:mi></m:munderover><m:msub><m:mi>w</m:mi><m:mi>i</m:mi></m:msub><m:mi>f</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:mfenced><m:mtext>.</m:mtext>
</m:math></td><td class="formula-eqn2">
      (5)
     </td></tr></table></div>

The points <m:math><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;within the interval <m:math><m:mfenced separators="" open="[" close="]"><m:mi>a</m:mi><m:mo>,</m:mo><m:mi>b</m:mi></m:mfenced></m:math>&#160;are known as the abscissae, and the <m:math><m:msub><m:mi>w</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;are known as the weights.</div><div class="paramtext">More generally, if the integrand has the form <a class="eqn" href="#eqn2">(2)</a>,  the corresponding formula is

<div class="formula-eqn"><a name="eqn6" id="eqn6"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>b</m:mi></m:munderover><m:mi>w</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mi>g</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8721;</m:mo><m:mrow><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:mrow><m:mi>N</m:mi></m:munderover><m:msub><m:mi>w</m:mi><m:mi>i</m:mi></m:msub><m:mi>g</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:mfenced><m:mtext>.</m:mtext>
</m:math></td><td class="formula-eqn2">
      (6)
     </td></tr></table></div>

If the integrand is known only at a fixed set of points, these points must be used as the abscissae, and the weighted sum is calculated using finite difference methods.  However, if the functional form of the integrand is known, so that its value at any abscissa is easily obtained, then a wide variety of quadrature rules are available, each characterised by its choice of abscissae and the corresponding weights.</div><div class="paramtext">The appropriate rule to use will depend on the interval <m:math><m:mfenced separators="" open="[" close="]"><m:mi>a</m:mi><m:mo>,</m:mo><m:mi>b</m:mi></m:mfenced></m:math>&#160;&#8211; whether finite or otherwise &#8211; and on the form of any <m:math><m:mi>w</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;factor in the integrand.  A suitable value of <m:math><m:mi>N</m:mi></m:math>&#160;depends on the general behaviour of <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>;  or of <m:math><m:mi>g</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>, if there is a <m:math><m:mi>w</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;factor present.</div><div class="paramtext">Among possible rules, we mention particularly the Gaussian formulae, which employ a distribution of abscissae which is optimal for <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;or <m:math><m:mi>g</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;of polynomial form.</div><div class="paramtext">The choice of basic rules constitutes one of the principles on which methods for one-dimensional integrals may be classified.  The other major basis of classification is the implementation strategy, of which some types are now presented.
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(a)</td>
<td valign="top">Single rule evaluation procedures
 <div class="paramtext">A fixed number of abscissae, <m:math><m:mi>N</m:mi></m:math>, is used.  This number and the particular rule chosen uniquely determine the weights and abscissae.  No estimate is made of the accuracy of the result.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(b)</td>
<td valign="top">Automatic procedures
 <div class="paramtext">The number of abscissae, <m:math><m:mi>N</m:mi></m:math>, within <m:math><m:mfenced separators="" open="[" close="]"><m:mi>a</m:mi><m:mo>,</m:mo><m:mi>b</m:mi></m:mfenced></m:math>&#160;is gradually increased until consistency is achieved to within a level of accuracy (absolute or relative) requested by you.  There are essentially two ways of doing this; hybrid forms of these two methods are also possible:
 <table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(i)</td>
<td valign="top">whole interval procedures (non-adaptive)
  <div class="paramtext">A series of rules using increasing values of <m:math><m:mi>N</m:mi></m:math>&#160;are successively applied over the whole interval <m:math><m:mfenced separators="" open="[" close="]"><m:mi>a</m:mi><m:mo>,</m:mo><m:mi>b</m:mi></m:mfenced></m:math>.  It is clearly more economical if abscissae already used for a lower value of <m:math><m:mi>N</m:mi></m:math>&#160;can be used again as part of a higher-order formula.  This principle is known as <b>optimal extension</b>.  There is no overlap between the abscissae used in Gaussian formulae of different orders.  However, the Kronrod formulae are designed to give an optimal  <m:math><m:mfenced separators=""><m:mn>2</m:mn><m:mi>N</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced></m:math>-point formula by adding <m:math><m:mfenced separators=""><m:mi>N</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced></m:math>&#160;points to an <m:math><m:mi>N</m:mi></m:math>-point Gauss formula.  Further extensions have been developed by Patterson.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(ii)</td>
<td valign="top">adaptive procedures
  <div class="paramtext">The interval <m:math><m:mfenced separators="" open="[" close="]"><m:mi>a</m:mi><m:mo>,</m:mo><m:mi>b</m:mi></m:mfenced></m:math>&#160;is repeatedly divided into a number of sub-intervals, and integration rules are applied separately to each sub-interval.  Typically, the subdivision process will be carried further in the neighbourhood of a sharp peak in the integrand than where the curve is smooth.  Thus, the distribution of abscissae is adapted to the shape of the integrand.</div>
  <div class="paramtext">Subdivision raises the problem of what constitutes an acceptable accuracy in each sub-interval.  The usual <b>global acceptability criterion</b> demands that the sum of the absolute values of the error estimates in the sub-intervals should meet the conditions required of the error over the whole interval.  Automatic extrapolation over several levels of subdivision may eliminate the effects of some types of singularities.</div></td>
</tr></table>
 </div></td>
</tr></table>
</div><div class="paramtext">An ideal general-purpose method would be an automatic method which could be used for a wide variety of integrands, was efficient (i.e., required the use of as few abscissae as possible), and was reliable (i.e., always gave results to within the requested accuracy).  Complete reliability is unobtainable, and generally higher reliability is obtained at the expense of efficiency, and vice versa.  <b>It must therefore be emphasised that the automatic routines in this chapter cannot be assumed to be <m:math><m:mn>100</m:mn><m:mo>%</m:mo></m:math>&#160;reliable.  In general, however, the reliability is very high.</b></div><h3 class="standard"><a class="sec" name="intbackground2" id="intbackground2"/>2.2&#160;&#160;Multidimensional Integrals</h3>
<div class="paramtext">A distinction must be made between cases of moderately low dimensionality  (say, up to <m:math><m:mn>4</m:mn></m:math>&#160;or <m:math><m:mn>5</m:mn></m:math>&#160;dimensions), and those of higher dimensionality.  Where the number of dimensions is limited, a one-dimensional method may be applied to each dimension, according to some suitable strategy, and high accuracy may be obtainable (using product rules).  However, the number of integrand evaluations rises very rapidly with the number of dimensions,  so that the accuracy obtainable with an acceptable amount of computational labour is limited; for example a product of <m:math><m:mn>3</m:mn></m:math>-point rules in <m:math><m:mn>20</m:mn></m:math>&#160;dimensions would require more than <m:math><m:msup><m:mn>10</m:mn><m:mn>9</m:mn></m:msup></m:math>&#160;integrand evaluations.  Special techniques such as the Monte&#8211;Carlo methods can be used to deal with high dimensions.

<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(a)</td>
<td valign="top">Products of one-dimensional rules
 <div class="paramtext">Using a two-dimensional integral as an example, we have

<div class="formula-eqn"><a name="eqn7" id="eqn7"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>1</m:mn></m:msub></m:munderover><m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>2</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>2</m:mn></m:msub></m:munderover><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>y</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>y</m:mi></m:mrow>
  <m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8721;</m:mo><m:mrow><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:mrow><m:mi>N</m:mi></m:munderover><m:msub><m:mi>w</m:mi><m:mi>i</m:mi></m:msub>
<m:mfenced open="[" close="]" separators=""><m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>2</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>2</m:mn></m:msub></m:munderover><m:mi>f</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub><m:mo>,</m:mo><m:mi>y</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>y</m:mi></m:mrow></m:mfenced>
</m:math></td><td class="formula-eqn2">
      (7)
     </td></tr></table></div><div class="formula-eqn"><a name="eqn8" id="eqn8"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>1</m:mn></m:msub></m:munderover><m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>2</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>2</m:mn></m:msub></m:munderover><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>y</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>y</m:mi></m:mrow>
  <m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8721;</m:mo><m:mrow><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:mrow><m:mi>N</m:mi></m:munderover><m:munderover><m:mo>&#8721;</m:mo><m:mrow><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:mrow><m:mi>N</m:mi></m:munderover><m:msub><m:mi>w</m:mi><m:mi>i</m:mi></m:msub><m:msub><m:mi>v</m:mi><m:mi>j</m:mi></m:msub><m:mi>f</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub><m:mo>,</m:mo><m:msub><m:mi>y</m:mi><m:mi>j</m:mi></m:msub></m:mfenced>
</m:math></td><td class="formula-eqn2">
      (8)
     </td></tr></table></div>

where <m:math><m:mfenced separators=""><m:msub><m:mi>w</m:mi><m:mi>i</m:mi></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:mfenced></m:math>&#160;and <m:math><m:mfenced separators=""><m:msub><m:mi>v</m:mi><m:mi>i</m:mi></m:msub><m:mo>,</m:mo><m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub></m:mfenced></m:math>&#160;are the weights and abscissae of the rules used in the respective dimensions.</div>
 <div class="paramtext">A different one-dimensional rule may be used for each dimension, as appropriate to the range and any weight function present, and a different strategy may be used, as appropriate to the integrand behaviour as a function of each independent variable.</div>
 <div class="paramtext">For a rule-evaluation strategy in all dimensions, the formula  <a class="eqn" href="#eqn8">(8)</a> is applied in a straightforward manner.  For automatic strategies (i.e., attempting to attain a requested accuracy),  there is a problem in deciding what accuracy must be requested in the inner integral(s).  Reference to formula <a class="eqn" href="#eqn7">(7)</a> shows that the presence of a limited but random error in the <m:math><m:mi>y</m:mi></m:math>-integration for different values of <m:math><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;can produce a &#8216;jagged&#8217;  function of <m:math><m:mi>x</m:mi></m:math>, which may be difficult to integrate to the desired accuracy and for this reason products of automatic one-dimensional  routines should be used with caution (see <a class="ref" href="#ref203">Lyness (1983)</a>).</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(b)</td>
<td valign="top">Monte&#8211;Carlo methods
 <div class="paramtext">These are based on estimating the mean value of the integrand sampled at points chosen from an appropriate statistical distribution function.  Usually a variance reducing procedure is incorporated to combat the fundamentally slow rate of convergence of the rudimentary form of the technique.  These methods can be effective by comparison with alternative methods when the integrand contains singularities or is erratic in some way, but they are of quite limited accuracy.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(c)</td>
<td valign="top">Number theoretic methods
 <div class="paramtext">These are based on the work of Korobov and Conroy and operate by exploiting implicitly the properties of the Fourier expansion of the integrand.  Special rules, constructed from so-called optimal coefficients, give a particularly uniform distribution of the points throughout <m:math><m:mi>n</m:mi></m:math>-dimensional space and from their number theoretic properties minimize the error on a prescribed class of integrals.  The method can be combined with the Monte&#8211;Carlo procedure.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(d)</td>
<td valign="top">Sag&#8211;Szekeres method
 <div class="paramtext">By transformation this method seeks to induce properties into the integrand which make it accurately integrable by the trapezoidal rule.  The transformation also allows effective control over the number of integrand evaluations.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(e)</td>
<td valign="top">Automatic adaptive procedures
 <div class="paramtext">An automatic adaptive strategy in several dimensions normally involves division of the region into subregions, concentrating the divisions in those parts of the region where the integrand is worst behaved.  It is difficult to arrange with any generality for variable limits in the inner integral(s).  For this reason, some methods use a region where all the limits are constants; this is called a hyper-rectangle.  Integrals over regions defined by variable or infinite limits may be handled by transformation to a hyper-rectangle.  Integrals over regions so irregular that such a transformation is not feasible may be handled by surrounding the region by an appropriate hyper-rectangle and defining the integrand to be zero outside the desired region.  Such a technique should always be followed by a Monte&#8211;Carlo method for integration.</div>
 <div class="paramtext">The method used locally in each subregion produced by the adaptive subdivision process is usually one of three types: Monte&#8211;Carlo, number theoretic or deterministic.  Deterministic methods are usually the most rapidly convergent but are often expensive to use for high dimensionality and not as robust as the other techniques.</div></td>
</tr></table>
</div><h2 class="standard"><a class="sec" name="available" id="available"/>3&#160;&#160;Recommendations on Choice and Use of Available Routines</h2>
<div class="paramtext">The following three sub-sections consider in turn routines for: one-dimensional integrals over a finite interval, and over a semi-infinite or an infinite interval; and multidimensional integrals.  Within each sub-section, routines are classified by the type of method, which ranges from simple rule evaluation to automatic adaptive algorithms.  The recommendations apply particularly when the primary objective is simply to compute the value of one or more integrals, and in these cases the automatic adaptive routines are generally the most convenient and reliable, although also the most expensive in computing time.</div><div class="paramtext">Note however that in some circumstances it may be counter-productive to use an automatic routine.  If the results of the quadrature are to be used in turn as input to a further computation (e.g., an &#8216;outer&#8217; quadrature or an optimization problem), then this further computation may be adversely affected by the &#8216;jagged performance profile&#8217; of an automatic routine; a simple rule-evaluation routine may provide much better overall performance.  For further guidance, the article by <a class="ref" href="#ref203">Lyness (1983)</a> is recommended.</div><h3 class="standard"><a class="sec" name="intrecomm_1" id="intrecomm_1"/>3.1&#160;&#160;One-dimensional Integrals over a Finite Interval</h3>
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(a)</td>
<td valign="top">Integrand defined at a set of points
 <div class="paramtext">If <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is defined numerically at four or more points, then the Gill&#8211;Miller finite difference method  (<a class="rout" href="../D01/d01gaf.xml">D01GAF</a>) should be used.  The interval of integration is taken to coincide with the range of <m:math><m:mi>x</m:mi></m:math>&#160;values of the points supplied.  It is in the nature of this problem that any routine may be unreliable.  In order to check results independently and so as to provide an alternative technique you may fit the integrand by Chebyshev series using <a class="rout" href="../E02/e02adf.xml">E02ADF</a> and then use routines <a class="rout" href="../E02/e02ajf.xml">E02AJF</a> and <a class="rout" href="../E02/e02akf.xml">E02AKF</a> to evaluate its integral (which need not be restricted to the range of the integration points, as is the case for <a class="rout" href="../D01/d01gaf.xml">D01GAF</a>).  A further alternative is to fit a cubic spline to the data using  <a class="rout" href="../E02/e02baf.xml">E02BAF</a> and then to evaluate its integral using <a class="rout" href="../E02/e02bdf.xml">E02BDF</a>.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(b)</td>
<td valign="top">Integrand defined as a function
 <div class="paramtext">If the functional form of <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is known, then one of the following approaches should be taken.  They are arranged in the order from most specific to most general, hence the first applicable procedure in the list will be the most efficient.  <b>However, if you do not wish to make any assumptions about the integrand, the most reliable routines to use will be <a class="rout" href="../D01/d01ajf.xml">D01AJF</a> (or <a class="rout" href="../D01/d01atf.xml">D01ATF</a>) 
, <a class="rout" href="../D01/d01ahf.xml">D01AHF</a> and <a class="rout" href="../D01/d01alf.xml">D01ALF</a>,

although these will in general be less efficient for simple integrals.</b>
 <table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(i)</td>
<td valign="top">Rule-evaluation routines
  <div class="paramtext">If <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is known to be sufficiently well behaved (more precisely, can be closely approximated by a polynomial of moderate degree),  a Gaussian routine with a suitable number of abscissae may be used.</div>
  
  <div class="paramtext"><a class="rout" href="../D01/d01bbf.xml">D01BBF</a> or <a class="rout" href="../D01/d01bcf.xml">D01BCF</a>  with  <a class="rout" href="../D01/d01fbf.xml">D01FBF</a> may be used if it is required to examine the weights and abscissae.</div>
  <div class="paramtext"><a class="rout" href="../D01/d01bbf.xml">D01BBF</a> is faster and more accurate, whereas  <a class="rout" href="../D01/d01bcf.xml">D01BCF</a> is more general.</div>
  <div class="paramtext">If <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is well behaved, apart from a weight-function of the form

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msup>
<m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mfrac><m:mrow><m:mi>a</m:mi><m:mo>+</m:mo><m:mi>b</m:mi></m:mrow><m:mn>2</m:mn></m:mfrac></m:mfenced>
<m:mi>c</m:mi></m:msup><m:mtext>&#8195; or &#8195;</m:mtext><m:msup><m:mfenced separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>x</m:mi></m:mfenced><m:mi>c</m:mi></m:msup><m:msup><m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced><m:mi>d</m:mi></m:msup><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div><a class="rout" href="../D01/d01bcf.xml">D01BCF</a> with <a class="rout" href="../D01/d01fbf.xml">D01FBF</a> may be used.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(ii)</td>
<td valign="top">Automatic whole-interval routines
  <div class="paramtext">If <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is reasonably smooth, and the required accuracy is not too high, the automatic whole-interval routines  <a class="rout" href="../D01/d01arf.xml">D01ARF</a> or <a class="rout" href="../D01/d01bdf.xml">D01BDF</a>  may be used.  <a class="rout" href="../D01/d01arf.xml">D01ARF</a> incorporates high-order extensions of the Kronrod rule and is the only routine which can also be used for indefinite integration.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(iii)</td>
<td valign="top">Automatic adaptive routines
  <div class="paramtext">Firstly, several routines are available for integrands of the form <m:math><m:mi>w</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mi>g</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;where <m:math><m:mi>g</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is a &#8216;smooth&#8217;  function (i.e., has no singularities, sharp peaks or violent oscillations in the interval of integration) and <m:math><m:mi>w</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is a weight function of one of the following forms.
 <ol class="listnumber"><li class="listnumber">if <m:math><m:mi>w</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:msup>
<m:mfenced separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>x</m:mi></m:mfenced>
<m:mi>&#945;</m:mi></m:msup><m:msup>
<m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced>
<m:mi>&#946;</m:mi></m:msup>   <m:msup><m:mfenced separators=""><m:mrow><m:mi>log</m:mi><m:mfenced separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>x</m:mi></m:mfenced></m:mrow></m:mfenced><m:mi>k</m:mi></m:msup><m:msup><m:mfenced separators=""><m:mrow><m:mi>log</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced></m:mrow></m:mfenced><m:mi>l</m:mi></m:msup></m:math>,  where <m:math><m:mi>k</m:mi><m:mo>,</m:mo><m:mi>l</m:mi><m:mo>=</m:mo><m:mn>0</m:mn><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>, <m:math><m:mi>&#945;</m:mi><m:mo>,</m:mo><m:mi>&#946;</m:mi><m:mo>&gt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>:  use 
<a class="rout" href="../D01/d01apf.xml">D01APF</a>;</li><li class="listnumber">if <m:math><m:mi>w</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mfrac><m:mn>1</m:mn><m:mrow><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>c</m:mi></m:mrow>
 </m:mfrac>
</m:math>: use 
<a class="rout" href="../D01/d01aqf.xml">D01AQF</a> 
 
(this integral is called the Hilbert transform of <m:math><m:mi>g</m:mi></m:math>);</li><li class="listnumber">if <m:math><m:mi>w</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mrow><m:mi>cos</m:mi><m:mfenced separators=""><m:mi>&#969;</m:mi><m:mi>x</m:mi></m:mfenced></m:mrow></m:math>&#160;or <m:math><m:mrow><m:mi>sin</m:mi><m:mfenced separators=""><m:mi>&#969;</m:mi><m:mi>x</m:mi></m:mfenced></m:mrow></m:math>: use <a class="rout" href="../D01/d01anf.xml">D01ANF</a> (this routine can also handle certain types of singularities in <m:math><m:mi>g</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>).</li></ol>
  </div>
  <div class="paramtext">Secondly, there are some routines for general <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>.  If  <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is known to be free of singularities, though it may be oscillatory, <a class="rout" href="../D01/d01akf.xml">D01AKF</a> or <a class="rout" href="../D01/d01auf.xml">D01AUF</a> may be used.</div>
  <div class="paramtext">The most powerful of the finite interval integration routines are 
<a class="rout" href="../D01/d01ajf.xml">D01AJF</a> and <a class="rout" href="../D01/d01atf.xml">D01ATF</a>,
 which can cope with singularities of several types, and <a class="rout" href="../D01/d01ahf.xml">D01AHF</a> and <a class="rout" href="../D01/d01alf.xml">D01ALF</a>.
They may be used if none of the more specific situations described above 
applies. <a class="rout" href="../D01/d01ahf.xml">D01AHF</a> and <a class="rout" href="../D01/d01alf.xml">D01ALF</a> are likely to be more efficient, whereas  <a class="rout" href="../D01/d01ajf.xml">D01AJF</a> and <a class="rout" href="../D01/d01atf.xml">D01ATF</a> are
 
somewhat more reliable, particularly where the integrand has singularities other than at an end point, or has discontinuities or cusps, and are therefore recommended where the integrand is known to be badly 
behaved where its nature is completely unknown.

It may sometimes be useful to use both routines as a check.</div>
  <div class="paramtext">Most of the routines in this chapter require you to supply a function or subroutine to evaluate the integrand at a single point.
<a class="rout" href="../D01/d01atf.xml">D01ATF</a> and <a class="rout" href="../D01/d01auf.xml">D01AUF</a> use the same methods as <a class="rout" href="../D01/d01ajf.xml">D01AJF</a> and <a class="rout" href="../D01/d01akf.xml">D01AKF</a> respectively, but have a different user interface which can result in faster execution,  especially on vector-processing machines (see <a class="ref" href="#ref202">Gladwell (1986)</a>).  They require you to provide a subroutine  to return an array of values of the integrand at each of an array of points.  This reduces the overhead of function calls, avoids repetition of computations common to each of the integrand evaluations, and offers greater scope for vectorization of your code.</div>
  <div class="paramtext">If <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;has singularities of certain types, discontinuities (including switches in definition) or sharp peaks <b>occurring at known points</b>, the integral should be evaluated separately over each of the subranges or 
<a class="rout" href="../D01/d01alf.xml">D01ALF</a>

  may be used.</div></td>
</tr></table>
 </div></td>
</tr></table><h3 class="standard"><a class="sec" name="intrecomm_2" id="intrecomm_2"/>3.2&#160;&#160;One-dimensional Integrals over a Semi-infinite or Infinite Interval</h3>
<div class="paramtext">
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline"><a name="intrecomm_2_a" id="intrecomm_2_a"/>(a)</td>
<td valign="top">Integrand defined at a set of points
 <div class="paramtext">If <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is defined numerically at four or more points,  and the portion of the integral lying outside the range of the points supplied may be neglected, then the Gill&#8211;Miller finite difference method,  <a class="rout" href="../D01/d01gaf.xml">D01GAF</a>, should be used.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline"><a name="intrecomm_2_b" id="intrecomm_2_b"/>(b)</td>
<td valign="top">Integrand defined as a function
 <table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline"><a name="intrecomm_2_b_i" id="intrecomm_2_b_i"/>(i)</td>
<td valign="top">Rule evaluation routines
  <div class="paramtext">If <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;behaves approximately like a polynomial in  <m:math><m:mi>x</m:mi></m:math>, apart from a weight function of the form:
  <ol class="listnumber"><li class="listnumber"><m:math><m:msup><m:mi>e</m:mi><m:mrow><m:mo>-</m:mo><m:mi>&#946;</m:mi><m:mi>x</m:mi></m:mrow></m:msup><m:mo>,</m:mo><m:mi>&#946;</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>&#160;(semi-infinite interval, lower limit finite); or</li><li class="listnumber"><m:math><m:msup><m:mi>e</m:mi><m:mrow><m:mo>-</m:mo><m:mi>&#946;</m:mi><m:mi>x</m:mi></m:mrow></m:msup><m:mo>,</m:mo><m:mi>&#946;</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;(semi-infinite interval,  upper limit finite); or</li><li class="listnumber"><m:math><m:msup><m:mi>e</m:mi><m:mrow><m:mo>-</m:mo><m:mi>&#946;</m:mi><m:msup>
<m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>&#945;</m:mi></m:mfenced>
<m:mn>2</m:mn></m:msup></m:mrow></m:msup><m:mo>,</m:mo><m:mi>&#946;</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>&#160;(infinite interval),</li></ol>
or if <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;behaves approximately like a polynomial in  <m:math><m:msup><m:mfenced separators=""><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>b</m:mi></m:mfenced><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup></m:math>&#160;(semi-infinite range), then the Gaussian  routines may be used.</div>
  <div class="paramtext"><a class="rout" href="../D01/d01baf.xml">D01BAF</a>

 may be used if it is not required to examine the weights and abscissae.</div>
  <div class="paramtext"><a class="rout" href="../D01/d01bbf.xml">D01BBF</a> or <a class="rout" href="../D01/d01bcf.xml">D01BCF</a>  with  <a class="rout" href="../D01/d01fbf.xml">D01FBF</a> may be used if it is required to examine the weights and abscissae.</div>
  <div class="paramtext"><a class="rout" href="../D01/d01bbf.xml">D01BBF</a> is faster and more accurate, whereas  <a class="rout" href="../D01/d01bcf.xml">D01BCF</a> is more general.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline"><a name="intrecomm_2_b_ii" id="intrecomm_2_b_ii"/>(ii)</td>
<td valign="top">Automatic adaptive routines
  <div class="paramtext"><a class="rout" href="../D01/d01amf.xml">D01AMF</a>

 may be used, except for integrands which decay slowly towards an infinite end point, and oscillate in sign over the entire range.  For this class, it may be possible to calculate the integral by integrating between the zeros and invoking some extrapolation process (see <a class="rout" href="../C06/c06baf.xml">C06BAF</a>).</div>
  <div class="paramtext"><a class="rout" href="../D01/d01asf.xml">D01ASF</a>

 may be used for integrals involving weight functions of the form <m:math><m:mrow><m:mi>cos</m:mi><m:mfenced separators=""><m:mi>&#969;</m:mi><m:mi>x</m:mi></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:mi>sin</m:mi><m:mfenced separators=""><m:mi>&#969;</m:mi><m:mi>x</m:mi></m:mfenced></m:mrow></m:math>&#160;over a semi-infinite interval (lower limit finite).</div>
  <div class="paramtext">The following alternative procedures are mentioned for completeness, though their use will rarely be necessary.
  <ol class="listnumber"><li class="listnumber">If the integrand decays rapidly towards an infinite end point, a finite cut-off may be chosen, and the finite range methods applied.</li><li class="listnumber">If the only irregularities occur in the finite part (apart from a singularity at the finite limit, with which 
<a class="rout" href="../D01/d01amf.xml">D01AMF</a>

  can cope), the range may be divided, with 
<a class="rout" href="../D01/d01amf.xml">D01AMF</a> used on the infinite part.</li><li class="listnumber">A transformation to finite range may be employed,e.g.,

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>x</m:mi><m:mo>=</m:mo><m:mfrac><m:mrow><m:mn>1</m:mn><m:mo>-</m:mo><m:mi>t</m:mi></m:mrow><m:mi>t</m:mi></m:mfrac><m:mtext>&#8195; or &#8195;</m:mtext><m:mi>x</m:mi><m:mo>=</m:mo><m:mo>-</m:mo><m:mrow><m:msub><m:mi mathvariant="normal">log</m:mi><m:mi>e</m:mi></m:msub><m:mo>&#8289;</m:mo><m:mi>t</m:mi></m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>

will transform <m:math><m:mfenced separators=""><m:mn>0</m:mn><m:mo>,</m:mo><m:mi>&#8734;</m:mi></m:mfenced></m:math>&#160;to <m:math><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>0</m:mn></m:mfenced></m:math>&#160;while for infinite ranges we have

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:munderover><m:mo>&#8747;</m:mo><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow><m:mi>&#8734;</m:mi></m:munderover><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mo>=</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mn>0</m:mn><m:mi>&#8734;</m:mi></m:munderover><m:mfenced separators=""><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>+</m:mo><m:mi>f</m:mi><m:mfenced separators=""><m:mo>-</m:mo><m:mi>x</m:mi></m:mfenced></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

If the integrand behaves badly on <m:math><m:mfenced separators=""><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow><m:mo>,</m:mo><m:mn>0</m:mn></m:mfenced></m:math>&#160;and well on  <m:math><m:mfenced separators=""><m:mn>0</m:mn><m:mo>,</m:mo><m:mi>&#8734;</m:mi></m:mfenced></m:math>&#160;or vice versa it is better to compute it as <m:math><m:mstyle displaystyle="true"><m:munderover><m:mo>&#8747;</m:mo><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow><m:mn>0</m:mn></m:munderover></m:mstyle><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mo>+</m:mo><m:mstyle displaystyle="true"><m:munderover><m:mo>&#8747;</m:mo><m:mn>0</m:mn><m:mi>&#8734;</m:mi></m:munderover></m:mstyle><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow></m:math>.  This saves computing unnecessary function values in the semi-infinite range where the function is well behaved.</li></ol>
  </div></td>
</tr></table></td>
</tr></table>
</div><h3 class="standard"><a class="sec" name="intrecomm_3" id="intrecomm_3"/>3.3&#160;&#160;Multidimensional Integrals</h3>
<div class="paramtext">A number of techniques are available in this area and the choice depends to a large extent on the dimension and the required accuracy.  It can be advantageous to use more than one technique as a confirmation of accuracy particularly for high-dimensional integrations.  Two of the routines incorporate a transformation procedure, using a user-supplied subroutine REGION, which allows general product regions to be easily dealt with in terms of conversion to the standard <m:math><m:mi>n</m:mi></m:math>-cube region.</div><table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(a)</td>
<td valign="top">Products of one-dimensional rules (suitable for up to about <m:math><m:mn>5</m:mn></m:math>&#160;dimensions)
 <div class="paramtext">If <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mfenced></m:math>&#160;is known to be a sufficiently well behaved function of each variable <m:math><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:math>, apart possibly from weight functions of the types provided, a product of Gaussian rules may be used.  These are provided by <a class="rout" href="../D01/d01bbf.xml">D01BBF</a> or <a class="rout" href="../D01/d01bcf.xml">D01BCF</a>  with <a class="rout" href="../D01/d01fbf.xml">D01FBF</a>.  Rules for finite,  semi-infinite and infinite ranges are included.</div>
 <div class="paramtext">For two-dimensional integrals only, unless the integrand is very badly behaved, the automatic whole-interval product procedure of <a class="rout" href="../D01/d01daf.xml">D01DAF</a> may be used.  The limits of the inner integral may be user-specified functions of the outer variable.  Infinite limits may be handled by transformation (see   <a class="sec" href="#intrecomm_2">Section 3.2</a>); end point singularities introduced by transformation should not be troublesome, as the integrand value will not be required on the boundary of the region.</div>
 <div class="paramtext">If none of these routines proves suitable and convenient, the one-dimensional routines may be used recursively.  For example, the two-dimensional integral

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>I</m:mi><m:mo>=</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>1</m:mn></m:msub></m:munderover><m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>2</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>2</m:mn></m:msub></m:munderover><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>y</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>y</m:mi></m:mrow>
  <m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>

may be expressed as

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>I</m:mi><m:mo>=</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>1</m:mn></m:msub></m:munderover>
<m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>, &#8195; where &#8195;</m:mtext>
<m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>2</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>2</m:mn></m:msub></m:munderover> <m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>y</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>y</m:mi></m:mrow><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

The user-supplied code to evaluate <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;will call the integration routine for the <m:math><m:mi>y</m:mi></m:math>-integration, which will call more user-supplied code for <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>y</m:mi></m:mfenced></m:math>&#160;as a function of <m:math><m:mi>y</m:mi></m:math>&#160;(<m:math><m:mi>x</m:mi></m:math>&#160;being effectively a constant).  Note that, for reasons of efficiency and robustness the integration routines are not defined as recursive, and thus <b>a different library integration routine must be used for each dimension</b>.  Apart from this restriction, the following combinations are not permitted:
<a class="rout" href="../D01/d01ajf.xml">D01AJF</a> and <a class="rout" href="../D01/d01alf.xml">D01ALF</a>,
<a class="rout" href="../D01/d01anf.xml">D01ANF</a> and <a class="rout" href="../D01/d01apf.xml">D01APF</a>,
<a class="rout" href="../D01/d01apf.xml">D01APF</a> and <a class="rout" href="../D01/d01aqf.xml">D01AQF</a>,
<a class="rout" href="../D01/d01anf.xml">D01ANF</a> and <a class="rout" href="../D01/d01aqf.xml">D01AQF</a>,
<a class="rout" href="../D01/d01anf.xml">D01ANF</a> and <a class="rout" href="../D01/d01asf.xml">D01ASF</a>,
<a class="rout" href="../D01/d01amf.xml">D01AMF</a> and <a class="rout" href="../D01/d01asf.xml">D01ASF</a>,
<a class="rout" href="../D01/d01atf.xml">D01ATF</a> and <a class="rout" href="../D01/d01auf.xml">D01AUF</a>.  Otherwise the full range of one-dimensional routines are available, for finite/infinite intervals, constant/variable limits, rule evaluation/automatic strategies etc.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(b)</td>
<td valign="top">Sag&#8211;Szekeres method
 <div class="paramtext">Two routines are based on this method.</div>
 <div class="paramtext"><a class="rout" href="../D01/d01fdf.xml">D01FDF</a> is particularly suitable for integrals of very large dimension although the accuracy is generally not high.  It allows integration over either the general product region (with built-in transformation to the <m:math><m:mi>n</m:mi></m:math>-cube) or the <m:math><m:mi>n</m:mi></m:math>-sphere.  Although no error estimate is provided, two adjustable parameters may be varied for checking purposes or may be used to tune the algorithm to particular integrals.</div>
 <div class="paramtext"><a class="rout" href="../D01/d01jaf.xml">D01JAF</a> is also based on the Sag&#8211;Szekeres method and integrates over the <m:math><m:mi>n</m:mi></m:math>-sphere.  It uses improved transformations which may be varied according to the behaviour of the integrand.  Although it can yield very accurate results it can only practically be employed for dimensions not exceeding <m:math><m:mn>4</m:mn></m:math>.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(c)</td>
<td valign="top">Number Theoretic method
 <div class="paramtext">Two routines are based on this method.</div>
 <div class="paramtext"><a class="rout" href="../D01/d01gcf.xml">D01GCF</a> carries out multiple integration using the Korobov&#8211;Conroy method over a product region with built-in transformation to the <m:math><m:mi>n</m:mi></m:math>-cube.  A stochastic modification of this method is incorporated hybridising the technique with the Monte&#8211;Carlo procedure.  An error estimate is provided in terms of the statistical standard error.  The routine includes a number of optimal coefficient rules for up to <m:math><m:mn>20</m:mn></m:math>&#160;dimensions; others can be computed using  <a class="rout" href="../D01/d01gyf.xml">D01GYF</a> and <a class="rout" href="../D01/d01gzf.xml">D01GZF</a>.  Like the Sag&#8211;Szekeres method it is suitable for large dimensional integrals although the accuracy is not high.</div>
 <div class="paramtext"><a class="rout" href="../D01/d01gdf.xml">D01GDF</a> uses the same method as  <a class="rout" href="../D01/d01gcf.xml">D01GCF</a>, but has a different interface which can result in faster execution, especially on vector-processing machines.  You are required to provide two subroutines, the first to return an array of values of the integrand at each of an array of points, and the second to evaluate the limits of integration at each of an array of points.  This reduces the overhead of function calls, avoids repetitions of computations common to each of the evaluations of the integral and limits of integration,  and offers greater scope for vectorization of your code.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(d)</td>
<td valign="top">A combinatorial extrapolation method
 <div class="paramtext"><a class="rout" href="../D01/d01paf.xml">D01PAF</a> computes a sequence of approximations and an error estimate to the integral of a function over a multidimensional simplex using a combinatorial method with extrapolation.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(e)</td>
<td valign="top">Automatic routines 
(<a class="rout" href="../D01/d01fcf.xml">D01FCF</a> and <a class="rout" href="../D01/d01gbf.xml">D01GBF</a>)

 <div class="paramtext">Both routines are for integrals of the form
 
<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
  <m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>1</m:mn></m:msub></m:munderover>
  <m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>2</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>2</m:mn></m:msub></m:munderover>
  <m:mo>&#8943;</m:mo>
  <m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mi>n</m:mi></m:msub><m:msub><m:mi>b</m:mi><m:mi>n</m:mi></m:msub></m:munderover>
  <m:mi>f</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mfenced><m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mrow><m:mi>n</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>&#8943;</m:mo><m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:mrow><m:mtext>.</m:mtext>
 </m:math></td><td class="formula2"/></tr></table></div></div>
 <div class="paramtext">
<a class="rout" href="../D01/d01gbf.xml">D01GBF</a>

 is an adaptive Monte&#8211;Carlo routine.  This routine is usually slow and not recommended for high-accuracy work.  It is a robust routine that can often be used for low-accuracy results with highly irregular integrands or when <m:math><m:mi>n</m:mi></m:math>&#160;is large.</div>
 <div class="paramtext"><a class="rout" href="../D01/d01fcf.xml">D01FCF</a>

 is an adaptive deterministic routine.  Convergence is fast for well behaved integrands.  Highly accurate results can often be obtained for <m:math><m:mi>n</m:mi></m:math>&#160;between <m:math><m:mn>2</m:mn></m:math>&#160;and <m:math><m:mn>5</m:mn></m:math>, using significantly fewer integrand evaluations than would be required by 
<a class="rout" href="../D01/d01gbf.xml">D01GBF</a>.

  The routine will usually work when the integrand is mildly singular and for <m:math><m:mi>n</m:mi><m:mo>&#8804;</m:mo><m:mn>10</m:mn></m:math>&#160;should be used before 
<a class="rout" href="../D01/d01gbf.xml">D01GBF</a>.

If it is known in advance that the integrand is highly irregular, it is best to compare results from at least two different routines.</div>
 <div class="paramtext">There are many problems for which one or both of the routines will require large amounts of computing time to obtain even moderately accurate results.  The amount of computing time is controlled by the number of integrand evaluations allowed by you, and you should set this parameter carefully, with reference to the time available and the accuracy desired.</div>
 <div class="paramtext"><a class="rout" href="../D01/d01eaf.xml">D01EAF</a> extends the technique of <a class="rout" href="../D01/d01fcf.xml">D01FCF</a> to integrate adaptively more than one integrand, that is to calculate the set of integrals
 
<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
  <m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>1</m:mn></m:msub></m:munderover>
  <m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>2</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>2</m:mn></m:msub></m:munderover>
  <m:mo>&#8943;</m:mo>
  <m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mi>n</m:mi></m:msub><m:msub><m:mi>b</m:mi><m:mi>n</m:mi></m:msub></m:munderover>
 <m:mfenced separators=""><m:msub><m:mi>f</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>f</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>f</m:mi><m:mi>m</m:mi></m:msub></m:mfenced>  <m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mrow><m:mi>n</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>&#8943;</m:mo><m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:mrow></m:math></td><td class="formula2"/></tr></table></div>

 for a set of similar integrands <m:math><m:msub><m:mi>f</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>f</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>f</m:mi><m:mi>m</m:mi></m:msub></m:math>&#160;where <m:math><m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mfenced></m:math>.</div></td>
</tr></table><h2 class="standard"><a class="sec" name="dtree" id="dtree"/>4&#160;&#160;Decision Trees</h2>
<h3 class="sec"><a name="tree1" id="tree1"/>Tree 1: One-dimensional integrals over a finite interval
</h3>
<table class="dtree">
<tr>
<td class="dtentry">Is the functional form of the integrand known?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is indefinite integration required?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01arf.xml">D01ARF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Are you concerned with efficiency for simple integrals?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is the integrand smooth (polynomial-like) apart from weight function <m:math><m:msup><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mfenced separators=""><m:mi>a</m:mi><m:mo>+</m:mo><m:mi>b</m:mi></m:mfenced><m:mo>/</m:mo><m:mn>2</m:mn></m:mfenced><m:mi>c</m:mi></m:msup></m:math>&#160;or <m:math><m:msup>
<m:mfenced separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>x</m:mi></m:mfenced>
<m:mi>c</m:mi></m:msup><m:msup>
<m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced>
<m:mi>d</m:mi></m:msup></m:math>?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01arf.xml">D01ARF</a>, <a class="rout" href="../D01/d01baf.xml">D01BAF</a>, <a class="rout" href="../D01/d01bbf.xml">D01BBF</a> or <a class="rout" href="../D01/d01bcf.xml">D01BCF</a> and <a class="rout" href="../D01/d01fbf.xml">D01FBF</a>, or <a class="rout" href="../D01/d01gcf.xml">D01GCF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is the integrand reasonably smooth and the required accuracy not too great?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01bdf.xml">D01BDF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Has the integrand discontinuities, sharp peaks or singularities at known points other than the end points?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Split the range and begin again; or use <a class="rout" href="../D01/d01alf.xml">D01ALF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is the integrand free of singularities, sharp peaks and violent oscillations apart from weight function <m:math>
	      <m:msup>
	       <m:mfenced separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>x</m:mi></m:mfenced>
	       <m:mi>&#945;</m:mi>
	      </m:msup>
	      <m:msup>
	       <m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced>
	       <m:mi>&#946;</m:mi>
	      </m:msup>
	      <m:mspace linebreak="newline"/>
	      <m:msup>
	       <m:mfenced separators=""><m:mrow><m:mi>log</m:mi><m:mfenced separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>x</m:mi></m:mfenced></m:mrow></m:mfenced>
	       <m:mi>k</m:mi>
	      </m:msup>
	      <m:msup>
	       <m:mfenced separators=""><m:mrow><m:mi>log</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced></m:mrow></m:mfenced>
	       <m:mi>l</m:mi>
	      </m:msup>
	      </m:math>?
	     </td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01apf.xml">D01APF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is the integrand free of singularities, sharp peaks and violent oscillations apart from weight function <m:math><m:mfrac><m:mn>1</m:mn><m:mrow><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>c</m:mi></m:mrow>
 </m:mfrac>
</m:math>?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01aqf.xml">D01AQF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is the integrand free of violent oscillations apart from weight function <m:math><m:mrow><m:mi>cos</m:mi><m:mfenced separators=""><m:mi>&#969;</m:mi><m:mi>x</m:mi></m:mfenced></m:mrow></m:math>&#160;or <m:math><m:mrow><m:mi>sin</m:mi><m:mfenced separators=""><m:mi>&#969;</m:mi><m:mi>x</m:mi></m:mfenced></m:mrow></m:math>?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01anf.xml">D01ANF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is the integrand free of singularities?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01akf.xml">D01AKF</a> or <a class="rout" href="../D01/d01auf.xml">D01AUF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is the integrand free of discontinuities and of singularities except possibly at the end points?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01ahf.xml">D01AHF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../D01/d01ajf.xml">D01AJF</a> or <a class="rout" href="../D01/d01atf.xml">D01ATF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../D01/d01ahf.xml">D01AHF</a>, <a class="rout" href="../D01/d01ajf.xml">D01AJF</a> or <a class="rout" href="../D01/d01atf.xml">D01ATF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry"><a class="rout" href="../D01/d01gaf.xml">D01GAF</a></td></tr></table><div class="paramtext"><b>Note:</b> <a class="rout" href="../D01/d01atf.xml">D01ATF</a> and <a class="rout" href="../D01/d01auf.xml">D01AUF</a> are likely to be more efficient than <a class="rout" href="../D01/d01ajf.xml">D01AJF</a> and <a class="rout" href="../D01/d01akf.xml">D01AKF</a>, which use a more conventional user-interface, consistent with other routines in the chapter.</div>
<h3 class="sec"><a name="tree2" id="tree2"/>Tree 2: One-dimensional integrals over a semi-infinite or infinite interval
</h3>
<table class="dtree">
<tr>
<td class="dtentry">Is the functional form of the integrand known?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Are you concerned with efficiency for simple integrands?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is the integrand smooth (polynomial-like) with no exceptions?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01bdf.xml">D01BDF</a>, <a class="rout" href="../D01/d01arf.xml">D01ARF</a> with transformation. See <a class="sec" href="#intrecomm_2">Section 3.2</a> <a class="item" href="#intrecomm_2_b">(b)</a><a class="item" href="#intrecomm_2_b_ii">(ii)</a>.</td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is the integrand smooth (polynomial-like) apart from weight function <m:math><m:msup><m:mi>e</m:mi><m:mrow><m:mo>-</m:mo><m:mi>&#946;</m:mi>
<m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:mrow></m:msup></m:math>&#160;(semi-infinite range) or <m:math><m:msup><m:mi>e</m:mi><m:msup><m:mrow><m:mo>-</m:mo><m:mi>&#946;</m:mi>
<m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced>
</m:mrow><m:mn>2</m:mn></m:msup></m:msup></m:math>&#160;(infinite range) or is the integrand polynomial-like in <m:math><m:mfrac><m:mn>1</m:mn><m:mrow><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>b</m:mi></m:mrow></m:mfrac></m:math>? (semi-infinite range)?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01baf.xml">D01BAF</a>, <a class="rout" href="../D01/d01bbf.xml">D01BBF</a> and <a class="rout" href="../D01/d01fbf.xml">D01FBF</a> or <a class="rout" href="../D01/d01bcf.xml">D01BCF</a> and <a class="rout" href="../D01/d01fbf.xml">D01FBF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Has integrand discontinuities, sharp peaks or singularities at known points other than a finite limit?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Split range; begin again using finite or infinite range trees</td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Does the integrand oscillate over the entire range?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Does the integrand decay rapidly towards an infinite limit?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Use <a class="rout" href="../D01/d01amf.xml">D01AMF</a>; or set cutoff and use finite range tree</td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is the integrand free of violent oscillations apart from weight function <m:math><m:mrow><m:mi>cos</m:mi><m:mfenced separators=""><m:mi>&#969;</m:mi><m:mi>x</m:mi></m:mfenced></m:mrow></m:math>&#160;or <m:math><m:mrow><m:mi>sin</m:mi><m:mfenced separators=""><m:mi>&#969;</m:mi><m:mi>x</m:mi></m:mfenced></m:mrow></m:math>&#160;(semi-infinite range)?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01asf.xml">D01ASF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Use finite-range integration between the zeros and extrapolate (see <a class="rout" href="../C06/c06baf.xml">C06BAF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../D01/d01amf.xml">D01AMF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../D01/d01amf.xml">D01AMF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry"><a class="rout" href="../D01/d01gaf.xml">D01GAF</a> (integrates over the range of the points supplied)</td></tr></table><h3 class="sec"><a name="tree3" id="tree3"/>Tree 3: Multidimensional integrals
</h3>
<table class="dtree">
<tr>
<td class="dtentry">Is dimension <m:math><m:mtext/><m:mo>=</m:mo><m:mn>2</m:mn></m:math>&#160;and product region?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01daf.xml">D01DAF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Is dimension <m:math><m:mtext/><m:mo>&#8804;</m:mo><m:mn>4</m:mn></m:math></td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is region an <m:math><m:mi>n</m:mi></m:math>-sphere?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01fbf.xml">D01FBF</a> with user transformation or <a class="rout" href="../D01/d01jaf.xml">D01JAF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is region a Simplex?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01fbf.xml">D01FBF</a> with user transformation or <a class="rout" href="../D01/d01paf.xml">D01PAF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is the integrand smooth (polynomial-like) in each dimension apart from weight function?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01bbf.xml">D01BBF</a> and <a class="rout" href="../D01/d01fbf.xml">D01FBF</a> or <a class="rout" href="../D01/d01bcf.xml">D01BCF</a> and <a class="rout" href="../D01/d01fbf.xml">D01FBF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is integrand free of extremely bad behaviour?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01fcf.xml">D01FCF</a>, <a class="rout" href="../D01/d01fdf.xml">D01FDF</a> or <a class="rout" href="../D01/d01gcf.xml">D01GCF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is bad behaviour on the boundary?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01fcf.xml">D01FCF</a> or <a class="rout" href="../D01/d01fdf.xml">D01FDF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Compare results from at least two of <a class="rout" href="../D01/d01fcf.xml">D01FCF</a>, <a class="rout" href="../D01/d01fdf.xml">D01FDF</a>, <a class="rout" href="../D01/d01gbf.xml">D01GBF</a> and <a class="rout" href="../D01/d01gcf.xml">D01GCF</a> and one-dimensional recursive application</td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Is region an <m:math><m:mi>n</m:mi></m:math>-sphere?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01fdf.xml">D01FDF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Is region a Simplex?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01paf.xml">D01PAF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Is high accuracy required?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01fdf.xml">D01FDF</a> with parameter tuning</td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Is dimension high?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../D01/d01fdf.xml">D01FDF</a>, <a class="rout" href="../D01/d01gcf.xml">D01GCF</a> or <a class="rout" href="../D01/d01gdf.xml">D01GDF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry"><a class="rout" href="../D01/d01fcf.xml">D01FCF</a></td></tr></table><div class="paramtext"><b>Note:</b> in the case where there are many integrals to be evaluated <a class="rout" href="../D01/d01eaf.xml">D01EAF</a> should be preferred to <a class="rout" href="../D01/d01fcf.xml">D01FCF</a>.</div><div class="paramtext"><a class="rout" href="../D01/d01gdf.xml">D01GDF</a> is likely to be more efficient than <a class="rout" href="../D01/d01gcf.xml">D01GCF</a>, which uses a more conventional user-interface, consistent with other routines in the chapter.</div><h2 class="standard"><a class="sec" name="index" id="index"/>5&#160;&#160;Functionality Index</h2>
<div>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>Korobov&#160;optimal&#160;coefficients&#160;for&#160;use&#160;in&#160;<a class="rout" href="../D01/d01gcf.xml">D01GCF</a>&#160;and&#160;<a class="rout" href="../D01/d01gdf.xml">D01GDF</a>:</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;when&#160;number&#160;of&#160;points&#160;is&#160;a&#160;product&#160;of&#160;2&#160;primes</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01gzf.xml">D01GZF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;when&#160;number&#160;of&#160;points&#160;is&#160;prime</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01gyf.xml">D01GYF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>Multidimensional&#160;quadrature:</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;over&#160;a&#160;general&#160;product&#160;region:</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Korobov&#8211;Conroy&#160;number-theoretic&#160;method</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01gcf.xml">D01GCF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Sag&#8211;Szekeres&#160;method&#160;(also&#160;over&#160;<span><i>n</i></span>-sphere)</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01fdf.xml">D01FDF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;variant&#160;of&#160;<a class="rout" href="../D01/d01gcf.xml">D01GCF</a>&#160;especially&#160;efficient&#160;on&#160;vector&#160;machines</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01gdf.xml">D01GDF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;over&#160;a&#160;hyper-rectangle:</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;adaptive&#160;method</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01fcf.xml">D01FCF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;adaptive&#160;method,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;multiple&#160;integrands</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01eaf.xml">D01EAF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Gaussian&#160;quadrature&#160;rule-evaluation</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01fbf.xml">D01FBF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Monte&#8211;Carlo&#160;method</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01gbf.xml">D01GBF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;over&#160;an&#160;<span><i>n</i></span>-simplex</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01paf.xml">D01PAF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;over&#160;an&#160;<span><i>n</i></span>-sphere <span><span>(<i>n</i> <span>&#160;&#8805;&#160;</span> <span>4</span>)</span></span>,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;allowing&#160;for&#160;badly&#160;behaved&#160;integrands</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01jaf.xml">D01JAF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>One-dimensional&#160;quadrature:</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;adaptive&#160;integration&#160;of&#160;a&#160;function&#160;over&#160;a&#160;finite&#160;interval:</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;allowing&#160;for&#160;singularities&#160;at&#160;user-specified&#160;break-points</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01alf.xml">D01ALF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;method&#160;suitable&#160;for&#160;oscillating&#160;functions</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01akf.xml">D01AKF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;strategy&#160;due&#160;to&#160;Patterson,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;suitable&#160;for&#160;well-behaved&#160;integrands</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01ahf.xml">D01AHF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;strategy&#160;due&#160;to&#160;Piessens&#160;and&#160;de&#160;Doncker,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;allowing&#160;for&#160;badly&#160;behaved&#160;integrands</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01ajf.xml">D01AJF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;variant&#160;of&#160;<a class="rout" href="../D01/d01ajf.xml">D01AJF</a>&#160;especially&#160;efficient&#160;on&#160;vector&#160;machines</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01atf.xml">D01ATF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;variant&#160;of&#160;<a class="rout" href="../D01/d01akf.xml">D01AKF</a>&#160;especially&#160;efficient&#160;on&#160;vector&#160;machines</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01auf.xml">D01AUF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;weight&#160;function&#160;<span><span>1</span><span>&#160;/&#160;</span><span>(<i>x</i>&#160;&#8722;&#160;<i>c</i>)</span></span>&#160;Cauchy principal value (Hilbert transform)</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01aqf.xml">D01AQF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;weight&#160;function&#160;with&#160;end-point&#160;singularities&#160;of&#160;algebraico-logarithmic&#160;type</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01apf.xml">D01APF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;weight&#160;function&#160;<span><span><span>cos</span><span>(<i>&#969;</i><i>x</i>)</span></span></span>&#160;or <span><span><span>sin</span><span>(<i>&#969;</i><i>x</i>)</span></span></span></nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01anf.xml">D01ANF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;adaptive&#160;integration&#160;of&#160;a&#160;function&#160;over&#160;an&#160;infinite&#160;interval&#160;or&#160;semi-infinite&#160;interval:</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;no&#160;weight&#160;function</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01amf.xml">D01AMF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;weight&#160;function&#160;<span><span><span>cos</span><span>(<i>&#969;</i><i>x</i>)</span></span></span>&#160;or <span><span><span>sin</span><span>(<i>&#969;</i><i>x</i>)</span></span></span></nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01asf.xml">D01ASF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;Gaussian&#160;quadrature&#160;rule-evaluation</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01baf.xml">D01BAF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;integration&#160;of&#160;a&#160;function&#160;defined&#160;by&#160;data&#160;values&#160;only,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Gill&#8211;Miller&#160;method</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01gaf.xml">D01GAF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;non-adaptive&#160;integration&#160;over&#160;a&#160;finite&#160;interval</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01bdf.xml">D01BDF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;non-adaptive&#160;integration&#160;over&#160;a&#160;finite&#160;interval:</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;with&#160;provision&#160;for&#160;indefinite&#160;integrals&#160;also</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01arf.xml">D01ARF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>Two-dimensional&#160;quadrature&#160;over&#160;a&#160;finite&#160;region</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01daf.xml">D01DAF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>Weights&#160;and&#160;abscissae&#160;for&#160;Gaussian&#160;quadrature&#160;rules:</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;more&#160;general&#160;choice&#160;of&#160;rule,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;calculating&#160;the&#160;weights&#160;and&#160;abscissae</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01bcf.xml">D01BCF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;restricted&#160;choice&#160;of&#160;rule,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;using&#160;pre-computed&#160;weights&#160;and&#160;abscissae</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../D01/d01bbf.xml">D01BBF</a></nobr></td></tr></table></div><h2 class="standard"><a class="sec" name="auxindex" id="auxindex"/>6&#160;&#160;Auxiliary Routines Associated with Library Routine Parameters</h2>
<div class="tablediv"><table class="wdrn"><tbody><tr><td class="libdoc" valign="top" align="left">D01BAW</td><td class="libdoc" valign="top" align="left">nagf_quad_1d_gauss_hermite<br/>See the description of the argument 
      D01XXX in <a class="rout" href="../D01/d01baf.xml">D01BAF</a> and <a class="rout" href="../D01/d01bbf.xml">D01BBF</a>.</td></tr>
<tr><td class="libdoc" valign="top" align="left">D01BAX</td><td class="libdoc" valign="top" align="left">nagf_quad_1d_gauss_laguerre<br/>See the description of the argument 
      D01XXX in <a class="rout" href="../D01/d01baf.xml">D01BAF</a> and <a class="rout" href="../D01/d01bbf.xml">D01BBF</a>.</td></tr>
<tr><td class="libdoc" valign="top" align="left">D01BAY</td><td class="libdoc" valign="top" align="left">nagf_quad_1d_gauss_rational<br/>See the description of the argument 
     D01XXX in <a class="rout" href="../D01/d01baf.xml">D01BAF</a> and <a class="rout" href="../D01/d01bbf.xml">D01BBF</a>.</td></tr>
<tr><td class="libdoc" valign="top" align="left">D01BAZ</td><td class="libdoc" valign="top" align="left">nagf_quad_1d_gauss_legendre<br/>See the description of the argument 
     D01XXX in <a class="rout" href="../D01/d01baf.xml">D01BAF</a> and <a class="rout" href="../D01/d01bbf.xml">D01BBF</a>.</td></tr>
<tr><td class="libdoc" valign="top" align="left">D01FDV</td><td class="libdoc" valign="top" align="left">nagf_quad_md_sphere_dummy_region<br/>See the description of the argument 
      REGION in <a class="rout" href="../D01/d01fdf.xml">D01FDF</a>.</td></tr></tbody></table></div><h2 class="standard"><a class="sec" name="withdrawn" id="withdrawn"/>7&#160;&#160;Routines Withdrawn or Scheduled for Withdrawal</h2>
<div class="paramtext">None.</div><h2 class="standard"><a class="sec" name="references" id="references"/>8&#160;&#160;References</h2><div class="paramtext"><a name="ref201" id="ref201"/>Davis P J and Rabinowitz P (1975)  <i>Methods of Numerical Integration</i> Academic Press </div>
<div class="paramtext"><a name="ref202" id="ref202"/>Gladwell I (1986)  Vectorisation of one-dimensional quadrature codes <i>Numerical Integration: Recent Developments, and Applications</i> (eds P Keast and G Fairweather) 231&#8211;238 D Reidel Publishing Company, Holland </div>
<div class="paramtext"><a name="ref203" id="ref203"/>Lyness J N (1983)  When not to use an automatic quadrature routine <i>SIAM Rev.</i> <b>25</b> 63&#8211;87 </div>
<div class="paramtext"><a name="ref010" id="ref010"/>Piessens R, de Doncker&#8211;Kapenga E, &#220;berhuber C and Kahaner D (1983)  <i>QUADPACK, A Subroutine Package for Automatic Integration</i> Springer&#8211;Verlag </div>
<div class="paramtext"><a name="ref204" id="ref204"/>Sobol I M (1974)  <i>The Monte Carlo Method</i> The University of Chicago Press </div>
<div class="paramtext"><a name="ref205" id="ref205"/>Stroud A H (1971)  <i>Approximate Calculation of Multiple Integrals</i> Prentice&#8211;Hall </div><hr/><div><a class="chap" href="d01conts.xml">D01 Chapter Contents</a></div><div><a class="chapint" href="../../pdf/D01/d01intro.pdf">D01 Chapter Introduction (PDF version)</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div>
<div><hr/><a class="genint" href="../FRONTMATTER/copyright.xml">&#169; The Numerical Algorithms Group Ltd, Oxford, UK. 2011</a></div></body></html>