<?xml version="1.0"?>
<!DOCTYPE html    PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
           "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="GENERATOR" content="TtM 4.12" />
 <style type="text/css">
 div.p { margin-top: 7pt; }
 span.roman {font-family: serif; font-style: normal; font-weight: normal;} 
</style>
 <style type="text/css">
 .tiny {font-size:30%;}
 .scriptsize {font-size:xx-small;}
 .footnotesize {font-size:x-small;}
 .smaller {font-size:smaller;}
 .small {font-size:small;}
 .normalsize {font-size:medium;}
 .large {font-size:large;}
 .larger {font-size:x-large;}
 .largerstill {font-size:xx-large;}
 .huge {font-size:300%;}
 </style>
<title>footnote.xml</title>
</head>
<body><div>
<table width="100%"><tr><td>
 <a href="index.xml">HEAD</a></td><td align="right">
 <a href="docindex.xml">PREVIOUS
</a></td></tr></table><hr /><h3>Footnotes:</h3>

<div class="p"><!----></div>
<a id="tthFtNtAAB"></a><a href="chap1.xml#tthFrefAAB"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>1</mn></mrow>
</msup>
</mrow></math></a>Throughout this book, matrices
  and vectors in abstract multidimensional space are denoted by
  upright bold font. Vectors in physical three-dimensional space are
  instead denoted by italic bold font.
<div class="p"><!----></div>
<a id="tthFtNtAAC"></a><a href="chap1.xml#tthFrefAAC"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow></math></a>This
  problem with polynomial fitting is sometimes called Runge's
  phenomenon.
<div class="p"><!----></div>
<a id="tthFtNtAAD"></a><a href="chap1.xml#tthFrefAAD"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>3</mn></mrow>
</msup>
</mrow></math></a>Sometimes called simply "orthogonal",
  the real version of "unitary".
<div class="p"><!----></div>
<a id="tthFtNtAAE"></a><a href="chap1.xml#tthFrefAAE"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>4</mn></mrow>
</msup>
</mrow></math></a>A
  highly abbreviated outline of the SVD is as follows. The
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>M</mi><mo>&times;</mo><mi>M</mi></mrow></math> matrix <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi mathvariant="bold">S</mi></mrow><mrow><mi>T</mi></mrow>
</msup>
<mi mathvariant="bold">S</mi></mrow></math> is symmetric. Therefore it has
  real eigenvalues <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msubsup><mrow><mi>d</mi></mrow><mrow><mi>i</mi> </mrow>
<mrow><mn>2</mn></mrow></msubsup>
</mrow></math> which because of its form are
  non-negative. Its eigenvectors <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="bold-italic">v</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
</mrow></math>, satisfying
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi mathvariant="bold">S</mi></mrow><mrow><mi>T</mi></mrow>
</msup>
<mi mathvariant="bold">S</mi>
<msub><mrow><mi mathvariant="bold-italic">v</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
<mo>=</mo>
<msubsup><mrow><mi>d</mi></mrow><mrow><mi>i</mi> </mrow>
<mrow><mn>2</mn></mrow></msubsup>

<msub><mrow><mi mathvariant="bold-italic">v</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
</mrow></math>, can be arranged into an
  orthonormal set in order of decreasing magnitude of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msubsup><mrow><mi>d</mi></mrow><mrow><mi>i</mi> </mrow>
<mrow><mn>2</mn></mrow></msubsup>
</mrow></math>. The <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>M</mi></mrow></math>
  eigenvectors can be considered the columns of an orthonormal matrix
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">V</mi></mrow></math>, which diagonalizes <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi mathvariant="bold">S</mi></mrow><mrow><mi>T</mi></mrow>
</msup>
<mi mathvariant="bold">S</mi></mrow></math> so that
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi mathvariant="bold">V</mi></mrow><mrow><mi>T</mi></mrow>
</msup>

<msup><mrow><mi mathvariant="bold">S</mi></mrow><mrow><mi>T</mi></mrow>
</msup>
<mi mathvariant="bold">S</mi><mi mathvariant="bold">V</mi><mo>=</mo>
<msup><mrow><mi mathvariant="bold">D</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow></math>
  is an <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>M</mi><mo>&times;</mo><mi>M</mi></mrow></math> non-negative, diagonal matrix with diagonal values
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msubsup><mrow><mi>d</mi></mrow><mrow><mi>i</mi> </mrow>
<mrow><mn>2</mn></mrow></msubsup>
</mrow></math>. Since <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">(</mo><mi mathvariant="bold">S</mi><mi mathvariant="bold">V</mi>
<msup><mrow><mo stretchy="false">)</mo></mrow><mrow><mi>T</mi></mrow>
</msup>
<mi mathvariant="bold">S</mi><mi mathvariant="bold">V</mi></mrow></math> is diagonal, the
  columns of the <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi><mo>&times;</mo><mi>M</mi></mrow></math> matrix <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">SV</mi></mrow></math> are orthogonal. Its
  columns corresponding to <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>d</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
<mo>=</mo><mn>0</mn></mrow></math> are zero and are not useful to us.
  The useful columns corresponding to non-zero <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>d</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
</mrow></math> (<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>i</mi><mo>=</mo><mn>1</mn><mo>,</mo><mo>.</mo><mo>.</mo><mo>.</mo><mo>,</mo><mi>L</mi></mrow></math>,
  say, <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>L</mi><mo>&le;</mo><mi>M</mi></mrow></math>) can be normalized by dividing by <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>d</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
</mrow></math>. Then by
  appending <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi><mo>-</mo><mi>L</mi></mrow></math> normalized column <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math>-vectors that are orthogonal to
  all the previous ones, we can construct a complete <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi><mo>&times;</mo><mi>N</mi></mrow></math>
  orthonormal matrix <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">U</mi><mo>=</mo><mo stretchy="false">[</mo><mi mathvariant="bold">S</mi><mi mathvariant="bold">V</mi>
<msubsup><mrow><mi mathvariant="bold">D</mi></mrow><mrow><mi>L</mi> </mrow>
<mrow><mo>-</mo><mn>1</mn></mrow></msubsup>
<mo>,</mo>
<msub><mrow><mi mathvariant="bold">U</mi></mrow><mrow><mi>N</mi><mo>-</mo><mi>L</mi></mrow>
</msub>
<mo stretchy="false">]</mo></mrow></math>. Here <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msubsup><mrow><mi mathvariant="bold">D</mi></mrow><mrow><mi>L</mi> </mrow>
<mrow><mo>-</mo><mn>1</mn></mrow></msubsup>
</mrow></math>
  denotes the <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>M</mi><mo>&times;</mo><mi>L</mi></mrow></math> diagonal matrix with elements <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>1</mn><mo stretchy="false">/</mo>
<msub><mrow><mi>d</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
</mrow></math> and
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="bold">U</mi></mrow><mrow><mi>N</mi><mo>-</mo><mi>L</mi></mrow>
</msub>
</mrow></math> denotes the appended extra columns. Now consider
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">U</mi><mi mathvariant="bold">D</mi>
<msup><mrow><mi mathvariant="bold">V</mi></mrow><mrow><mi>T</mi></mrow>
</msup>
</mrow></math>. The appended <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="bold">U</mi></mrow><mrow><mi>N</mi><mo>-</mo><mi>L</mi></mrow>
</msub>
</mrow></math> make zero
  contribution to this product because the lower rows of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">D</mi></mrow></math>
  which they multiply are always zero. The rest of the product is
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">S</mi><mi mathvariant="bold">V</mi>
<msubsup><mrow><mi mathvariant="bold">D</mi></mrow><mrow><mi>L</mi> </mrow>
<mrow><mo>-</mo><mn>1</mn></mrow></msubsup>

<msub><mrow><mi mathvariant="bold">D</mi></mrow><mrow><mi>L</mi></mrow>
</msub>

<msup><mrow><mi mathvariant="bold">V</mi></mrow><mrow><mi>T</mi></mrow>
</msup>
<mo>=</mo><mi mathvariant="bold">S</mi></mrow></math>. Therefore
  we have constructed the singular value decomposition
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">S</mi><mo>=</mo><mi mathvariant="bold">U</mi><mi mathvariant="bold">D</mi>
<msup><mrow><mi mathvariant="bold">V</mi></mrow><mrow><mi>T</mi></mrow>
</msup>
</mrow></math>.  
<div class="p"><!----></div>
<a id="tthFtNtAAF"></a><a href="chap1.xml#tthFrefAAF"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>5</mn></mrow>
</msup>
</mrow></math></a>If <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>M</mi><mo>&gt;</mo><mi>N</mi></mrow></math>, the combination <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">D</mi>
<msup><mrow><mi mathvariant="bold">D</mi></mrow><mrow><mo>-</mo><mn>1</mn></mrow>
</msup>
</mrow></math>, which
arises from forming <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">S</mi>
<msup><mrow><mi mathvariant="bold">S</mi></mrow><mrow><mo>-</mo><mn>1</mn></mrow>
</msup>
</mrow></math> is not an <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>M</mi><mo>&times;</mo><mi>M</mi></mrow></math>
identity matrix. Instead it has ones only at most for the first <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math> of the
diagonal positions, and zeros thereafter. It is an <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi><mo>&times;</mo><mi>N</mi></mrow></math>
identity matrix with extra zero rows and columns padding it out to
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>M</mi><mo>&times;</mo><mi>M</mi></mrow></math>. So the pseudo inverse is a funny kind of inverse which
works only one way.

<div class="p"><!----></div>
If <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">S</mi></mrow></math> is square and <em>nonsingular</em>, then the pseudo
inverse is exactly the same as the (normal) inverse.

<div class="p"><!----></div>
If <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">S</mi></mrow></math> were a <em>singular</em> square matrix, for example (and
possibly in other situations) then at least one of the original <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>d</mi></mrow><mrow><mi>j</mi></mrow>
</msub>
</mrow></math>
would be zero. We usually consider the singular values (<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>d</mi></mrow><mrow><mi>j</mi></mrow>
</msub>
</mrow></math>) to be
arranged in descending order of size; so that the zero values come at
the end. <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi mathvariant="bold">D</mi></mrow><mrow><mo>-</mo><mn>1</mn></mrow>
</msup>
</mrow></math> would then have an element <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>1</mn><mo stretchy="false">/</mo>
<msub><mrow><mi>d</mi></mrow><mrow><mi>j</mi></mrow>
</msub>
</mrow></math> that is
<em>infinite</em>, and the formal manipulations would be
unjustified. What the pseudo-inverse does in these tricky cases is put
the value of the inverse <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>1</mn><mo stretchy="false">/</mo>
<msub><mrow><mi>d</mi></mrow><mrow><mi>j</mi></mrow>
</msub>
</mrow></math> equal to zero instead of infinity. In
that case, once again, an incomplete identity matrix is produced, with
extra diagonal zeros at the end. And it actually doesn't
completely "work" as an inverse in either direction.

<div class="p"><!----></div>
For those who know some linear algebra, what's happening is that the
pseudo-inverse projects vectors in the range of the original matrix
back into the complement of its nullspace.
<div class="p"><!----></div>
<a id="tthFtNtAAG"></a><a href="chap1.xml#tthFrefAAG"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>6</mn></mrow>
</msup>
</mrow></math></a>See for example, <i>Numerical
    Recipes</i>, W H Press, B P Flannery, S A Teukolsky, and W T
  Vettering, Cambridge University Press (first edition, 1989)
  (henceforth cited simply as <i>Numerical Recipes</i>)
  Section 2.9.
<div class="p"><!----></div>
<a id="tthFtNtAAH"></a><a href="chap1.xml#tthFrefAAH"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>7</mn></mrow>
</msup>
</mrow></math></a>by QR decomposition
<div class="p"><!----></div>
<a id="tthFtNtAAI"></a><a href="chap1.xml#tthFrefAAI"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>8</mn></mrow>
</msup>
</mrow></math></a>This notation means the first <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math> rows of the compound
  matrix consist of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">S</mi></mrow></math>, and the next <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>N</mi></mrow><mrow><mi>R</mi></mrow>
</msub>
</mrow></math> rows are <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&lambda;</mi><mi mathvariant="bold">R</mi></mrow></math>.
<div class="p"><!----></div>
<a id="tthFtNtAAJ"></a><a href="chap1.xml#tthFrefAAJ"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>9</mn></mrow>
</msup>
</mrow></math></a>This regularization is
  equivalent to what is sometimes called a "smoothing spline". In
  the limit of large smoothing parameter <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&lambda;</mi></mrow></math>, the function <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>f</mi></mrow></math>
  is a straight line (zero second derivative everywhere). In the limit
  of small <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&lambda;</mi></mrow></math>, it is a cubic spline interpolation through all
  the values <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">(</mo>
