1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
\subsection{integral}
\label{labintegral}
\noindent Name: \textbf{integral}\\
\phantom{aaa}computes an interval bounding the integral of a function on an interval.\\[0.2cm]
\noindent Library name:\\
\verb| sollya_obj_t sollya_lib_integral(sollya_obj_t, sollya_obj_t)|\\[0.2cm]
\noindent Usage:
\begin{center}
\textbf{integral}(\emph{f},\emph{I}) : (\textsf{function}, \textsf{range}) $\rightarrow$ \textsf{range}\\
\end{center}
Parameters:
\begin{itemize}
\item \emph{f} is a function.
\item \emph{I} is an interval.
\end{itemize}
\noindent Description: \begin{itemize}
\item \textbf{integral}(\emph{f},\emph{I}) returns an interval $J$ such that the exact value of
the integral of \emph{f} on \emph{I} lies in $J$.
\item This command is safe but very inefficient. Use \textbf{dirtyintegral} if you just want
an approximate value.
\item The result of this command depends on the global variable \textbf{diam}.
The method used is the following: \emph{I} is cut into intervals of length not
greater then $\delta \cdot |I|$ where $\delta$ is the value
of global variable \textbf{diam}.
On each small interval \emph{J}, an evaluation of \emph{f} by interval is
performed. The result is multiplied by the length of \emph{J}. Finally all values
are summed.
\end{itemize}
\noindent Example 1:
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> sin(10);
-0.54402111088936981340474766185137728168364301291622
> integral(cos(x),[0;10]);
[-0.54710197983579690224097637163525943075698599257333;-0.5409401513001318384815
0540881373370744053741191729]
> diam=1e-5!;
> integral(cos(x),[0;10]);
[-0.54432915685955427101857780295936956775293876382777;-0.5437130640124996950803
9644221927489010425803173555]
\end{Verbatim}
\end{minipage}\end{center}
See also: \textbf{diam} (\ref{labdiam}), \textbf{dirtyintegral} (\ref{labdirtyintegral}), \textbf{prec} (\ref{labprec})
|