<?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>F01BVF : 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/F01/f01bvf.pdf">F01BVF (PDF version)</a></div><div><a class="chap" href="f01conts.xml">F01 Chapter Contents</a></div><div><a class="chapint" href="f01intro.xml">F01 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/>F01BVF</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">F01BVF transforms the generalized symmetric-definite eigenproblem <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction><m:mi>x</m:mi></m:math>&#160;to the equivalent standard eigenproblem <m:math><m:mi>C</m:mi><m:mi>y</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>y</m:mi></m:math>, where <m:math><m:mi>A</m:mi></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction></m:math>&#160;and <m:math><m:mi>C</m:mi></m:math>&#160;are symmetric band matrices and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction></m:math>&#160;is positive-definite.  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction></m:math>&#160;must have been decomposed by <a class="rout" href="../F01/f01buf.xml">F01BUF</a>.</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;F01BVF&#160;(</td><td class="tdfspec2"><a class="arg" href="#N">N</a>, <a class="arg" href="#MA1">MA1</a>, <a class="arg" href="#MB1">MB1</a>, <a class="arg" href="#M3">M3</a>, <a class="arg" href="#K">K</a>, <a class="arg" href="#A">A</a>, <a class="arg" href="#LDA">LDA</a>, <a class="arg" href="#B">B</a>, <a class="arg" href="#LDB">LDB</a>, <a class="arg" href="#V">V</a>, <a class="arg" href="#LDV">LDV</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">N, MA1, MB1, M3, K, LDA, LDB, LDV, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">A(LDA,N), B(LDB,N), V(LDV,M3), W(M3)</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext"><m:math><m:mi>A</m:mi></m:math>&#160;is a symmetric band matrix of order <m:math><m:mi>n</m:mi></m:math>&#160;and bandwidth <m:math><m:mn>2</m:mn><m:msub><m:mi>m</m:mi><m:mi>A</m:mi></m:msub><m:mo>+</m:mo><m:mn>1</m:mn></m:math>.  The positive-definite symmetric band matrix <m:math><m:mi>B</m:mi></m:math>, of order <m:math><m:mi>n</m:mi></m:math>&#160;and bandwidth <m:math><m:mn>2</m:mn><m:msub><m:mi>m</m:mi><m:mi>B</m:mi></m:msub><m:mo>+</m:mo><m:mn>1</m:mn></m:math>, must have been previously decomposed by <a class="rout" href="../F01/f01buf.xml">F01BUF</a> as <m:math><m:mi>U</m:mi><m:mi>L</m:mi><m:mi>D</m:mi><m:msup><m:mi>L</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msup><m:mi>U</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>.  F01BVF applies <m:math><m:mi>U</m:mi></m:math>, <m:math><m:mi>L</m:mi></m:math>&#160;and <m:math><m:mi>D</m:mi></m:math>&#160;to <m:math><m:mi>A</m:mi></m:math>, <m:math><m:msub><m:mi>m</m:mi><m:mi>A</m:mi></m:msub></m:math>&#160;rows at a time, restoring the band form of <m:math><m:mi>A</m:mi></m:math>&#160;at each stage by plane rotations.  The parameter <m:math><m:mi>k</m:mi></m:math>&#160;defines the change-over point in the decomposition of <m:math><m:mi>B</m:mi></m:math>&#160;as used by <a class="rout" href="../F01/f01buf.xml">F01BUF</a> and is also used as a change-over point in the transformations applied by this routine.  For maximum efficiency, <m:math><m:mi>k</m:mi></m:math>&#160;should be chosen to be the multiple of <m:math><m:msub><m:mi>m</m:mi><m:mi>A</m:mi></m:msub></m:math>&#160;nearest to <m:math><m:mi>n</m:mi><m:mo>/</m:mo><m:mn>2</m:mn></m:math>.  The resulting symmetric band matrix <m:math><m:mi>C</m:mi></m:math>&#160;is overwritten on <a class="arg" href="#A">A</a>.  The eigenvalues of <m:math><m:mi>C</m:mi></m:math>, and thus of the original problem, may be found using <a class="rout" href="../F08/f08hef.xml">F08HEF (DSBTRD)</a> and <a class="rout" href="../F08/f08jff.xml">F08JFF (DSTERF)</a>.  For selected eigenvalues, use <a class="rout" href="../F08/f08hef.xml">F08HEF (DSBTRD)</a> and <a class="rout" href="../F08/f08jjf.xml">F08JJF (DSTEBZ)</a>.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref347" id="ref347"/>Crawford C R (1973)  Reduction of a band-symmetric generalized eigenvalue problem <i>Comm. ACM</i> <b>16</b> 41&#8211;44 </div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="N" id="N"/>1: &#160;&#160;&#8194; N &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 

