<?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>D01ARF : NAG Library, Mark 22</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="rout" href="../../pdf/D01/d01arf.pdf">D01ARF (PDF version)</a></div><div><a class="chap" href="d01conts.xml">D01 Chapter Contents</a></div><div><a class="chapint" href="d01intro.xml">D01 Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div><hr/><h1 class="libdoc">NAG Library Routine Document<br/><br/>D01ARF</h1><div class="paramtext"><div class="header"><b>Note:</b>&#160; before using this routine, please read the Users' Note for your implementation to check the interpretation of <span class="bitalic">bold italicised</span> terms and other implementation-dependent details.</div></div> 
<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="#purpose">1&#160;&#160;<b>Purpose</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#specification">2&#160;&#160;<b>Specification</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocdescription');"><span class="htmltocplus" id="tocdescriptionplus">+</span><span class="htmltocminus" id="tocdescriptionminus">&#8722;</span></span>
<a class="htmltoc" href="#description">3&#160;&#160;<b>Description</b></a>
<div class="htmltocitem" id="tocdescription">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#arfdescription1">3.1&#160;&#160;<b>Definite Integrals</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#arfdescription2">3.2&#160;&#160;<b>Indefinite Integrals</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">4&#160;&#160;<b>References</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#parameters">5&#160;&#160;<b>Parameters</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#errors">6&#160;&#160;<b>Error Indicators and Warnings</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#accuracy">7&#160;&#160;<b>Accuracy</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments">8&#160;&#160;<b>Further Comments</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocexample');"><span class="htmltocplus" id="tocexampleplus">+</span><span class="htmltocminus" id="tocexampleminus">&#8722;</span></span>
<a class="htmltoc" href="#example">9&#160;&#160;<b>Example</b></a>
<div class="htmltocitem" id="tocexample">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examtext">9.1&#160;&#160;<b>Program Text</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examdata">9.2&#160;&#160;<b>Program Data</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examresults">9.3&#160;&#160;<b>Program Results</b></a>
</div>
</div>
</div>
</div>
</div><h2 class="standard"><a class="sec" name="purpose" id="purpose"/>1&#160;&#160;Purpose</h2>
<div class="paramtext">D01ARF computes definite and indefinite integrals over a finite range to a specified relative or absolute accuracy, using the method described in <a class="ref" href="#ref269">Patterson (1968)</a>.</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;D01ARF&#160;(</td><td class="tdfspec2"><a class="arg" href="#A">A</a>, <a class="arg" href="#B">B</a>, <a class="arg" href="#FUN">FUN</a>, <a class="arg" href="#RELACC">RELACC</a>, <a class="arg" href="#ABSACC">ABSACC</a>, <a class="arg" href="#MAXRUL">MAXRUL</a>, <a class="arg" href="#IPARM">IPARM</a>, <a class="arg" href="#ACC">ACC</a>, <a class="arg" href="#ANS">ANS</a>, <a class="arg" href="#N">N</a>, <a class="arg" href="#ALPHA">ALPHA</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">MAXRUL, IPARM, N, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">A, B, FUN, RELACC, ABSACC, ACC, ANS, ALPHA(390)</td></tr><tr><td class="tdfspec1">EXTERNAL</td><td class="tdfspec2">FUN</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">D01ARF evaluates definite and indefinite 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:mi>a</m:mi><m:mi>b</m:mi></m:munderover><m:mi>f</m:mi><m:mfenced separators=""><m:mi>t</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>t</m:mi></m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>

using the method described in <a class="ref" href="#ref269">Patterson (1968)</a>.</div><h3 class="standard"><a class="sec" name="arfdescription1" id="arfdescription1"/>3.1&#160;&#160;Definite Integrals</h3>
<div class="paramtext">In this case D01ARF must be called with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>.  By linear transformation the integral is changed to

<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:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow>
  <m:mrow><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></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="formula2"/></tr></table></div>

where

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mfrac><m:mrow><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mrow><m:mn>2</m:mn></m:mfrac> <m:mi>f</m:mi>
<m:mfenced separators=""><m:mfrac><m:mrow><m:mi>b</m:mi><m:mo>+</m:mo><m:mi>a</m:mi><m:mo>+</m:mo><m:mfenced separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced><m:mi>x</m:mi></m:mrow><m:mn>2</m:mn></m:mfrac></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

