Likely obvious but I just cant figure out why LaTeX is choking on this problem when I include the solution.
The table seems okay to me, but there must be an issue with the array.
++++++++++++++++++
## DESCRIPTION
## This is Problem 3.3.15 from the APEX Calculus text (3.3.16 in the ULETH APEX text). It covers the First Derivative Test.
## ENDDESCRIPTION
## DBsubject(Calculus - single variable)
## DBchapter(Applications of differentiation)
## DBsection(Increasing/decreasing functions and local extrema)
## Level(2)
## Institution('Valdosta State University')
## Author('S. V. Ault')
## RevisedBy('F. J. Francis')
## TitleText1('APEX Calculus')
## AuthorText1('Hartman')
## EditionText1('3.0')
## Section1('3.3')
## Problem1('15')
## MO(1)
## Keywords('first derivative test', 'increasing and decreasing functions','ULETH-MATH1560', 'ULETH-MATH1565')
###########################
# Initialization
DOCUMENT();
# Load whatever macros you need for the problem
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
# Used to provide contextual help for how to type answers.
"AnswerFormatHelp.pl",
# Provides greater control over the layout of the problem.
"PGML.pl",
# Used for course-specific initializations.
"PGcourse.pl",
);
# Sets up basic problem information.
TEXT(beginproblem());
#############################
# Setup
#-ULETH-#
Context("Numeric");
$b = 3*random(1,6,1);
$c = random(1,20,1)*random(-1,1,2);
$f = Formula("x^3 + $b x^2 + $c")->reduce();
$b2 = 2*$b;
$df = Formula("3x^2 + $b2 x")->reduce();
Context("Interval");
@domain = Compute("(-INF, INF)");
$crit1 = -$b2/3;
$crit2 = 0;
@inc = Compute("(-INF, $crit1) U ($crit2, INF)");
@dec = Compute("($crit1, $crit2)");
$ans_crit = List($crit1, $crit2);
$ans_max = List($crit1);
$ans_min = List($crit2);
#-ENDULETH-#
#############################
# Problem Text
#-ULETH-#
BEGIN_PGML
In the following questions, consider the function
>>[`f(x) = [$f].`]<<
Enter *DNE* if an answer does not exist.
----
a) Give the domain of [`f`] (in interval notation): [________________________]{Compute(@domain)} [@ AnswerFormatHelp("intervals") @]*
b) Find the critical numbers of [`f`]. [____________]{Compute($ans_crit)} [@ AnswerFormatHelp("numbers") @]*
(Separate multiple answers with commas.)
c) Determine the intervals on which [`f`] is increasing and decreasing.
[`f`] is increasing on: [________________________]{Compute(@inc)}
[`f`] is decreasing on: [________________________]{Compute(@dec)}
d) Use the First Derivative Test to determine whether each
critical point is a relative maximum, minimum, or neither.
Relative maxima occur at [`x = `] [____________]{Compute($ans_max)} (Separate multiple
answers with commas.)
Relative minima occur at [`x = `] [____________]{Compute($ans_min)} (Separate multiple answers with commas.)
END_PGML
#-ENDULETH-#
#############################
# Solution
#-ULETH-#
BEGIN_PGML_SOLUTION
Since [`f(x) = [$f]`] is a polynomial, its domain is all real numbers,
or [`(-\infty, \infty)`].
Its derivative is [`f'(x) = [$df]`]. Factor to find the two critical numbers,
[`x = [$crit1], [$crit2]`].
Use the first derivative test, choosing sample points in each interval.
[``
\begin{array}{|l|l|l|}
\hline
\textrm{Interval} &
\textrm{Sign of}\; f'\; \textrm{at sample} &
\textrm{Conclusion} \\
\hline
\hline
(-\infty, [$crit1]) & \textrm{positive} & \textrm{increasing} \\
\hline
([$crit1], [$crit2]) & \textrm{negative} & \textrm{decreasing} \\
\hline
([$crit2], \infty) & \textrm{positive} & \textrm{increasing} \\
\hline
\end{array}
``]
Based on the signs in each interval there is a
relative maximum at [`x = [$crit1]`] and a
relative minimum at [`x = [$crit2]`].
END_PGML_SOLUTION
#-ENDULETH-#
#############################
# Answer evaluation
#Answers are evaluated in the problem text.
#-ULETH-#
# Setting this to 1 means that students will receive feedback on whether their
# answers are correct.
$showPartialCorrectAnswers = 1;
#-ENDULETH-#
COMMENT('
Randomization provides 240 possible versions of this question.<BR>
Includes a solution set.<BR>
Made from a ULETH template.<BR>
');
ENDDOCUMENT();