<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="HTMLFiles/pmathml.xsl"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "HTMLFiles/xhtml1-transitional.dtd">

<!-- This HTML document was created by converting a Mathematica notebook using Export. -->


<html xmlns="http://www.w3.org/1999/xhtml" class="Notebook">

<head >
<title>
  numabj.nb
</title>

<link href="../navi/css/ratk.css" rel="stylesheet" type="text/css"/>
<link href="HTMLFiles/Default.css" rel="stylesheet" type="text/css" />
</head>

<body>

<p><a href="../mma/numabj.nb">numabj.nb</a></p>

<p class="Title">
 Adamsin &ndash; Bashforthin menetelm&auml;n johto
</p>



<p class="Text">
 Integroimalla differentiaaliyht&auml;l&ouml; <span><math xmlns='http://www.w3.org/1998/Math/MathML'
    mathematica:form='TraditionalForm'
    xmlns:mathematica='http://www.wolfram.com/XML/'>
 <mrow>
  <mrow>
   <mi>y</mi>
   <mo>&apos;</mo>
  </mrow>
  <mtext> </mtext>
  <mo>=</mo>
  <mtext> </mtext>
  <mrow>
   <mi>f</mi>
   <mo>&#8289;</mo>
   <mo>(</mo>
   <mrow>
    <mi>x</mi>
    <mo>,</mo>
    <mi>y</mi>
   </mrow>
   <mo>)</mo>
  </mrow>
 </mrow>
</math></span>&nbsp;&nbsp;puolittain v&auml;lin <span><math xmlns='http://www.w3.org/1998/Math/MathML'
    mathematica:form='TraditionalForm'
    xmlns:mathematica='http://www.wolfram.com/XML/'>
 <mrow>
  <mo>[</mo>
  <mrow>
   <msub>
    <mi>x</mi>
    <mi>k</mi>
   </msub>
   <mtext> </mtext>
   <mo>,</mo>
   <mtext> </mtext>
   <msub>
    <mi>x</mi>
    <mrow>
     <mi>k</mi>
     <mo>+</mo>
     <mn>1</mn>
    </mrow>
   </msub>
  </mrow>
  <mo>]</mo>
 </mrow>
</math></span> yli saadaan
</p>



<p class="Input">
 <math xmlns='http://www.w3.org/1998/Math/MathML'
    mathematica:form='TraditionalForm'
    xmlns:mathematica='http://www.wolfram.com/XML/'>
 <mrow>
  <mstyle fontweight='normal'
      fontstyle='italic'>
   <mrow>
    <mrow>
     <mi>y</mi>
     <mo>&#8289;</mo>
     <mo>(</mo>
     <msub>
      <mi>x</mi>
      <mrow>
       <mi>k</mi>
       <mo>+</mo>
       <mn>1</mn>
      </mrow>
     </msub>
     <mo>)</mo>
    </mrow>
    <mo>-</mo>
    <mrow>
     <mi>y</mi>
     <mo>&#8289;</mo>
     <mo>(</mo>
     <msub>
      <mi>x</mi>
      <mi>k</mi>
     </msub>
     <mo>)</mo>
    </mrow>
   </mrow>
  </mstyle>
  <mo fontweight='normal' fontstyle='italic'>=</mo>
  <mrow>
   <mstyle fontweight='normal'
       fontstyle='italic'>
    <msubsup>
     <mo>&#8747;</mo>
     <msub>
      <mi>x</mi>
      <mi>k</mi>
     </msub>
     <msub>
      <mi>x</mi>
      <mrow>
       <mi>k</mi>
       <mo>+</mo>
       <mn>1</mn>
      </mrow>
     </msub>
    </msubsup>
   </mstyle>
   <mrow>
    <mstyle fontweight='normal'
        fontstyle='italic'>
     <mrow>
      <mi>f</mi>
      <mo>&#8289;</mo>
      <mo>(</mo>
      <mrow>
       <mi>x</mi>
       <mo>,</mo>
       <mrow>
        <mi>y</mi>
        <mo>&#8289;</mo>
        <mo>(</mo>
        <mi>x</mi>
        <mo>)</mo>
       </mrow>
      </mrow>
      <mo>)</mo>
     </mrow>
    </mstyle>
    <mo>&#8290;</mo>
    <mrow>
     <mrow>
      <mo fontweight='normal' fontstyle='normal'>&#8518;</mo>
      <mi fontweight='normal' fontstyle='italic'>x</mi>
     </mrow>
     <mo fontweight='normal' fontstyle='italic'>.</mo>
    </mrow>
   </mrow>
  </mrow>
 </mrow>