<m:math><m:mi>n</m:mi></m:math>, the order of the matrices <m:math><m:mi>A</m:mi></m:math>, <m:math><m:mi>B</m:mi></m:math>&#160;and <m:math><m:mi>C</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="MA1" id="MA1"/>2: &#160;&#160;&#8194; MA1 &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 

<m:math><m:msub><m:mi>m</m:mi><m:mi>A</m:mi></m:msub><m:mo>+</m:mo><m:mn>1</m:mn></m:math>, where <m:math><m:msub><m:mi>m</m:mi><m:mi>A</m:mi></m:msub></m:math>&#160;is the number of nonzero superdiagonals in <m:math><m:mi>A</m:mi></m:math>. Normally <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MA1"><m:mi mathcolor="#EE0000" mathvariant="bold">MA1</m:mi></m:maction><m:mo>&#8810;</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="MB1" id="MB1"/>3: &#160;&#160;&#8194; MB1 &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 

<m:math><m:msub><m:mi>m</m:mi><m:mi>B</m:mi></m:msub><m:mo>+</m:mo><m:mn>1</m:mn></m:math>, where <m:math><m:msub><m:mi>m</m:mi><m:mi>B</m:mi></m:msub></m:math>&#160;is the number of nonzero superdiagonals in <m:math><m:mi>B</m:mi></m:math>.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MB1"><m:mi mathcolor="#EE0000" mathvariant="bold">MB1</m:mi></m:maction><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#MA1"><m:mi mathcolor="#EE0000" mathvariant="bold">MA1</m:mi></m:maction></m:math>.
</div></dd><dt class="paramhead"><a name="M3" id="M3"/>4: &#160;&#160;&#8194; M3 &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 


the value of <m:math><m:mn>3</m:mn><m:msub><m:mi>m</m:mi><m:mi>A</m:mi></m:msub><m:mo>+</m:mo><m:msub><m:mi>m</m:mi><m:mi>B</m:mi></m:msub></m:math>.</div></dd><dt class="paramhead"><a name="K" id="K"/>5: &#160;&#160;&#8194; K &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:mi>k</m:mi></m:math>, the change-over point in the transformations. It must be the same as the value used by <a class="rout" href="../F01/f01buf.xml">F01BUF</a> in the decomposition of <m:math><m:mi>B</m:mi></m:math>.</div>
<div class="paramtext"><i>Suggested value</i>:
  the optimum value is the multiple of <m:math><m:msub><m:mi>m</m:mi><m:mi>A</m:mi></m:msub></m:math>&#160;nearest to <m:math><m:mi>n</m:mi><m:mo>/</m:mo><m:mn>2</m:mn></m:math>.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MB1"><m:mi mathcolor="#EE0000" mathvariant="bold">MB1</m:mi></m:maction><m:mo>-</m:mo><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</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="A" id="A"/>6: &#160;&#160;&#8194; A(<a class="arg" href="#LDA">LDA</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 entry</i>: the upper triangle of the <m:math><m:mi>n</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;symmetric band matrix <m:math><m:mi>A</m:mi></m:math>, with the diagonal of the matrix stored in the <m:math><m:mfenced separators=""><m:msub><m:mi>m</m:mi><m:mi>A</m:mi></m:msub><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced></m:math>th row of the array, and the <m:math><m:msub><m:mi>m</m:mi><m:mi>A</m:mi></m:msub></m:math>&#160;superdiagonals within the band stored in the first <m:math><m:msub><m:mi>m</m:mi><m:mi>A</m:mi></m:msub></m:math>&#160;rows of the array. Each column of the matrix is stored in the corresponding column of the array. For example, if <m:math><m:mi>n</m:mi><m:mo>=</m:mo><m:mn>6</m:mn></m:math>&#160;and <m:math><m:msub><m:mi>m</m:mi><m:mi>A</m:mi></m:msub><m:mo>=</m:mo><m:mn>2</m:mn></m:math>, the storage scheme is 
