\subsection{chebyshevform}
\label{labchebyshevform}
\noindent Name: \textbf{chebyshevform}\\
\phantom{aaa}computes a rigorous polynomial approximation\\[0.2cm]
\noindent Library name:\\
\verb|   sollya_obj_t sollya_lib_chebyshevform(sollya_obj_t, sollya_obj_t,|\\
\verb|                                         sollya_obj_t);|\\[0.2cm]
\noindent Usage: 
\begin{center}
\textbf{chebyshevform}(\emph{f}, \emph{n}, \emph{I}) : (\textsf{function}, \textsf{integer}, \textsf{range}) $\rightarrow$ \textsf{list}\\
\end{center}
Parameters: 
\begin{itemize}
\item \emph{f} is the function to be approximated.
\item \emph{n} is the degree of the polynomial that must approximate \emph{f}.
\item \emph{I} is the interval over which the function is to be approximated. This interval cannot be a point interval, i.e. its endpoints have to be different.
\end{itemize}
\noindent Description: \begin{itemize}

\item \textbf{WARNING:} \textbf{chebyshevform} is a certified command, not difficult to use but not
   completely straightforward to use either. In order to be sure to use it
   correctly, the reader is invited to carefully read this documentation
   entirely.

\item \textbf{chebyshevform} computes an approximation polynomial and an interval error
   bound for a given function $f$.
   \\
   More precisely, it returns a list $L = \left[p, \textrm{coeffErrors},\Delta,\textrm{chebCoeffs} \right]$
   where:\begin{itemize}
   \item $p$ is an approximation polynomial of degree $n$ which is roughly speaking a
   numerical Chebyshev interpolation polynomial of $f$ over $I$ represented in
   monomial basis.
   \item coeffsErrors is a list of $n+1$ intervals. Each interval coeffsErrors[$i$]
   contains an enclosure of all the errors accumulated when computing the $i$-th
   coefficient of $p$.
   \item $\Delta$ is an interval that provides a bound for the approximation error
   between $p$ and $f$. See details below.
   \item $\textrm{chebCoeffs}$ is a list of $n+1$ intervals. These are the interval
   coefficients obtained for the representation of interpolation polynomial
   considered in Chebyshev basis. See details below.\end{itemize}

\item The polynomial $p$ and the bound $\Delta$ are obtained using Chebyshev Models
   principles.

\item More formally, the mathematical property ensured by the algorithm may be
   stated as follows:
   \\
   Using monomial basis representation given by $p$: there exist (small) values
   $\varepsilon_i \in \textrm{coeffsErrors}[i]$ such that:
   $\forall x \in I, \exists \delta \in \Delta,\,$
   $f(x)-p(x) = \sum\limits_{i=0}^{n} \varepsilon_i\, x^i + \delta$.
   \\
   Using Chebyshev basis representation given by $\textrm{chebCoeffs}$: there exist values
   $\alpha_i \in \textrm{chebCoeffs}[i]$ such that:
   $\forall x \in I, \exists \delta \in \Delta,\,$
   $f(x)-\sum\limits_{i=0}^{n} \alpha_i\, T_i(y)= \delta$,
   where $[a,b]=I, y=(2x-b-a)/(b-a)$ and $T_i(y)$ is the $i$-th Chebyshev polynomial
   over $[-1,1]$.

\item The algorithm does not guarantee that by increasing the degree of the
   approximation, the remainder bound will become smaller. Moreover, it may even
   become larger due to the dependency phenomenon present with interval
   arithmetic. In order to reduce this phenomenon, a possible solution is to
   split the definition domain $I$ into several smaller intervals.
\end{itemize}
\noindent Example 1: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> TL=chebyshevform(exp(x), 10, [-1,1]);
> p=TL[0];
> Delta=TL[2];
> p; Delta;
1.00000000000000000000000000000000000000000000000017 + x * (1.000000000273898191
9773953471453626764777115166417 + x * (0.500000000022767543680233268825420973654
11870042312 + x * (0.166666661190450656168988993421371510533693281444003 + x * (
4.1666666211440433973188799509591566161569698904644e-2 + x * (8.3333639749825520
034240517636254576844423981913793e-3 + x * (1.3888914363614809070686210553721677
7944219976325265e-3 + x * (1.98342776066472142284727329700227389403558111865906e
-4 + x * (2.47957727598277888282218067965324267955768146489014e-5 + x * (2.82540
33440982477266316370012542019511804700836066e-6 + x * 2.813698333371884313582809
1163040197490633045592362e-7)))))))))
[-2.71406412827174505775085010461449926572460824320373e-11;2.7140641282717450577
5085010461449926572460824320373e-11]
\end{Verbatim}
\end{minipage}\end{center}
See also: \textbf{taylorform} (\ref{labtaylorform}), \textbf{diff} (\ref{labdiff}), \textbf{autodiff} (\ref{labautodiff}), \textbf{taylor} (\ref{labtaylor}), \textbf{remez} (\ref{labremez})