</math>
</p>

<p class="Text">
 Adamsin &ndash; Bashforthin menetelm&auml;ss&auml; integraalille lasketaan approksimaatio korvaamalla funktio <span><math xmlns='http://www.w3.org/1998/Math/MathML'
    mathematica:form='TraditionalForm'
    xmlns:mathematica='http://www.wolfram.com/XML/'>
 <mrow>
  <mi>f</mi>
  <mo>&#8289;</mo>
  <mo>(</mo>
  <mrow>
   <mi>x</mi>
   <mo>,</mo>
   <mrow>
    <mi>y</mi>
    <mo>&#8289;</mo>
    <mo>(</mo>
    <mi>x</mi>
    <mo>)</mo>
   </mrow>
  </mrow>
  <mo>)</mo>
 </mrow>
</math></span> kolmannen asteen interpolaatiopolynomilla. T&auml;m&auml;n tukipistein&auml; (so. pistein&auml;, joiden kautta polynomin kuvaaja kulkee) ovat nelj&auml; edellist&auml; jo laskettua pistett&auml; <span><math xmlns='http://www.w3.org/1998/Math/MathML'
    mathematica:form='TraditionalForm'
    xmlns:mathematica='http://www.wolfram.com/XML/'>
 <mrow>
  <mo>(</mo>
  <mrow>
   <msub>
    <mi>x</mi>
    <mi>j</mi>
   </msub>
   <mtext> </mtext>
   <mo>,</mo>
   <mtext> </mtext>
   <mrow>
    <mi>f</mi>
    <mo>&#8289;</mo>
    <mo>(</mo>
    <mrow>
     <msub>
      <mi>x</mi>
      <mi>j</mi>
     </msub>
     <mtext> </mtext>
     <mo>,</mo>
     <mtext> </mtext>
     <msub>
      <mi>y</mi>
      <mi>j</mi>
     </msub>
    </mrow>
    <mo>)</mo>
   </mrow>
  </mrow>
  <mo>)</mo>
 </mrow>
</math></span>, <span><math xmlns='http://www.w3.org/1998/Math/MathML'
    mathematica:form='TraditionalForm'
    xmlns:mathematica='http://www.wolfram.com/XML/'>
 <mrow>
  <mrow>
   <mi>j</mi>
   <mtext> </mtext>
   <mo>=</mo>
   <mtext> </mtext>
   <mrow>
    <mi>k</mi>
    <mo>-</mo>
    <mn>3</mn>
   </mrow>
  </mrow>
  <mtext> </mtext>
  <mo>,</mo>
  <mtext> </mtext>
  <mrow>
   <mi>k</mi>
   <mo>-</mo>
   <mn>2</mn>
  </mrow>
  <mtext> </mtext>
  <mo>,</mo>
  <mtext> </mtext>
  <mrow>
   <mi>k</mi>
   <mo>-</mo>
   <mn>1</mn>
  </mrow>
  <mtext> </mtext>
  <mo>,</mo>
  <mtext> </mtext>
  <mi>k</mi>
 </mrow>
</math></span>.
</p>



<p class="CellLabel">
 In[1]:=
</p>



