<?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>D02HBF : 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/D02/d02hbf.pdf">D02HBF (PDF version)</a></div><div><a class="chap" href="d02conts.xml">D02 Chapter Contents</a></div><div><a class="chapint" href="d02intro.xml">D02 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/>D02HBF</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">D02HBF solves a two-point boundary value problem for a system of ordinary differential equations, using initial value techniques and Newton iteration; it generalizes subroutine <a class="rout" href="../D02/d02haf.xml">D02HAF</a> to include the case where parameters other than boundary values are to be determined.</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;D02HBF&#160;(</td><td class="tdfspec2"><a class="arg" href="#P">P</a>, <a class="arg" href="#N1">N1</a>, <a class="arg" href="#PE">PE</a>, <a class="arg" href="#E">E</a>, <a class="arg" href="#N">N</a>, <a class="arg" href="#SOLN">SOLN</a>, <a class="arg" href="#M1">M1</a>, <a class="arg" href="#FCN">FCN</a>, <a class="arg" href="#BC">BC</a>, <a class="arg" href="#RANGE">RANGE</a>, <a class="arg" href="#W">W</a>, <a class="arg" href="#SDW">SDW</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">N1, N, M1, SDW, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">P(N1), PE(N1), E(N), SOLN(N,M1), W(N,SDW)</td></tr><tr><td class="tdfspec1">EXTERNAL</td><td class="tdfspec2">FCN, BC, RANGE</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">D02HBF solves a two-point boundary value problem by determining the unknown parameters <m:math><m:msub><m:mi>p</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>p</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>p</m:mi><m:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:msub></m:math>&#160;of the problem.  These parameters may be, but need not be, boundary values;  they may include eigenvalue parameters in the coefficients of the differential equations, length of the range of integration, etc. The notation and methods used are similar to those of <a class="rout" href="../D02/d02haf.xml">D02HAF</a> and you are advised to study this first.  (The parameters <m:math><m:msub><m:mi>p</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>p</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>p</m:mi><m:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:msub></m:math>&#160;correspond precisely to the unknown boundary conditions in <a class="rout" href="../D02/d02haf.xml">D02HAF</a>.)  It is assumed that we have a system of <m:math><m:mi mathvariant="italic">n</m:mi></m:math>&#160;first-order ordinary differential equations of the form:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mfrac><m:mrow><m:mi>d</m:mi><m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub></m:mrow>
  <m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow>
 </m:mfrac><m:mo>=</m:mo><m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:msub><m:mi>y</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>y</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>y</m:mi><m:mi mathvariant="italic">n</m:mi></m:msub></m:mfenced><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 mathvariant="italic">n</m:mi><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

and that the derivatives <m:math><m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;are evaluated by <a class="arg" href="#FCN">FCN</a>.  The system, including the boundary conditions given by <a class="arg" href="#BC">BC</a> and the range of integration given by <a class="arg" href="#RANGE">RANGE</a>, involves the <m:math><m:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;unknown parameters <m:math><m:msub><m:mi>p</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>p</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>p</m:mi><m:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:msub></m:math>&#160;which are to be determined,  and for which initial estimates must be supplied.  The number of unknown parameters <m:math><m:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;must not exceed the number of equations <m:math><m:mi mathvariant="italic">n</m:mi></m:math>.  If <m:math><m:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub><m:mo>&lt;</m:mo><m:mi mathvariant="italic">n</m:mi></m:math>, we assume that <m:math><m:mfenced separators=""><m:mi mathvariant="italic">n</m:mi><m:mo>-</m:mo><m:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:mfenced></m:math>&#160;equations of the system are not involved in the matching process.  These are usually referred to as &#8216;driving equations&#8217;; they are independent of the parameters and of the solutions of the other <m:math><m:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;equations.  In numbering the equations for <a class="arg" href="#FCN">FCN</a>, the driving equations must be put <b>first</b>.</div><div class="paramtext">The estimated values of the parameters are corrected by a form of Newton iteration.  The Newton correction on each iteration is calculated using a Jacobian matrix whose <m:math><m:mfenced separators=""><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mfenced></m:math>th element depends on the derivative of the <m:math><m:mi>i</m:mi></m:math>th component of the solution, <m:math><m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub></m:math>,  with respect to the <m:math><m:mi>j</m:mi></m:math>th parameter, <m:math><m:msub><m:mi>p</m:mi><m:mi>j</m:mi></m:msub></m:math>.  This matrix is calculated by a simple numerical differentiation technique which requires <m:math><m:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;evaluations of the differential system.</div><div class="paramtext">If the parameter <a class="arg" href="#IFAIL">IFAIL</a> is set appropriately, the routine automatically prints messages to inform you of the flow of the calculation.  These messages are discussed in detail in <a class="sec" href="#fcomments">Section 8</a>.</div><div class="paramtext">D02HBF is a simplified version of <a class="rout" href="../D02/d02saf.xml">D02SAF</a> which is described in detail in <a class="ref" href="#ref025">Gladwell (1979)</a>.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref025" id="ref025"/>Gladwell I (1979)  The development of the boundary value codes in the ordinary differential equations chapter of the NAG Library <i>Codes for Boundary Value Problems in Ordinary Differential Equations. Lecture Notes in Computer Science</i> (eds B Childs, M Scott, J W Daniel, E Denman and P Nelson) <b>76</b> Springer&#8211;Verlag </div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<div class="paramtext">You are strongly recommended to read <a class="sec" href="#description">Sections 3</a> and <a class="sec" href="#fcomments">8</a> in conjunction with this section.</div><dl><dt class="paramhead"><a name="P" id="P"/>1: &#160;&#160;&#8194; P(<a class="arg" href="#N1">N1</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry</i>: an estimate for the <m:math><m:mi>i</m:mi></m:math>th parameter, <m:math><m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub></m:math>, for <m:math><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:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>.</div>
<div class="paramtext"><i>On exit</i>: the corrected value for the <m:math><m:mi>i</m:mi></m:math>th parameter, unless an error has occurred, when it contains the last calculated value of the parameter.</div></dd><dt class="paramhead"><a name="N1" id="N1"/>2: &#160;&#160;&#8194; N1 &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: 

