<?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>D01ASF : 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/d01asf.pdf">D01ASF (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/>D01ASF</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="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#description">3&#160;&#160;<b>Description</b></a>
</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">D01ASF calculates an approximation to the sine or the cosine transform of a function <m:math><m:mi>g</m:mi></m:math>&#160;over <m:math><m:mfenced open="[" close=")" separators=""><m:mi>a</m:mi><m:mi>&#8734;</m:mi></m:mfenced></m:math>:

<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:mi>a</m:mi><m:mi>&#8734;</m:mi></m:munderover>
 <m:mi>g</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
 <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:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow>
 <m:mtext>&#8195; or &#8195;</m:mtext>
 <m:mi>I</m:mi>
 <m:mo>=</m:mo>
 <m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>&#8734;</m:mi></m:munderover>
 <m:mi>g</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
 <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:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>

(for a user-specified value of <m:math><m:mi>&#969;</m:mi></m:math>).</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;D01ASF&#160;(</td><td class="tdfspec2"><a class="arg" href="#G">G</a>, <a class="arg" href="#A">A</a>, <a class="arg" href="#OMEGA">OMEGA</a>, <a class="arg" href="#KEY">KEY</a>, <a class="arg" href="#EPSABS">EPSABS</a>, <a class="arg" href="#RESULT">RESULT</a>, <a class="arg" href="#ABSERR">ABSERR</a>, <a class="arg" href="#LIMLST">LIMLST</a>, <a class="arg" href="#LST">LST</a>, <a class="arg" href="#ERLST">ERLST</a>, <a class="arg" href="#RSLST">RSLST</a>, <a class="arg" href="#IERLST">IERLST</a>, <a class="arg" href="#W">W</a>, <a class="arg" href="#LW">LW</a>, <a class="arg" href="#IW">IW</a>, <a class="arg" href="#LIW">LIW</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">KEY, LIMLST, LST, IERLST(LIMLST), LW, IW(LIW), LIW, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">G, A, OMEGA, EPSABS, RESULT, ABSERR, ERLST(LIMLST), RSLST(LIMLST), W(LW)</td></tr><tr><td class="tdfspec1">EXTERNAL</td><td class="tdfspec2">G</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">D01ASF is based on the QUADPACK routine QAWFE (see <a class="ref" href="#ref010">Piessens <span class="italic">et al.</span> (1983)</a>).  It is an adaptive routine, designed to integrate a function of the form <m:math><m:mi>g</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mi>w</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;over a semi-infinite interval, where <m:math><m:mi>w</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is either <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;or  <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>.</div><div class="paramtext">Over successive intervals

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:mfenced separators="" open="[" close="]"><m:mrow><m:mi>a</m:mi><m:mo>+</m:mo><m:mfenced separators=""><m:mi>k</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced><m:mi>c</m:mi></m:mrow><m:mo>,</m:mo><m:mrow><m:mi>a</m:mi><m:mo>+</m:mo><m:mi>k</m:mi><m:mi>c</m:mi></m:mrow></m:mfenced>
 <m:mtext>, &#8195;</m:mtext>
 <m:mi>k</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:maction actiontype="link" dsi:type="simple" dsi:href="#LST"><m:mi mathcolor="#EE0000" mathvariant="bold">LST</m:mi></m:maction>
</m:math></td><td class="formula2"/></tr></table></div>


integration is performed by the same algorithm as is used by <a class="rout" href="../D01/d01anf.xml">D01ANF</a>.  The intervals <m:math><m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub></m:math>&#160;are of constant length

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:mi>c</m:mi>
 <m:mo>=</m:mo>
 <m:mfenced open="{" close="}" separators="">
  <m:mn>2</m:mn><m:mfenced open="[" close="]" separators=""><m:mfenced open="|" close="|" separators=""><m:mi>&#969;</m:mi></m:mfenced></m:mfenced>
  <m:mo>+</m:mo><m:mn>1</m:mn>
 </m:mfenced>
 <m:mi>&#960;</m:mi><m:mo>/</m:mo><m:mfenced open="|" close="|" separators=""><m:mi>&#969;</m:mi></m:mfenced>
 <m:mtext>, &#8195;</m:mtext>
 <m:mi>&#969;</m:mi><m:mo>&#8800;</m:mo><m:mn>0</m:mn>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:mfenced open="[" close="]" separators=""><m:mfenced open="|" close="|" separators=""><m:mi>&#969;</m:mi></m:mfenced></m:mfenced></m:math>&#160;represents the largest integer less than or equal to <m:math><m:mfenced open="|" close="|" separators=""><m:mi>&#969;</m:mi></m:mfenced></m:math>.  Since <m:math><m:mi>c</m:mi></m:math>&#160;equals an odd number of half periods, the integral contributions over succeeding intervals will alternate in sign when the function <m:math><m:mi>g</m:mi></m:math>&#160;is positive and monotonically decreasing over <m:math><m:mfenced open="[" close=")" separators=""><m:mi>a</m:mi><m:mi>&#8734;</m:mi></m:mfenced></m:math>.  The algorithm, described in <a class="ref" href="#ref010">Piessens <span class="italic">et al.</span> (1983)</a>, incorporates a global acceptance criterion  (as defined by <a class="ref" href="#ref009">Malcolm and Simpson (1976)</a>) together with the  <m:math><m:mi>&#949;</m:mi></m:math>-algorithm (see <a class="ref" href="#ref011">Wynn (1956)</a>) to perform extrapolation.  The local error estimation is described by <a class="ref" href="#ref010">Piessens <span class="italic">et al.</span> (1983)</a>.</div><div class="paramtext">If <m:math><m:mi>&#969;</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#KEY"><m:mi mathcolor="#EE0000" mathvariant="bold">KEY</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>, the routine  uses the same algorithm as  <a class="rout" href="../D01/d01amf.xml">D01AMF</a> (with  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../D01/d01amf.xml#EPSREL"><m:mi mathcolor="#EE0000" mathvariant="bold">EPSREL</m:mi></m:maction><m:mo>=</m:mo><m:mn>0.0</m:mn></m:math>).</div><div class="paramtext">In contrast to the other routines in <a class="chap" href="../D01/d01conts.xml">Chapter D01</a>,  D01ASF works only with an <b>absolute</b> error tolerance (<a class="arg" href="#EPSABS">EPSABS</a>).  Over the interval <m:math><m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub></m:math>&#160;it attempts to satisfy the absolute accuracy requirement

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msub><m:mi mathvariant="italic">EPSA</m:mi><m:mi>k</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:msub><m:mi>U</m:mi><m:mi>k</m:mi></m:msub><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#EPSABS"><m:mi mathcolor="#EE0000" mathvariant="bold">EPSABS</m:mi></m:maction>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:msub><m:mi>U</m:mi><m:mi>k</m:mi></m:msub><m:mo>=</m:mo><m:mfenced separators=""><m:mn>1</m:mn><m:mo>-</m:mo><m:mi>p</m:mi></m:mfenced><m:msup><m:mi>p</m:mi><m:mrow><m:mi>k</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup></m:math>, for <m:math><m:mi>k</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:mtext/></m:math>&#160;and <m:math><m:mi>p</m:mi><m:mo>=</m:mo><m:mn>0.9</m:mn></m:math>.</div><div class="paramtext">However, when difficulties occur during the integration over the  <m:math><m:mi>k</m:mi></m:math>th sub-interval <m:math><m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub></m:math>&#160;such that the error flag 
<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IERLST"><m:mi mathcolor="#EE0000" mathvariant="bold">IERLST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>k</m:mi></m:mfenced></m:mrow></m:math>&#160;is nonzero, the accuracy requirement over subsequent intervals is relaxed.  See <a class="ref" href="#ref010">Piessens <span class="italic">et al.</span> (1983)</a>  for more details.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref009" id="ref009"/>Malcolm M A and Simpson R B (1976)  Local versus global strategies for adaptive quadrature <i>ACM Trans. Math. Software</i> <b>1</b> 129&#8211;146 </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="ref011" id="ref011"/>Wynn P (1956)  On a device for computing the <m:math><m:msub><m:mi>e</m:mi><m:mi>m</m:mi></m:msub><m:mfenced separators=""><m:msub><m:mi mathvariant="normal">S</m:mi><m:mi>n</m:mi></m:msub></m:mfenced></m:math>&#160;transformation <i>Math. Tables Aids Comput.</i> <b>10</b> 91&#8211;96 </div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="G" id="G"/>1: &#160;&#160;&#8194; G &#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="#G">G</a> must return the value of the function <m:math><m:mi>g</m:mi></m:math>&#160;at a given point <a class="arg" href="../D01/d01asf.xml#G_X">X</a>.</div><div class="subprog">
<div class="paramtext">The specification of <a class="arg" href="#G">G</a> is:</div><table class="fspec"><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b>&#160;FUNCTION&#160;G&#160;(</td><td class="tdfspec2"><a class="arg" href="../D01/d01asf.xml#G_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="G_X" id="G_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 at which the function <m:math><m:mi>g</m:mi></m:math>&#160;must be evaluated.</div></dd></dl>
</div>
<div class="paramtext"><a class="arg" href="#G">G</a> must be declared as EXTERNAL in the (sub)program from which D01ASF is called. Parameters denoted as <span class="italic">Input</span>  must <b>not</b>  be changed by this procedure.</div>
</dd><dt class="paramhead"><a name="A" id="A"/>2: &#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="OMEGA" id="OMEGA"/>3: &#160;&#160;&#8194; OMEGA &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the parameter <m:math><m:mi>&#969;</m:mi></m:math>&#160;in the weight function of the transform.</div></dd><dt class="paramhead"><a name="KEY" id="KEY"/>4: &#160;&#160;&#8194; KEY &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: indicates which integral is to be computed.

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#KEY"><m:mi mathcolor="#EE0000" mathvariant="bold">KEY</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd><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>.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#KEY"><m:mi mathcolor="#EE0000" mathvariant="bold">KEY</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd><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>sin</m:mi><m:mfenced separators=""><m:mi>&#969;</m:mi><m:mi>x</m:mi></m:mfenced></m:mrow></m:math>.</dd></dl>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#KEY"><m:mi mathcolor="#EE0000" mathvariant="bold">KEY</m:mi></m:maction><m:mo>=</m:mo><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="EPSABS" id="EPSABS"/>5: &#160;&#160;&#8194; EPSABS &#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 <a class="arg" href="#EPSABS">EPSABS</a> is negative, the absolute value is used. See <a class="sec" href="#accuracy">Section 7</a>.</div></dd><dt class="paramhead"><a name="RESULT" id="RESULT"/>6: &#160;&#160;&#8194; RESULT &#8211; <span class="bitalic">double precision</span><span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: the approximation to the integral <m:math><m:mi>I</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="ABSERR" id="ABSERR"/>7: &#160;&#160;&#8194; ABSERR &#8211; <span class="bitalic">double precision</span><span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: an estimate of the modulus of the absolute error, which should be an upper bound for <m:math><m:mfenced open="|" close="|" separators=""><m:mi>I</m:mi><m:mo>-</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#RESULT"><m:mi mathcolor="#EE0000" mathvariant="bold">RESULT</m:mi></m:maction></m:mfenced></m:math>.</div></dd><dt class="paramhead"><a name="LIMLST" id="LIMLST"/>8: &#160;&#160;&#8194; LIMLST &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 

an upper bound on the number of intervals <m:math><m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub></m:math>&#160;needed for the integration.</div>
<div class="paramtext"><i>Suggested value</i>:
  

<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIMLST"><m:mi mathcolor="#EE0000" mathvariant="bold">LIMLST</m:mi></m:maction><m:mo>=</m:mo><m:mn>50</m:mn></m:math>&#160;is adequate for most problems.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIMLST"><m:mi mathcolor="#EE0000" mathvariant="bold">LIMLST</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>3</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="LST" id="LST"/>9: &#160;&#160;&#8194; LST &#8211; INTEGER<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: the number of intervals <m:math><m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub></m:math>&#160;actually used for the integration.</div></dd><dt class="paramhead"><a name="ERLST" id="ERLST"/>10: &#8194; ERLST(<a class="arg" href="#LIMLST">LIMLST</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ERLST"><m:mi mathcolor="#EE0000" mathvariant="bold">ERLST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>k</m:mi></m:mfenced></m:mrow></m:math>&#160;contains the error estimate corresponding to the integral contribution over the interval <m:math><m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub></m:math>, for <m:math><m:mi>k</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:maction actiontype="link" dsi:type="simple" dsi:href="#LST"><m:mi mathcolor="#EE0000" mathvariant="bold">LST</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="RSLST" id="RSLST"/>11: &#8194; RSLST(<a class="arg" href="#LIMLST">LIMLST</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#RSLST"><m:mi mathcolor="#EE0000" mathvariant="bold">RSLST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>k</m:mi></m:mfenced></m:mrow></m:math>&#160;contains the integral contribution over the interval <m:math><m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub></m:math>, for <m:math><m:mi>k</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:maction actiontype="link" dsi:type="simple" dsi:href="#LST"><m:mi mathcolor="#EE0000" mathvariant="bold">LST</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="IERLST" id="IERLST"/>12: &#8194; IERLST(<a class="arg" href="#LIMLST">LIMLST</a>) &#8211; INTEGER array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IERLST"><m:mi mathcolor="#EE0000" mathvariant="bold">IERLST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>k</m:mi></m:mfenced></m:mrow></m:math>&#160;contains the error flag corresponding to <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#RSLST"><m:mi mathcolor="#EE0000" mathvariant="bold">RSLST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>k</m:mi></m:mfenced></m:mrow></m:math>, for <m:math><m:mi>k</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:maction actiontype="link" dsi:type="simple" dsi:href="#LST"><m:mi mathcolor="#EE0000" mathvariant="bold">LST</m:mi></m:maction></m:math>. See <a class="sec" href="#errors">Section 6</a>.</div></dd><dt class="paramhead"><a name="W" id="W"/>13: &#8194; W(<a class="arg" href="#LW">LW</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Workspace</span></dt><dt class="multi-paramhead"><a name="LW" id="LW"/>14: &#8194; LW &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the dimension of the array <a class="arg" href="#W">W</a> as declared in the (sub)program from which D01ASF is called. The value of <a class="arg" href="#LW">LW</a> (together with that of <a class="arg" href="#LIW">LIW</a>) imposes a bound on the number of sub-intervals into which each interval <m:math><m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub></m:math>&#160;may be divided by the routine. The number of sub-intervals cannot exceed <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LW"><m:mi mathcolor="#EE0000" mathvariant="bold">LW</m:mi></m:maction><m:mo>/</m:mo><m:mn>4</m:mn></m:math>. The more difficult the integrand, the larger <a class="arg" href="#LW">LW</a> should be.</div>
<div class="paramtext"><i>Suggested value</i>:
  a value in the range <m:math><m:mn>800</m:mn></m:math>&#160;to <m:math><m:mn>2000</m:mn></m:math>&#160;is adequate for most problems.

</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LW"><m:mi mathcolor="#EE0000" mathvariant="bold">LW</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>4</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="IW" id="IW"/>15: &#8194; IW(<a class="arg" href="#LIW">LIW</a>) &#8211; INTEGER array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IW"><m:mi mathcolor="#EE0000" mathvariant="bold">IW</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>&#160;contains the maximum number of sub-intervals actually used for integrating over any of the intervals <m:math><m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub></m:math>. The rest of the array is used as workspace.</div></dd><dt class="paramhead"><a name="LIW" id="LIW"/>16: &#8194; LIW &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the dimension of the array <a class="arg" href="#IW">IW</a> as declared in the (sub)program from which D01ASF is called. The number of sub-intervals into which each interval <m:math><m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub></m:math>&#160;may be divided cannot exceed <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIW"><m:mi mathcolor="#EE0000" mathvariant="bold">LIW</m:mi></m:maction><m:mo>/</m:mo><m:mn>2</m:mn></m:math>.</div>
<div class="paramtext"><i>Suggested value</i>:
  

<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIW"><m:mi mathcolor="#EE0000" mathvariant="bold">LIW</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#LW"><m:mi mathcolor="#EE0000" mathvariant="bold">LW</m:mi></m:maction><m:mo>/</m:mo><m:mn>2</m:mn></m:math>.
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIW"><m:mi mathcolor="#EE0000" mathvariant="bold">LIW</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>17: &#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> D01ASF 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">The maximum number of subdivisions allowed with the given workspace has been reached without the accuracy requirements being achieved.  Look at the integrand in order to determine the integration difficulties.  If the position of a local difficulty within the interval can be determined (e.g., a singularity of the integrand or its derivative, a peak, a discontinuity, etc.) you will probably gain from splitting up the interval at this point and calling D01ASF on the infinite subrange and an appropriate integrator on the finite subrange.  Alternatively, consider relaxing the accuracy requirements specified by <a class="arg" href="#EPSABS">EPSABS</a> or increasing the amount of workspace.</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">Round-off error prevents the requested tolerance from being achieved.  Consider requesting less accuracy.</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">Extremely bad local integrand behaviour causes a very strong subdivision around one (or more) points of the interval.  The same advice applies as in the case of <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>.</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">The requested tolerance cannot be achieved because the extrapolation does not increase the accuracy satisfactorily; the returned result is the best which can be obtained.  The same advice applies as in the case of <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>.</div>
<div class="paramtext">Look at the integrand in order to determine the integration difficulties.  If the position of a local difficulty within the interval can be determined (e.g., a singularity of the integrand or its derivative, a peak, a discontinuity etc.) you will probably gain from splitting up the interval at this point and calling D01ASF on the infinite subrange and an appropriate integrator on the finite subrange.  Alternatively, consider relaxing the accuracy requirements specified by <a class="arg" href="#EPSABS">EPSABS</a> or increasing the amount of workspace.</div>
<div class="paramtext">Please note that divergence can occur with any nonzero value of <a class="arg" href="#IFAIL">IFAIL</a>.</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq5" id="IFeq5"/><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>5</m:mn></m:math></dt>
<dd><div class="paramtext">The integral is probably divergent, or slowly convergent.  Please note that divergence can occur with any nonzero value of <a class="arg" href="#IFAIL">IFAIL</a>.</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq6" id="IFeq6"/><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>6</m:mn></m:math></dt>
<dd>
<table class="ifail"><tr><td class="ifail1">On&#160;entry,</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#KEY"><m:mi mathcolor="#EE0000" mathvariant="bold">KEY</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>1</m:mn></m:math>&#160;or <m:math><m:mn>2</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIMLST"><m:mi mathcolor="#EE0000" mathvariant="bold">LIMLST</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>3</m:mn></m:math>.</td></tr></table>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq7" id="IFeq7"/><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>7</m:mn></m:math></dt>
<dd>
<div class="paramtext">Bad integration behaviour occurs within one or more of the intervals <m:math><m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub></m:math>.  Location and type of the difficulty involved can be determined from the vector <a class="arg" href="#IERLST">IERLST</a>.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq8" id="IFeq8"/><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>8</m:mn></m:math></dt>
<dd>
<div class="paramtext">Maximum number of intervals <m:math><m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub></m:math>&#160;(<m:math><m:mtext/><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIMLST"><m:mi mathcolor="#EE0000" mathvariant="bold">LIMLST</m:mi></m:maction></m:math>) allowed has been achieved.  Increase the value of <a class="arg" href="#LIMLST">LIMLST</a> to allow more cycles.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq9" id="IFeq9"/><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>9</m:mn></m:math></dt>
<dd>
<div class="paramtext">The extrapolation table constructed for convergence acceleration of the series formed by the integral contribution over the intervals <m:math><m:msub><m:mi>C</m:mi><m:mi>k</m:mi></m:msub></m:math>, does not converge to the required accuracy.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq10" id="IFeq10"/><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>10</m:mn></m:math></dt>
<dd><table class="ifail"><tr><td class="ifail1">On&#160;entry,</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LW"><m:mi mathcolor="#EE0000" mathvariant="bold">LW</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>4</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIW"><m:mi mathcolor="#EE0000" mathvariant="bold">LIW</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>2</m:mn></m:math>.</td></tr></table></dd>
</dl>
<div class="paramtext">In the cases <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="#IFeq7"><m:mn mathcolor="#003399" mathvariant="bold">7</m:mn></m:maction></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq8"><m:mn mathcolor="#003399" mathvariant="bold">8</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq9"><m:mn mathcolor="#003399" mathvariant="bold">9</m:mn></m:maction></m:math>, additional information about the cause of the error can be obtained from the array <a class="arg" href="#IERLST">IERLST</a>, as follows:

<dl>
<dt class="paramval"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IERLST"><m:mi mathcolor="#EE0000" mathvariant="bold">IERLST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>k</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>The maximum number of <m:math><m:mtext>subdivisions</m:mtext><m:mo>=</m:mo><m:mrow><m:mi>min</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#LW"><m:mi mathcolor="#EE0000" mathvariant="bold">LW</m:mi></m:maction><m:mo>/</m:mo><m:mn>4</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIW"><m:mi mathcolor="#EE0000" mathvariant="bold">LIW</m:mi></m:maction><m:mo>/</m:mo><m:mn>2</m:mn></m:mfenced></m:mrow></m:math>&#160;has been achieved on the <m:math><m:mi>k</m:mi></m:math>th interval.</dd>
<dt class="paramval"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IERLST"><m:mi mathcolor="#EE0000" mathvariant="bold">IERLST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>k</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>Occurrence of round-off error is detected and prevents the tolerance imposed on the <m:math><m:mi>k</m:mi></m:math>th interval from being achieved.</dd>
<dt class="paramval"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IERLST"><m:mi mathcolor="#EE0000" mathvariant="bold">IERLST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>k</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt>
<dd>Extremely bad integrand behaviour occurs at some points of the <m:math><m:mi>k</m:mi></m:math>th interval.</dd>
<dt class="paramval"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IERLST"><m:mi mathcolor="#EE0000" mathvariant="bold">IERLST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>k</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>4</m:mn></m:math></dt>
<dd>The integration procedure over the <m:math><m:mi>k</m:mi></m:math>th interval does not converge (to within the required accuracy) due to round-off in the extrapolation procedure invoked on this interval.  It is assumed that the result on this interval is the best which can be obtained.</dd>
<dt class="paramval"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IERLST"><m:mi mathcolor="#EE0000" mathvariant="bold">IERLST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>k</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>5</m:mn></m:math></dt>
<dd>The integral over the <m:math><m:mi>k</m:mi></m:math>th interval is probably divergent or slowly convergent.  It must be noted that divergence can occur with any other value of <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IERLST"><m:mi mathcolor="#EE0000" mathvariant="bold">IERLST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>k</m:mi></m:mfenced></m:mrow></m:math>.</dd></dl>
</div><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">D01ASF cannot guarantee, but in practice usually achieves, the following accuracy:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mfenced open="|" close="|" separators=""><m:mi>I</m:mi><m:mo>-</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#RESULT"><m:mi mathcolor="#EE0000" mathvariant="bold">RESULT</m:mi></m:maction></m:mfenced><m:mo>&#8804;</m:mo><m:mfenced open="|" close="|" separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#EPSABS"><m:mi mathcolor="#EE0000" mathvariant="bold">EPSABS</m:mi></m:maction></m:mfenced><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <a class="arg" href="#EPSABS">EPSABS</a> is the user-specified absolute error tolerance.  Moreover, it returns the quantity <a class="arg" href="#ABSERR">ABSERR</a>, which, in normal circumstances, satisfies

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mfenced open="|" close="|" separators=""><m:mi>I</m:mi><m:mo>-</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#RESULT"><m:mi mathcolor="#EE0000" mathvariant="bold">RESULT</m:mi></m:maction></m:mfenced><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABSERR"><m:mi mathcolor="#EE0000" mathvariant="bold">ABSERR</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mfenced open="|" close="|" separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#EPSABS"><m:mi mathcolor="#EE0000" mathvariant="bold">EPSABS</m:mi></m:maction></m:mfenced><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div></div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext">None.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This example computes

<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:mi>&#8734;</m:mi></m:munderover>
 <m:mfrac><m:mn>1</m:mn><m:msqrt><m:mi>x</m:mi></m:msqrt></m:mfrac>
 <m:mrow><m:mi>cos</m:mi><m:mfenced separators=""><m:mi>&#960;</m:mi><m:mi>x</m:mi><m:mo>/</m:mo><m:mn>2</m:mn></m:mfenced></m:mrow>
 <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></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/d01asfe.f">Program Text (d01asfe.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/d01asfe.r">Program Results (d01asfe.r)</a></p><hr/><div><a class="rout" href="../../pdf/D01/d01asf.pdf">D01ASF (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>