<p class="Input">
 <math xmlns='http://www.w3.org/1998/Math/MathML'>
 <mrow>
  <mrow>
   <mi>tukipisteet</mi>
  </mrow>
  <mo>=</mo>
  <mtext> </mtext>
  <mrow>
   <mo>{</mo>
   <mrow>
    <mrow>
     <msub>
      <mi>x</mi>
      <mi>k</mi>
     </msub>
     <mtext> </mtext>
     <mo>-</mo>
     <mtext> </mtext>
     <mrow>
      <mn>3</mn>
      <mo>&#8290;</mo>
      <mi>h</mi>
     </mrow>
    </mrow>
    <mo>,</mo>
    <mrow>
     <msub>
      <mi>x</mi>
      <mi>k</mi>
     </msub>
     <mtext> </mtext>
     <mo>-</mo>
     <mtext> </mtext>
     <mrow>
      <mn>2</mn>
      <mo>&#8290;</mo>
      <mi>h</mi>
     </mrow>
    </mrow>
    <mo>,</mo>
    <mrow>
     <msub>
      <mi>x</mi>
      <mi>k</mi>
     </msub>
     <mtext> </mtext>
     <mo>-</mo>
     <mtext> </mtext>
     <mi>h</mi>
    </mrow>
    <mo>,</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mo>}</mo>
  </mrow>
 </mrow>
</math>
</p>

<p class="CellLabel">
 Out[1]=
</p>



<p class="Output">
 <math xmlns='http://www.w3.org/1998/Math/MathML'>
 <mrow>
  <mo>{</mo>
  <mrow>
   <mrow>
    <mrow>
     <mrow>
      <mo>-</mo>
      <mn>3</mn>
     </mrow>
     <mo>&#8290;</mo>
     <mi>h</mi>
    </mrow>
    <mo>+</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mo>,</mo>
   <mrow>
    <mrow>
     <mrow>
      <mo>-</mo>
      <mn>2</mn>
     </mrow>
     <mo>&#8290;</mo>
     <mi>h</mi>
    </mrow>
    <mo>+</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mo>,</mo>
   <mrow>
    <mrow>
     <mo>-</mo>
     <mi>h</mi>
    </mrow>
    <mo>+</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mo>,</mo>
   <msub>
    <mi>x</mi>
    <mi>k</mi>
   </msub>
  </mrow>
  <mo>}</mo>
 </mrow>
</math>
</p>

<p class="CellLabel">
 In[2]:=
</p>



<p class="Input">
 <math xmlns='http://www.w3.org/1998/Math/MathML'>
 <mrow>
  <mi>funktionarvot</mi>
  <mo>=</mo>
  <mtext> </mtext>
  <mrow>
   <mo>{</mo>
   <mrow>
    <msub>
     <mi>f</mi>
     <mrow>
      <mi>k</mi>
      <mo>-</mo>
      <mn>3</mn>
     </mrow>
    </msub>
    <mo>,</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mi>k</mi>
      <mo>-</mo>
      <mn>2</mn>
     </mrow>
    </msub>
    <mo>,</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mi>k</mi>
      <mo>-</mo>
      <mn>1</mn>
     </mrow>
    </msub>
    <mo>,</mo>
    <msub>
     <mi>f</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mo>}</mo>
  </mrow>
 </mrow>
</math>
</p>

<p class="CellLabel">
 Out[2]=
</p>



<p class="Output">
 <math xmlns='http://www.w3.org/1998/Math/MathML'>
 <mrow>
  <mo>{</mo>
  <mrow>
   <msub>
    <mi>f</mi>
    <mrow>
     <mrow>
      <mo>-</mo>
      <mn>3</mn>
     </mrow>
     <mo>+</mo>
     <mi>k</mi>
    </mrow>
   </msub>
   <mo>,</mo>
   <msub>
    <mi>f</mi>
    <mrow>
     <mrow>
      <mo>-</mo>
      <mn>2</mn>
     </mrow>
     <mo>+</mo>
     <mi>k</mi>
    </mrow>
   </msub>
   <mo>,</mo>
   <msub>
    <mi>f</mi>
    <mrow>
     <mrow>
      <mo>-</mo>
      <mn>1</mn>
     </mrow>
     <mo>+</mo>
     <mi>k</mi>
    </mrow>
   </msub>
   <mo>,</mo>
   <msub>
    <mi>f</mi>
    <mi>k</mi>
   </msub>
  </mrow>
  <mo>}</mo>
 </mrow>
