%% Created by Maple V Release 4 (APPLE_PPC_MAC)
%% Source Worksheet: Sample2.mws
%% Generated: Wed Jul  8 12:52:35 1998
\documentclass{article}
\usepackage{maple2e}
\DefineParaStyle{Author}
\DefineParaStyle{Heading 1}
\DefineParaStyle{Maple Output}
\DefineParaStyle{Maple Plot}
\DefineParaStyle{Title}
\DefineCharStyle{2D Comment}
\DefineCharStyle{2D Math}
\DefineCharStyle{2D Output}
\begin{document}
\begin{Title}
A First Example
\end{Title}

\begin{Author}
Daniel D.Warner
\end{Author}

\begin{Author}
July 8,1998
\end{Author}

\begin{maplegroup}
\begin{mapleinput}
\end{mapleinput}

\end{maplegroup}

\section{Calculation}

Look at the integral 
\mapleinline{inert}{2d}{Int(x^2*sin(x-a),x)}{%
$\int x^{2}\,{\rm sin}(x - a)\,dx$%
}. Notice that is integrand, 
\mapleinline{inert}{2d}{x^2*sin(x-a)}{%
$x^{2}\,{\rm sin}(x - a)$%
}, depends on the parameter 
\mapleinline{inert}{2d}{a}{%
$a$%
}.

Give the integral a name so that you can refer to it later.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{eq1 := Int(x^2*sin(x-a),x);}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\it eq1} := {\displaystyle \int } x^{2}\,{\rm sin}(x - a)\,dx
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
The value of the integral is an anti-derivative on the integrand.

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{answer:=value(eq1);}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\begin{eqnarray*}
\lefteqn{{\it answer} :=  - (x - a)^{2}\,{\rm cos}(x - a) + 2\,
{\rm cos}(x - a) + 2\,(x - a)\,{\rm sin}(x - a)} \\
 & & \mbox{} + 2\,a\,({\rm sin}(x - a) - (x - a)\,{\rm cos}(x - a
)) - a^{2}\,{\rm cos}(x - a)\mbox{\hspace{62pt}}
\end{eqnarray*}
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
As you can see the answer depends on the parameter.

\end{maplegroup}

\section{Visualization}

To see how the parameter affects the answer you can graph it as a
surface.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot3d(answer,x=-Pi..Pi, a=0..1);}{%
}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{Sample01.eps}
\end{center}

\end{maplegroup}
\begin{maplegroup}
If the parameter represents time, you get the animation below.

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\end{mapleinput}

\end{maplegroup}
\end{document}
%% End of Maple V Output