and is then approximated by an <m:math><m:mi>n</m:mi></m:math>-point quadrature rule

<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>&#8721;</m:mo><m:mrow><m:mi>k</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>k</m:mi></m:msub><m:mi>F</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mi>k</m:mi></m:msub></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:msub><m:mi>w</m:mi><m:mi>k</m:mi></m:msub></m:math>&#160;are the weights and <m:math><m:msub><m:mi>x</m:mi><m:mi>k</m:mi></m:msub></m:math>&#160;are the abscissae.</div><div class="paramtext">The routine uses a family of nine interlacing rules based on the optimal extension of the three-point Gauss rule.  These rules use <m:math><m:mn>1</m:mn></m:math>, <m:math><m:mn>3</m:mn></m:math>, <m:math><m:mn>7</m:mn></m:math>, <m:math><m:mn>15</m:mn></m:math>, <m:math><m:mn>31</m:mn></m:math>, <m:math><m:mn>63</m:mn></m:math>, <m:math><m:mn>127</m:mn></m:math>, <m:math><m:mn>255</m:mn></m:math>&#160;and <m:math><m:mn>511</m:mn></m:math>&#160;points and have respective polynomial integrating degrees <m:math><m:mn>1</m:mn></m:math>, <m:math><m:mn>5</m:mn></m:math>, <m:math><m:mn>11</m:mn></m:math>, <m:math><m:mn>23</m:mn></m:math>, <m:math><m:mn>47</m:mn></m:math>, <m:math><m:mn>95</m:mn></m:math>, <m:math><m:mn>191</m:mn></m:math>, <m:math><m:mn>383</m:mn></m:math>&#160;and <m:math><m:mn>767</m:mn></m:math>.  Each rule has the property that the next in sequence includes all the points of its predecessor and has the greatest possible increase in integrating degree.</div><div class="paramtext">The integration method is based on the successive application of these rules until the absolute value of the difference of two successive results differs by not more than <a class="arg" href="#ABSACC">ABSACC</a>, or relatively by not more than <a class="arg" href="#RELACC">RELACC</a>.  The result of the last rule used is taken as the value of the integral (<a class="arg" href="#ANS">ANS</a>), and the absolute difference of the results of the last two rules used is taken as an estimate of the absolute error (<a class="arg" href="#ACC">ACC</a>).  Due to their interlacing form no integrand evaluations are wasted in passing from one rule to the next.</div><h3 class="standard"><a class="sec" name="arfdescription2" id="arfdescription2"/>3.2&#160;&#160;Indefinite Integrals</h3>
<div class="paramtext">Suppose the value of the integral

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:munderover><m:mo>&#8747;</m:mo><m:mi>c</m:mi><m:mi>d</m:mi></m:munderover><m:mi>f</m:mi><m:mfenced separators=""><m:mi>t</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>t</m:mi></m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>

is required for a number of sub-intervals <m:math><m:mfenced separators="" open="[" close="]"><m:mi>c</m:mi><m:mo>,</m:mo><m:mi>d</m:mi></m:mfenced></m:math>, all of which lie in an 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>.</div><div class="paramtext">In this case D01ARF should first be called with the parameter <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;and the interval set to <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>.  The routine then calculates the integral over <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;<b>and</b> the Legendre expansion of the integrand, using the same integrand values.  If the routine is subsequently called with  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>&#160;and the interval set to <m:math><m:mfenced separators="" open="[" close="]"><m:mi>c</m:mi><m:mo>,</m:mo><m:mi>d</m:mi></m:mfenced></m:math>, the integral over <m:math><m:mfenced separators="" open="[" close="]"><m:mi>c</m:mi><m:mo>,</m:mo><m:mi>d</m:mi></m:mfenced></m:math>&#160;is calculated by analytical integration of the Legendre expansion, without further evaluations of the integrand.</div><div class="paramtext">For the interval <m:math><m:mfenced separators="" open="[" close="]"><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced></m:math>&#160;the expansion takes the form

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:munderover><m:mo>&#8721;</m:mo><m:mrow><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:mrow><m:mi>&#8734;</m:mi></m:munderover><m:msub><m:mi>&#945;</m:mi><m:mi>i</m:mi></m:msub><m:msub><m:mi>P</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:msub><m:mi>P</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is the order <m:math><m:mi>i</m:mi></m:math>&#160;Legendre polynomial.  Assuming that the integral over the full range <m:math><m:mfenced separators="" open="[" close="]"><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced></m:math>&#160;was evaluated to the required accuracy using an <m:math><m:mi>n</m:mi></m:math>-point rule,  then the coefficients

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>&#945;</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:mfrac other="small"><m:mn>1</m:mn><m:mn>2</m:mn></m:mfrac><m:mfenced separators=""><m:mn>2</m:mn><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced><m:munderover><m:mo>&#8747;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow>
  <m:mrow><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:munderover><m:msub><m:mi>P</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><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;</m:mtext><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>0</m:mn><m:mo>,</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>m</m:mi>