</math>
</p>

<p class="Text">
 Interpolaatiopolynomin muodostamisessa tarvittavat pisteet ovat
</p>



<p class="CellLabel">
 In[3]:=
</p>



<p class="Input">
 <math xmlns='http://www.w3.org/1998/Math/MathML'>
 <mrow>
  <mi>interpolaatiodata</mi>
  <mo>=</mo>
  <mtext> </mtext>
  <mrow>
   <mi>Transpose</mi>
   <mo>[</mo>
   <mrow>
    <mo>{</mo>
    <mrow>
     <mi>tukipisteet</mi>
     <mo>,</mo>
     <mi>funktionarvot</mi>
    </mrow>
    <mo>}</mo>
   </mrow>
   <mo>]</mo>
  </mrow>
 </mrow>
</math>
</p>

<p class="CellLabel">
 Out[3]=
</p>



<p class="Output">
 <math xmlns='http://www.w3.org/1998/Math/MathML'>
 <mrow>
  <mo>{</mo>
  <mrow>
   <mrow>
    <mo>{</mo>
    <mrow>
     <mrow>
      <mrow>
       <mrow>
        <mo>-</mo>
        <mn>3</mn>
       </mrow>
       <mo>&#8290;</mo>
       <mi>h</mi>
      </mrow>
      <mo>+</mo>
      <msub>
       <mi>x</mi>
       <mi>k</mi>
      </msub>
     </mrow>
     <mo>,</mo>
     <msub>
      <mi>f</mi>
      <mrow>
       <mrow>
        <mo>-</mo>
        <mn>3</mn>
       </mrow>
       <mo>+</mo>
       <mi>k</mi>
      </mrow>
     </msub>
    </mrow>
    <mo>}</mo>
   </mrow>
   <mo>,</mo>
   <mrow>
    <mo>{</mo>
    <mrow>
     <mrow>
      <mrow>
       <mrow>
        <mo>-</mo>
        <mn>2</mn>
       </mrow>
       <mo>&#8290;</mo>
       <mi>h</mi>
      </mrow>
      <mo>+</mo>
      <msub>
       <mi>x</mi>
       <mi>k</mi>
      </msub>
     </mrow>
     <mo>,</mo>
     <msub>
      <mi>f</mi>
      <mrow>
       <mrow>
        <mo>-</mo>
        <mn>2</mn>
       </mrow>
       <mo>+</mo>
       <mi>k</mi>
      </mrow>
     </msub>
    </mrow>
    <mo>}</mo>
   </mrow>
   <mo>,</mo>
   <mrow>
    <mo>{</mo>
    <mrow>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mi>h</mi>
      </mrow>
      <mo>+</mo>
      <msub>
       <mi>x</mi>
       <mi>k</mi>
      </msub>
     </mrow>
     <mo>,</mo>
     <msub>
      <mi>f</mi>
      <mrow>
       <mrow>
        <mo>-</mo>
        <mn>1</mn>
       </mrow>
       <mo>+</mo>
       <mi>k</mi>
      </mrow>
     </msub>
    </mrow>
    <mo>}</mo>
   </mrow>
   <mo>,</mo>
   <mrow>
    <mo>{</mo>
    <mrow>
     <msub>
      <mi>x</mi>
      <mi>k</mi>
     </msub>
     <mo>,</mo>
     <msub>
      <mi>f</mi>
      <mi>k</mi>
     </msub>
    </mrow>
    <mo>}</mo>
   </mrow>
  </mrow>
  <mo>}</mo>
 </mrow>
