<?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>C05PDF/C05PDA : 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/C05/c05pdf.pdf">C05PDF/C05PDA (PDF version)</a></div><div><a class="chap" href="c05conts.xml">C05 Chapter Contents</a></div><div><a class="chapint" href="c05intro.xml">C05 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/>C05PDF/C05PDA</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="htmltoc" onclick="showLevel('tocspecification');"><span class="htmltocplus" id="tocspecificationplus">+</span><span class="htmltocminus" id="tocspecificationminus">&#8722;</span></span>
<a class="htmltoc" href="#specification">2&#160;&#160;<b>Specification</b></a>
<div class="htmltocitem" id="tocspecification">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#routFspec">2.1&#160;&#160;<b>Specification for C05PDF</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#routAspec">2.2&#160;&#160;<b>Specification for C05PDA</b></a>
</div>
</div>
</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">C05PDF/C05PDA is a comprehensive reverse communication routine to find a solution of a system of nonlinear equations by a modification of the Powell hybrid method.  You must provide the Jacobian.</div><div class="paramtext">C05PDA is a version of C05PDF that has additional parameters in order to make it safe for use in multithreaded applications (see <a class="sec" href="#parameters">Section 5</a>).</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2><h3 class="standard"><a class="sec" name="routFspec" id="routFspec"/>2.1&#160;&#160;Specification for C05PDF</h3>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;C05PDF&#160;(</td><td class="tdfspec2"><a class="arg" href="#IREVCM">IREVCM</a>, <a class="arg" href="#N">N</a>, <a class="arg" href="#X">X</a>, <a class="arg" href="#FVEC">FVEC</a>, <a class="arg" href="#FJAC">FJAC</a>, <a class="arg" href="#LDFJAC">LDFJAC</a>, <a class="arg" href="#XTOL">XTOL</a>, <a class="arg" href="#DIAG">DIAG</a>, <a class="arg" href="#MODE">MODE</a>, <a class="arg" href="#FACTOR">FACTOR</a>, <a class="arg" href="#R">R</a>, <a class="arg" href="#LR">LR</a>, <a class="arg" href="#QTF">QTF</a>, <a class="arg" href="#W">W</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">IREVCM, N, LDFJAC, MODE, LR, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">X(N), FVEC(N), FJAC(LDFJAC,N), XTOL, DIAG(N), FACTOR, R(LR), QTF(N), W(N,4)</td></tr></table><h3 class="standard"><a class="sec" name="routAspec" id="routAspec"/>2.2&#160;&#160;Specification for C05PDA</h3>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;C05PDA&#160;(</td><td class="tdfspec2"><a class="arg" href="#IREVCM">IREVCM</a>, <a class="arg" href="#N">N</a>, <a class="arg" href="#X">X</a>, <a class="arg" href="#FVEC">FVEC</a>, <a class="arg" href="#FJAC">FJAC</a>, <a class="arg" href="#LDFJAC">LDFJAC</a>, <a class="arg" href="#XTOL">XTOL</a>, <a class="arg" href="#DIAG">DIAG</a>, <a class="arg" href="#MODE">MODE</a>, <a class="arg" href="#FACTOR">FACTOR</a>, <a class="arg" href="#R">R</a>, <a class="arg" href="#LR">LR</a>, <a class="arg" href="#QTF">QTF</a>, <a class="arg" href="#W">W</a>, <a class="arg" href="#LWSAV">LWSAV</a>, <a class="arg" href="#IWSAV">IWSAV</a>, <a class="arg" href="#RWSAV">RWSAV</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">IREVCM, N, LDFJAC, MODE, LR, IWSAV(15), IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">X(N), FVEC(N), FJAC(LDFJAC,N), XTOL, DIAG(N), FACTOR, R(LR), QTF(N), W(N,4), RWSAV(10)</td></tr><tr><td class="tdfspec1">LOGICAL</td><td class="tdfspec2">LWSAV(5)</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">The system of equations is defined as:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub>
 <m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mfenced>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
 <m:mtext>, &#8195;</m:mtext>
 <m:mi>i</m:mi><m:mo>=</m:mo>
 <m:mn>1</m:mn><m:mo>,</m:mo>
 <m:mn>2</m:mn><m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo><m:mo>,</m:mo>
 <m:mi>n</m:mi>
 <m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