</m:math></td><td class="formula2"/></tr></table></div>

are evaluated by that same rule, up to

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>m</m:mi><m:mo>=</m:mo><m:mfenced separators=""><m:mn>3</m:mn><m:mi>n</m:mi><m:mo>-</m:mo> <m:mn>1</m:mn></m:mfenced><m:mo>/</m:mo><m:mn>4</m:mn><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

The accuracy for indefinite integration should be of the same order as that obtained for the definite integral over the full range.  The indefinite integrals will be exact when <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is a polynomial of degree <m:math><m:mtext/><m:mo>&#8804;</m:mo><m:mi>m</m:mi></m:math>.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref269" id="ref269"/>Patterson T N L (1968)  The Optimum addition of points to quadrature formulae <i>Math. Comput.</i> <b>22</b> 847&#8211;856 </div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="A" id="A"/>1: &#160;&#160;&#8194; A &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:mi>a</m:mi></m:math>, the lower limit of integration.</div></dd><dt class="paramhead"><a name="B" id="B"/>2: &#160;&#160;&#8194; B &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:mi>b</m:mi></m:math>, the upper limit of integration. It is not necessary that <m:math><m:mi>a</m:mi><m:mo>&lt;</m:mo><m:mi>b</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="FUN" id="FUN"/>3: &#160;&#160;&#8194; FUN &#8211; <span class="bitalic">double precision</span> FUNCTION, supplied by the user.<span class="pclass">External Procedure</span></dt><dd><div class="paramtext"><a class="arg" href="#FUN">FUN</a> must return the value of the integrand <m:math><m:mi>f</m:mi></m:math>&#160;at a specified point.</div><div class="subprog">
<div class="paramtext">The specification of <a class="arg" href="#FUN">FUN</a> is:</div><table class="fspec"><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b>&#160;FUNCTION&#160;FUN&#160;(</td><td class="tdfspec2"><a class="arg" href="../D01/d01arf.xml#FUN_X">X</a>)</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">X</td></tr></table>
<dl><dt class="paramhead"><a name="FUN_X" id="FUN_X"/>1: &#160;&#160;&#8194; X &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the point in <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;at which the integrand <m:math><m:mi>f</m:mi></m:math>&#160;must be evaluated.</div></dd></dl>
</div>
<div class="paramtext"><a class="arg" href="#FUN">FUN</a> must be declared as EXTERNAL in the (sub)program from which D01ARF is called. Parameters denoted as <span class="italic">Input</span>  must <b>not</b>  be changed by this procedure.</div>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>, <a class="arg" href="#FUN">FUN</a> is not called.</div>
</dd><dt class="paramhead"><a name="RELACC" id="RELACC"/>4: &#160;&#160;&#8194; RELACC &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the relative accuracy required. If convergence according to absolute accuracy is required, <a class="arg" href="#RELACC">RELACC</a> should be set to zero (but see also <a class="sec" href="#accuracy">Section 7</a>). If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#RELACC"><m:mi mathcolor="#EE0000" mathvariant="bold">RELACC</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0.0</m:mn></m:math>, its absolute value is used.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>, <a class="arg" href="#RELACC">RELACC</a> is not used.</div>
</div></dd><dt class="paramhead"><a name="ABSACC" id="ABSACC"/>5: &#160;&#160;&#8194; ABSACC &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the absolute accuracy required. If convergence according to relative accuracy is required, <a class="arg" href="#ABSACC">ABSACC</a> should be set to zero (but see also <a class="sec" href="#accuracy">Section 7</a>). If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABSACC"><m:mi mathcolor="#EE0000" mathvariant="bold">ABSACC</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0.0</m:mn></m:math>, its absolute value is used.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>, <a class="arg" href="#ABSACC">ABSACC</a> is not used.</div>
</div></dd><dt class="paramhead"><a name="MAXRUL" id="MAXRUL"/>6: &#160;&#160;&#8194; MAXRUL &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the maximum number of successive rules that may be used.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#MAXRUL"><m:mi mathcolor="#EE0000" mathvariant="bold">MAXRUL</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>9</m:mn></m:math>. If <a class="arg" href="#MAXRUL">MAXRUL</a> is outside these limits, the value <m:math><m:mn>9</m:mn></m:math>&#160;is assumed.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>, <a class="arg" href="#MAXRUL">MAXRUL</a> is not used.</div></div></dd><dt class="paramhead"><a name="IPARM" id="IPARM"/>7: &#160;&#160;&#8194; IPARM &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: indicates the task to be performed by the routine.

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math></dt>
<dd>Only the definite integral over <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 evaluated.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>As well as the definite integral, the expansion of the integrand in Legendre polynomials over <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 calculated, using the same values of the integrand as used to compute the integral. The expansion coefficients, and some other quantities, are returned in <a class="arg" href="#ALPHA">ALPHA</a> for later use in computing indefinite integrals.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd><m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>t</m:mi></m:mfenced></m:math>&#160;is integrated analytically over <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;using the previously computed expansion, stored in <a class="arg" href="#ALPHA">ALPHA</a>. No further evaluations of the integrand are required. The routine must previously have been called with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;and 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;must lie within that specified for the previous call. In this case only the arguments <a class="arg" href="#A">A</a>, <a class="arg" href="#B">B</a>, <a class="arg" href="#IPARM">IPARM</a>, <a class="arg" href="#ANS">ANS</a>, <a class="arg" href="#ALPHA">ALPHA</a> and <a class="arg" href="#IFAIL">IFAIL</a> are used.</dd></dl>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mn>1</m:mn></m:math>&#160;or <m:math><m:mn>2</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="ACC" id="ACC"/>8: &#160;&#160;&#8194; ACC &#8211; <span class="bitalic">double precision</span><span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mn>1</m:mn></m:math>, <a class="arg" href="#ACC">ACC</a> contains the absolute value of the difference between the last two successive estimates of the integral. This may be used as a measure of the accuracy actually achieved.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>, <a class="arg" href="#ACC">ACC</a> is not used.</div>
</div></dd><dt class="paramhead"><a name="ANS" id="ANS"/>9: &#160;&#160;&#8194; ANS &#8211; <span class="bitalic">double precision</span><span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: the estimated value of the integral.</div></dd><dt class="paramhead"><a name="N" id="N"/>10: &#8194; N &#8211; INTEGER<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: when <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mn>1</m:mn></m:math>, <a class="arg" href="#N">N</a> contains the number of integrand evaluations used in the calculation of the integral.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>, <a class="arg" href="#N">N</a> is not used.</div>
</div></dd><dt class="paramhead"><a name="ALPHA" id="ALPHA"/>11: &#8194; ALPHA(<m:math><m:mn>390</m:mn></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>, <a class="arg" href="#ALPHA">ALPHA</a> must contain the coefficients of the Legendre expansions of the integrand, as returned by a previous call of D01ARF with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;and a range containing the present range. 
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mn>1</m:mn></m:math>, <a class="arg" href="#ALPHA">ALPHA</a> need not be set on entry.</div>
</div>
<div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>, the first <m:math><m:mi>m</m:mi></m:math>&#160;elements of <a class="arg" href="#ALPHA">ALPHA</a> hold the coefficients of the Legendre expansion of the integrand, and the value of <m:math><m:mi>m</m:mi></m:math>&#160;is stored in <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ALPHA"><m:mi mathcolor="#EE0000" mathvariant="bold">ALPHA</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>390</m:mn></m:mfenced></m:mrow></m:math>. <a class="arg" href="#ALPHA">ALPHA</a> must not be changed between a call with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;and subsequent calls with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>, the first <m:math><m:mi>m</m:mi></m:math>&#160;elements of <a class="arg" href="#ALPHA">ALPHA</a> are unchanged on exit.</div>
</div></dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>12: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <a class="arg" href="#IFAIL">IFAIL</a> must be set to <m:math><m:mn>0</m:mn></m:math>, <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>. If you are unfamiliar with this parameter you should refer to <a class="sec" href="../GENINT/essint.xml#library3">Section 3.3</a> in  the Essential Introduction for details.</div>
<div class="paramtext"><i>On exit</i>: <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;unless the routine detects an error (see <a class="sec" href="#errors">Section 6</a>).
<div class="paramtext">For environments where it might be inappropriate to halt program execution when an error is detected, the value <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>&#160;is recommended.  If the output of error messages is undesirable, then the value <m:math><m:mn>1</m:mn></m:math>&#160;is recommended.  Otherwise, because for this routine the values of the output parameters may be useful even if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8800;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;on exit, the recommended value is <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>.  <b>When the value <m:math><m:mrow><m:mo>-</m:mo><m:mn mathvariant="bold">1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>&#160;is used it is essential to test the value of <a class="arg" href="#IFAIL">IFAIL</a> on exit.</b></div>
</div></dd></dl><h2 class="standard"><a class="sec" name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2>
<div class="paramtext">If on entry <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">-1</m:mn></m:maction></m:math>, explanatory error messages are output on the current error message unit (as defined by <a class="rout" href="../X04/x04aaf.xml">X04AAF</a>).</div><div class="paramtext"><b>Note:</b> D01ARF may return useful information for one or more of the following detected errors or warnings.</div><div class="paramtext">Errors or warnings detected by the routine:</div>
<dl class="ifail">
<dt class="errorhead"><a name="IFeq1" id="IFeq1"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mn>1</m:mn></m:math>, this indicates that all <a class="arg" href="#MAXRUL">MAXRUL</a> rules have been used and the integral has not converged to the accuracy requested.  In this case <a class="arg" href="#ANS">ANS</a> contains the last approximation to the integral, and <a class="arg" href="#ACC">ACC</a> contains the difference between the last two approximations.  To check this estimate of the integral, D01ARF could be called again to evaluate

