Mathematical Fill in the Blanks - [formula] option

Question Mode: Blanks - [formula] option

 

Note:  Version 2.5 introduces Inline Questions, which have all the capabilities of Blanks questions, but more power and flexibility.  

 

The Blanks blank[formula] question type generates a fill-in-the-blank question in which the answer is a formula. The text inside a \blank[formula] command is removed and a text field is displayed.

Notes

For example, if the answer field were

  {2.34 ? 0.01}

any response between 2.33 and 2.35 (inclusive) would be graded correct.  In other words, the number following the ? operator is the margin of error. For more information on tolerances, see Setting a Margin of Error in Non-numeric Questions.

'$$x = \blank[formula]{sin(1)}$$'
 

and
 

'$\int_0^{\blank[formula]{sin(1)}} f(x)\,dx$'
 

generate conversion errors, but
 

'$x = \blank[formula]{sin(1)}$'
 

converts correctly. However, it is recommended that you use a construction similar to:
 

'$x = {}$\blank[formula]{sin(1)}$'

Example 1

\begin{question}{Blanks}
\qutext{The derivative of the function $f(x)=4x-x^3$ is
% Format: \blank[formula]{correct answer in calculator syntax}
\blank[formula]{4-3x^2}
and the second derivative is
\blank[formula]{-6x}.}
\end{question}

Example 2

\begin{question}{Blanks}
\qutext{The function $1-x^2$ is positive for values of $x$ in the range
\blank[formula]{-1} $< x <$ \blank[formula]{1}.}
\end{question}

Example 3

\begin{question}{Blanks}
\qutext{The maximum value of the function
$f(x)=\displaystyle\frac{x}{1+2x^2}$ is
\blank[formula]{0.353553 ? 0.0001} and the minimum value is
\blank[formula]{-0.353553 ? 0.0001}. Your answers must be correct
to at least 4 decimal places.}
\end{question}

Example 4

\begin{question}{Blanks}
% This question mixes the [menu] and [formula] options.
\qutext{The graph of the function $f(x)=(x-3)^2$ is the same as the
graph of $g(x)=x^2$ shifted to the \blank[menu]{right, left}
\blank[formula]{3} units.}
\end{question}

Example 5

\begin{question}{blanks}
% This question uses randomized variables.
\qutext{An earthquake that measures $\var{a}$ on the Richter scale is
\blank[formula]{\var{ans}} times more powerful than one that measures
$\var{b}$. Your answer must be exact.}
\code{
$a=rand(5,9,2);
$inc=int(rint(3)+2);
$b=$a-$inc;
$ans=int(10^$inc);
}
% The above code chooses a random value $a between 5 and 9, to two
% significant figures. $b will be 2, 3, or 4 less than $a.
\end{question}