\section{SIN Trigonometric Sine Function}

\subsection{Usage}

Computes the \verb|sin| function for its argument.  The general
syntax for its use is
\begin{verbatim}
  y = sin(x)
\end{verbatim}
where \verb|x| is an \verb|n|-dimensional array of numerical type.
Integer types are promoted to the \verb|double| type prior to
calculation of the \verb|sin| function.  Output \verb|y| is of the
same size and type as the input \verb|x|, (unless \verb|x| is an
integer, in which case \verb|y| is a \verb|double| type).  
\subsection{Function Internals}

Mathematically, the \verb|sin| function is defined for all real
valued arguments \verb|x| by the infinite summation
\[
  \sin x \equiv \sum_{n=1}^{\infty} \frac{(-1)^{n-1} x^{2n-1}}{(2n-1)!}.
\]
For complex valued arguments \verb|z|, the sine is computed via
\[
  \sin z \equiv \sin \Re z \cosh \Im z - i \cos \Re z
  \sinh \Im z.
\]
\subsection{Example}

The following piece of code plots the real-valued \verb|sin(2 pi x)|
function over one period of \verb|[0,1]|:
\begin{verbatim}
--> x = linspace(0,1);
--> plot(x,sin(2*pi*x))

\end{verbatim}


\centerline{\includegraphics[width=8cm]{sinplot}}