<div class="formula"><table class="formula"><tr><td class="formula"><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>t</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>t</m:mi></m:mrow><m:mtext>&#8195; as &#8195;</m:mtext><m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>c</m:mi></m:munderover>
<m:mi>f</m:mi><m:mfenced separators=""><m:mi>t</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>t</m:mi></m:mrow><m:mo>+</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mi>c</m:mi><m:mi>b</m:mi></m:munderover>
<m:mi>f</m:mi><m:mfenced separators=""><m:mi>t</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>t</m:mi></m:mrow><m:mtext>&#8195; for some &#8203;</m:mtext><m:mi>a</m:mi><m:mo>&lt;</m:mo><m:mi>c</m:mi><m:mo>&lt;</m:mo><m:mi>b</m:mi><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>, this indicates failure of convergence during the run with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;in which the Legendre expansion was created.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq2" id="IFeq2"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>
<div class="paramtext">On entry, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mn>1</m:mn></m:math>&#160;or <m:math><m:mn>2</m:mn></m:math></div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq3" id="IFeq3"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt>
<dd>
<div class="paramtext">The routine is called with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>&#160;but a previous call with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;has been omitted or was invoked with an integration interval of length zero.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq4" id="IFeq4"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>4</m:mn></m:math></dt>
<dd>
<div class="paramtext">On entry, with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>, the interval for indefinite integration is not contained within the interval specified when D01ARF was previously called with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>.</div>
</dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">The relative or absolute accuracy required is specified by you in the variables <a class="arg" href="#RELACC">RELACC</a> or <a class="arg" href="#ABSACC">ABSACC</a>.  D01ARF will terminate whenever either the relative accuracy specified by <a class="arg" href="#RELACC">RELACC</a> or the absolute accuracy specified by <a class="arg" href="#ABSACC">ABSACC</a> is reached.  One or other of these criteria may be &#8216;forced&#8217; by setting the parameter for the other to zero.  If both <a class="arg" href="#RELACC">RELACC</a> and <a class="arg" href="#ABSACC">ABSACC</a> are specified as zero, then the routine uses the value <m:math><m:mn>10.0</m:mn><m:mo>&#215;</m:mo><m:mfenced separators=""><m:mi mathvariant="bold-italic">machine&#160;precision</m:mi></m:mfenced></m:math>&#160;for <a class="arg" href="#RELACC">RELACC</a>.</div><div class="paramtext">If on exit <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>, then it is likely that the result is correct to one or other of these accuracies.  If on exit <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq1"><m:mn mathcolor="#003399" mathvariant="bold">1</m:mn></m:maction></m:math>,  then it is likely that neither of the requested accuracies has been reached.</div><div class="paramtext">When you have no prior idea of the magnitude of the integral, it is possible that an unreasonable accuracy may be requested, e.g., a relative accuracy for an integral which turns out to be zero, or a small absolute accuracy for an integral which turns out to be very large.  Even if failure is reported in such a case, the value of the integral may still be satisfactory.  The device of setting the other &#8216;unused&#8217; accuracy parameter to a small positive value (e.g., <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>9</m:mn></m:mrow></m:msup></m:math>&#160;for an implementation of <m:math><m:mn>11</m:mn></m:math>-digit precision) rather than zero, may prevent excessive calculation in such a situation.</div><div class="paramtext">To avoid spurious convergence, it is recommended that relative accuracies larger than about <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>3</m:mn></m:mrow></m:msup></m:math>&#160;be avoided.</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext">The time taken by D01ARF depends on the complexity of the integrand and the accuracy required.</div><div class="paramtext">This routine uses the Patterson method over the whole integration interval and should therefore be suitable for well behaved functions.  However, for very irregular functions it would be more efficient to submit the differently behaved regions separately for integration.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This example evaluates the following integrals
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(i)</td>
<td valign="top">Definite integral only <m:math><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:mfenced></m:math>&#160;for

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:munderover><m:mo>&#8747;</m:mo><m:mn>0</m:mn><m:mn>1</m:mn></m:munderover><m:mfrac><m:mn>4</m:mn><m:mrow><m:mn>1</m:mn><m:mo>+</m:mo><m:msup><m:mi>x</m:mi><m:mn>2</m:mn></m:msup></m:mrow>
 </m:mfrac><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>&#8195;</m:mtext><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABSACC"><m:mi mathcolor="#EE0000" mathvariant="bold">ABSACC</m:mi></m:maction><m:mo>=</m:mo><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>5</m:mn></m:mrow></m:msup></m:mfenced><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>
