<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>integrate</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1993</DATE>
  <SHORT_DESCRIPTION name="integrate"> integration by quadrature</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>[x]=integrate(expr,v,x0,x1 [,ea [,er]])  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>expr</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: external Scilab</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>v</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: string (integration variable)</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>x0,x1</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: real numbers (bounds of integration)</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>ea,er</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: real numbers (absolute  error bound) Default value: 0</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>er</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: real number, (relative error bound) Default value: 1.d-8</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P>
    computes :</P>
    <VERBATIM><![CDATA[
                       /x1
                      [
                  x = I  f(v)dv
                      ]
                     /x0
      ]]></VERBATIM>
    <P>
    The evaluation hopefully satisfies following claim for accuracy:
    <VERB>abs(I-x)&lt;= max(ea,er*abs(I))</VERB> where I stands for the
    exact value of the integral.</P>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
integrate('sin(x)','x',0,%pi)
integrate(['if x==0 then 1,';
           'else sin(x)/x,end'],'x',0,%pi)
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>intg</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>inttrap</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>intsplin</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>ode</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