<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block"> <m:mtable> <m:mtr> <m:mtd><m:mtext>*</m:mtext></m:mtd> <m:mtd><m:mtext>*</m:mtext></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>13</m:mn></m:msub></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>24</m:mn></m:msub></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>35</m:mn></m:msub></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>46</m:mn></m:msub></m:mtd> </m:mtr><m:mtr> <m:mtd><m:mtext>*</m:mtext></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>12</m:mn></m:msub></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>23</m:mn></m:msub></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>34</m:mn></m:msub></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>45</m:mn></m:msub></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>56</m:mn></m:msub></m:mtd> </m:mtr><m:mtr> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>11</m:mn></m:msub></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>22</m:mn></m:msub></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>33</m:mn></m:msub></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>44</m:mn></m:msub></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>55</m:mn></m:msub></m:mtd> <m:mtd><m:msub><m:mi>a</m:mi><m:mn>66</m:mn></m:msub></m:mtd> </m:mtr> </m:mtable> </m:math></td><td class="formula2"/></tr></table></div>
 Elements in the top left corner of the array need not be set. The following code assigns the matrix elements within the band to the correct elements of the array: 

<pre class="verbatim">
      DO 20 J = 1, N
         DO 10 I = MAX(1,J-MA1+1), J
            A(I-J+MA1,J) = matrix (I,J)
   10 CONTINUE
   20 CONTINUE </pre>