</math>
</p>

<p class="Text">
 Interpolaatiopolynomi saadaan yhdell&auml; komennolla (muuttujana <span><math xmlns='http://www.w3.org/1998/Math/MathML'
    mathematica:form='TraditionalForm'
    xmlns:mathematica='http://www.wolfram.com/XML/'>
 <mi>t</mi>
</math></span>):
</p>



<p class="CellLabel">
 In[4]:=
</p>



<p class="Input">
 <math xmlns='http://www.w3.org/1998/Math/MathML'>
 <mrow>
  <mi>p</mi>
  <mo>=</mo>
  <mrow>
   <mrow>
    <mi>InterpolatingPolynomial</mi>
    <mo>[</mo>
    <mrow>
     <mi>interpolaatiodata</mi>
     <mo>,</mo>
     <mi>t</mi>
    </mrow>
    <mo>]</mo>
   </mrow>
   <mo>//</mo>
   <mi>Expand</mi>
  </mrow>
 </mrow>
</math>
</p>

<p class="CellLabel">
 Out[4]=
</p>



<p class="Output">
 <math xmlns='http://www.w3.org/1998/Math/MathML'>
 <mrow>
  <mrow>
   <mo>-</mo>
   <mfrac>
    <mrow>
     <mi>t</mi>
     <mo>&#8290;</mo>
     <msub>
      <mi>f</mi>
      <mrow>
       <mrow>
        <mo>-</mo>
        <mn>3</mn>
       </mrow>
       <mo>+</mo>
       <mi>k</mi>
      </mrow>
     </msub>
    </mrow>
    <mrow>
     <mn>3</mn>
     <mo>&#8290;</mo>
     <mi>h</mi>
    </mrow>
   </mfrac>
  </mrow>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <msup>
     <mi>t</mi>
     <mn>2</mn>
    </msup>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>3</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>2</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <msup>
     <mi>t</mi>
     <mn>3</mn>
    </msup>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>3</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
   </mrow>
   <mrow>
    <mn>6</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <mn>3</mn>
    <mo>&#8290;</mo>
    <mi>t</mi>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>2</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <mi>h</mi>
   </mrow>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>t</mi>
     <mn>2</mn>
    </msup>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>2</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
   </mrow>
   <msup>
    <mi>h</mi>
    <mn>2</mn>
   </msup>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <msup>
     <mi>t</mi>
     <mn>3</mn>
    </msup>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>2</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <mn>3</mn>
    <mo>&#8290;</mo>
    <mi>t</mi>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>1</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
   </mrow>
   <mi>h</mi>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <mn>5</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>t</mi>
     <mn>2</mn>
    </msup>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>1</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>2</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <msup>
     <mi>t</mi>
     <mn>3</mn>
    </msup>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>1</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>+</mo>
  <msub>
   <mi>f</mi>
   <mi>k</mi>
  </msub>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <mn>11</mn>
    <mo>&#8290;</mo>
    <mi>t</mi>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mrow>
    <mn>6</mn>
    <mo>&#8290;</mo>
    <mi>h</mi>
   </mrow>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <msup>
     <mi>t</mi>
     <mn>2</mn>
    </msup>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <msup>
    <mi>h</mi>
    <mn>2</mn>
   </msup>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <msup>
     <mi>t</mi>
     <mn>3</mn>
    </msup>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mrow>
    <mn>6</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>3</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mrow>
    <mn>3</mn>
    <mo>&#8290;</mo>
    <mi>h</mi>
   </mrow>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <mi>t</mi>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>3</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <msup>
    <mi>h</mi>
    <mn>2</mn>
   </msup>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <msup>
     <mi>t</mi>
     <mn>2</mn>
    </msup>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>3</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <mn>3</mn>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>2</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <mi>h</mi>
   </mrow>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <mn>4</mn>
    <mo>&#8290;</mo>
    <mi>t</mi>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>2</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <msup>
    <mi>h</mi>
    <mn>2</mn>
   </msup>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <mn>3</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>t</mi>
     <mn>2</mn>
    </msup>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>2</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <mn>3</mn>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>1</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mi>h</mi>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <mn>5</mn>
    <mo>&#8290;</mo>
    <mi>t</mi>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>1</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <msup>
    <mi>h</mi>
    <mn>2</mn>
   </msup>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <mn>3</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>t</mi>
     <mn>2</mn>
    </msup>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>1</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <mn>11</mn>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mi>k</mi>
    </msub>
    <mo>&#8290;</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mrow>
    <mn>6</mn>
    <mo>&#8290;</mo>
    <mi>h</mi>
   </mrow>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <mi>t</mi>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mi>k</mi>
    </msub>
    <mo>&#8290;</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <msup>
    <mi>h</mi>
    <mn>2</mn>
   </msup>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <msup>
     <mi>t</mi>
     <mn>2</mn>
    </msup>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mi>k</mi>
    </msub>
    <mo>&#8290;</mo>
    <msub>
     <mi>x</mi>
     <mi>k</mi>
    </msub>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>3</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msubsup>
     <mi>x</mi>
     <mi>k</mi>
     <mn>2</mn>
    </msubsup>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>2</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <mi>t</mi>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>3</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msubsup>
     <mi>x</mi>
     <mi>k</mi>
     <mn>2</mn>
    </msubsup>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>2</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msubsup>
     <mi>x</mi>
     <mi>k</mi>
     <mn>2</mn>
    </msubsup>
   </mrow>
   <msup>
    <mi>h</mi>
    <mn>2</mn>
   </msup>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <mn>3</mn>
    <mo>&#8290;</mo>
    <mi>t</mi>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>2</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msubsup>
     <mi>x</mi>
     <mi>k</mi>
     <mn>2</mn>
    </msubsup>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <mn>5</mn>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>1</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msubsup>
     <mi>x</mi>
     <mi>k</mi>
     <mn>2</mn>
    </msubsup>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>2</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <mn>3</mn>
    <mo>&#8290;</mo>
    <mi>t</mi>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>1</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msubsup>
     <mi>x</mi>
     <mi>k</mi>
     <mn>2</mn>
    </msubsup>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <msub>
     <mi>f</mi>
     <mi>k</mi>
    </msub>
    <mo>&#8290;</mo>
    <msubsup>
     <mi>x</mi>
     <mi>k</mi>
     <mn>2</mn>
    </msubsup>
   </mrow>
   <msup>
    <mi>h</mi>
    <mn>2</mn>
   </msup>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <mi>t</mi>
    <mo>&#8290;</mo>
    <msub>
     <mi>f</mi>
     <mi>k</mi>
    </msub>
    <mo>&#8290;</mo>
    <msubsup>
     <mi>x</mi>
     <mi>k</mi>
     <mn>2</mn>
    </msubsup>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>3</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msubsup>
     <mi>x</mi>
     <mi>k</mi>
     <mn>3</mn>
    </msubsup>
   </mrow>
   <mrow>
    <mn>6</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>2</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msubsup>
     <mi>x</mi>
     <mi>k</mi>
     <mn>3</mn>
    </msubsup>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>+</mo>
  <mfrac>
   <mrow>
    <msub>
     <mi>f</mi>
     <mrow>
      <mrow>
       <mo>-</mo>
       <mn>1</mn>
      </mrow>
      <mo>+</mo>
      <mi>k</mi>
     </mrow>
    </msub>
    <mo>&#8290;</mo>
    <msubsup>
     <mi>x</mi>
     <mi>k</mi>
     <mn>3</mn>
    </msubsup>
   </mrow>
   <mrow>
    <mn>2</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
  <mo>-</mo>
  <mfrac>
   <mrow>
    <msub>
     <mi>f</mi>
     <mi>k</mi>
    </msub>
    <mo>&#8290;</mo>
    <msubsup>
     <mi>x</mi>
     <mi>k</mi>
     <mn>3</mn>
    </msubsup>
   </mrow>
   <mrow>
    <mn>6</mn>
    <mo>&#8290;</mo>
    <msup>
     <mi>h</mi>
     <mn>3</mn>
    </msup>
   </mrow>
  </mfrac>
 </mrow>
