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
|
\subsection{diff}
\label{labdiff}
\noindent Name: \textbf{diff}\\
\phantom{aaa}differentiation operator\\[0.2cm]
\noindent Library name:\\
\verb| sollya_obj_t sollya_lib_diff(sollya_obj_t)|\\[0.2cm]
\noindent Usage:
\begin{center}
\textbf{diff}(\emph{function}) : \textsf{function} $\rightarrow$ \textsf{function}\\
\end{center}
Parameters:
\begin{itemize}
\item \emph{function} represents a function
\end{itemize}
\noindent Description: \begin{itemize}
\item \textbf{diff}(\emph{function}) returns the symbolic derivative of the function
\emph{function} by the global free variable.
If \emph{function} represents a function symbol that is externally bound
to some code by \textbf{library}, the derivative is performed as a symbolic
annotation to the returned expression tree.
\end{itemize}
\noindent Example 1:
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> diff(sin(x));
cos(x)
\end{Verbatim}
\end{minipage}\end{center}
\noindent Example 2:
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> diff(x);
1
\end{Verbatim}
\end{minipage}\end{center}
\noindent Example 3:
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> diff(x^x);
x^x * (1 + log(x))
\end{Verbatim}
\end{minipage}\end{center}
See also: \textbf{library} (\ref{lablibrary}), \textbf{autodiff} (\ref{labautodiff}), \textbf{taylor} (\ref{labtaylor}), \textbf{taylorform} (\ref{labtaylorform})
|