</div>
<div class="paramtext"><i>On exit</i>: is overwritten by the corresponding elements of <m:math><m:mi>C</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="LDA" id="LDA"/>7: &#160;&#160;&#8194; LDA &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the first dimension of the array <a class="arg" href="#A">A</a> as declared in the (sub)program from which F01BVF is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDA"><m:mi mathcolor="#EE0000" mathvariant="bold">LDA</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#MA1"><m:mi mathcolor="#EE0000" mathvariant="bold">MA1</m:mi></m:maction></m:math>.
</div></dd><dt class="paramhead"><a name="B" id="B"/>8: &#160;&#160;&#8194; B(<a class="arg" href="#LDB">LDB</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 entry</i>: the elements of the decomposition of matrix <m:math><m:mi>B</m:mi></m:math>&#160;as returned by <a class="rout" href="../F01/f01buf.xml">F01BUF</a>.</div>
<div class="paramtext"><i>On exit</i>: the elements of <a class="arg" href="#B">B</a> will have been permuted.</div></dd><dt class="paramhead"><a name="LDB" id="LDB"/>9: &#160;&#160;&#8194; LDB &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the first dimension of the array <a class="arg" href="#B">B</a> as declared in the (sub)program from which F01BVF is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDB"><m:mi mathcolor="#EE0000" mathvariant="bold">LDB</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#MB1"><m:mi mathcolor="#EE0000" mathvariant="bold">MB1</m:mi></m:maction></m:math>.
</div></dd><dt class="paramhead"><a name="V" id="V"/>10: &#8194; V(<a class="arg" href="#LDV">LDV</a>,<a class="arg" href="#M3">M3</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Workspace</span></dt><dt class="multi-paramhead"><a name="LDV" id="LDV"/>11: &#8194; LDV &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the first dimension of the array <a class="arg" href="#V">V</a> as declared in the (sub)program from which F01BVF is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDV"><m:mi mathcolor="#EE0000" mathvariant="bold">LDV</m:mi></m:maction><m:mo>&#8805;</m:mo><m:msub><m:mi>m</m:mi><m:mi>A</m:mi></m:msub><m:mo>+</m:mo><m:msub><m:mi>m</m:mi><m:mi>B</m:mi></m:msub></m:math>.
</div></dd><dt class="paramhead"><a name="W" id="W"/>12: &#8194; W(<a class="arg" href="#M3">M3</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Workspace</span></dt><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>13: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <a class="arg" href="#IFAIL">IFAIL</a> must be set to <m:math><m:mn>0</m:mn></m:math>, <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>. If you are unfamiliar with this parameter you should refer to <a class="sec" href="../GENINT/essint.xml#library3">Section 3.3</a> in  the Essential Introduction for details.</div>
<div class="paramtext"><i>On exit</i>: <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;unless the routine detects an error (see <a class="sec" href="#errors">Section 6</a>). <div class="paramtext">For environments where it might be inappropriate to halt program execution when an error is detected, the value <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>&#160;is recommended.  If the output of error messages is undesirable, then the value <m:math><m:mn>1</m:mn></m:math>&#160;is recommended.  Otherwise, if you are not familiar with this parameter, the recommended value is <m:math><m:mn>0</m:mn></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 mathvariant="bold">1</m:mn></m:math>&#160;is used it is essential to test the value of <a class="arg" href="#IFAIL">IFAIL</a> on exit.</b></div></div></dd></dl><h2 class="standard"><a class="sec" name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2>
<div class="paramtext">If on entry <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">-1</m:mn></m:maction></m:math>, explanatory error messages are output on the current error message unit (as defined by <a class="rout" href="../X04/x04aaf.xml">X04AAF</a>).</div><div class="paramtext">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="#MB1"><m:mi mathcolor="#EE0000" mathvariant="bold">MB1</m:mi></m:maction><m:mo>&gt;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#MA1"><m:mi mathcolor="#EE0000" mathvariant="bold">MA1</m:mi></m:maction></m:math>.</td></tr></table>
</dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">In general the computed system is exactly congruent to a problem <m:math><m:mfenced separators=""><m:mi>A</m:mi><m:mo>+</m:mo><m:mi>E</m:mi></m:mfenced><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mfenced separators=""><m:mi>B</m:mi><m:mo>+</m:mo><m:mi>F</m:mi></m:mfenced><m:mi>x</m:mi></m:math>, where <m:math><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>E</m:mi></m:mfenced></m:math>&#160;and <m:math><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>F</m:mi></m:mfenced></m:math>&#160;are of the order of <m:math><m:mi>&#949;</m:mi><m:mi>&#954;</m:mi><m:mfenced separators=""><m:mi>B</m:mi></m:mfenced><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>A</m:mi></m:mfenced></m:math>&#160;and <m:math><m:mi>&#949;</m:mi><m:mi>&#954;</m:mi><m:mfenced separators=""><m:mi>B</m:mi></m:mfenced><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>B</m:mi></m:mfenced></m:math>&#160;respectively, where <m:math><m:mi>&#954;</m:mi><m:mfenced separators=""><m:mi>B</m:mi></m:mfenced></m:math>&#160;is the condition number of <m:math><m:mi>B</m:mi></m:math>&#160;with respect to inversion and <m:math><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>.  This means that when <m:math><m:mi>B</m:mi></m:math>&#160;is positive-definite but not well-conditioned with respect to inversion, the method, which effectively involves the inversion of <m:math><m:mi>B</m:mi></m:math>, may lead to a severe loss of accuracy in well-conditioned eigenvalues.</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext">The time taken by F01BVF is approximately proportional to <m:math><m:msup><m:mi>n</m:mi><m:mn>2</m:mn></m:msup><m:msubsup><m:mi>m</m:mi><m:mi>B</m:mi><m:mn>2</m:mn></m:msubsup></m:math>&#160;and the distance of <m:math><m:mi>k</m:mi></m:math>&#160;from <m:math><m:mi>n</m:mi><m:mo>/</m:mo><m:mn>2</m:mn></m:math>, e.g., <m:math><m:mi>k</m:mi><m:mo>=</m:mo><m:mi>n</m:mi><m:mo>/</m:mo><m:mn>4</m:mn></m:math>&#160;and <m:math><m:mi>k</m:mi><m:mo>=</m:mo><m:mn>3</m:mn><m:mi>n</m:mi><m:mo>/</m:mo><m:mn>4</m:mn></m:math>&#160;take <m:math><m:mn>502</m:mn><m:mo>%</m:mo></m:math>&#160;longer.</div><div class="paramtext">When <m:math><m:mi>B</m:mi></m:math>&#160;is positive-definite and well-conditioned with respect to inversion, the generalized symmetric eigenproblem can be reduced to the standard symmetric problem <m:math><m:mi>P</m:mi><m:mi>y</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>y</m:mi></m:math>&#160;where <m:math><m:mi>P</m:mi><m:mo>=</m:mo><m:msup><m:mi>L</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:mi>A</m:mi><m:msup><m:mi>L</m:mi><m:mrow><m:mo>-</m:mo><m:mi mathvariant="normal">T</m:mi></m:mrow></m:msup></m:math>&#160;and <m:math><m:mi>B</m:mi><m:mo>=</m:mo><m:mi>L</m:mi><m:msup><m:mi>L</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>, the Cholesky factorization.</div><div class="paramtext">When <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;are of band form, especially if the bandwidth is small compared with the order of the matrices, storage considerations may rule out the possibility of working with <m:math><m:mi>P</m:mi></m:math>&#160;since it will be a full matrix in general.  However, for any factorization of the form <m:math><m:mi>B</m:mi><m:mo>=</m:mo><m:mi>S</m:mi><m:msup><m:mi>S</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>, the generalized symmetric problem reduces to the standard form

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msup><m:mi>S</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:mi>A</m:mi><m:msup><m:mi>S</m:mi><m:mrow><m:mo>-</m:mo><m:mi mathvariant="normal">T</m:mi></m:mrow></m:msup><m:mfenced separators=""><m:msup><m:mi>S</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mfenced separators=""><m:msup><m:mi>S</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</m:mi></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