</math>
</p>

<p class="Text">
 Integraalin approksimaatio saadaan integroimalla polynomi:
</p>



<p class="CellLabel">
 In[5]:=
</p>



<p class="Input">
 <math xmlns='http://www.w3.org/1998/Math/MathML'>
 <mrow>
  <mi>integraali</mi>
  <mo>=</mo>
  <mtext> </mtext>
  <mrow>
   <mrow>
    <mi>Integrate</mi>
    <mo>[</mo>
    <mrow>
     <mi>p</mi>
     <mo>,</mo>
     <mrow>
      <mo>{</mo>
      <mrow>
       <mi>t</mi>
       <mo>,</mo>
       <msub>
        <mi>x</mi>
        <mi>k</mi>
       </msub>
       <mo>,</mo>
       <mrow>
        <msub>
         <mi>x</mi>
         <mi>k</mi>
        </msub>
        <mo>+</mo>
        <mi>h</mi>
       </mrow>
      </mrow>
      <mo>}</mo>
     </mrow>
    </mrow>
    <mo>]</mo>
   </mrow>
   <mo>//</mo>
   <mi>Simplify</mi>
  </mrow>
 </mrow>
</math>
</p>

<p class="CellLabel">
 Out[5]=
</p>



<p class="Output">
 <math xmlns='http://www.w3.org/1998/Math/MathML'>
 <mrow>
  <mfrac>
   <mn>1</mn>
   <mn>24</mn>
  </mfrac>
  <mo>&#8290;</mo>
  <mi>h</mi>
  <mo>&#8290;</mo>
  <mrow>
   <mo>(</mo>
   <mrow>
    <mrow>
     <mrow>
      <mo>-</mo>
      <mn>9</mn>
     </mrow>
     <mo>&#8290;</mo>
     <msub>
      <mi>f</mi>
      <mrow>
       <mrow>
        <mo>-</mo>
        <mn>3</mn>
       </mrow>
       <mo>+</mo>
       <mi>k</mi>
      </mrow>
     </msub>
    </mrow>
    <mo>+</mo>
    <mrow>
     <mn>37</mn>
     <mo>&#8290;</mo>
     <msub>
      <mi>f</mi>
      <mrow>
       <mrow>
        <mo>-</mo>
        <mn>2</mn>
       </mrow>
       <mo>+</mo>
       <mi>k</mi>
      </mrow>
     </msub>
    </mrow>
    <mo>-</mo>
    <mrow>
     <mn>59</mn>
     <mo>&#8290;</mo>
     <msub>
      <mi>f</mi>
      <mrow>
       <mrow>
        <mo>-</mo>
        <mn>1</mn>
       </mrow>
       <mo>+</mo>
       <mi>k</mi>
      </mrow>
     </msub>
    </mrow>
    <mo>+</mo>
    <mrow>
     <mn>55</mn>
     <mo>&#8290;</mo>
     <msub>
      <mi>f</mi>
      <mi>k</mi>
     </msub>
    </mrow>
   </mrow>
   <mo>)</mo>
  </mrow>
 </mrow>
</math>
</p>





<p><b>Linkkej&auml;</b></p>

<p>
<a href="../xml/numadb.xml">Adamsin  -  Bashforthin menetelm&auml;</a><br/>
</p>

<p style='font-style: italic;'>
 SKK 30.04.2001
</p>


<hr />
<p style='font-family: Helvetica; font-size: 8pt'>Created by
<a href="http://www.wolfram.com"><span style='font-style: italic'>Mathematica</span></a>
&nbsp;(July 21, 2004) </p>

</body>

</html>
