Description
The
Maple question type adds the capabilities of
the Maple mathematical computation package to EDU. In
Maple questions, the
student's response can be passed directly to Maple for
grading. Moreover, questions can include Maple-generated
plots, and students can preview plots of their answers
(provided that the answer is an expression suitable for
plotting).
Notes
- Maple questions use the
\maple
command instead of \answer
to specify an answer. The argument
to \maple
is the correct answer, expressed in
Maple syntax.
- Maple syntax is much more stringent than
EDU syntax. For example, EDU recognizes
2x
as
a product, but Maple requires 2*x
. To allow
students to use EDU syntax in their responses, include
\type{formula}
in the question body. EDU
will then preprocess the student's response, accepting the
same syntax as EDU's Formula mode, before sending it to
Maple. This means that the syntax is more forgiving, so
that the response 2x
would be accepted as well
as 2*x
, but advanced Maple commands will
probably be rejected.
- Authors may insert Maple-driven plots in
the
\qutext
field with the \drawMaplePlot
macro. Three-dimensional
(surface) plots can be included with \drawMaplePlot3d
.
- Authors can allow students to view a plot
of their response by including a
\plot
macro in the question, but outside
of \qutext
. For answers in two variables, a
three-dimensional plot can be provided with the \plot3d
macro. Either of these macros will
cause a 'Plot' link to be placed below the response entry
cell. A student who clicks on this link will be shown a
plot of the response they have entered, without having the
response submitted for grading.
Examples
\begin{question}{Maple}
\qutext{What is the derivative of $x^2$?}
\type{formula} % to allow the student to enter "2x"
\maple{2*x}
\end{question}
\begin{question}{Maple}
\qutext{Find the solution to the initial-value
problem $xy'=\sin x$, $y(0)=0$. Give your answer
as the formula for $y(x)$.}
\maple{Si(x)}
% the response "int(sin(t)/t,t=0..x)" would be graded correct
\end{question}
\begin{question}{Maple}
\qutext{The graph of a trigonometric function $f(x)$
is given below.\\
\\
% the optional argument is the plot's width; the height will be 250
\drawMaplePlot[400]{2*sin(Pi*x + Pi/4)}{x}{-2}{2} % must capitalize Pi
\\
\\
The graph passes through the point $(1/4,2)$.\\
\\
Give a formula for $f(x)$.}
\maple{2*sin(Pi*x + Pi/4)}
\plot{x}{-2}{2} % you really wouldn't use \plot for this
% question, since it gives away the answer
\end{question}