Formula

Description

This is the most general type of math question. Answers may be any kind of formula, entered in calculator syntax. Answers may include variables and standard functions.

Notes

Examples

\begin{question}{Formula}
\qutext{What is the derivative of $x^3+3\cos(x)-1$?}
% Use calculator syntax for the answer, NOT TeX:
\answer{3x^2-3*sin(x)}
\end{question}
\begin{question}{Formula}
\qutext{Compute the exact value of $f'(2)$ if
$f(x)=x^3+3\cos(x)-1$.}
\answer{12-3*sin(2)}
% Any numerical approximation would be graded as incorrect.
\end{question}
\begin{question}{Formula}
\qutext{Compute $f'(2)$ if $f(x)=x^3+3\cos(x)-1$.
Round your answer to 5 significant digits.}
\answer{9.2721}
% In this case, a more accurate response would still be
% graded as incorrect.
\end{question}
\begin{question}{Formula}
\qutext{Compute $f'(2)$ if $f(x)=x^3+3\cos(x)-1$.
Your answer should be correct to an accuracy of at least
5 decimal places.}
\answer{9.27211 ? 0.00001}
% Any response between 9.27210 and 9.27212 would be
% graded as correct.
% The response '12-3*sin(2)' would also be acceptable. 
\begin{question}{Formula}
% This question uses algorithmic variables.
\qutext{Find the formula for the inverse of the function
$f(x)=\var{a}x+\var{b}$.}
\answer{(x-\var{b})/\var{a}}
\code{$a = range(2,10);
      $b = range(2,10);}
% The above code chooses random integer coefficients
% a and b between 2 and 10. 
\end{question}