<msub><mrow><mi>x</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
<mo>,</mo>
<msub><mrow><mi>y</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
<mo stretchy="false">)</mo></mrow></math>.
<div class="p"><!----></div>
<a id="tthFtNtABA"></a><a href="chap1.xml#tthFrefABA"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>10</mn></mrow>
</msup>
</mrow></math></a>This topic and many others in data fitting is
  addressed for example in Siegmund Brandt (2014) <i>Data Analysis
    Statistical and Computational Methods for Scientists and
    Engineers</i>, Fourth Ed., Springer, New York.
<div class="p"><!----></div>
<a id="tthFtNtABB"></a><a href="chap1.xml#tthFrefABB"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>11</mn></mrow>
</msup>
</mrow></math></a>Of course Fourier analysis is usually approached
  differently, as briefly discussed in the final chapter. We are here
  just using sine as an example function, in part because it is
  familiar.
<div class="p"><!----></div>
<a id="tthFtNtABC"></a><a href="chap1.xml#tthFrefABC"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>12</mn></mrow>
</msup>
</mrow></math></a>There are lots of other
  correct but more verbose ways of doing it.
<div class="p"><!----></div>
<a id="tthFtNtABD"></a><a href="chap2.xml#tthFrefABD"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>13</mn></mrow>
</msup>
</mrow></math></a>If <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>f</mi></mrow></math> is independent of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>y</mi></mrow></math>, then we should use
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>f</mi><mo stretchy="false">(</mo>
<msub><mrow><mi>x</mi></mrow><mrow><mi>n</mi><mo>+</mo><mn>1</mn><mo stretchy="false">/</mo><mn>2</mn></mrow>
</msub>
<mo stretchy="false">)</mo></mrow></math> where <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>x</mi></mrow><mrow><mi>n</mi><mo>+</mo><mn>1</mn><mo stretchy="false">/</mo><mn>2</mn></mrow>
</msub>
<mo>=</mo><mo stretchy="false">(</mo>
<msub><mrow><mi>x</mi></mrow><mrow><mi>n</mi><mo>+</mo><mn>1</mn></mrow>
</msub>
<mo>+</mo>
<msub><mrow><mi>x</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
<mo stretchy="false">)</mo><mo stretchy="false">/</mo><mn>2</mn></mrow></math>, and we then have a formula accurate to second-order
  for performing simple integration
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msubsup><mrow><mo>&int;</mo></mrow><mrow><mn>0</mn> </mrow>
<mrow>
<msub><mrow><mi>x</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
</mrow></msubsup>
<mi>f</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mi mathvariant="italic">dx</mi><mo>=</mo>
<msub><mrow><mi>y</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
<mo>-</mo>
<msub><mrow><mi>y</mi></mrow><mrow><mn>0</mn></mrow>
</msub>
<mo>=</mo>
<munderover><mo>&sum;</mo><mrow><mi>k</mi><mo>=</mo><mn>0</mn> </mrow>
<mrow><mi>n</mi><mo>-</mo><mn>1</mn></mrow></munderover><mi>f</mi><mo stretchy="false">(</mo>
<msub><mrow><mi>x</mi></mrow><mrow><mi>k</mi><mo>+</mo><mn>1</mn><mo stretchy="false">/</mo><mn>2</mn></mrow>
</msub>
<mo stretchy="false">)</mo><mo stretchy="false">(</mo>
<msub><mrow><mi>x</mi></mrow><mrow><mi>k</mi><mo>+</mo><mn>1</mn></mrow>
</msub>
<mo>-</mo>
<msub><mrow><mi>x</mi></mrow><mrow><mi>k</mi></mrow>
</msub>
<mo stretchy="false">)</mo></mrow></math>. There are fancier, higher-order, ways
  to do integration, but this is by far the most straightforward.
<div class="p"><!----></div>
<a id="tthFtNtABE"></a><a href="chap2.xml#tthFrefABE"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>14</mn></mrow>
</msup>
</mrow></math></a>The notation
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>O</mi><mo stretchy="false">(</mo>
<msup><mrow><mi mathvariant="italic">&epsi;</mi></mrow><mrow><mi>n</mi></mrow>
</msup>
<mo stretchy="false">)</mo></mrow></math> denotes additional terms whose magnitude is
  proportional to a (usually small) parameter <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&epsi;</mi></mrow></math> raised to the
  power <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>n</mi></mrow></math> or higher.
<div class="p"><!----></div>
<a id="tthFtNtABF"></a><a href="chap2.xml#tthFrefABF"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>15</mn></mrow>
</msup>
</mrow></math></a>The proof is
  rather hard work. Here's an outline. Use notation <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>F</mi><mo stretchy="false">(</mo><mi mathvariant="italic">&delta;</mi><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><mi>f</mi><mo stretchy="false">(</mo><mi>y</mi><mo stretchy="false">(</mo>