and there does exist a factorization such that <m:math><m:msup><m:mi>S</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:mi>A</m:mi><m:msup><m:mi>S</m:mi><m:mrow><m:mo>-</m:mo><m:mi mathvariant="normal">T</m:mi></m:mrow></m:msup></m:math>&#160;is still of band form (see <a class="ref" href="#ref347">Crawford (1973)</a>).  Writing

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>C</m:mi><m:mo>=</m:mo><m:msup><m:mi>S</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:mi>A</m:mi><m:msup><m:mi>S</m:mi><m:mrow><m:mo>-</m:mo><m:mi mathvariant="normal">T</m:mi></m:mrow></m:msup><m:mtext>&#8195; and &#8195;</m:mtext><m:mi>y</m:mi><m:mo>=</m:mo><m:msup><m:mi>S</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</m:mi>
</m:math></td><td class="formula2"/></tr></table></div>

the standard form is <m:math><m:mi>C</m:mi><m:mi>y</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>y</m:mi></m:math>&#160;and the bandwidth of <m:math><m:mi>C</m:mi></m:math>&#160;is the maximum bandwidth of <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>.</div><div class="paramtext">Each stage in the transformation consists of two phases.  The first reduces a leading principal sub-matrix of <m:math><m:mi>B</m:mi></m:math>&#160;to the identity matrix and this introduces nonzero elements outside the band of <m:math><m:mi>A</m:mi></m:math>.  In the second, further transformations are applied which leave the reduced part of <m:math><m:mi>B</m:mi></m:math>&#160;unaltered and drive the extra elements upwards and off the top left corner of <m:math><m:mi>A</m:mi></m:math>.  Alternatively, <m:math><m:mi>B</m:mi></m:math>&#160;may be reduced to the identity matrix starting at the bottom right-hand corner and the extra elements introduced in <m:math><m:mi>A</m:mi></m:math>&#160;can be driven downwards.</div><div class="paramtext">The advantage of the <m:math><m:mi>U</m:mi><m:mi>L</m:mi><m:mi>D</m:mi><m:msup><m:mi>L</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msup><m:mi>U</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>&#160;decomposition of <m:math><m:mi>B</m:mi></m:math>&#160;is that no extra elements have to be pushed over the whole length of <m:math><m:mi>A</m:mi></m:math>.  If <m:math><m:mi>k</m:mi></m:math>&#160;is taken as approximately <m:math><m:mi>n</m:mi><m:mo>/</m:mo><m:mn>2</m:mn></m:math>, the shifting is limited to halfway.  At each stage the size of the triangular bumps produced in <m:math><m:mi>A</m:mi></m:math>&#160;depends on the number of rows and columns of <m:math><m:mi>B</m:mi></m:math>&#160;which are eliminated in the first phase and on the bandwidth of <m:math><m:mi>B</m:mi></m:math>.  The number of rows and columns over which these triangles are moved at each step in the second phase is equal to the bandwidth of <m:math><m:mi>A</m:mi></m:math>.</div><div class="paramtext">In this routine, <a class="arg" href="#A">A</a> is defined as being at least as wide as <m:math><m:mi>B</m:mi></m:math>&#160;and must be filled out with zeros if necessary as it is overwritten with <m:math><m:mi>C</m:mi></m:math>.  The number of rows and columns of <m:math><m:mi>B</m:mi></m:math>&#160;which are effectively eliminated at each stage is <m:math><m:msub><m:mi>m</m:mi><m:mi>A</m:mi></m:msub></m:math>.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This example finds the three smallest eigenvalues of <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi><m:mi>x</m:mi></m:math>, where

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:mo>=</m:mo>
 <m:mfenced><m:mtable columnalign="right">
  <m:mtr>
   <m:mtd><m:mn>11</m:mn></m:mtd>
   <m:mtd><m:mn>12</m:mn></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>12</m:mn></m:mtd>
   <m:mtd><m:mn>12</m:mn></m:mtd>
   <m:mtd><m:mn>13</m:mn></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd><m:mn>13</m:mn></m:mtd>
   <m:mtd><m:mn>13</m:mn></m:mtd>
   <m:mtd><m:mn>14</m:mn></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mn>14</m:mn></m:mtd>
   <m:mtd><m:mn>14</m:mn></m:mtd>
   <m:mtd><m:mn>15</m:mn></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mn>15</m:mn></m:mtd>
   <m:mtd><m:mn>15</m:mn></m:mtd>
   <m:mtd><m:mn>16</m:mn></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mn>16</m:mn></m:mtd>
   <m:mtd><m:mn>16</m:mn></m:mtd>
   <m:mtd><m:mn>17</m:mn></m:mtd>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mn>17</m:mn></m:mtd>
   <m:mtd><m:mn>17</m:mn></m:mtd>
   <m:mtd><m:mn>18</m:mn></m:mtd>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mn>18</m:mn></m:mtd>
   <m:mtd><m:mn>18</m:mn></m:mtd>
   <m:mtd><m:mn>19</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mn>19</m:mn></m:mtd>
   <m:mtd><m:mn>19</m:mn></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div><div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>B</m:mi><m:mo>=</m:mo>
 <m:mfenced><m:mtable columnalign="right">
  <m:mtr>
   <m:mtd><m:mn>101</m:mn></m:mtd>
   <m:mtd><m:mn>22</m:mn></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>22</m:mn></m:mtd>
   <m:mtd><m:mn>102</m:mn></m:mtd>
   <m:mtd><m:mn>23</m:mn></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd><m:mn>23</m:mn></m:mtd>
   <m:mtd><m:mn>103</m:mn></m:mtd>
   <m:mtd><m:mn>24</m:mn></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mn>24</m:mn></m:mtd>
   <m:mtd><m:mn>104</m:mn></m:mtd>
   <m:mtd><m:mn>25</m:mn></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mn>25</m:mn></m:mtd>
   <m:mtd><m:mn>105</m:mn></m:mtd>
   <m:mtd><m:mn>26</m:mn></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mn>26</m:mn></m:mtd>
   <m:mtd><m:mn>106</m:mn></m:mtd>
   <m:mtd><m:mn>27</m:mn></m:mtd>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mn>27</m:mn></m:mtd>
   <m:mtd><m:mn>107</m:mn></m:mtd>
   <m:mtd><m:mn>28</m:mn></m:mtd>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mn>28</m:mn></m:mtd>
   <m:mtd><m:mn>108</m:mn></m:mtd>
   <m:mtd><m:mn>29</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mn>29</m:mn></m:mtd>
   <m:mtd><m:mn>109</m:mn></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div></div><h3 class="standard"><a class="sec" name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
<p><a class="verbatimref" href="../../examples/source/f01bvfe.f">Program Text (f01bvfe.f)</a></p><h3 class="standard"><a class="sec" name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>
<p><a class="verbatimref" href="../../examples/data/f01bvfe.d">Program&#160;Data (f01bvfe.d)</a></p><h3 class="standard"><a class="sec" name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>
<p><a class="verbatimref" href="../../examples/baseresults/f01bvfe.r">Program Results (f01bvfe.r)</a></p>
<hr/><div><a class="rout" href="../../pdf/F01/f01bvf.pdf">F01BVF (PDF version)</a></div><div><a class="chap" href="f01conts.xml">F01 Chapter Contents</a></div><div><a class="chapint" href="f01intro.xml">F01 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>