<m:math><m:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>, the number of parameters.</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="#N1"><m:mi mathcolor="#EE0000" mathvariant="bold">N1</m:mi></m:maction><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>.
</div></dd><dt class="paramhead"><a name="PE" id="PE"/>3: &#160;&#160;&#8194; PE(<a class="arg" href="#N1">N1</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the elements of <a class="arg" href="#PE">PE</a> must be given small positive values. The element <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PE"><m:mi mathcolor="#EE0000" mathvariant="bold">PE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;is used 
<table class="standard-90"><tr>
<td style="width:2.1em;" valign="baseline">(i)</td>
<td valign="top">in the convergence test on the <m:math><m:mi>i</m:mi></m:math>th parameter in the Newton iteration, and</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(ii)</td>
<td valign="top">in perturbing the <m:math><m:mi>i</m:mi></m:math>th parameter when approximating the derivatives of the components of the solution with respect to this parameter for use in the Newton iteration.</td>
</tr></table>
<div class="paramtext">The elements <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PE"><m:mi mathcolor="#EE0000" mathvariant="bold">PE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;should not be chosen too small. They should usually be several orders of magnitude larger than <span class="bitalic">machine precision</span>.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PE"><m:mi mathcolor="#EE0000" mathvariant="bold">PE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">i</m:mi></m:mfenced></m:mrow><m:mo>&gt;</m:mo><m:mn>0.0</m:mn></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:maction actiontype="link" dsi:type="simple" dsi:href="#N1"><m:mi mathcolor="#EE0000" mathvariant="bold">N1</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="E" id="E"/>4: &#160;&#160;&#8194; E(<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the elements of <a class="arg" href="#E">E</a> must be given positive values. The element <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#E"><m:mi mathcolor="#EE0000" mathvariant="bold">E</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;is used in the bound on the local error in the <m:math><m:mi>i</m:mi></m:math>th component of the solution <m:math><m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;during integration.
<div class="paramtext">The elements <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#E"><m:mi mathcolor="#EE0000" mathvariant="bold">E</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;should not be chosen too small. They should usually be several orders of magnitude larger than <span class="bitalic">machine precision</span>.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#E"><m:mi mathcolor="#EE0000" mathvariant="bold">E</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">i</m:mi></m:mfenced></m:mrow><m:mo>&gt;</m:mo><m:mn>0.0</m:mn></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:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="N" id="N"/>5: &#160;&#160;&#8194; N &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: 


<m:math><m:mi mathvariant="italic">n</m:mi></m:math>, the total number of differential equations.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="SOLN" id="SOLN"/>6: &#160;&#160;&#8194; SOLN(<a class="arg" href="#N">N</a>,<a class="arg" href="#M1">M1</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: the solution when <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M1"><m:mi mathcolor="#EE0000" mathvariant="bold">M1</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>1</m:mn></m:math>.</div></dd><dt class="paramhead"><a name="M1" id="M1"/>7: &#160;&#160;&#8194; M1 &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: 