<msub><mrow><mi>x</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
<mo>+</mo><mi mathvariant="italic">&delta;</mi><mi>x</mi><mo stretchy="false">)</mo><mo>,</mo><mi mathvariant="italic">&delta;</mi><mi>x</mi><mo stretchy="false">)</mo></mrow></math> to refer to values of the derivative
  function along the exact orbit. Suppose we compose <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi><mi>y</mi><mo>=</mo><mo stretchy="false">(</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow><mn>6</mn></mrow>
</mfrac>
<mi>F</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>+</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow><mn>3</mn></mrow>
</mfrac>
<mi>F</mi><mo stretchy="false">(</mo>
<mfrac><mrow><mi mathvariant="italic">&Delta;</mi></mrow>
<mrow><mn>2</mn></mrow>
</mfrac>
<mo stretchy="false">)</mo><mo>+</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow><mn>3</mn></mrow>
</mfrac>
<mi>F</mi><mo stretchy="false">(</mo>
<mfrac><mrow><mi mathvariant="italic">&Delta;</mi></mrow>
<mrow><mn>2</mn></mrow>
</mfrac>
<mo stretchy="false">)</mo><mo>+</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow><mn>6</mn></mrow>
</mfrac>
<mi>F</mi><mo stretchy="false">(</mo><mi mathvariant="italic">&Delta;</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mi mathvariant="italic">&Delta;</mi></mrow></math>. This is
  the form corresponding to eqs.&nbsp;(<a href="chap2.xml#ode17a">2.16</a>) and (<a href="chap2.xml#ode18">2.17</a>),
  but using the exact <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>f</mi></mrow></math> on the orbit, rather than the intermediate
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi>f</mi></mrow><mrow><mo stretchy="false">(</mo><mi>n</mi><mo stretchy="false">)</mo></mrow>
</msup>
</mrow></math> estimates. By substituting from eq.&nbsp;(<a href="chap2.xml#ode12">2.11</a>) it is
  easy but tedious to show that this <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi><mi>y</mi></mrow></math> is equal to <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>y</mi><mo stretchy="false">(</mo>
<msub><mrow><mi>x</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
<mo>+</mo><mi mathvariant="italic">&Delta;</mi><mo stretchy="false">)</mo><mo>-</mo>
<msub><mrow><mi>y</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
<mo>+</mo><mi>O</mi><mo stretchy="false">(</mo>
<msup><mrow><mi mathvariant="italic">&Delta;</mi></mrow><mrow><mn>5</mn></mrow>
</msup>
<mo stretchy="false">)</mo></mrow></math>; that is, it is an accurate representation of the
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>y</mi></mrow></math>-step to fourth-order. Actually it is instructive to realize that
  the symmetry of the <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&delta;</mi><mi>x</mi></mrow></math> positions, <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>0</mn></mrow></math>, <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mfrac><mrow><mi mathvariant="italic">&Delta;</mi></mrow>
<mrow><mn>2</mn></mrow>
</mfrac>
</mrow></math>, and
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi></mrow></math> ensures that all even order errors in this <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi><mi>y</mi></mrow></math> are
  zero while the first-order error is zero because the coefficients sum
  to unity. The factor of 2 difference between the center and the end
  coefficients is the choice that makes the third-order error zero. In
  itself this has not proved the scheme to be fourth-order accurate,
  because there are non-zero differences approximately proportional to
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mfrac><mrow><mo>&part;</mo><mi>f</mi></mrow>
<mrow><mo>&part;</mo><mi>y</mi></mrow>
</mfrac>
</mrow></math> between the <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>f</mi></mrow></math> values and the <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>F</mi></mrow></math> values:
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi>f</mi></mrow><mrow><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo></mrow>
</msup>
<mo>-</mo><mi>F</mi><mo stretchy="false">(</mo>
<mfrac><mrow><mi mathvariant="italic">&Delta;</mi></mrow>
<mrow><mn>2</mn></mrow>
</mfrac>
<mo stretchy="false">)</mo><mo>=</mo>
<mfrac><mrow><mo>&part;</mo><mi>f</mi></mrow>
<mrow><mo>&part;</mo><mi>y</mi></mrow>
</mfrac>
<mo stretchy="false">(</mo>
<msup><mrow><mi>y</mi></mrow><mrow><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo></mrow>
</msup>
<mo>-</mo><mi>y</mi><mo stretchy="false">(</mo>
<mfrac><mrow><mi mathvariant="italic">&Delta;</mi></mrow>
<mrow><mn>2</mn></mrow>
</mfrac>
<mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow></math>, <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi>f</mi></mrow><mrow><mo stretchy="false">(</mo><mn>2</mn><mo stretchy="false">)</mo></mrow>
</msup>
<mo>-</mo><mi>F</mi><mo stretchy="false">(</mo>
<mfrac><mrow><mi mathvariant="italic">&Delta;</mi></mrow>
<mrow><mn>2</mn></mrow>
</mfrac>
<mo stretchy="false">)</mo><mo>=</mo>
<mfrac><mrow><mo>&part;</mo><mi>f</mi></mrow>
<mrow><mo>&part;</mo><mi>y</mi></mrow>
</mfrac>
<mo stretchy="false">(</mo>
<msup><mrow><mi>y</mi></mrow><mrow><mo stretchy="false">(</mo><mn>2</mn><mo stretchy="false">)</mo></mrow>
</msup>
<mo>-</mo><mi>y</mi><mo stretchy="false">(</mo>
<mfrac><mrow><mi mathvariant="italic">&Delta;</mi></mrow>
<mrow><mn>2</mn></mrow>
</mfrac>
<mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow></math>,
  and <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi>f</mi></mrow><mrow><mo stretchy="false">(</mo><mn>3</mn><mo stretchy="false">)</mo></mrow>
</msup>
<mo>-</mo><mi>F</mi><mo stretchy="false">(</mo><mi mathvariant="italic">&Delta;</mi><mo stretchy="false">)</mo><mo>=</mo>
<mfrac><mrow><mo>&part;</mo><mi>f</mi></mrow>
<mrow><mo>&part;</mo><mi>y</mi></mrow>
</mfrac>
<mo stretchy="false">(</mo>
<msup><mrow><mi>y</mi></mrow><mrow><mo stretchy="false">(</mo><mn>3</mn><mo stretchy="false">)</mo></mrow>
</msup>
<mo>-</mo><mi>y</mi><mo stretchy="false">(</mo><mi mathvariant="italic">&Delta;</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow></math>. (Because of the order of the
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>y</mi></mrow></math>-differences one can quickly see that <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mfrac><mrow>
<msup><mrow><mo>&part;</mo></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow>
<mrow><mo>&part;</mo>
<msup><mrow><mi>y</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow>
</mfrac>
</mrow></math>
  terms don't need to be kept.) The successive differences
  such as <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">(</mo>
<msup><mrow><mi>y</mi></mrow><mrow><mo stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo></mrow>
</msup>
<mo>-</mo><mi>y</mi><mo stretchy="false">(</mo>
<mfrac><mrow><mi mathvariant="italic">&Delta;</mi></mrow>
<mrow><mn>2</mn></mrow>
</mfrac>
<mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow></math> can be expressed in terms of
  the Taylor expansion eq.&nbsp;(<a href="chap2.xml#ode13">2.12</a>), and then the
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>f</mi></mrow></math>-differences are gathered in the combination of eq.&nbsp;  (<a href="chap2.xml#ode18">2.17</a>): <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mfrac><mrow><mn>1</mn></mrow>
<mrow><mn>6</mn></mrow>
</mfrac>
<mo>,</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow><mn>3</mn></mrow>
</mfrac>
<mo>,</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow><mn>3</mn></mrow>
</mfrac>
<mo>,</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow><mn>6</mn></mrow>
</mfrac>
</mrow></math>. One can
  then evaluate the <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mfrac><mrow><mo>&part;</mo><mi>f</mi></mrow>
<mrow><mo>&part;</mo><mi>y</mi></mrow>
</mfrac>
</mrow></math> terms and demonstrate that they cancel to fourth
  order.

<div class="p"><!----></div>
<a id="tthFtNtABG"></a><a href="chap3.xml#tthFrefABG"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>16</mn></mrow>
</msup>
</mrow></math></a>A more general form of bisection in which the
  interval is divided in two <em>unequal</em> parts weighted by the
  value of the function, <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>s</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
<mo>=</mo><mo stretchy="false">[</mo><mi>f</mi><mo stretchy="false">(</mo>
<msub><mrow><mi>s</mi></mrow><mrow><mi>l</mi></mrow>
</msub>
<mo stretchy="false">)</mo>
<msub><mrow><mi>s</mi></mrow><mrow><mi>u</mi></mrow>
</msub>
<mo>-</mo><mi>f</mi><mo stretchy="false">(</mo>
<msub><mrow><mi>s</mi></mrow><mrow><mi>u</mi></mrow>
</msub>
<mo stretchy="false">)</mo>
<msub><mrow><mi>s</mi></mrow><mrow><mi>l</mi></mrow>
</msub>
<mo stretchy="false">]</mo><mo stretchy="false">/</mo><mo stretchy="false">[</mo><mi>f</mi><mo stretchy="false">(</mo>
<msub><mrow><mi>s</mi></mrow><mrow><mi>l</mi></mrow>
</msub>
<mo stretchy="false">)</mo><mo>-</mo><mi>f</mi><mo stretchy="false">(</mo>
<msub><mrow><mi>s</mi></mrow><mrow><mi>u</mi></mrow>
</msub>
<mo stretchy="false">)</mo><mo stretchy="false">]</mo></mrow></math>
  has comparable robustness, requires no additional function
  evaluations per step but a couple of extra multiplications, and
  converges quicker than plain bisection except in special cases. This
  is sometimes called the "false-position" root-finding method. It
  is generally possible to detect automatically when one of those
  slowly converging special cases is encountered and take additional
  measures.
<div class="p"><!----></div>
<a id="tthFtNtABH"></a><a href="chap3.xml#tthFrefABH"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>17</mn></mrow>
</msup>
</mrow></math></a>A shorthand way to remember the result
  for an order <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math> derivative is that the numerator is the sum of the
  neighboring <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>y</mi></mrow></math> values times the coefficients of a binomial
  expansion to the power <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math>, and the denominator is <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi>
<msup><mrow><mi>x</mi></mrow><mrow><mi>N</mi></mrow>
</msup>
</mrow></math>.
<div class="p"><!----></div>
<a id="tthFtNtABI"></a><a href="chap3.xml#tthFrefABI"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>18</mn></mrow>
</msup>
</mrow></math></a>An alternative
  approach to implementing boundary conditions is to regard the
  boundary positions as outside and not operated upon by the
  difference matrix. Then its indices runs only from <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>2</mn></mrow></math> to <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi><mo>-</mo><mn>1</mn></mrow></math>, and
  it has dimensions <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">(</mo><mi>N</mi><mo>-</mo><mn>2</mn><mo stretchy="false">)</mo><mo>&times;</mo><mo stretchy="false">(</mo><mi>N</mi><mo>-</mo><mn>2</mn><mo stretchy="false">)</mo></mrow></math>. For Dirichlet conditions, the
  term in the difference stencils of positions <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>2</mn></mrow></math> and <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi><mo>-</mo><mn>1</mn></mrow></math> that
  contains the boundary value is moved into the right-hand-side source
  vector. Generically the matrix equation is then <br />
<table width="100%"><tr><td align="center">
    <math xmlns="http://www.w3.org/1998/Math/MathML">
    <mstyle displaystyle="true"><mrow><mrow><mo>(</mo>
<mtable>
<mtr><mtd columnalign="center"><mrow><mo>-</mo><mn>2</mn></mrow></mtd><mtd columnalign="center"><mrow><mn>1</mn></mrow></mtd><mtd columnalign="center"><mrow><mn>0</mn></mrow></mtd><mtd columnalign="center"><mrow><mn>0</mn></mrow></mtd><mtd columnalign="center"><mrow><mn>0</mn></mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow><mo>&dtdot;</mo></mrow></mtd><mtd columnalign="center"><mrow><mo>&dtdot;</mo></mrow></mtd><mtd columnalign="center"><mrow><mo>&dtdot;</mo></mrow></mtd><mtd columnalign="center"><mrow><mn>0</mn></mrow></mtd><mtd columnalign="center"><mrow><mn>0</mn></mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow><mn>0</mn></mrow></mtd><mtd columnalign="center"><mrow><mn>1</mn></mrow></mtd><mtd columnalign="center"><mrow><mo>-</mo><mn>2</mn></mrow></mtd><mtd columnalign="center"><mrow><mn>1</mn></mrow></mtd><mtd columnalign="center"><mrow><mn>0</mn></mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow><mn>0</mn></mrow></mtd><mtd columnalign="center"><mrow><mn>0</mn></mrow></mtd><mtd columnalign="center"><mrow><mo>&dtdot;</mo></mrow></mtd><mtd columnalign="center"><mrow><mo>&dtdot;</mo></mrow></mtd><mtd columnalign="center"><mrow><mo>&dtdot;</mo></mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow><mn>0</mn></mrow></mtd><mtd columnalign="center"><mrow><mn>0</mn></mrow></mtd><mtd columnalign="center"><mrow><mn>0</mn></mrow></mtd><mtd columnalign="center"><mrow><mn>1</mn></mrow></mtd><mtd columnalign="center"><mrow><mo>-</mo><mn>2</mn></mrow></mtd></mtr></mtable>

<mo>)</mo></mrow><mrow><mo>(</mo>
<mtable>
<mtr><mtd columnalign="center"><mrow>
<msub><mrow><mi>y</mi></mrow><mrow><mn>2</mn></mrow>
</msub>
</mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow>:</mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow>
<msub><mrow><mi>y</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
</mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow>:</mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow>
<msub><mrow><mi>y</mi></mrow><mrow><mi>N</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
</mrow></mtd></mtr></mtable>

<mo>)</mo></mrow><mo>=</mo><mrow><mo>(</mo>
<mtable>
<mtr><mtd columnalign="center"><mrow>
<msub><mrow><mi>g</mi></mrow><mrow><mn>2</mn></mrow>
</msub>
<mi mathvariant="italic">&Delta;</mi>
<msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
<mo>-</mo>
<msub><mrow><mi>y</mi></mrow><mrow><mi>L</mi></mrow>
</msub>
</mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow>:</mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow>
<msub><mrow><mi>g</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
<mi mathvariant="italic">&Delta;</mi>
<msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow>:</mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow>
<msub><mrow><mi>g</mi></mrow><mrow><mi>N</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
<mi mathvariant="italic">&Delta;</mi>
<msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
<mo>-</mo>
<msub><mrow><mi>y</mi></mrow><mrow><mi>R</mi></mrow>
</msub>
</mrow></mtd></mtr></mtable>

<mo>)</mo></mrow><mo>.</mo></mrow>
    </mstyle></math>
</td></tr></table>
<br />

This form keeps the matrix symmetric, which is advantageous for some
inversion algorithms.

<div class="p"><!----></div>
<a id="tthFtNtABJ"></a><a href="chap3.xml#tthFrefABJ"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>19</mn></mrow>
</msup>
</mrow></math></a>In some
  circumstances one can deliberately choose the mesh so as to put the
  boundary at <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>x</mi></mrow><mrow><mn>3</mn><mo stretchy="false">/</mo><mn>2</mn></mrow>
</msub>
</mrow></math>.  Then the implementation represented by eq.&nbsp;  (3.15)   does put the value at the correct place. This mesh choice is
  appropriate if the boundary condition is known to be of purely
  derivative form. It then lends itself to the alternative approach of
  the previous note, excluding the boundary from <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">D</mi></mrow></math>.  The top
  left coefficient becomes <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>D</mi></mrow><mrow><mn>22</mn></mrow>
</msub>
<mo>=</mo><mo>-</mo><mn>1</mn></mrow></math>, and <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi><mi>x</mi><mi>&ensp;</mi><mi mathvariant="italic">dy</mi><mo stretchy="false">/</mo><mi mathvariant="italic">dx</mi>
<msub><mrow><mo stretchy="false">&verbar;</mo></mrow><mrow><mi>L</mi></mrow>
</msub>
</mrow></math> is
  added to the source vector, to implement the boundary
  condition. Mixed boundary conditions are not handled so easily like
  this, which is why a second-order accurate form with the boundary at
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>x</mi></mrow><mrow><mn>1</mn></mrow>
</msub>
</mrow></math> has been given.
<div class="p"><!----></div>
<a id="tthFtNtACA"></a><a href="chap3.xml#tthFrefACA"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>20</mn></mrow>
</msup>
</mrow></math></a>The error in the
  first derivative <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>y</mi><mo>'</mo></mrow></math> is approximately <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>y</mi>"<msub><mi></mi><mrow><mn>2</mn></mrow></msub>
<mo>.</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow><mn>2</mn></mrow>
</mfrac>
<mi mathvariant="italic">&Delta;</mi><mi>x</mi></mrow></math>,
  first-order in <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi><mi>x</mi></mrow></math>, but the error in <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi><mi>y</mi></mrow></math> is
  second-order in <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi><mi>x</mi></mrow></math> giving first order accuracy.
<div class="p"><!----></div>
<a id="tthFtNtACB"></a><a href="chap3.xml#tthFrefACB"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>21</mn></mrow>
</msup>
</mrow></math></a>With periodic boundary conditions the homogeneous
  equation (<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mfrac><mrow>
<msup><mrow><mi>d</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
<mi>y</mi></mrow>
<mrow>
<msup><mrow><mi mathvariant="italic">dx</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow>
</mfrac>
<mo>=</mo><mn>0</mn></mrow></math>) is satisfied by any constant <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>y</mi></mrow></math>. An
  additional condition must therefore be applied to make the solution
  unique.  Moreover, there exists no solution of the differential
  equation with continuous derivative unless <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo>&int;</mo><mi>g</mi><mi mathvariant="italic">dx</mi><mo>=</mo><mn>0</mn></mrow></math>. These
  requirements are reflected in the fact that the matrix of this
  system is singular. If (<a href="chap3.xmlpt18">3.19</a>) is solved by
  pseudo-inverse, it gives the solution having zero mean: <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo>&sum;</mo>
<msub><mrow><mi>y</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
<mo stretchy="false">/</mo><mi>N</mi><mo>=</mo><mn>0</mn></mrow></math>, using as right-hand-side instead of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi>
<msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
<mi mathvariant="bold">g</mi></mrow></math>
  the quantity <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi>
<msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
<mo stretchy="false">(</mo><mi mathvariant="bold">g</mi><mo>-</mo><mo>&sum;</mo>
<msub><mrow><mi>g</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
<mo stretchy="false">/</mo><mi>N</mi><mo stretchy="false">)</mo></mrow></math>.
<div class="p"><!----></div>
<a id="tthFtNtACC"></a><a href="chap3.xml#tthFrefACC"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>22</mn></mrow>
</msup>
</mrow></math></a>On a structured mesh, a
  finite volume method is identical to the finite difference method
  provided this conservative differencing is used.
<div class="p"><!----></div>
<a id="tthFtNtACD"></a><a href="chap4.xml#tthFrefACD"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>23</mn></mrow>
</msup>
</mrow></math></a>The subscript <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>q</mi></mrow></math> on <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="italic">&rho;</mi></mrow><mrow><mi>q</mi></mrow>
</msub>
</mrow></math>
  reminds us this is charge density, not mass density <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&rho;</mi></mrow></math> here.
<div class="p"><!----></div>
<a id="tthFtNtACE"></a><a href="chap4.xml#tthFrefACE"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>24</mn></mrow>
</msup>
</mrow></math></a>Vector dependent variable problems are hyperbolic if the
matrix of the coefficients of their differentials is diagonizable with
real eigenvalues, as we'll see later.
<div class="p"><!----></div>
<a id="tthFtNtACF"></a><a href="chap4.xml#tthFrefACF"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>25</mn></mrow>
</msup>
</mrow></math></a>Constructed with the distmesh routines from <a href="http://persson.berkeley.edu/distmesh/"><tt>http://persson.berkeley.edu/distmesh/</tt></a>
<div class="p"><!----></div>
<a id="tthFtNtACG"></a><a href="chap4.xml#tthFrefACG"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>26</mn></mrow>
</msup>
</mrow></math></a>For object-oriented purists, this could
  be a "method".
<div class="p"><!----></div>
<a id="tthFtNtACH"></a><a href="chap5.xml#tthFrefACH"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>27</mn></mrow>
</msup>
</mrow></math></a>In effect, we linearize about an exact solution of
  the equations and the <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&psi;</mi></mrow></math> we then analyse is the (presumed small)
  difference between the solution we obtain and the exact solution. In
  the text we avoid encumbrance of the notation by not drawing
  explicit attention to this fact.
<div class="p"><!----></div>
<a id="tthFtNtACI"></a><a href="chap5.xml#tthFrefACI"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>28</mn></mrow>
</msup>
</mrow></math></a>The Nyquist limit.
<div class="p"><!----></div>
<a id="tthFtNtACJ"></a><a href="chap5.xml#tthFrefACJ"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>29</mn></mrow>
</msup>
</mrow></math></a>Or, for example, an LU
  decomposition.
<div class="p"><!----></div>
<a id="tthFtNtADA"></a><a href="chap5.xml#tthFrefADA"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>30</mn></mrow>
</msup>
</mrow></math></a>See for example
  <em>Numerical Recipes</em> section 2.6
<div class="p"><!----></div>
<a id="tthFtNtADB"></a><a href="chap5.xml#tthFrefADB"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>31</mn></mrow>
</msup>
</mrow></math></a>Octave and
  Matlab have a simple built-in function to do reordering, called <tt>reshape()</tt>.
<div class="p"><!----></div>
<a id="tthFtNtADC"></a><a href="chap5.xml#tthFrefADC"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>32</mn></mrow>
</msup>
</mrow></math></a>and of LU decomposition and backsubstitution
<div class="p"><!----></div>
<a id="tthFtNtADD"></a><a href="chap5.xml#tthFrefADD"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>33</mn></mrow>
</msup>
</mrow></math></a>We
  could alternatively have used integral positions and the second
  order scheme of eq.&nbsp;<a href="chap3.xmlpt15">3.16</a>)
<div class="p"><!----></div>
<a id="tthFtNtADE"></a><a href="chap6.xml#tthFrefADE"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>34</mn></mrow>
</msup>
</mrow></math></a>Removing the
  (first-order) time derivative changes the classification of the equation
  because it is no longer a differential equation in <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>t</mi></mrow></math> at all.
<div class="p"><!----></div>
<a id="tthFtNtADF"></a><a href="chap6.xml#tthFrefADF"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>35</mn></mrow>
</msup>
</mrow></math></a>Jacobi's method actually can
  be used to solve a rather general matrix equation
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">B</mi><mi mathvariant="bold-italic">&psi;</mi><mo>=</mo><mi mathvariant="bold">s</mi></mrow></math>, and is implemented as
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi mathvariant="bold-italic">&psi;</mi></mrow><mrow><mo stretchy="false">(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo stretchy="false">)</mo></mrow>
</msup>
<mo>=</mo>
<msup><mrow><mi mathvariant="bold">D</mi></mrow><mrow><mo>-</mo><mn>1</mn></mrow>
</msup>
<mo stretchy="false">(</mo><mi mathvariant="bold">s</mi><mo>-</mo><mi mathvariant="bold">R</mi>
<msup><mrow><mi mathvariant="bold-italic">&psi;</mi></mrow><mrow><mo stretchy="false">(</mo><mi>n</mi><mo stretchy="false">)</mo></mrow>
</msup>
<mo stretchy="false">)</mo></mrow></math>, where
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">D</mi></mrow></math> is the diagonal part of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">B</mi></mrow></math> and
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">R</mi><mo>=</mo><mi mathvariant="bold">B</mi><mo>-</mo><mi mathvariant="bold">D</mi></mrow></math> is the rest. Its convergence is guaranteed
  if <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">B</mi></mrow></math> is <em>diagonally dominant</em>, meaning that the
  absolute value of the diagonal term exceeds the sum of the absolute
  values of all the other coefficients of the corresponding
  row.
<div class="p"><!----></div>
<a id="tthFtNtADG"></a><a href="chap6.xml#tthFrefADG"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>36</mn></mrow>
</msup>
</mrow></math></a>For the matrix expert, the advancing
  matrix is then explicitly "two-cyclic, and consistently ordered".
<div class="p"><!----></div>
<a id="tthFtNtADH"></a><a href="chap6.xml#tthFrefADH"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>37</mn></mrow>
</msup>
</mrow></math></a>A Fourier treatment is not rigorously
  justified in general, but serves to illustrate simply the most
  important characteristics.
<div class="p"><!----></div>
<a id="tthFtNtADI"></a><a href="chap6.xml#tthFrefADI"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>38</mn></mrow>
</msup>
</mrow></math></a>See the enrichment section
    for an outline if you are
  interested. G D Smith <em>Numerical Soution of Partial
    Differential Equations</em>, Oxford University Press, 1985, p275ff
  gives an accessible detailed treatment.
<div class="p"><!----></div>
<a id="tthFtNtADJ"></a><a href="chap6.xml#tthFrefADJ"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>39</mn></mrow>
</msup>
</mrow></math></a>If we apply the boundary
  conditions, then the <em>eigenmode</em> is actually
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>sin</mi><mo stretchy="false">(</mo><mi mathvariant="italic">jp</mi><mi mathvariant="italic">&pi;</mi><mo stretchy="false">/</mo>
<msub><mrow><mi>N</mi></mrow><mrow><mi>x</mi></mrow>
</msub>
<mo stretchy="false">)</mo><mi>sin</mi><mo stretchy="false">(</mo><mi mathvariant="italic">kq</mi><mi mathvariant="italic">&pi;</mi><mo stretchy="false">/</mo>
<msub><mrow><mi>N</mi></mrow><mrow><mi>y</mi></mrow>
</msub>
<mo stretchy="false">)</mo></mrow></math> but the complex Von Neumann
  analysis gives the same result.
<div class="p"><!----></div>
<a id="tthFtNtAEA"></a><a href="chap6.xml#tthFrefAEA"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>40</mn></mrow>
</msup>
</mrow></math></a>In
fact, if <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>N</mi></mrow><mrow><mi>x</mi></mrow>
</msub>
<mo>=</mo>
<msub><mrow><mi>N</mi></mrow><mrow><mi>y</mi></mrow>
</msub>
</mrow></math> and <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi><mi>x</mi><mo>=</mo><mi mathvariant="italic">&Delta;</mi><mi>y</mi></mrow></math>, then <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>M</mi><mo>=</mo>
<msub><mrow><mi>N</mi></mrow><mrow><mi>x</mi></mrow>
</msub>
</mrow></math>, or
alternatively if <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi><mi>y</mi><mo>&gt;&gt;</mo><mi mathvariant="italic">&Delta;</mi><mi>x</mi></mrow></math>, and <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>N</mi></mrow><mrow><mi>x</mi></mrow>
</msub>
</mrow></math> is not far smaller
than <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>N</mi></mrow><mrow><mi>y</mi></mrow>
</msub>
</mrow></math>, then <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>M</mi><mo>&ap;</mo>
<msub><mrow><mi>N</mi></mrow><mrow><mi>x</mi></mrow>
</msub>
</mrow></math>.
<div class="p"><!----></div>
<a id="tthFtNtAEB"></a><a href="chap6.xml#tthFrefAEB"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>41</mn></mrow>
</msup>
</mrow></math></a>the
difference between the "converged" iterative <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&psi;</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo></mrow></math> and the
analytic <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&psi;</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo></mrow></math> normalized to the analytic value.
<div class="p"><!----></div>
<a id="tthFtNtAEC"></a><a href="chap7.xml#tthFrefAEC"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>42</mn></mrow>
</msup>
</mrow></math></a>If the Jacobian is position-dependent, then the
  modes are only approximately uncoupled, because our analysis is
  effectively assuming that <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">J</mi></mrow></math> and <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo>&part;</mo><mo stretchy="false">/</mo><mo>&part;</mo><mi>x</mi></mrow></math>
  commute, which is not exact if <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">J</mi></mrow></math> is spatially-varying.  The
  stability analysis is then local, and only approximate. But in any
  case Von Neumann stability analysis is only approximate in
  non-uniform cases.
<div class="p"><!----></div>
<a id="tthFtNtAED"></a><a href="chap7.xml#tthFrefAED"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>43</mn></mrow>
</msup>
</mrow></math></a>provided the eigenvectors
  are linearly independent
<div class="p"><!----></div>
<a id="tthFtNtAEE"></a><a href="chap7.xml#tthFrefAEE"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>44</mn></mrow>
</msup>
</mrow></math></a>Although this can be proved, it
  is complicated.
<div class="p"><!----></div>
<a id="tthFtNtAEF"></a><a href="chap8.xml#tthFrefAEF"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>45</mn></mrow>
</msup>
</mrow></math></a>There is considerable subtlety
  in the question "how abruptly". After all any velocity change
  really takes a finite time and involves an acceleration. Why isn't
  it included in <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold-italic">a</mi></mrow></math>? For present purposes we'll just finesse
  this question by saying that the source contains any velocity
  changes that are not included in the acceleration.
<div class="p"><!----></div>
<a id="tthFtNtAEG"></a><a href="chap8.xml#tthFrefAEG"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>46</mn></mrow>
</msup>
</mrow></math></a>(not multiple dependent
  variables that have to be arranged into a vector representation
  whose eigenvalue might not be real)
<div class="p"><!----></div>
<a id="tthFtNtAEH"></a><a href="chap9.xml#tthFrefAEH"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>47</mn></mrow>
</msup>
</mrow></math></a>The transport of
  radiation, of <em>photons</em>, can also be treated in this
  way, but their treatment has to be expressed in terms of energy (or
  momentum) rather than speed, since all photons travel at the same
  speed.
<div class="p"><!----></div>
<a id="tthFtNtAEI"></a><a href="chap9.xml#tthFrefAEI"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>48</mn></mrow>
</msup>
</mrow></math></a>Also there may be other spontaneous decays or
  fissions (delayed neutrons) but we'll ignore them for now.
<div class="p"><!----></div>
<a id="tthFtNtAEJ"></a><a href="chap9.xml#tthFrefAEJ"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>49</mn></mrow>
</msup>
</mrow></math></a>Most reactor physics texts express the velocity
  distribution differently, in terms of flux density <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&phi;</mi><mo>&equiv;</mo><mi>v</mi><mi>f</mi></mrow></math>,
  as the dependent variable. To retain the more general relevance to
  solving Boltzmann's equation, we here keep <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>f</mi></mrow></math> as the dependent
  variable. The result is still equivalent to standard reactor physics
  equations.
<div class="p"><!----></div>
<a id="tthFtNtAFA"></a><a href="chap9.xml#tthFrefAFA"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>50</mn></mrow>
</msup>
</mrow></math></a>Although there we might have to include
  self-collisions.
<div class="p"><!----></div>
<a id="tthFtNtAFB"></a><a href="chap9.xml#tthFrefAFB"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>51</mn></mrow>
</msup>
</mrow></math></a>In practice delayed neutrons introduce a
  severe complication.
<div class="p"><!----></div>
<a id="tthFtNtAFC"></a><a href="chap9.xml#tthFrefAFC"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>52</mn></mrow>
</msup>
</mrow></math></a>Computational size reduction, retaining spatial
  dependence, might call for a very small number of speed
  groups. Perhaps even a single group <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>N</mi></mrow><mrow><mi>G</mi></mrow>
</msub>
<mo>=</mo><mn>1</mn></mrow></math>. Then the neutron
  transport is reduced to a single diffusion equation. 
<div class="p"><!----></div>
<a id="tthFtNtAFD"></a><a href="chap9.xml#tthFrefAFD"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>53</mn></mrow>
</msup>
</mrow></math></a>And the boundary conditions are also homogeneous. Of
  course "homogeneous" does not here mean uniform in space; it means
  having no constant terms.
<div class="p"><!----></div>
<a id="tthFtNtAFE"></a><a href="chap9.xml#tthFrefAFE"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>54</mn></mrow>
</msup>
</mrow></math></a>Strictly speaking,
  the inverse of the eigenvalues of the matrix
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">(</mo><mi mathvariant="bold-italic">&nu;</mi>
<msub><mrow><mi mathvariant="bold-italic">&Sigma;</mi></mrow><mrow><mi>f</mi></mrow>
</msub>
<mi mathvariant="bold">V</mi>
<msup><mrow><mo stretchy="false">)</mo></mrow><mrow><mo>-</mo><mn>1</mn></mrow>
</msup>
<mo stretchy="false">(</mo><mo>-</mo><mi mathvariant="bold">L</mi><mo>+</mo>
<msub><mrow><mi mathvariant="bold-italic">&Sigma;</mi></mrow><mrow><mi>t</mi></mrow>
</msub>
<mi mathvariant="bold">V</mi><mo>-</mo>
<msub><mrow><mi mathvariant="bold-italic">&Sigma;</mi></mrow><mrow><mi>s</mi></mrow>
</msub>
<mi mathvariant="bold">V</mi><mo stretchy="false">)</mo></mrow></math>.
<div class="p"><!----></div>
<a id="tthFtNtAFF"></a><a href="chap9.xml#tthFrefAFF"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>55</mn></mrow>
</msup>
</mrow></math></a>A generalized eigenvalue is the solution
  to <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">(</mo><mi mathvariant="bold">A</mi><mo>-</mo><mi mathvariant="italic">&lambda;</mi><mi mathvariant="bold">B</mi><mo stretchy="false">)</mo><mi mathvariant="bold">v</mi><mo>=</mo><mn>0</mn></mrow></math> where both <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">A</mi></mrow></math> and
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">B</mi></mrow></math> are general matrices.
<div class="p"><!----></div>
<a id="tthFtNtAFG"></a><a href="chap9.xml#tthFrefAFG"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>56</mn></mrow>
</msup>
</mrow></math></a>Actually if it were the largest eigenvalue of
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">M</mi></mrow></math>, for a single group or diagonal <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">G</mi></mrow></math> we could
  directly use the "power method", which is eq.&nbsp;<a href="chap9.xml#eigschem">9.16</a> with
  the <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>F</mi></mrow></math>-indices (<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>n</mi></mrow></math>, <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>n</mi><mo>+</mo><mn>1</mn></mrow></math>) exchanged. However, because we want the
  smallest eigenvalue <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>1</mn><mo stretchy="false">/</mo><mi>k</mi></mrow></math>, we must effectively invert <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">M</mi></mrow></math>
  (which requires interior iteration) because <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">M</mi></mrow></math> is never
  diagonal.
<div class="p"><!----></div>
<a id="tthFtNtAFH"></a><a href="chap9.xml#tthFrefAFH"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>57</mn></mrow>
</msup>
</mrow></math></a>e.g.&nbsp;  SOR
<div class="p"><!----></div>
<a id="tthFtNtAFI"></a><a href="chap9.xml#tthFrefAFI"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>58</mn></mrow>
</msup>
</mrow></math></a>See e.g.&nbsp;<em>Applied
    Reactor Physics</em> Alain H&#233;bert, Presses internationales
  Polytechnique, www.polymtl.ca, (2009). Actually many other choices
  of weighting will work as well, not just
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">(</mo><mi mathvariant="bold">G</mi>
<msup><mrow><mi mathvariant="bold">F</mi></mrow><mrow><mo stretchy="false">(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo stretchy="false">)</mo></mrow>
</msup>

<msup><mrow><mo stretchy="false">)</mo></mrow><mrow><mi>T</mi></mrow>
</msup>
</mrow></math>.
<div class="p"><!----></div>
<a id="tthFtNtAFJ"></a><a href="chap9.xml#tthFrefAFJ"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>59</mn></mrow>
</msup>
</mrow></math></a>The zeroes in the non-diagonal matrices arise because
  scatterings hardly ever move neutrons to higher energy or reduce the
  energy by more than one group, and fissions give rise only to
  energetic neutrons. The values given are roughly appropriate for a
  pressurized water reactor.
<div class="p"><!----></div>
<a id="tthFtNtAGA"></a><a href="chap9.xml#tthFrefAGA"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>60</mn></mrow>
</msup>
</mrow></math></a>In reactor physics <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>B</mi></mrow></math> is called
  the "Buckling".
<div class="p"><!----></div>
<a id="tthFtNtAGB"></a><a href="chap10.xml#tthFrefAGB"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>61</mn></mrow>
</msup>
</mrow></math></a>Alder and Wainwright, "Phase transition for a hard
  sphere system", J. Chem. Phys. 27, 1208-1209, (1957). Liquid
  behavior is an important phenomenon for which Molecular Dynamics is
  useful.
<div class="p"><!----></div>
<a id="tthFtNtAGC"></a><a href="chap10.xml#tthFrefAGC"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>62</mn></mrow>
</msup>
</mrow></math></a>For fixed <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&Delta;</mi><mi>t</mi></mrow></math>, the Verlet and leap-frog
  schemes are equivalent, with the identification
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="bold-italic">v</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
<mo>=</mo><mo stretchy="false">(</mo>
<msub><mrow><mi mathvariant="bold-italic">v</mi></mrow><mrow><mi>n</mi><mo>-</mo><mn>1</mn><mo stretchy="false">/</mo><mn>2</mn></mrow>
</msub>
<mo>+</mo>
<msub><mrow><mi mathvariant="bold-italic">v</mi></mrow><mrow><mi>n</mi><mo>+</mo><mn>1</mn><mo stretchy="false">/</mo><mn>2</mn></mrow>
</msub>
<mo stretchy="false">)</mo><mo stretchy="false">/</mo><mn>2</mn></mrow></math>. The Verlet scheme,
  implemented in terms of velocity as in eq.&nbsp;(<a href="chap10.xml#Verlet">10.1</a>),
  requires more storage or more acceleration evaluations: because two
  values of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold-italic">a</mi></mrow></math> are needed. It can be implemented in terms of
  the position advance alone as
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="bold-italic">x</mi></mrow><mrow><mi>n</mi><mo>+</mo><mn>1</mn></mrow>
</msub>
<mo>=</mo><mn>2</mn>
<msub><mrow><mi mathvariant="bold-italic">x</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
<mo>-</mo>
<msub><mrow><mi mathvariant="bold-italic">x</mi></mrow><mrow><mi>n</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
<mo>+</mo><mi mathvariant="bold-italic">a</mi><mi mathvariant="italic">&Delta;</mi>
<msup><mrow><mi>t</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow></math>, which
  requires the same storage as leap-frog.
<div class="p"><!----></div>
<a id="tthFtNtAGD"></a><a href="chap10.xml#tthFrefAGD"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>63</mn></mrow>
</msup>
</mrow></math></a>Since the step cost for a neighboring
  domain of size <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo>&prop;</mo>
<msub><mrow><mi>N</mi></mrow><mrow><mi>l</mi></mrow>
</msub>
</mrow></math> is <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo>&prop;</mo>
<msub><mrow><mi>N</mi></mrow><mrow><mi>p</mi></mrow>
</msub>

<msubsup><mrow><mi>N</mi></mrow><mrow><mi>l</mi> </mrow>
<mrow><mn>3</mn></mrow></msubsup>
</mrow></math>, and the step
  cost for the neighbor update is <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo>&prop;</mo>
<msubsup><mrow><mi>N</mi></mrow><mrow><mi>p</mi> </mrow>
<mrow><mn>2</mn></mrow></msubsup>
<mo stretchy="false">/</mo>
<msub><mrow><mi>N</mi></mrow><mrow><mi>l</mi></mrow>
</msub>
</mrow></math>, a formal
  optimum occurs when these are equal <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>N</mi></mrow><mrow><mi>l</mi></mrow>
</msub>
<mo>&prop;</mo>
<msubsup><mrow><mi>N</mi></mrow><mrow><mi>p</mi> </mrow>
<mrow><mn>1</mn><mo stretchy="false">/</mo><mn>4</mn></mrow></msubsup>
</mrow></math>. So
  formally, the per-step cost of this <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>N</mi></mrow><mrow><mi>l</mi></mrow>
</msub>
</mrow></math>-optimized algorithm would
  be <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo>&prop;</mo>
<msub><mrow><mi>N</mi></mrow><mrow><mi>p</mi></mrow>
</msub>

<msubsup><mrow><mi>N</mi></mrow><mrow><mi>p</mi> </mrow>
<mrow><mn>3</mn><mo stretchy="false">/</mo><mn>4</mn></mrow></msubsup>
</mrow></math>: slightly better than <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msubsup><mrow><mi>N</mi></mrow><mrow><mi>p</mi> </mrow>
<mrow><mn>2</mn></mrow></msubsup>
</mrow></math>.
<div class="p"><!----></div>
<a id="tthFtNtAGE"></a><a href="chap10.xml#tthFrefAGE"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>64</mn></mrow>
</msup>
</mrow></math></a>See
  for example C K Birdsall and A B Langdon (1991)
  <i>Plasma Physics via Computer Simulation</i>, IOP
  Publishing, Bristol; or R W Hockney and J W Eastwood (1988)
  <i>Computer Simulation using Particles</i>, Taylor and
  Francis, New York
<div class="p"><!----></div>
<a id="tthFtNtAGF"></a><a href="chap10.xml#tthFrefAGF"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>65</mn></mrow>
</msup>
</mrow></math></a>See for example the SOR estimates.
<div class="p"><!----></div>
<a id="tthFtNtAGG"></a><a href="chap11.xml#tthFrefAGG"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>66</mn></mrow>
</msup>
</mrow></math></a>Siegmund Brandt
  (2014) <i>Data Analysis Statistical and Computational Methods for
    Scientists and Engineers</i>, Fourth Ed., Springer, New York, gives a
  much more expansive introduction to statistics and Monte Carlo
  techniques.
<div class="p"><!----></div>
<a id="tthFtNtAGH"></a><a href="chap11.xml#tthFrefAGH"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>67</mn></mrow>
</msup>
</mrow></math></a>Statisticians use the
  generic word "sample" to refer to the particular result of a
  single test or measurement.
<div class="p"><!----></div>
<a id="tthFtNtAGI"></a><a href="chap11.xml#tthFrefAGI"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>68</mn></mrow>
</msup>
</mrow></math></a>Division by the factor <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi><mo>-</mo><mn>1</mn></mrow></math>
  rather than <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math> makes this formula an unbiassed estimate of the
  distribution variance. One way to understand this is to recognize
  that the number of degrees of freedom of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<munderover><mo>&sum;</mo><mrow><mn>1</mn> </mrow>
<mrow><mi>N</mi></mrow></munderover><mo stretchy="false">(</mo>
<msub><mrow><mi>v</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
<mo>-</mo>
<msub><mrow><mi mathvariant="italic">&mu;</mi></mrow><mrow><mi>N</mi></mrow>
</msub>

<msup><mrow><mo stretchy="false">)</mo></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow></math> is
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi><mo>-</mo><mn>1</mn></mrow></math>, not <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math>. Using <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi><mo>-</mo><mn>1</mn></mrow></math> is sometimes called "Bessel's
  correction".
<div class="p"><!----></div>
<a id="tthFtNtAGJ"></a><a href="chap11.xml#tthFrefAGJ"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>69</mn></mrow>
</msup>
</mrow></math></a>Often called the "expectation" of
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>v</mi></mrow></math>
<div class="p"><!----></div>
<a id="tthFtNtAHA"></a><a href="chap11.xml#tthFrefAHA"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>70</mn></mrow>
</msup>
</mrow></math></a><b>Central Limit Theorem</b>. It is not
  straightforward to prove that the distribution becomes Gaussian. But
  it is fairly easy to show that the variance of the sample mean is
  the variance of the distribution divided by <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math>. From the definition
  of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="italic">&mu;</mi></mrow><mrow><mi>N</mi></mrow>
</msub>
</mrow></math> one can immediately deduce
  that <br />
<table width="100%"><tr><td align="center">
    <math xmlns="http://www.w3.org/1998/Math/MathML">
    <mstyle displaystyle="true"><mrow><mo stretchy="false">(</mo>
<msub><mrow><mi mathvariant="italic">&mu;</mi></mrow><mrow><mi>N</mi></mrow>
</msub>
<mo>-</mo><mi mathvariant="italic">&mu;</mi>
<msup><mrow><mo stretchy="false">)</mo></mrow><mrow><mn>2</mn></mrow>
</msup>
<mo>=</mo>
<msup><mrow><mo>(</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow><mi>N</mi></mrow>
</mfrac>

<munderover><mo>&sum;</mo><mrow><mn>1</mn> </mrow>
<mrow><mi>N</mi></mrow></munderover><mo stretchy="false">(</mo>
<msub><mrow><mi>v</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
<mo>-</mo><mi mathvariant="italic">&mu;</mi><mo stretchy="false">)</mo><mo>)</mo></mrow><mrow><mn>2</mn></mrow>
</msup>
<mo>=</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow>
<msup><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow>
</mfrac>

<munderover><mo>&sum;</mo><mrow><mi>i</mi><mo>,</mo><mi>j</mi> </mrow>
<mrow><mi>N</mi></mrow></munderover><mo stretchy="false">(</mo>
<msub><mrow><mi>v</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
<mo>-</mo><mi mathvariant="italic">&mu;</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo>
<msub><mrow><mi>v</mi></mrow><mrow><mi>j</mi></mrow>
</msub>
<mo>-</mo><mi mathvariant="italic">&mu;</mi><mo stretchy="false">)</mo><mo>.</mo></mrow>
    </mstyle></math>
</td></tr></table>
<br />
 Take the expectation
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">&lang;</mo><mo>&#x2026;</mo><mo stretchy="false">&rang;</mo></mrow></math> of this quantity to obtain the variance of
  the distribution of sample means:
  <br />
<table width="100%"><tr><td align="center">
    <math xmlns="http://www.w3.org/1998/Math/MathML">
    <mstyle displaystyle="true"><mrow><mo stretchy="false">&lang;</mo><mo stretchy="false">(</mo>
<msub><mrow><mi mathvariant="italic">&mu;</mi></mrow><mrow><mi>N</mi></mrow>
</msub>
<mo>-</mo><mi mathvariant="italic">&mu;</mi>
<msup><mrow><mo stretchy="false">)</mo></mrow><mrow><mn>2</mn></mrow>
</msup>
<mo stretchy="false">&rang;</mo><mo>=</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow>
<msup><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow>
</mfrac>

<munderover><mo>&sum;</mo><mrow><mi>i</mi><mo>,</mo><mi>j</mi> </mrow>
<mrow><mi>N</mi></mrow></munderover><mo stretchy="false">&lang;</mo><mo stretchy="false">(</mo>
<msub><mrow><mi>v</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
<mo>-</mo><mi mathvariant="italic">&mu;</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo>
<msub><mrow><mi>v</mi></mrow><mrow><mi>j</mi></mrow>
</msub>
<mo>-</mo><mi mathvariant="italic">&mu;</mi><mo stretchy="false">)</mo><mo stretchy="false">&rang;</mo><mo>=</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow>
<msup><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow>
</mfrac>

<munderover><mo>&sum;</mo><mrow><mi>i</mi> </mrow>
<mrow><mi>N</mi></mrow></munderover><mo stretchy="false">&lang;</mo><mo stretchy="false">(</mo>
<msub><mrow><mi>v</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
<mo>-</mo><mi mathvariant="italic">&mu;</mi>
<msup><mrow><mo stretchy="false">)</mo></mrow><mrow><mn>2</mn></mrow>
</msup>
<mo stretchy="false">&rang;</mo><mo>=</mo>
<mfrac><mrow>
<msup><mrow><mi>S</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow>
<mrow><mi>N</mi></mrow>
</mfrac>
<mo>.</mo></mrow>
    </mstyle></math>
</td></tr></table>
<br />
 The first
  equality, taking the expectation inside the sum, is a simple
  property of taking the expectation: the expectation of a sum is the
  sum of the expectations. The second equality uses the fact that
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">&lang;</mo><mo stretchy="false">(</mo>
<msub><mrow><mi>v</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
<mo>-</mo><mi mathvariant="italic">&mu;</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo>
<msub><mrow><mi>v</mi></mrow><mrow><mi>j</mi></mrow>
</msub>
<mo>-</mo><mi mathvariant="italic">&mu;</mi><mo stretchy="false">)</mo><mo stretchy="false">&rang;</mo><mo>=</mo><mn>0</mn></mrow></math> for <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>i</mi><mo>&ne;</mo><mi>j</mi></mrow></math> because the
  quantities <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">(</mo>
<msub><mrow><mi>v</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
<mo>-</mo><mi mathvariant="italic">&mu;</mi><mo stretchy="false">)</mo></mrow></math> are statistically independent and have zero
  mean. That is sufficient to yield the required result. Our estimate
  for the distribution variance is <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi>S</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
<mo>=</mo>
<msubsup><mrow><mi>S</mi></mrow><mrow><mi>N</mi> </mrow>
<mrow><mn>2</mn></mrow></msubsup>
</mrow></math>. So the unbiassed
  estimate for the variance of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="italic">&mu;</mi></mrow><mrow><mi>N</mi></mrow>
</msub>
</mrow></math> is
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">&lang;</mo><mo stretchy="false">(</mo>
<msub><mrow><mi mathvariant="italic">&mu;</mi></mrow><mrow><mi>N</mi></mrow>
</msub>
<mo>-</mo><mi mathvariant="italic">&mu;</mi>
<msup><mrow><mo stretchy="false">)</mo></mrow><mrow><mn>2</mn></mrow>
</msup>
<mo stretchy="false">&rang;</mo><mo>=</mo>
<msubsup><mrow><mi>S</mi></mrow><mrow><mi>N</mi> </mrow>
<mrow><mn>2</mn></mrow></msubsup>
<mo stretchy="false">/</mo><mi>N</mi></mrow></math>. The standard error is the
  square root of this quantity.
<div class="p"><!----></div>
<a id="tthFtNtAHB"></a><a href="chap11.xml#tthFrefAHB"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>71</mn></mrow>
</msup>
</mrow></math></a>An un-normalized
  Gaussian distribution has three, including the height.
<div class="p"><!----></div>
<a id="tthFtNtAHC"></a><a href="chap11.xml#tthFrefAHC"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>72</mn></mrow>
</msup>
</mrow></math></a>Linear interpolation is then
  equivalent to representing <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>p</mi></mrow><mrow><mi>v</mi></mrow>
</msub>
</mrow></math> as a histogram. So adequate
  resolution may require a fairly large number <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>N</mi></mrow><mrow><mi>t</mi></mrow>
</msub>
</mrow></math>.
<div class="p"><!----></div>
<a id="tthFtNtAHD"></a><a href="chap11.xml#tthFrefAHD"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>73</mn></mrow>
</msup>
</mrow></math></a><b>Quiet
    start and quasi-random selection.</b> When starting a
  particle-in-cell simulation, the initial positions of the particles
  might be chosen using random numbers to decide their
  location. However, they then will have density fluctuations of
  various wavelengths that in plasmas may be <em>bigger</em> than are
  present after running the simulation for many steps. The reason for
  this discrepancy is that the feedback effect of the self-consistent
  electric potential tends to smooth out density fluctuations, so that
  in the fully developed simulation the noise level is lower than
  purely random. A simple way of saying the same thing is that
  individual particles <em>repel</em> others of the same type,
  preventing clumping of the particles. It is therefore often
  physically reasonable to start a PIC simulation with positions that
  are chosen to be more evenly spaced than purely random. Indeed, for
  some calculations it is advantageous (but non-physical) to start
  with density fluctuations even <em>lower</em> than the final level
  that would be present for a steady plasma. In either case, what is
  called a "Quiet Start" can be obtained by using what are called
  "quasi-random" numbers [see e.g.&nbsp;<i>Numerical Recipes</i>]
  instead of (pseudo) random numbers. Quasi-random numbers are
  somewhat random, but much smoother in their distribution because
  each new number takes account of the already used numbers and tries
  to avoid being close to them. Successive numbers are thus correlated
  rather than uncorrelated. For Monte-Carlo integration, such smoother
  distributions in space are also often highly appropriate and can
  give lower-noise results for the same number of samples, beating the
  weak, <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>1</mn><mo stretchy="false">/</mo><msqrt><mrow><mi>N</mi></mrow></msqrt></mrow></math>, decrease of fractional error.
<div class="p"><!----></div>
<a id="tthFtNtAHE"></a><a href="chap11.xml#tthFrefAHE"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>74</mn></mrow>
</msup>
</mrow></math></a>Or if we wish to do
  "quiet injection" that is smoother than purely random
<div class="p"><!----></div>
<a id="tthFtNtAHF"></a><a href="chap11.xml#tthFrefAHF"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>75</mn></mrow>
</msup>
</mrow></math></a><b>The
    Discrete Poisson distribution.</b> Suppose there is a very large
  number <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math> of similar, uncorrelated, events (for example radioactive
  decays of atoms) waiting to occur. In a time duration far shorter
  than the waiting time (e.g.&nbsp;the half-life) of an individual event
  the probability that any one of them occurs is small, say <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>p</mi><mo>=</mo><mi>r</mi><mo stretchy="false">/</mo><mi>N</mi></mrow></math>. Then <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>r</mi></mrow></math> is the average total number of events occuring in
  this time duration. The total number of events actually occuring in
  a particular time sample is then an integer, and we want to find the
  probability of each possible integer. Any sample consists of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math>
  choices about the individual events: yes or no. The number of yes
  events is distributed as a Binomial distribution, in which the
  probability of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>n</mi></mrow></math> yes events is given by the number of different
  ways to choose <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>n</mi></mrow></math> out of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math>, which is <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mfrac><mrow><mi>N</mi><mo>!</mo></mrow>
<mrow><mi>n</mi><mo>!</mo><mo stretchy="false">(</mo><mi>N</mi><mo>-</mo><mi>n</mi><mo stretchy="false">)</mo><mo>!</mo></mrow>
</mfrac>
</mrow></math>, times
  the probability of each specific arrangement of <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>n</mi></mrow></math> yes events and
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi><mo>-</mo><mi>n</mi></mrow></math> no events, <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi>p</mi></mrow><mrow><mi>n</mi></mrow>
</msup>
<mo stretchy="false">(</mo><mn>1</mn><mo>-</mo><mi>p</mi>
<msup><mrow><mo stretchy="false">)</mo></mrow><mrow><mi>N</mi><mo>-</mo><mi>n</mi></mrow>
</msup>
</mrow></math>. The total is
  <br />
<table width="100%"><tr><td align="center">
    <math xmlns="http://www.w3.org/1998/Math/MathML">
    <mstyle displaystyle="true"><mrow>
<msub><mrow><mi>p</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
<mo>=</mo>
<mfrac><mrow><mi>N</mi><mo>!</mo></mrow>
<mrow><mi>n</mi><mo>!</mo><mo stretchy="false">(</mo><mi>N</mi><mo>-</mo><mi>n</mi><mo stretchy="false">)</mo><mo>!</mo></mrow>
</mfrac>

<msup><mrow><mi>p</mi></mrow><mrow><mi>n</mi></mrow>
</msup>
<mo stretchy="false">(</mo><mn>1</mn><mo>-</mo><mi>p</mi>
<msup><mrow><mo stretchy="false">)</mo></mrow><mrow><mi>N</mi><mo>-</mo><mi>n</mi></mrow>
</msup>
<mo>=</mo>
<mfrac><mrow>
<msup><mrow><mi>r</mi></mrow><mrow><mi>n</mi></mrow>
</msup>
</mrow>
<mrow><mi>n</mi><mo>!</mo></mrow>
</mfrac>

<msup><mrow><mo>(</mo><mn>1</mn><mo>-</mo>
<mfrac><mrow><mi>r</mi></mrow>
<mrow><mi>N</mi></mrow>
</mfrac>
<mo>)</mo></mrow><mrow><mi>N</mi></mrow>
</msup>
<mrow><mo>[</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow>
<msup><mrow><mi>N</mi></mrow><mrow><mi>n</mi></mrow>
</msup>
<mo stretchy="false">(</mo><mn>1</mn><mo>-</mo><mi>r</mi><mo stretchy="false">/</mo><mi>N</mi>
<msup><mrow><mo stretchy="false">)</mo></mrow><mrow><mi>n</mi></mrow>
</msup>
</mrow>
</mfrac>

<mfrac><mrow><mi>N</mi><mo>!</mo></mrow>
<mrow><mo stretchy="false">(</mo><mi>N</mi><mo>-</mo><mi>n</mi><mo stretchy="false">)</mo><mo>!</mo></mrow>
</mfrac>
<mo>]</mo></mrow><mo>.</mo></mrow>
    </mstyle></math>
</td></tr></table>
<br />
 Now recognize that the limit for large <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math>
  (but constant <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>n</mi></mrow></math>) of
  the square bracket term is 1; while the limit of the term <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mo>(</mo><mn>1</mn><mo>-</mo>
<mfrac><mrow><mi>r</mi></mrow>
<mrow><mi>N</mi></mrow>
</mfrac>
<mo>)</mo></mrow><mrow><mi>N</mi></mrow>
</msup>
</mrow></math> is <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>exp</mi><mo stretchy="false">(</mo><mo>-</mo><mi>r</mi><mo stretchy="false">)</mo></mrow></math>. Therefore the
  probability of obtaining <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>n</mi></mrow></math> total events, of a type that are completely
  uncorrelated (<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi><mo>&rarr;</mo><mi mathvariant="italic">&infin;</mi></mrow></math>),
  when their average rate of occurrence is <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>r</mi></mrow></math> is
<br />
<table width="100%"><tr><td align="center">
    <math xmlns="http://www.w3.org/1998/Math/MathML">
    <mstyle displaystyle="true"><mrow>
<msub><mrow><mi>p</mi></mrow><mrow><mi>n</mi></mrow>
</msub>
<mo>=</mo>
<mfrac><mrow>
<msup><mrow><mi>r</mi></mrow><mrow><mi>n</mi></mrow>
</msup>
</mrow>
<mrow><mi>n</mi><mo>!</mo></mrow>
</mfrac>
<mi>exp</mi><mo stretchy="false">(</mo><mo>-</mo><mi>r</mi><mo stretchy="false">)</mo><mo>.</mo></mrow>
    </mstyle></math>
</td></tr></table>
<br />
 This is the discrete Poisson distribution.
<div class="p"><!----></div>
<a id="tthFtNtAHG"></a><a href="chap11.xml#tthFrefAHG"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>76</mn></mrow>
</msup>
</mrow></math></a>Or double-precision if
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math> is very large.
<div class="p"><!----></div>
<a id="tthFtNtAHH"></a><a href="chap11.xml#tthFrefAHH"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>77</mn></mrow>
</msup>
</mrow></math></a>The random generators I used here are both
  portable. The good generator is the <tt>RANLUX</tt> routine
  described by M. Luscher, <i>Computer Physics Communications</i> 79
  (1994) 100, and F. James, <i>Computer Physics Communications</i>
  79 (1994) 111, used with the lowest luxury level. The bad generator
  is the <tt>RAN1</tt> routine from the first (FORTRAN) edition of
  <i>Numerical Recipes</i> (1989). It was replaced by better
  routines in later editions.
<div class="p"><!----></div>
<a id="tthFtNtAHI"></a><a href="chap12.xml#tthFrefAHI"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>78</mn></mrow>
</msup>
</mrow></math></a>For photons, the "velocity" should
  be interpreted as a combination of energy (frequency or wavelength)
  and propagation direction, since the particle's speed is always the
  speed of light.
<div class="p"><!----></div>
<a id="tthFtNtAHJ"></a><a href="chap12.xml#tthFrefAHJ"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>79</mn></mrow>
</msup>
</mrow></math></a>The velocity distribution <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>f</mi></mrow><mrow><mi>k</mi></mrow>
</msub>
</mrow></math> in discrete velocity
  bins <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi>d</mi></mrow><mrow><mn>3</mn></mrow>
</msup>

<msub><mrow><mi>v</mi></mrow><mrow><mi>k</mi></mrow>
</msub>
</mrow></math> may also be desired. It is given by summing only
  those passages that occur in the velocity bin: <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>f</mi></mrow><mrow><mi>k</mi></mrow>
</msub>

<msup><mrow><mi>d</mi></mrow><mrow><mn>3</mn></mrow>
</msup>

<msub><mrow><mi>v</mi></mrow><mrow><mi>k</mi></mrow>
</msub>
<mo>=</mo>
<munder><mo>&sum;</mo><mrow>
<msub><mrow><mi>v</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
<mo>&isin;</mo>
<msup><mrow><mi>d</mi></mrow><mrow><mn>3</mn></mrow>
</msup>

<msub><mrow><mi>v</mi></mrow><mrow><mi>k</mi></mrow>
</msub>
</mrow>
</munder>
<mi mathvariant="italic">&Delta;</mi>
<msub><mrow><mi>t</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
</mrow></math>. It will have greater statistical
  uncertainty because of fewer samples per bin.
<div class="p"><!----></div>
<a id="tthFtNtAIA"></a><a href="chap13.xml#tthFrefAIA"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>80</mn></mrow>
</msup>
</mrow></math></a>One such book with lots of engineering examples is
  Steven C Chapra and Raymond P Canale (2006) (5th Ed, or later)
  "Numerical Methods for Engineers" McGraw-Hill, NY.
<div class="p"><!----></div>
<a id="tthFtNtAIB"></a><a href="chap13.xml#tthFrefAIB"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>81</mn></mrow>
</msup>
</mrow></math></a>The volume of a
  tetrahedron can be written as a <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>4</mn><mo>&times;</mo><mn>4</mn></mrow></math> determinant using the
  cartesian coordinates <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">(</mo>
<msub><mrow><mi>x</mi></mrow><mrow><mi>k</mi></mrow>
</msub>
<mo>,</mo>
<msub><mrow><mi>y</mi></mrow><mrow><mi>k</mi></mrow>
</msub>
<mo>,</mo>
<msub><mrow><mi>z</mi></mrow><mrow><mi>k</mi></mrow>
</msub>
<mo stretchy="false">)</mo></mrow></math> of its four corners (<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>k</mi><mo>=</mo><mn>1</mn><mo>,</mo><mn>4</mn></mrow></math>) as
<br />
<table width="100%"><tr><td align="center">
    <math xmlns="http://www.w3.org/1998/Math/MathML">
    <mstyle displaystyle="true"><mrow><mi>V</mi><mo>=</mo>
<mfrac><mrow><mn>1</mn></mrow>
<mrow><mn>6</mn></mrow>
</mfrac>
<mrow><mo>|</mo>
<mtable>
<mtr><mtd columnalign="center"><mrow><mn>1</mn></mrow></mtd><mtd columnalign="center"><mrow>
<msub><mrow><mi>x</mi></mrow><mrow><mn>1</mn></mrow>
</msub>
</mrow></mtd><mtd columnalign="center"><mrow>
<msub><mrow><mi>y</mi></mrow><mrow><mn>1</mn></mrow>
</msub>
</mrow></mtd><mtd columnalign="center"><mrow>
<msub><mrow><mi>z</mi></mrow><mrow><mn>1</mn></mrow>
</msub>
</mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow><mn>1</mn></mrow></mtd><mtd columnalign="center"><mrow>
<msub><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow>
</msub>
</mrow></mtd><mtd columnalign="center"><mrow>
<msub><mrow><mi>y</mi></mrow><mrow><mn>2</mn></mrow>
</msub>
</mrow></mtd><mtd columnalign="center"><mrow>
<msub><mrow><mi>z</mi></mrow><mrow><mn>2</mn></mrow>
</msub>
</mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow><mn>1</mn></mrow></mtd><mtd columnalign="center"><mrow>
<msub><mrow><mi>x</mi></mrow><mrow><mn>3</mn></mrow>
</msub>
</mrow></mtd><mtd columnalign="center"><mrow>
<msub><mrow><mi>y</mi></mrow><mrow><mn>3</mn></mrow>
</msub>
</mrow></mtd><mtd columnalign="center"><mrow>
<msub><mrow><mi>z</mi></mrow><mrow><mn>3</mn></mrow>
</msub>
</mrow></mtd></mtr>
<mtr><mtd columnalign="center"><mrow><mn>1</mn></mrow></mtd><mtd columnalign="center"><mrow>
<msub><mrow><mi>x</mi></mrow><mrow><mn>4</mn></mrow>
</msub>
</mrow></mtd><mtd columnalign="center"><mrow>
<msub><mrow><mi>y</mi></mrow><mrow><mn>4</mn></mrow>
</msub>
</mrow></mtd><mtd columnalign="center"><mrow>
<msub><mrow><mi>z</mi></mrow><mrow><mn>4</mn></mrow>
</msub>
</mrow></mtd></mtr></mtable>

<mo>|</mo></mrow></mrow>
    </mstyle></math>
</td></tr></table>
<br />


<div class="p"><!----></div>
<a id="tthFtNtAIC"></a><a href="chap13.xml#tthFrefAIC"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>82</mn></mrow>
</msup>
</mrow></math></a>These important details are discussed
  in texts devoted to finite elements, such as, Thomas J R Hughes
  (1987) "The Finite Element Method" Prentice Hall, Englewood
  Cliffs, NJ. The classic text on the background mathematical theory
  is, G Strang and G J Fix (1973, 2008) "An Analysis of the Finite
  Element Method", Reissued by Wellesley-Cambridge, Press, USA.
<div class="p"><!----></div>
<a id="tthFtNtAID"></a><a href="chap13.xml#tthFrefAID"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>83</mn></mrow>
</msup>
</mrow></math></a>Since <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>f</mi></mrow></math> is periodic, its value at <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>j</mi><mo>=</mo><mn>0</mn></mrow></math> is the same
  as at <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>j</mi><mo>=</mo><mi>N</mi></mrow></math>, so the range is equivalent to <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>1</mn><mo>,</mo><mo>.</mo><mo>.</mo><mo>.</mo><mo>,</mo><mi>N</mi></mrow></math>.
<div class="p"><!----></div>
<a id="tthFtNtAIE"></a><a href="chap13.xml#tthFrefAIE"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>84</mn></mrow>
</msup>
</mrow></math></a>If <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>N</mi></mrow></math> is odd, then
  the highest frequency is obviously <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">(</mo><mi>N</mi><mo>-</mo><mn>1</mn><mo stretchy="false">)</mo><mo stretchy="false">/</mo><mn>2</mn></mrow></math>, but we'll avoid
  reiterating this alternative.
<div class="p"><!----></div>
<a id="tthFtNtAIF"></a><a href="chap13.xml#tthFrefAIF"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>85</mn></mrow>
</msup>
</mrow></math></a><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&epsi;</mi></mrow></math> is a small adjustment of the end
  point to avoid it falling on a delta function.
<div class="p"><!----></div>
<a id="tthFtNtAIG"></a><a href="chap13.xml#tthFrefAIG"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>86</mn></mrow>
</msup>
</mrow></math></a>An
   extensive discussion is given in W H Press et al, "Numerical
   Recipes", chapter 12. Various open source implementations are
   available.
<div class="p"><!----></div>
<a id="tthFtNtAIH"></a><a href="chap13.xml#tthFrefAIH"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>87</mn></mrow>
</msup>
</mrow></math></a>A non-zero
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="bold">x</mi></mrow><mrow><mn>0</mn></mrow>
</msub>
</mrow></math> can be removed by reexpressing the equation in terms of
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">x</mi><mo>'</mo><mo>=</mo><mi mathvariant="bold">x</mi><mo>-</mo>
<msub><mrow><mi mathvariant="bold">x</mi></mrow><mrow><mn>0</mn></mrow>
</msub>
</mrow></math>.
<div class="p"><!----></div>
<a id="tthFtNtAII"></a><a href="chap13.xml#tthFrefAII"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>88</mn></mrow>
</msup>
</mrow></math></a>The present derivation draws on C P Jackson
  and P C Robinson (1985) "A numerical study of various algorithms
  related to the preconditioned conjugate gradient method",
  International Journal for Numerical Methods in Engineering, Vol 21,
  pp 1315-1338, and G Markham (1990) "Conjugate Gradient Type Methods
for Indefinite, Asymmetric, and Complex Systems" IMA Journal of
Numerical Analysis, Vol 10, pp 155-170.
<div class="p"><!----></div>
<a id="tthFtNtAIJ"></a><a href="chap13.xml#tthFrefAIJ"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>89</mn></mrow>
</msup>
</mrow></math></a>This is a type of Gramm-Schmidt
  basis-set construction.
<div class="p"><!----></div>
<a id="tthFtNtAJA"></a><a href="chap13.xml#tthFrefAJA"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>90</mn></mrow>
</msup>
</mrow></math></a>Succinct descriptions of a wide
  range of iterative algorithms are given by R. Barrett, M. Berry,
  T. F. Chan, J. Demmel, J. Donato, J. Dongarra, V. Eijkhout, R. Pozo,
  C. Romine, H. Van der Vorst (1994) "Templates for the Solution of
  Linear Systems: Building Blocks for Iterative Methods" 2nd Edition,
  SIAM, Philadelphia, which is available at
  <a href="http://www.netlib.org/linalg/html_templates/report.html"><tt>http://www.netlib.org/linalg/html_templates/report.html</tt></a>. Open
  source libraries of implementations of Krylov schemes are widely
  available. One of the more comprehensive is "SLATEC" at
  <a href="http://www.netlib.org/slatec/"><tt>http://www.netlib.org/slatec/</tt></a>.
<div class="p"><!----></div>
<a id="tthFtNtAJB"></a><a href="chap13.xml#tthFrefAJB"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>91</mn></mrow>
</msup>
</mrow></math></a>
  Bi-conjugate gradient iterations are implemented using two residual
  and two search direction vectors requiring just one multiplication
  by <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">A</mi></mrow></math> and one by <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>T</mi></mrow>
</msup>
</mrow></math> per step in this way:

<div class="p"><!----></div>

<table>
<tr><td align="left">1 Initialize:</td><td align="left">choose <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="bold">x</mi></mrow><mrow><mn>0</mn></mrow>
</msub>
</mrow></math>, <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="bold">r</mi></mrow><mrow><mn>0</mn></mrow>
</msub>
<mo>=</mo><mi mathvariant="bold">b</mi><mo>-</mo><mi mathvariant="bold">A</mi>
<msub><mrow><mi mathvariant="bold">x</mi></mrow><mrow><mn>0</mn></mrow>
</msub>
</mrow></math>,
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="bold">p</mi></mrow><mrow><mn>0</mn></mrow>
</msub>
<mo>=</mo>
<msub><mrow><mi mathvariant="bold">r</mi></mrow><mrow><mn>0</mn></mrow>
</msub>
</mrow></math>, choose <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow>
<mover><mrow><mi mathvariant="bold">r</mi></mrow>
<mo>&OverBar;</mo></mover>
</mrow><mrow><mn>0</mn></mrow>
</msub>
</mrow></math>, <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow>
<mover><mrow><mi mathvariant="bold">p</mi></mrow>
<mo>&OverBar;</mo></mover>
</mrow><mrow><mn>0</mn></mrow>
</msub>
<mo>=</mo>
<msub><mrow>
<mover><mrow><mi mathvariant="bold">r</mi></mrow>
<mo>&OverBar;</mo></mover>
</mrow><mrow><mn>0</mn></mrow>
</msub>
</mrow></math>, set <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>k</mi><mo>=</mo><mn>1</mn></mrow></math>.</td></tr>
<tr><td align="left">2 Calculate <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&alpha;</mi></mrow></math>:</td><td align="left"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="italic">&alpha;</mi></mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
<mo>=</mo>
<msubsup><mrow><mi mathvariant="bold">r</mi></mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn> </mrow>
<mrow><mi>T</mi></mrow></msubsup>

<msub><mrow>
<mover><mrow><mi mathvariant="bold">r</mi></mrow>
<mo>&OverBar;</mo></mover>
</mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
<mo stretchy="false">/</mo>
<msubsup><mrow><mi mathvariant="bold">p</mi></mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn> </mrow>
<mrow><mi>T</mi></mrow></msubsup>
<mi mathvariant="bold">A</mi>
<msub><mrow>
<mover><mrow><mi mathvariant="bold">p</mi></mrow>
<mo>&OverBar;</mo></mover>
</mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
</mrow></math></td></tr>
<tr><td align="left">3 Update <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">r</mi></mrow></math>s, <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">x</mi></mrow></math>:</td><td align="left"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="bold">r</mi></mrow><mrow><mi>k</mi></mrow>
</msub>
<mo>=</mo>
<msub><mrow><mi mathvariant="bold">r</mi></mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
<mo>-</mo>
<msub><mrow><mi mathvariant="italic">&alpha;</mi></mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
<mi mathvariant="bold">A</mi>
<msub><mrow><mi mathvariant="bold">p</mi></mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
</mrow></math>,&nbsp;&nbsp;&nbsp; 
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow>
<mover><mrow><mi mathvariant="bold">r</mi></mrow>
<mo>&OverBar;</mo></mover>
</mrow><mrow><mi>k</mi></mrow>
</msub>
<mo>=</mo>
<msub><mrow>
<mover><mrow><mi mathvariant="bold">r</mi></mrow>
<mo>&OverBar;</mo></mover>
</mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
<mo>-</mo>
<msub><mrow><mi mathvariant="italic">&alpha;</mi></mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>

<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>T</mi></mrow>
</msup>

<msub><mrow>
<mover><mrow><mi mathvariant="bold">p</mi></mrow>
<mo>&OverBar;</mo></mover>
</mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
</mrow></math>,</td></tr>
<tr><td align="left"></td><td align="left"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="bold">x</mi></mrow><mrow><mi>k</mi></mrow>
</msub>
<mo>=</mo>
<msub><mrow><mi mathvariant="bold">x</mi></mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
<mo>-</mo>
<msub><mrow><mi mathvariant="italic">&alpha;</mi></mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
<mi mathvariant="bold">A</mi>
<msub><mrow><mi mathvariant="bold">p</mi></mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
<mo>.</mo></mrow></math></td></tr>
<tr><td align="left">4 Calculate <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&beta;</mi></mrow></math>:</td><td align="left"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="italic">&beta;</mi></mrow><mrow><mi>k</mi><mo>,</mo><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
<mo>=</mo>
<msubsup><mrow>
<mover><mrow><mi mathvariant="bold">r</mi></mrow>
<mo>&OverBar;</mo></mover>
</mrow><mrow><mi>k</mi> </mrow>
<mrow><mi>T</mi></mrow></msubsup>

<msub><mrow><mi mathvariant="bold">r</mi></mrow><mrow><mi>k</mi></mrow>
</msub>
<mo stretchy="false">/</mo>
<msubsup><mrow>
<mover><mrow><mi mathvariant="bold">r</mi></mrow>
<mo>&OverBar;</mo></mover>
</mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn> </mrow>
<mrow><mi>T</mi></mrow></msubsup>

<msub><mrow><mi mathvariant="bold">r</mi></mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
<mo>.</mo></mrow></math></td></tr>
<tr><td align="left">5 Update <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">p</mi></mrow></math>s:</td><td align="left"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi mathvariant="bold">p</mi></mrow><mrow><mi>k</mi></mrow>
</msub>
<mo>=</mo>
<msub><mrow><mi mathvariant="bold">r</mi></mrow><mrow><mi>k</mi></mrow>
</msub>
<mo>-</mo>
<msub><mrow><mi mathvariant="italic">&beta;</mi></mrow><mrow><mi>k</mi><mo>,</mo><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>

<msub><mrow><mi mathvariant="bold">p</mi></mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
</mrow></math>&nbsp;&nbsp;&nbsp; 
and &nbsp;&nbsp;&nbsp;  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow>
<mover><mrow><mi mathvariant="bold">p</mi></mrow>
<mo>&OverBar;</mo></mover>
</mrow><mrow><mi>k</mi></mrow>
</msub>
<mo>=</mo>
<msub><mrow>
<mover><mrow><mi mathvariant="bold">r</mi></mrow>
<mo>&OverBar;</mo></mover>
</mrow><mrow><mi>k</mi></mrow>
</msub>
<mo>-</mo>
<msub><mrow><mi mathvariant="italic">&beta;</mi></mrow><mrow><mi>k</mi><mo>,</mo><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>

<msub><mrow>
<mover><mrow><mi mathvariant="bold">p</mi></mrow>
<mo>&OverBar;</mo></mover>
</mrow><mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow>
</msub>
<mo>.</mo></mrow></math></td></tr>
<tr><td align="left">6 Convergence?</td><td align="left">If not converged, increment <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>k</mi></mrow></math> and repeat from 2.</td></tr></table>


<div class="p"><!----></div>
  The conjugate gradient scheme is the same except no barred
quantities are calculated and unbarred quantities replace them.

<div class="p"><!----></div>
<a id="tthFtNtAJC"></a><a href="chap13.xml#tthFrefAJC"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>92</mn></mrow>
</msup>
</mrow></math></a>A compact mathematical description is given, for
  example, by Stephen Jardin (2010) "Computational Methods for Plasma
  Physics" CRC press, Taylor and Francis, Boca Raton. Section
  3.7.2.
<div class="p"><!----></div>
<a id="tthFtNtAJD"></a><a href="chap13.xml#tthFrefAJD"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>93</mn></mrow>
</msup>
</mrow></math></a>The
  number of iterations required to converge to a given accuracy for
  separated eigenvalues is approximately proportional to the square
  root of the matrix condition number. The condition number is the
  ratio of the maximum to the minimum eigenvalue. That is unity for
  the unit matrix because all eigenvalues are 1. For a matrix
  representing an isotropic finite-difference Laplacian, the
  eigenvalues are the squared wave numbers of the spatial Fourier
  modes. The condition number is therefore the sum of the squares of
  the number of mesh points in each dimension. The number of
  iterations required is therefore proportional to the mesh count of
  the largest dimension. That is the same as optimized
  SOR. Finding the optimum relaxation parameter for SOR is relatively
  easy for a rectangular mesh on a cubical domain. Consequently
  un-preconditioned Krylov methods for finite-difference equations in
  simple domains are generally not much faster than SOR. Krylov methods come
  into their own when the matrices are more complicated and optimizing
  SOR is impossible, for example for finite element methods on unstructured
  grids.
<div class="p"><!----></div>
<a id="tthFtNtAJE"></a><a href="chap13.xml#tthFrefAJE"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>94</mn></mrow>
</msup>
</mrow></math></a>There are some problems in liquids
  where sound waves are important; just a minority.
<div class="p"><!----></div>
<a id="tthFtNtAJF"></a><a href="chap13.xml#tthFrefAJF"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>95</mn></mrow>
</msup>
</mrow></math></a>This equation arises from substituting
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="italic">&rho;</mi><mo>=</mo><mi mathvariant="italic">constant</mi></mrow></math> into the (sourceless) continuity equation, so
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>0</mn><mo>=</mo>
<mfrac><mrow><mo>&part;</mo><mi mathvariant="italic">&rho;</mi></mrow>
<mrow><mo>&part;</mo><mi>t</mi></mrow>
</mfrac>
<mo>=</mo><mo>-</mo><mo mathvariant="bold-italic">&nabla;</mo><mo>.</mo><mo stretchy="false">(</mo><mi mathvariant="italic">&rho;</mi><mi mathvariant="bold-italic">v</mi><mo stretchy="false">)</mo></mrow></math>. If
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo>&nabla;</mo><mi mathvariant="italic">&rho;</mi></mrow></math> is non-zero, so <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo mathvariant="bold-italic">&nabla;</mo><mo>.</mo><mo stretchy="false">(</mo><mi mathvariant="italic">&rho;</mi><mi mathvariant="bold-italic">v</mi><mo stretchy="false">)</mo></mrow></math> is non-zero
  even though <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo mathvariant="bold-italic">&nabla;</mo><mo>.</mo><mi mathvariant="bold-italic">v</mi><mo>=</mo><mn>0</mn></mrow></math>, then the pressure equation
  acquires an additional term.
<div class="p"><!----></div>
<a id="tthFtNtAJG"></a><a href="chap13.xml#tthFrefAJG"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>96</mn></mrow>
</msup>
</mrow></math></a>See, e.g.&nbsp;J H Ferziger and M Peri&#263; (2002)
  "Computational Methods for Fluid Dynamics" third edition,
  Springer, Berlin.
<div class="p"><!----></div>
<a id="tthFtNtAJH"></a><a href="chap13.xml#tthFrefAJH"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>97</mn></mrow>
</msup>
</mrow></math></a>See, e.g.&nbsp;S Jardin (2010) op
  cit.
<div class="p"><!----></div>
<a id="tthFtNtAJI"></a><a href="chap13.xml#tthFrefAJI"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>98</mn></mrow>
</msup>
</mrow></math></a>A comprehensive introduction to limiter
  methods is given in Randall J Leveque (2002) "Finite Volume Methods
  for Hyperbolic Problems", Cambridge University
  Press.
<div class="p"><!----></div>
<a id="tthFtNtAJJ"></a><a href="chap13.xml#tthFrefAJJ"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>99</mn></mrow>
</msup>
</mrow></math></a>A large
  jet aircraft may reach <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mn>10</mn></mrow><mrow><mn>9</mn></mrow>
</msup>
</mrow></math>.
<div class="p"><!----></div>
<a id="tthFtNtBAA"></a><a href="chap13.xml#tthFrefBAA"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>100</mn></mrow>
</msup>
</mrow></math></a>See for example U. Piomelli
  (1999) "Large-eddy simulation: achievements and challenges"
  Progress in Aerospace Sciences, Vol 35, pp 335-362
<div class="p"><!----></div>
<a id="tthFtNtBAB"></a><a href="chap13.xml#tthFrefBAB"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>101</mn></mrow>
</msup>
</mrow></math></a>or
  the product of two different fluctuating quantities
<div class="p"><!----></div>
<a id="tthFtNtBAC"></a><a href="chap13.xml#tthFrefBAC"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>102</mn></mrow>
</msup>
</mrow></math></a>See for example B E Launder, G J Reece,
  and W Rodi (1975) "Progress in development of a Reynolds-stress
  turbulence closure", Journal of Fluid Mechanics, Vol 68, pp
  537-566.
<div class="p"><!----></div>
<a id="tthFtNtBAD"></a><a href="chapA.xml#tthFrefBAD"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>103</mn></mrow>
</msup>
</mrow></math></a>Of course there are deeper ways to think about vector
  spaces, but we here use the simplest approach.
<div class="p"><!----></div>
<a id="tthFtNtBAE"></a><a href="chapA.xml#tthFrefBAE"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>104</mn></mrow>
</msup>
</mrow></math></a>So a column
  vector can be considered a <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>J</mi><mo>&times;</mo><mn>1</mn></mrow></math> matrix and a row vector a
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>1</mn><mo>&times;</mo><mi>J</mi></mrow></math> matrix.
<div class="p"><!----></div>
<a id="tthFtNtBAF"></a><a href="chapA.xml#tthFrefBAF"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>105</mn></mrow>
</msup>
</mrow></math></a>Consider recursively expanding the determinant and
  subsequent cofactors, always choosing not to expand by the rows that
  are identical. Eventually one ends up with all <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>2</mn><mo>&times;</mo><mn>2</mn></mrow></math> cofactors composed
  of the identical rows. They are all zero.
<div class="p"><!----></div>
<a id="tthFtNtBAG"></a><a href="chapA.xml#tthFrefBAG"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>106</mn></mrow>
</msup>
</mrow></math></a>A left
  inverse <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>L</mi></mrow>
</msup>
</mrow></math> such that <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>L</mi></mrow>
</msup>
<mi mathvariant="bold">A</mi><mo>=</mo><mi mathvariant="bold">I</mi></mrow></math> must always
  be equal to a right inverse <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>R</mi></mrow>
</msup>
</mrow></math> such that
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi mathvariant="bold">A</mi>
<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>R</mi></mrow>
</msup>
<mo>=</mo><mi mathvariant="bold">I</mi></mrow></math> because
  <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>L</mi></mrow>
</msup>
<mo>=</mo>
<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>L</mi></mrow>
</msup>
<mi mathvariant="bold">I</mi><mo>=</mo>
<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>L</mi></mrow>
</msup>
<mo stretchy="false">(</mo><mi mathvariant="bold">A</mi>
<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>R</mi></mrow>
</msup>
<mo stretchy="false">)</mo><mo>=</mo><mo stretchy="false">(</mo>
<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>L</mi></mrow>
</msup>
<mi mathvariant="bold">A</mi><mo stretchy="false">)</mo>
<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>R</mi></mrow>
</msup>
<mo>=</mo><mi mathvariant="bold">I</mi>
<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>R</mi></mrow>
</msup>
<mo>=</mo>
<msup><mrow><mi mathvariant="bold">A</mi></mrow><mrow><mi>R</mi></mrow>
</msup>
</mrow></math>.<hr /><a href="index.xml">HEAD</a>
<br /><br /><hr /><small>File translated from
T<sub><span class="small">E</span></sub>X
by <a href="http://hutchinson.belmont.ma.us/tth/">
T<sub><span class="small">T</span></sub>M</a>,
version 4.12.</small>
</div></body></html>