</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(ii)</td>
<td valign="top">Definite integral together with expansion coefficients <m:math><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:mfenced></m:math>&#160;for

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:munderover><m:mo>&#8747;</m:mo><m:mn>1</m:mn><m:mn>2</m:mn></m:munderover><m:mroot><m:mi>x</m:mi><m:mn>8</m:mn></m:mroot><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>&#8195;</m:mtext><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABSACC"><m:mi mathcolor="#EE0000" mathvariant="bold">ABSACC</m:mi></m:maction><m:mo>=</m:mo><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>5</m:mn></m:mrow></m:msup></m:mfenced><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>
</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(iii)</td>
<td valign="top">Indefinite integral using previous expansion <m:math><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPARM"><m:mi mathcolor="#EE0000" mathvariant="bold">IPARM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:mfenced></m:math>&#160;for

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:munderover><m:mo>&#8747;</m:mo><m:mn>1.2</m:mn><m:mn>1.8</m:mn></m:munderover><m:mroot><m:mi>x</m:mi><m:mn>8</m:mn></m:mroot><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>&#8195;</m:mtext><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABSACC"><m:mi mathcolor="#EE0000" mathvariant="bold">ABSACC</m:mi></m:maction><m:mo>=</m:mo><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>5</m:mn></m:mrow></m:msup></m:mfenced><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>
</td>
</tr></table>
</div><h3 class="standard"><a class="sec" name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
<p><a class="verbatimref" href="../../examples/source/d01arfe.f">Program Text (d01arfe.f)</a></p><h3 class="standard"><a class="sec" name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>
<div class="paramtext">None.</div><h3 class="standard"><a class="sec" name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>
<p><a class="verbatimref" href="../../examples/baseresults/d01arfe.r">Program Results (d01arfe.r)</a></p>
<hr/><div><a class="rout" href="../../pdf/D01/d01arf.pdf">D01ARF (PDF version)</a></div><div><a class="chap" href="d01conts.xml">D01 Chapter Contents</a></div><div><a class="chapint" href="d01intro.xml">D01 Chapter Introduction</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. 2009</a></div></body></html>