a value which controls exit values. 

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M1"><m:mi mathcolor="#EE0000" mathvariant="bold">M1</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>The final solution is not calculated.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M1"><m:mi mathcolor="#EE0000" mathvariant="bold">M1</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>The final values of the solution at interval (length of range)/<m:math><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#M1"><m:mi mathcolor="#EE0000" mathvariant="bold">M1</m:mi></m:maction><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced></m:math>&#160;are calculated and stored sequentially in the array <a class="arg" href="#SOLN">SOLN</a> starting with the values of the solutions evaluated at the first end point (see <a class="arg" href="#RANGE">RANGE</a>) stored in the first column of <a class="arg" href="#SOLN">SOLN</a>.</dd></dl>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M1"><m:mi mathcolor="#EE0000" mathvariant="bold">M1</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="FCN" id="FCN"/>8: &#160;&#160;&#8194; FCN &#8211; SUBROUTINE, supplied by the user.<span class="pclass">External Procedure</span></dt><dd>
<div class="paramtext"><a class="arg" href="#FCN">FCN</a> must evaluate the functions <m:math><m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;(i.e., the derivatives <m:math><m:msubsup><m:mi>y</m:mi><m:mi>i</m:mi><m:mo>&#8242;</m:mo></m:msubsup></m:math>), for <m:math><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 mathvariant="italic">n</m:mi></m:math>, at a general point <m:math><m:mi>x</m:mi></m:math>.</div><div class="subprog">
<div class="paramtext">The specification of <a class="arg" href="#FCN">FCN</a> is:</div><table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;FCN&#160;(</td><td class="tdfspec2"><a class="arg" href="../D02/d02hbf.xml#FCN_X">X</a>, <a class="arg" href="../D02/d02hbf.xml#FCN_Y">Y</a>, <a class="arg" href="../D02/d02hbf.xml#FCN_F">F</a>, <a class="arg" href="../D02/d02hbf.xml#FCN_P">P</a>)</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">X, Y(<m:math><m:mi mathvariant="italic">n</m:mi></m:math>), F(<m:math><m:mi mathvariant="italic">n</m:mi></m:math>), P(<m:math><m:mi mathvariant="italic">n1</m:mi></m:math>)</td></tr></table>
<div class="paramtext">where <m:math><m:mi mathvariant="italic">n</m:mi></m:math>&#160;and <m:math><m:mi mathvariant="italic">n1</m:mi></m:math>&#160;are the numerical values of <a class="arg" href="#N">N</a> and <a class="arg" href="#N1">N1</a> in the call of D02HBF.</div>
<dl><dt class="paramhead"><a name="FCN_X" id="FCN_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>: <m:math><m:mi>x</m:mi></m:math>, the value of the argument.</div></dd><dt class="paramhead"><a name="FCN_Y" id="FCN_Y"/>2: &#160;&#160;&#8194; Y(<m:math><m:mi mathvariant="italic">n</m:mi></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub></m:math>, the value of the argument, for <m:math><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 mathvariant="italic">n</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="FCN_F" id="FCN_F"/>3: &#160;&#160;&#8194; F(<m:math><m:mi mathvariant="italic">n</m:mi></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: the value of <m:math><m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub></m:math>, for <m:math><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 mathvariant="italic">n</m:mi></m:math>. The <m:math><m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;may depend upon the parameters <m:math><m:msub><m:mi>p</m:mi><m:mi>j</m:mi></m:msub></m:math>, for <m:math><m:mi>j</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:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>. If there are any driving equations (see <a class="sec" href="#description">Section 3</a>) then these must be numbered first in the ordering of the components of <a class="arg" href="../D02/d02hbf.xml#FCN_F">F</a> in <a class="arg" href="#FCN">FCN</a>.</div></dd><dt class="paramhead"><a name="FCN_P" id="FCN_P"/>4: &#160;&#160;&#8194; P(<m:math><m:mi mathvariant="italic">n1</m:mi></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the current estimate of the parameter <m:math><m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub></m:math>, for <m:math><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:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>.</div></dd></dl>
</div>
<div class="paramtext"><a class="arg" href="#FCN">FCN</a> must be declared as EXTERNAL in the (sub)program from which D02HBF 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="BC" id="BC"/>9: &#160;&#160;&#8194; BC &#8211; SUBROUTINE, supplied by the user.<span class="pclass">External Procedure</span></dt><dd>
<div class="paramtext"><a class="arg" href="#BC">BC</a> must place in <a class="arg" href="../D02/d02hbf.xml#BC_G1">G1</a> and <a class="arg" href="../D02/d02hbf.xml#BC_G2">G2</a> the boundary conditions at <m:math><m:mi>a</m:mi></m:math>&#160;and <m:math><m:mi>b</m:mi></m:math>&#160;respectively (see <a class="arg" href="#RANGE">RANGE</a>).</div><div class="subprog">
<div class="paramtext">The specification of <a class="arg" href="#BC">BC</a> is:</div><table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;BC&#160;(</td><td class="tdfspec2"><a class="arg" href="../D02/d02hbf.xml#BC_G1">G1</a>, <a class="arg" href="../D02/d02hbf.xml#BC_G2">G2</a>, <a class="arg" href="../D02/d02hbf.xml#BC_P">P</a>)</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">G1(<m:math><m:mi mathvariant="italic">n</m:mi></m:math>), G2(<m:math><m:mi mathvariant="italic">n</m:mi></m:math>), P(<m:math><m:mi mathvariant="italic">n1</m:mi></m:math>)</td></tr></table>
<div class="paramtext">where <m:math><m:mi mathvariant="italic">n</m:mi></m:math>&#160;and <m:math><m:mi mathvariant="italic">n1</m:mi></m:math>&#160;are the numerical values of <a class="arg" href="#N">N</a> and <a class="arg" href="#N1">N1</a> in the call of D02HBF.</div>
<dl><dt class="paramhead"><a name="BC_G1" id="BC_G1"/>1: &#160;&#160;&#8194; G1(<m:math><m:mi mathvariant="italic">n</m:mi></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: the value of <m:math><m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>a</m:mi></m:mfenced></m:math>, (where this may be a known value or a function of the parameters <m:math><m:msub><m:mi>p</m:mi><m:mi>j</m:mi></m:msub></m:math>, for <m:math><m:mi>j</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:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;and <m:math><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 mathvariant="italic">n</m:mi></m:math>).</div></dd><dt class="paramhead"><a name="BC_G2" id="BC_G2"/>2: &#160;&#160;&#8194; G2(<m:math><m:mi mathvariant="italic">n</m:mi></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: the value of <m:math><m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>b</m:mi></m:mfenced></m:math>, for <m:math><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 mathvariant="italic">n</m:mi></m:math>, (where these may be known values or functions of the parameters <m:math><m:msub><m:mi>p</m:mi><m:mi>j</m:mi></m:msub></m:math>, for <m:math><m:mi>j</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:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>). If <m:math><m:mi mathvariant="italic">n</m:mi><m:mo>&gt;</m:mo><m:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>, so that there are some driving equations, then the first <m:math><m:mi mathvariant="italic">n</m:mi><m:mo>-</m:mo><m:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;values of <a class="arg" href="../D02/d02hbf.xml#BC_G2">G2</a> need not be set since they are never used.</div></dd><dt class="paramhead"><a name="BC_P" id="BC_P"/>3: &#160;&#160;&#8194; P(<m:math><m:mi mathvariant="italic">n1</m:mi></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: an estimate of the parameter <m:math><m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub></m:math>, for <m:math><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:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>.</div></dd></dl>
</div>
<div class="paramtext"><a class="arg" href="#BC">BC</a> must be declared as EXTERNAL in the (sub)program from which D02HBF 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="RANGE" id="RANGE"/>10: &#8194; RANGE &#8211; SUBROUTINE, supplied by the user.<span class="pclass">External Procedure</span></dt><dd>
<div class="paramtext"><a class="arg" href="#RANGE">RANGE</a> must evaluate the boundary points <m:math><m:mi>a</m:mi></m:math>&#160;and <m:math><m:mi>b</m:mi></m:math>, each of which may depend on the parameters <m:math><m:msub><m:mi>p</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>p</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>p</m:mi><m:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:msub></m:math>. The integrations in the shooting method are always from <m:math><m:mi>a</m:mi></m:math>&#160;to <m:math><m:mi>b</m:mi></m:math>.</div><div class="subprog">
<div class="paramtext">The specification of <a class="arg" href="#RANGE">RANGE</a> is:</div><table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;RANGE&#160;(</td><td class="tdfspec2"><a class="arg" href="../D02/d02hbf.xml#RANGE_A">A</a>, <a class="arg" href="../D02/d02hbf.xml#RANGE_B">B</a>, <a class="arg" href="../D02/d02hbf.xml#RANGE_P">P</a>)</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">A, B, P(<m:math><m:mi mathvariant="italic">n1</m:mi></m:math>)</td></tr></table>
<div class="paramtext">where <m:math><m:mi mathvariant="italic">n1</m:mi></m:math>&#160;is the actual value of <a class="arg" href="#N1">N1</a> in the call of D02HBF.</div>
<dl><dt class="paramhead"><a name="RANGE_A" id="RANGE_A"/>1: &#160;&#160;&#8194; A &#8211; <span class="bitalic">double precision</span><span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: <m:math><m:mi>a</m:mi></m:math>, one of the boundary points.</div></dd><dt class="paramhead"><a name="RANGE_B" id="RANGE_B"/>2: &#160;&#160;&#8194; B &#8211; <span class="bitalic">double precision</span><span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: the second boundary point, <m:math><m:mi>b</m:mi></m:math>. Note that <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#RANGE_B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction><m:mo>&gt;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#RANGE_A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction></m:math>&#160;forces the direction of integration to be that of increasing <m:math><m:mi>x</m:mi></m:math>. If <a class="arg" href="../D02/d02hbf.xml#RANGE_A">A</a> and <a class="arg" href="../D02/d02hbf.xml#RANGE_B">B</a> are interchanged the direction of integration is reversed.</div></dd><dt class="paramhead"><a name="RANGE_P" id="RANGE_P"/>3: &#160;&#160;&#8194; P(<m:math><m:mi mathvariant="italic">n1</m:mi></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the current estimate of the <m:math><m:mi>i</m:mi></m:math>th parameter, <m:math><m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub></m:math>, for <m:math><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:msub><m:mi mathvariant="italic">n</m:mi><m:mn>1</m:mn></m:msub></m:math>.</div></dd></dl>
</div>
<div class="paramtext"><a class="arg" href="#RANGE">RANGE</a> must be declared as EXTERNAL in the (sub)program from which D02HBF 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="W" id="W"/>11: &#8194; W(<a class="arg" href="#N">N</a>,<a class="arg" href="#SDW">SDW</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd>
<div class="paramtext">Used mainly for workspace.</div>
<div class="paramtext"><i>On exit</i>: with <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="#IFeq2"><m:mn mathcolor="#003399" mathvariant="bold">2</m:mn></m:maction></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq3"><m:mn mathcolor="#003399" mathvariant="bold">3</m:mn></m:maction></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq4"><m:mn mathcolor="#003399" mathvariant="bold">4</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq5"><m:mn mathcolor="#003399" mathvariant="bold">5</m:mn></m:maction></m:math>&#160;(see <a class="sec" href="#errors">Section 6</a>), <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#W"><m:mi mathcolor="#EE0000" mathvariant="bold">W</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>, for <m:math><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 mathvariant="italic">n</m:mi></m:math>, contains the solution at the point <m:math><m:mi>x</m:mi></m:math>&#160;when the error occurred. <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#W"><m:mi mathcolor="#EE0000" mathvariant="bold">W</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn><m:mn>2</m:mn></m:mfenced></m:mrow></m:math>&#160;contains <m:math><m:mi>x</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="SDW" id="SDW"/>12: &#8194; SDW &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the second dimension of the array <a class="arg" href="#W">W</a> as declared in the (sub)program from which D02HBF is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#SDW"><m:mi mathcolor="#EE0000" mathvariant="bold">SDW</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>3</m:mn><m:mo>&#8290;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>14</m:mn><m:mo>+</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>11</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>.
</div></dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>13: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext">For this routine, the normal use of <a class="arg" href="#IFAIL">IFAIL</a> is extended to control the printing of error and warning messages as well as specifying hard or soft failure (see <a class="sec" href="../GENINT/essint.xml#library3">Section 3.3</a> in  the Essential Introduction).</div>
<div class="paramtext"><i>On entry</i>: <a class="arg" href="#IFAIL">IFAIL</a> must be set to a value with the decimal expansion <m:math><m:mi mathvariant="italic">cba</m:mi></m:math>, where each of the decimal digits <m:math><m:mi>c</m:mi></m:math>, <m:math><m:mi>b</m:mi></m:math>&#160;and <m:math><m:mi>a</m:mi></m:math>&#160;must have a value of <m:math><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mn>1</m:mn></m:math>.
<table class="standard-90"><tr>
<td style="width:3.0em;" valign="baseline"><m:math><m:mi>a</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td>
<td valign="top">specifies hard failure, otherwise soft failure;</td>
</tr><tr>
<td style="width:3.0em;" valign="baseline"><m:math><m:mi>b</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td>
<td valign="top">suppresses error messages, otherwise error messages will be printed (see <a class="sec" href="#errors">Section 6</a>);</td>
</tr><tr>
<td style="width:3.0em;" valign="baseline"><m:math><m:mi>c</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td>
<td valign="top">suppresses warning messages, otherwise warning messages will be printed (see <a class="sec" href="#errors">Section 6</a>).</td>
</tr></table>
<div class="paramtext">The recommended value for inexperienced users is <m:math><m:mn>110</m:mn></m:math>&#160;(i.e., hard failure with all messages printed).</div>
</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></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">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">One or more of the parameters <a class="arg" href="#N">N</a>, <a class="arg" href="#N1">N1</a>, <a class="arg" href="#M1">M1</a>, <a class="arg" href="#SDW">SDW</a>, <a class="arg" href="#E">E</a> or <a class="arg" href="#PE">PE</a> is incorrectly set.</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">The step length for the integration became too short whilst calculating the residual (see <a class="sec" href="#fcomments">Section 8</a>).</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">No initial step length could be chosen for the integration whilst calculating the residual.</div></dd>
</dl>
<div class="paramtext"><b>Note:</b> <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="#IFeq2"><m:mn mathcolor="#003399" mathvariant="bold">2</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq3"><m:mn mathcolor="#003399" mathvariant="bold">3</m:mn></m:maction></m:math>&#160;can occur due to choosing too small a value for <a class="arg" href="#E">E</a> or due to choosing the wrong direction of integration.  Try varying <a class="arg" href="#E">E</a> and interchanging <m:math><m:mi>a</m:mi></m:math>&#160;and <m:math><m:mi>b</m:mi></m:math>.  These error exits can also occur for very poor initial choices of the parameters in the array <a class="arg" href="#P">P</a> and, in extreme cases, because D02HBF cannot be used to solve the problem posed.</div>
<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">As for <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="#IFeq2"><m:mn mathcolor="#003399" mathvariant="bold">2</m:mn></m:maction></m:math>&#160;but the error occurred when calculating the Jacobian.</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">As for <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="#IFeq3"><m:mn mathcolor="#003399" mathvariant="bold">3</m:mn></m:maction></m:math>&#160;but the error occurred when calculating the Jacobian.</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>
<div class="paramtext">The calculated Jacobian has an insignificant column.  This can occur because a parameter <m:math><m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;is incorrectly entered when posing the problem.</div>
</dd>
</dl>
<div class="paramtext"><b>Note:</b> <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="#IFeq4"><m:mn mathcolor="#003399" mathvariant="bold">4</m:mn></m:maction></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq5"><m:mn mathcolor="#003399" mathvariant="bold">5</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq6"><m:mn mathcolor="#003399" mathvariant="bold">6</m:mn></m:maction></m:math>&#160;usually indicate a badly scaled problem.  You may vary the size of <a class="arg" href="#PE">PE</a>.  Otherwise the use of the more general <a class="rout" href="../D02/d02saf.xml">D02SAF</a> which affords more control over the calculations is advised.</div>
<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">The linear algebra routine used (<a class="rout" href="../F08/f08kbf.xml">F08KBF (DGESVD)</a>) has failed.  This error exit should not occur and can be avoided by changing the initial estimates <m:math><m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub></m:math>.</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">The Newton iteration has failed to converge.  This can indicate a poor initial choice of parameters <m:math><m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;or a very difficult problem.  Consider varying the elements <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PE"><m:mi mathcolor="#EE0000" mathvariant="bold">PE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;if the residuals are small in the monitoring output.  If the residuals are large, try varying the initial parameters <m:math><m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub></m:math>.</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>
<dt class="multi-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>
<dt class="multi-errorhead"><a name="IFeq11" id="IFeq11"/><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>11</m:mn></m:math></dt>
<dt class="multi-errorhead"><a name="IFeq12" id="IFeq12"/><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>12</m:mn></m:math></dt>
<dt class="multi-errorhead"><a name="IFeq13" id="IFeq13"/><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>13</m:mn></m:math></dt>
<dd>
<div class="paramtext">Indicates that a serious error has occurred in an internal call.  Check all array subscripts and subroutine parameter lists in the call to D02HBF.  Seek expert help.</div>
</dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">If the process converges, the accuracy to which the unknown parameters are determined is usually close to that specified by you; the solution, if requested, may be determined to a required accuracy by varying <a class="arg" href="#E">E</a>.</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext">The time taken by D02HBF depends on the complexity of the system, and on the number of iterations required.  In practice, integration of the differential equations is by far the most costly process involved.</div><div class="paramtext">Wherever they occur in the routine, the error parameters contained in the arrays <a class="arg" href="#E">E</a> and <a class="arg" href="#PE">PE</a> are used in &#8216;mixed&#8217; form; that is <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#E"><m:mi mathcolor="#EE0000" mathvariant="bold">E</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;always occurs in expressions of the form

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#E"><m:mi mathcolor="#EE0000" mathvariant="bold">E</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow><m:mo>&#215;</m:mo><m:mfenced separators=""><m:mn>1</m:mn><m:mo>+</m:mo><m:mfenced open="|" close="|" separators=""><m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub></m:mfenced></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PE"><m:mi mathcolor="#EE0000" mathvariant="bold">PE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;always occurs in expressions of the form

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PE"><m:mi mathcolor="#EE0000" mathvariant="bold">PE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow><m:mo>&#215;</m:mo><m:mfenced separators=""><m:mn>1</m:mn><m:mo>+</m:mo><m:mfenced open="|" close="|" separators=""><m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub></m:mfenced></m:mfenced><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

Though not ideal for every application, it is expected that this mixture of absolute and relative error testing will be adequate for most purposes.</div><div class="paramtext">You may determine a suitable direction of integration <m:math><m:mi>a</m:mi></m:math>&#160;to <m:math><m:mi>b</m:mi></m:math>&#160;and suitable values for <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#E"><m:mi mathcolor="#EE0000" mathvariant="bold">E</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;by integrations with <a class="rout" href="../D02/d02pcf.xml">D02PCF</a>.  The best direction of integration is usually the direction of decreasing solutions.  You are strongly recommended to set <a class="arg" href="#IFAIL">IFAIL</a> to obtain self-explanatory error messages, and also monitoring information about the course of the computation.  You may select the channel numbers on which this output is to appear by calls of <a class="rout" href="../X04/x04aaf.xml">X04AAF</a> (for error messages) or <a class="rout" href="../X04/x04abf.xml">X04ABF</a> (for monitoring information) &#8211; see <a class="sec" href="#example">Section 9</a> for an example.  Otherwise the default channel numbers will be used, as specified in the <a class="url" href="http://www.nag.co.uk/doc/inun/fl22.html">Users' Note</a>.  The monitoring information produced at each iteration includes the current parameter values, the residuals and two norms: a basic norm and a current norm.  At each iteration the aim is to find parameter values which make the current norm less than the basic norm.  Both these norms should tend to zero as should the residuals.  (They would all be zero if the exact parameters were used as input.)  For more details, in particular about the other monitoring information printed, you are advised to consult the specification of <a class="rout" href="../D02/d02saf.xml">D02SAF</a>, and especially the description of the parameter <a class="arg" href="../D02/d02saf.xml#MONIT">MONIT</a> there.</div><div class="paramtext">The computing time for integrating the differential equations can sometimes depend critically on the quality of the initial estimates for the parameters <m:math><m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub></m:math>.  If it seems that too much computing time is required and, in particular, if the values of the residuals printed by the monitoring routine are much larger than the expected values of the solution at <m:math><m:mi>b</m:mi></m:math>, then the coding of <a class="arg" href="#FCN">FCN</a>, <a class="arg" href="#BC">BC</a> and <a class="arg" href="#RANGE">RANGE</a> should be checked for errors.  If no errors can be found, an independent attempt should be made to improve the initial estimates for <m:math><m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub></m:math>.</div><div class="paramtext">The subroutine can be used to solve a very wide range of problems, for example:
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(a)</td>
<td valign="top">eigenvalue problems, including problems where the eigenvalue occurs in the boundary conditions;</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(b)</td>
<td valign="top">problems where the differential equations depend on some parameters which are to be determined so as to satisfy certain boundary conditions (see Example 2 in <a class="sec" href="#example">Section 9</a>);</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(c)</td>
<td valign="top">problems where one of the end points of the range of integration is to be determined as the point where a variable <m:math><m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;takes a particular value (see Example 2 in <a class="sec" href="#example">Section 9</a>);</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(d)</td>
<td valign="top">singular problems and problems on infinite ranges of integration where the values of the solution at <m:math><m:mi>a</m:mi></m:math>&#160;or <m:math><m:mi>b</m:mi></m:math>&#160;or both are determined by a power series or an asymptotic expansion (or a more complicated expression) and where some of the coefficients in the expression are to be determined (see Example 1 in <a class="sec" href="#example">Section 9</a>); and</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(e)</td>
<td valign="top">differential equations with certain terms defined by other independent (driving) differential equations.</td>
</tr></table>
</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">For this routine two examples are presented.  There is a single example program for D02HBF, with a main program and the code to solve the two example problems given in Example 1 (EX1) and Example 2 (EX2).</div><div class="paramtext"><b>Example 1 (EX1)</b></div><div class="paramtext">This example finds the solution of the differential equation

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msup><m:mi>y</m:mi><m:mrow><m:mo>&#8242;</m:mo><m:mo>&#8242;</m:mo></m:mrow></m:msup><m:mo>=</m:mo><m:mfenced separators=""><m:msup><m:mi>y</m:mi><m:mn>3</m:mn></m:msup><m:mo>-</m:mo><m:msup><m:mi>y</m:mi><m:mo>&#8242;</m:mo></m:msup></m:mfenced><m:mo>/</m:mo><m:mn>2</m:mn><m:mi>x</m:mi>
</m:math></td><td class="formula2"/></tr></table></div>

on the range <m:math><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:mi>x</m:mi><m:mo>&#8804;</m:mo><m:mn>16</m:mn></m:math>, with boundary conditions <m:math><m:mi>y</m:mi><m:mfenced separators=""><m:mn>0</m:mn></m:mfenced><m:mo>=</m:mo><m:mn>0.1</m:mn></m:math>&#160;and <m:math><m:mi>y</m:mi><m:mfenced separators=""><m:mn>16</m:mn></m:mfenced><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>/</m:mo><m:mn>6</m:mn></m:math>.  We cannot use the differential equation at <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;because it is singular, so we take a truncated power series expansion

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>y</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>/</m:mo><m:mn>10</m:mn><m:mo>+</m:mo><m:msub><m:mi>p</m:mi><m:mn>1</m:mn></m:msub><m:mo>&#215;</m:mo><m:msqrt><m:mi>x</m:mi></m:msqrt><m:mo>/</m:mo><m:mn>10</m:mn><m:mo>+</m:mo><m:mi>x</m:mi><m:mo>/</m:mo><m:mn>100</m:mn>
</m:math></td><td class="formula2"/></tr></table></div>

near the origin where <m:math><m:msub><m:mi>p</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;is one of the parameters to be determined.  We choose the interval as <m:math><m:mfenced separators="" open="[" close="]"><m:mn>0.1</m:mn><m:mo>,</m:mo><m:mn>16</m:mn></m:mfenced></m:math>&#160;and setting <m:math><m:msub><m:mi>p</m:mi><m:mn>2</m:mn></m:msub><m:mo>=</m:mo><m:msup><m:mi>y</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mfenced separators=""><m:mn>16</m:mn></m:mfenced></m:math>, we can determine all the boundary conditions.  We take <m:math><m:mi mathvariant="normal">X1</m:mi><m:mo>=</m:mo><m:mn>16</m:mn></m:math>.  We write <m:math><m:mi>y</m:mi><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#FCN_Y"><m:mi mathcolor="#EE0000" mathvariant="bold">Y</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>, <m:math><m:msup><m:mi>y</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#FCN_Y"><m:mi mathcolor="#EE0000" mathvariant="bold">Y</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow></m:math>, and estimate <m:math><m:mi mathvariant="normal">PARAM</m:mi><m:mfenced separators=""><m:mn>1</m:mn></m:mfenced><m:mo>=</m:mo><m:mn>0.2</m:mn></m:math>, <m:math><m:mi mathvariant="normal">PARAM</m:mi><m:mfenced separators=""><m:mn>2</m:mn></m:mfenced><m:mo>=</m:mo><m:mn>0.0</m:mn></m:math>.  Note the call to <a class="rout" href="../X04/x04abf.xml">X04ABF</a> before the call to D02HBF.</div><div class="paramtext"><b>Example 2 (EX2)</b></div><div class="paramtext">This example finds the gravitational constant <m:math><m:msub><m:mi>p</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;and the range <m:math><m:msub><m:mi>p</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;over which a projectile must be fired to hit the target with a given velocity.</div><div class="paramtext">The differential equations are

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtable>
  <m:mtr columnalign="left">
   <m:mtd>
    <m:msup><m:mi>y</m:mi><m:mo>&#8242;</m:mo></m:msup>
    <m:mo>=</m:mo>
    <m:mrow><m:mi>tan</m:mi><m:mo>&#8289;</m:mo><m:mi>&#981;</m:mi></m:mrow>
   </m:mtd>
  </m:mtr><m:mtr columnalign="left">
   <m:mtd>
    <m:msup><m:mi>v</m:mi><m:mo>&#8242;</m:mo></m:msup>
    <m:mo>=</m:mo>
    <m:mfrac other="display">
     <m:mrow><m:mo>-</m:mo><m:mfenced separators=""><m:msub><m:mi>p</m:mi><m:mn>1</m:mn></m:msub><m:mrow><m:mi>sin</m:mi><m:mo>&#8289;</m:mo><m:mi>&#981;</m:mi></m:mrow><m:mo>+</m:mo><m:mn>0.00002</m:mn><m:mo>&#8290;</m:mo><m:msup><m:mi>v</m:mi><m:mn>2</m:mn></m:msup></m:mfenced></m:mrow>
     <m:mrow><m:mi>v</m:mi><m:mrow><m:mi>cos</m:mi><m:mo>&#8289;</m:mo><m:mi>&#981;</m:mi></m:mrow></m:mrow>
    </m:mfrac>
   </m:mtd>
  </m:mtr><m:mtr columnalign="left">
   <m:mtd>
    <m:mi>&#981;</m:mi>
    <m:mo>&#8242;</m:mo>
    <m:mo>=</m:mo>
    <m:mfrac other="display">
  <m:mrow><m:mo>-</m:mo><m:msub><m:mi>p</m:mi><m:mn>1</m:mn></m:msub></m:mrow><m:msup><m:mi>v</m:mi><m:mn>2</m:mn></m:msup></m:mfrac>
   </m:mtd>
  </m:mtr>
 </m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

on the range <m:math><m:mn>0</m:mn><m:mo>&lt;</m:mo><m:mi>x</m:mi><m:mo>&lt;</m:mo><m:msub><m:mi>p</m:mi><m:mn>2</m:mn></m:msub></m:math>, with boundary conditions

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtable>
 <m:mtr>
  <m:mtd><m:mi>y</m:mi><m:mo>=</m:mo><m:mn>0</m:mn><m:mtext>,</m:mtext></m:mtd>
  <m:mtd><m:mi>v</m:mi><m:mo>=</m:mo><m:mn>500</m:mn><m:mtext>,</m:mtext></m:mtd>
  <m:mtd><m:mi>&#981;</m:mi><m:mo>=</m:mo><m:mn>0.5</m:mn></m:mtd>
  <m:mtd><m:mtext>at &#160;</m:mtext><m:mi>x</m:mi><m:mo>=</m:mo><m:mn>0</m:mn><m:mtext>,</m:mtext></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mi>y</m:mi><m:mo>=</m:mo><m:mn>0</m:mn><m:mtext>,</m:mtext></m:mtd>
  <m:mtd><m:mi>v</m:mi><m:mo>=</m:mo><m:mn>450</m:mn><m:mtext>,</m:mtext></m:mtd>
  <m:mtd><m:mi>&#981;</m:mi><m:mo>=</m:mo><m:msub><m:mi>p</m:mi><m:mn>3</m:mn></m:msub></m:mtd>
  <m:mtd><m:mtext>at &#160;</m:mtext><m:mi>x</m:mi><m:mo>=</m:mo><m:msub><m:mi>p</m:mi><m:mn>2</m:mn></m:msub><m:mtext>.</m:mtext></m:mtd>
 </m:mtr>
</m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

We write <m:math><m:mi>y</m:mi><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#FCN_Y"><m:mi mathcolor="#EE0000" mathvariant="bold">Y</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>, <m:math><m:mi>v</m:mi><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#FCN_Y"><m:mi mathcolor="#EE0000" mathvariant="bold">Y</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow></m:math>,  <m:math><m:mi>&#981;</m:mi><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#FCN_Y"><m:mi mathcolor="#EE0000" mathvariant="bold">Y</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>3</m:mn></m:mfenced></m:mrow></m:math>.  We estimate <m:math><m:msub><m:mi>p</m:mi><m:mn>1</m:mn></m:msub><m:mo>=</m:mo><m:mi mathvariant="normal">PARAM</m:mi><m:mfenced separators=""><m:mn>1</m:mn></m:mfenced><m:mo>=</m:mo><m:mn>32</m:mn></m:math>, <m:math><m:msub><m:mi>p</m:mi><m:mn>2</m:mn></m:msub><m:mo>=</m:mo><m:mi mathvariant="normal">PARAM</m:mi><m:mfenced separators=""><m:mn>2</m:mn></m:mfenced><m:mo>=</m:mo><m:mn>6000</m:mn></m:math>&#160;and <m:math><m:msub><m:mi>p</m:mi><m:mn>3</m:mn></m:msub><m:mo>=</m:mo><m:mi mathvariant="normal">PARAM</m:mi><m:mfenced separators=""><m:mn>3</m:mn></m:mfenced><m:mo>=</m:mo><m:mn>0.54</m:mn></m:math>&#160;(though this last estimate is not important).</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/d02hbfe.f">Program Text (d02hbfe.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/d02hbfe.r">Program Results (d02hbfe.r)</a></p><div class="figure"><a name="d02hbf1-plot" id="d02hbf1-plot"/><img src="../figures/d02hbf1-plot.png" alt="Example Program Plot for d02hbf1-plot"/></div><div class="figure"><a name="d02hbf2-plot" id="d02hbf2-plot"/><img src="../figures/d02hbf2-plot.png" alt="Example Program Plot for d02hbf2-plot"/></div>
<hr/><div><a class="rout" href="../../pdf/D02/d02hbf.pdf">D02HBF (PDF version)</a></div><div><a class="chap" href="d02conts.xml">D02 Chapter Contents</a></div><div><a class="chapint" href="d02intro.xml">D02 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>