C05PDF/C05PDA is based on the MINPACK routine HYBRJ (see <a class="ref" href="#ref004">Mor&#233; <span class="italic">et al.</span> (1980)</a>).  It chooses the correction at each step as a convex combination of the Newton and scaled gradient directions.  Under reasonable conditions this guarantees global convergence for starting points far from the solution and a fast rate of convergence.  The Jacobian is updated by the rank-1 method of Broyden.  For more details see <a class="ref" href="#ref005">Powell (1970)</a>.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref004" id="ref004"/>Mor&#233; J J, Garbow B S and Hillstrom K E (1980)  User guide for MINPACK-1 <i>Technical Report ANL-80-74</i> Argonne National Laboratory </div>
<div class="paramtext"><a name="ref005" id="ref005"/>Powell M J D (1970)  A hybrid method for nonlinear algebraic equations <i>Numerical Methods for Nonlinear Algebraic Equations</i> (ed P Rabinowitz) Gordon and Breach </div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<div class="paramtext"><b>Note:</b> this routine uses <b>reverse communication.</b> Its use involves an initial entry, intermediate exits and re-entries, and a final exit, as indicated by the <b>parameter <a class="arg" href="#IREVCM">IREVCM</a></b>. Between intermediate exits and re-entries, <b>all parameters other than</b> <b><a class="arg" href="#FVEC">FVEC</a> and <a class="arg" href="#FJAC">FJAC</a> must remain unchanged</b>.</div><dl><dt class="paramhead"><a name="IREVCM" id="IREVCM"/>1: &#160;&#160;&#8194; IREVCM &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On initial entry</i>: must have the value <m:math><m:mn>0</m:mn></m:math>.</div>
<div class="paramtext"><i>On intermediate exit</i>:
specifies what action you must take before re-entering C05PDF/C05PDA <b>with</b> <a class="arg" href="#IREVCM">IREVCM</a> <b>unchanged</b>.  The value of <a class="arg" href="#IREVCM">IREVCM</a> should be interpreted as follows: 

<dl>
<dt class="paramval"><m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn>
</m:math></dt>
<dd>Indicates the start of a new iteration.  No action is required by you, but <a class="arg" href="#X">X</a> and <a class="arg" href="#FVEC">FVEC</a> are available for printing.</dd>
<dt class="paramval"><m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn>
</m:math></dt>
<dd>Indicates that before re-entry to C05PDF/C05PDA, <a class="arg" href="#FVEC">FVEC</a> must contain the function value <m:math>
 <m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced>
</m:math>.</dd>
<dt class="paramval"><m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn>
</m:math></dt>
<dd>Indicates that before re-entry to C05PDF/C05PDA, <m:math>
 <m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#FJAC"><m:mi mathcolor="#EE0000" mathvariant="bold">FJAC</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow>
</m:math>&#160;must contain the value of <m:math>
 <m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>x</m:mi><m:mi>j</m:mi></m:msub></m:mrow>
 </m:mfrac>
</m:math>&#160;at the point <m:math><m:mi>x</m:mi></m:math>, for <m:math>
 <m:mi>i</m:mi><m:mo>,</m:mo><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:mi>n</m:mi>
</m:math>.</dd></dl>
</div>
<div class="paramtext"><i>On final exit</i>: <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn>
</m:math>, and the algorithm has terminated.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mn>1</m:mn></m:math>, <m:math><m:mn>2</m:mn></m:math>&#160;or <m:math><m:mn>3</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="N" id="N"/>2: &#160;&#160;&#8194; N &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On initial entry</i>: 
  
  
  

<m:math><m:mi>n</m:mi></m:math>, the number of 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>&gt;</m:mo><m:mn>0</m:mn>
</m:math>.
</div></dd><dt class="paramhead"><a name="X" id="X"/>3: &#160;&#160;&#8194; X(<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On initial entry</i>: an initial guess at the solution vector.</div>
<div class="paramtext"><i>On intermediate exit</i>:
contains the current point.</div>
<div class="paramtext"><i>On final exit</i>: the final estimate of the solution vector.</div></dd><dt class="paramhead"><a name="FVEC" id="FVEC"/>4: &#160;&#160;&#8194; FVEC(<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On initial entry</i>: need not be set.</div>
<div class="paramtext"><i>On intermediate re-entry</i>: if <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>2</m:mn>
</m:math>, <a class="arg" href="#FVEC">FVEC</a> must not be changed.
<div class="paramtext">If <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn>
</m:math>, <a class="arg" href="#FVEC">FVEC</a> must be set to the values of the functions computed at the current point <a class="arg" href="#X">X</a>.</div>
</div>
<div class="paramtext"><i>On final exit</i>: the function values at the final point, <a class="arg" href="#X">X</a>.</div></dd><dt class="paramhead"><a name="FJAC" id="FJAC"/>5: &#160;&#160;&#8194; FJAC(<a class="arg" href="#LDFJAC">LDFJAC</a>,<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On initial entry</i>: must be set to the values of the Jacobian evaluated at the initial point <a class="arg" href="#X">X</a>.</div>
<div class="paramtext"><i>On intermediate re-entry</i>: if <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>3</m:mn>
</m:math>, <a class="arg" href="#FJAC">FJAC</a> must not be changed. 
<div class="paramtext">If <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn>
</m:math>, <a class="arg" href="#FJAC">FJAC</a> must be set to the value of the Jacobian computed at the current point <a class="arg" href="#X">X</a>.</div>
</div>
<div class="paramtext"><i>On final exit</i>: the orthogonal matrix <m:math><m:mi>Q</m:mi></m:math>&#160;produced by the <m:math>
 <m:mi>Q</m:mi><m:mi>R</m:mi>
</m:math>&#160;factorization of the final approximate Jacobian.</div></dd><dt class="paramhead"><a name="LDFJAC" id="LDFJAC"/>6: &#160;&#160;&#8194; LDFJAC &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On initial entry</i>: the first dimension of the array <a class="arg" href="#FJAC">FJAC</a> as declared in the (sub)program from which C05PDF/C05PDA is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#LDFJAC"><m:mi mathcolor="#EE0000" mathvariant="bold">LDFJAC</m:mi></m:maction><m:mo>&#8805;</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="XTOL" id="XTOL"/>7: &#160;&#160;&#8194; XTOL &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On initial entry</i>: the accuracy in <a class="arg" href="#X">X</a> to which the solution is required.</div>
<div class="paramtext"><i>Suggested value</i>:
  the square root of the <span class="bitalic">machine precision</span>.

</div><div class="paramtext"><i>Constraint</i>:
  <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#XTOL"><m:mi mathcolor="#EE0000" mathvariant="bold">XTOL</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0.0</m:mn>
</m:math>.
</div></dd><dt class="paramhead"><a name="DIAG" id="DIAG"/>8: &#160;&#160;&#8194; DIAG(<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On initial entry</i>: if <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#MODE"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn>
</m:math>, <a class="arg" href="#DIAG">DIAG</a> must contain multiplicative scale factors for the variables.</div><div class="paramtext"><i>Constraint</i>:
  <m:math>
 <m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#DIAG"><m:mi mathcolor="#EE0000" mathvariant="bold">DIAG</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:mi>n</m:mi></m:math>.</div>
<div class="paramtext"><i>On intermediate exit</i>:
the scale factors actually used (computed internally if <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#MODE"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>2</m:mn>
</m:math>).</div></dd><dt class="paramhead"><a name="MODE" id="MODE"/>9: &#160;&#160;&#8194; MODE &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On initial entry</i>: indicates whether or not you have provided scaling factors in <a class="arg" href="#DIAG">DIAG</a>.  If <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#MODE"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn>
</m:math>&#160;the scale factors must be supplied in <a class="arg" href="#DIAG">DIAG</a>.  Otherwise, the variables will be scaled internally.</div></dd><dt class="paramhead"><a name="FACTOR" id="FACTOR"/>10: &#8194; FACTOR &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On initial entry</i>: a quantity to be used in determining the initial step bound.  In most cases, <a class="arg" href="#FACTOR">FACTOR</a> should lie between <m:math><m:mn>0.1</m:mn></m:math>&#160;and <m:math><m:mn>100.0</m:mn></m:math>.  (The step bound is <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#FACTOR"><m:mi mathcolor="#EE0000" mathvariant="bold">FACTOR</m:mi></m:maction><m:mo>&#215;</m:mo><m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#DIAG"><m:mi mathcolor="#EE0000" mathvariant="bold">DIAG</m:mi></m:maction><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction></m:mfenced><m:mn>2</m:mn></m:msub>
</m:math>&#160;if this is nonzero; otherwise the bound is <a class="arg" href="#FACTOR">FACTOR</a>.)</div>
<div class="paramtext"><i>Suggested value</i>:
  <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#FACTOR"><m:mi mathcolor="#EE0000" mathvariant="bold">FACTOR</m:mi></m:maction><m:mo>=</m:mo><m:mn>100.0</m:mn>
</m:math>.</div><div class="paramtext"><i>Constraint</i>:
  <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#FACTOR"><m:mi mathcolor="#EE0000" mathvariant="bold">FACTOR</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0.0</m:mn>
</m:math>.
</div></dd><dt class="paramhead"><a name="R" id="R"/>11: &#8194; R(<a class="arg" href="#LR">LR</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On initial entry</i>: need not be set.</div>
<div class="paramtext"><i>On intermediate exit</i>:
must not be changed.</div><div class="paramtext"><i>On final exit</i>: the upper triangular matrix <m:math><m:mi>R</m:mi></m:math>&#160;produced by the <m:math>
 <m:mi>Q</m:mi><m:mi>R</m:mi>
</m:math>&#160;factorization of the final approximate Jacobian, stored row-wise.</div></dd><dt class="paramhead"><a name="LR" id="LR"/>12: &#8194; LR &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On initial entry</i>: the dimension of the array <a class="arg" href="#R">R</a> as declared in the (sub)program from which C05PDF/C05PDA is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#LR"><m:mi mathcolor="#EE0000" mathvariant="bold">LR</m:mi></m:maction><m:mo>&#8805;</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>&#215;</m:mo><m:mfenced separators=""><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>1</m:mn></m:mfenced><m:mo>/</m:mo><m:mn>2</m:mn>
</m:math>.
</div></dd><dt class="paramhead"><a name="QTF" id="QTF"/>13: &#8194; QTF(<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On initial entry</i>: need not be set.</div>
<div class="paramtext"><i>On intermediate exit</i>:
must not be changed.</div> 
<div class="paramtext"><i>On final exit</i>: the vector <m:math>
 <m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>f</m:mi>
</m:math>.</div></dd><dt class="paramhead"><a name="W" id="W"/>14: &#8194; W(<a class="arg" href="#N">N</a>,<m:math><m:mn>4</m:mn></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Communication Array</span></dt><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>15: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><b>Note:</b> <span class="italic">for C05PDA, <a class="arg" href="#IFAIL">IFAIL</a> does not occur in this position in the parameter list.  See the additional parameters described below</span>.</div><div class="paramtext"><i>On initial 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 final 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><dd class="note"><b>Note:</b> <span class="italic"> the following are additional parameters for specific use with C05PDA.  Users of C05PDF therefore need not read the remainder of this description</span>.</dd><dt class="paramhead"><a name="LWSAV" id="LWSAV"/>15: &#8194; LWSAV(<m:math><m:mn>5</m:mn></m:math>) &#8211; LOGICAL array<span class="pclass">Communication Array</span></dt><dt class="multi-paramhead"><a name="IWSAV" id="IWSAV"/>16: &#8194; IWSAV(<m:math><m:mn>15</m:mn></m:math>) &#8211; INTEGER array<span class="pclass">Communication Array</span></dt><dt class="multi-paramhead"><a name="RWSAV" id="RWSAV"/>17: &#8194; RWSAV(<m:math><m:mn>10</m:mn></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Communication Array</span></dt><dd>
<div class="paramtext">The arrays <a class="arg" href="#LWSAV">LWSAV</a>, <a class="arg" href="#IWSAV">IWSAV</a> and <a class="arg" href="#RWSAV">RWSAV</a> <b>must not</b> be altered between calls to C05PDA.</div></dd><dt class="paramhead"><a name="IFAIL2" id="IFAIL2"/>18: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><b>Note:</b> see the parameter description for <a class="arg" href="#IFAIL">IFAIL</a> above.</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>
<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="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>0</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="#XTOL"><m:mi mathcolor="#EE0000" mathvariant="bold">XTOL</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0.0</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="#FACTOR"><m:mi mathcolor="#EE0000" mathvariant="bold">FACTOR</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>0.0</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="#LDFJAC"><m:mi mathcolor="#EE0000" mathvariant="bold">LDFJAC</m:mi></m:maction><m:mo>&lt;</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>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math>
   <m:maction actiontype="link" dsi:type="simple" dsi:href="#LR"><m:mi mathcolor="#EE0000" mathvariant="bold">LR</m:mi></m:maction><m:mo>&lt;</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>&#215;</m:mo>
   <m:mfenced separators=""><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>1</m:mn></m:mfenced>
   <m:mo>/</m:mo>
   <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="#MODE"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn>
  </m:math>&#160;and <m:math>
   <m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#DIAG"><m:mi mathcolor="#EE0000" mathvariant="bold">DIAG</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mn>0.0</m:mn>
  </m:math>&#160;for some <m:math><m:mi>i</m:mi></m:math>, <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:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction>
  </m:math>.</td></tr></table>
</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>
<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="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0</m:mn>
  </m:math>&#160;or <m:math>
   <m:maction actiontype="link" dsi:type="simple" dsi:href="#IREVCM"><m:mi mathcolor="#EE0000" mathvariant="bold">IREVCM</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>3</m:mn>
  </m:math>.</td></tr></table>
</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 further improvement in the approximate solution <a class="arg" href="#X">X</a> is possible; <a class="arg" href="#XTOL">XTOL</a> is too small.</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 iteration is not making good progress, as measured by the improvement from the last five Jacobian evaluations.</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 iteration is not making good progress, as measured by the improvement from the last <m:math><m:mn>10</m:mn></m:math>&#160;iterations.</div></dd>
</dl>
<div class="paramtext">The values <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>&#160;and <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="#IFeq5"><m:mn mathcolor="#003399" mathvariant="bold">5</m:mn></m:maction></m:math>&#160;may indicate that the system does not have a zero, or that the solution is very close to the origin (see <a class="sec" href="#accuracy">Section 7</a>).  Otherwise, rerunning C05PDF/C05PDA from a different starting point may avoid the region of difficulty.</div><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">If <m:math>
 <m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover>
</m:math>&#160;is the true solution and <m:math><m:mi>D</m:mi></m:math>&#160;denotes the diagonal matrix whose entries are defined by the array <a class="arg" href="#DIAG">DIAG</a>, then C05PDF/C05PDA tries to ensure that

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msub><m:mfenced open="&#8214;" close="&#8214;" separators="">
  <m:mi>D</m:mi>
  <m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover></m:mfenced>
 </m:mfenced><m:mn>2</m:mn></m:msub>
 <m:mo>&#8804;</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#XTOL"><m:mi mathcolor="#EE0000" mathvariant="bold">XTOL</m:mi></m:maction>
 <m:mo>&#215;</m:mo>
 <m:msub><m:mfenced open="&#8214;" close="&#8214;" separators="">
  <m:mi>D</m:mi>
  <m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover>
 </m:mfenced><m:mn>2</m:mn></m:msub>
 <m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

If this condition is satisfied with <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#XTOL"><m:mi mathcolor="#EE0000" mathvariant="bold">XTOL</m:mi></m:maction>
 <m:mo>=</m:mo>
 <m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mi>k</m:mi></m:mrow></m:msup>
</m:math>, then the larger components of <m:math>
 <m:mi>D</m:mi><m:mi>x</m:mi>
</m:math>&#160;have <m:math><m:mi>k</m:mi></m:math>&#160;significant decimal digits.  There is a danger that the smaller components of <m:math>
 <m:mi>D</m:mi><m:mi>x</m:mi>
</m:math>&#160;may have large relative errors, but the fast rate of convergence of C05PDF/C05PDA usually avoids this possibility.</div><div class="paramtext">If <a class="arg" href="#XTOL">XTOL</a> is less than <span class="bitalic">machine precision</span> and the above test is satisfied with the <span class="bitalic">machine precision</span> in place of <a class="arg" href="#XTOL">XTOL</a>, then the routine exits 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="#IFeq3"><m:mn mathcolor="#003399" mathvariant="bold">3</m:mn></m:maction></m:math>.</div><div class="paramtext"><b>Note:</b>&#160; this convergence test is based purely on relative error, and may not indicate convergence if the solution is very close to the origin.</div><div class="paramtext">The test assumes that the functions and the Jacobian are coded consistently and that the functions are reasonably well behaved.  If these conditions are not satisfied, then C05PDF/C05PDA may incorrectly indicate convergence.  The coding of the Jacobian can be checked using <a class="rout" href="../C05/c05zaf.xml">C05ZAF</a>.  If the Jacobian is coded correctly, then the validity of the answer can be checked by rerunning C05PDF/C05PDA with a tighter tolerance.</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext">The time required by C05PDF/C05PDA to solve a given problem depends on <m:math><m:mi>n</m:mi></m:math>, the behaviour of the functions, the accuracy requested and the starting point.  The number of arithmetic operations executed by C05PDF/C05PDA is about <m:math>
 <m:mn>11.5</m:mn><m:mo>&#215;</m:mo><m:msup><m:mi>n</m:mi><m:mn>2</m:mn></m:msup>
</m:math>&#160;to process each evaluation of the functions and about <m:math>
 <m:mn>1.3</m:mn><m:mo>&#215;</m:mo><m:msup><m:mi>n</m:mi><m:mn>3</m:mn></m:msup>
</m:math>&#160;to process each evaluation of the Jacobian.  The timing of C05PDF/C05PDA is strongly influenced by the time spent in the evaluation of the functions and the Jacobian.</div><div class="paramtext">Ideally the problem should be scaled so that, at the solution, the function values are of comparable magnitude.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This example determines the values <m:math>
 <m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub>
 <m:mo>,</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>,</m:mo>
 <m:msub><m:mi>x</m:mi><m:mn>9</m:mn></m:msub>
</m:math>&#160;which satisfy the tridiagonal equations:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtable columnalign="right center left">
 <m:mtr>
  <m:mtd><m:mfenced separators=""><m:mn>3</m:mn><m:mo>-</m:mo><m:mn>2</m:mn><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:mfenced><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>-</m:mo><m:mn>2</m:mn><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>=</m:mo></m:mtd>
  <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>,</m:mtext></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mo>-</m:mo><m:msub><m:mi>x</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>+</m:mo><m:mfenced separators=""><m:mn>3</m:mn><m:mo>-</m:mo><m:mn>2</m:mn><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:mfenced><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub><m:mo>-</m:mo><m:mn>2</m:mn><m:msub><m:mi>x</m:mi><m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub></m:mtd>
  <m:mtd><m:mo>=</m:mo></m:mtd>
  <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>, &#8195;</m:mtext><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mn>3</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mn>8</m:mn></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mo>-</m:mo><m:msub><m:mi>x</m:mi><m:mn>8</m:mn></m:msub><m:mo>+</m:mo><m:mfenced separators=""><m:mn>3</m:mn><m:mo>-</m:mo><m:mn>2</m:mn><m:msub><m:mi>x</m:mi><m:mn>9</m:mn></m:msub></m:mfenced><m:msub><m:mi>x</m:mi><m:mn>9</m:mn></m:msub></m:mtd>
  <m:mtd><m:mo>=</m:mo></m:mtd>
  <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>.</m:mtext></m:mtd>
 </m:mtr>
</m:mtable>
</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/c05pdfe.f">Program Text (c05pdfe.f)</a></p><p><a class="verbatimref" href="../../examples/source/c05pdae.f">Program Text (c05pdae.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/c05pdfe.r">Program Results (c05pdfe.r)</a></p><p><a class="verbatimref" href="../../examples/baseresults/c05pdae.r">Program Results (c05pdae.r)</a></p>
<hr/><div><a class="rout" href="../../pdf/C05/c05pdf.pdf">C05PDF/C05PDA (PDF version)</a></div><div><a class="chap" href="c05conts.xml">C05 Chapter Contents</a></div><div><a class="chapint" href="c05intro.xml">C05 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>
