In the following code, I am getting the attached error message.
I think this might have something to do with ImplicitPlane, although I am not certain. Interestingly, for the asymptotes, 6y=7x, 6y=-7x is accepted as correct. And, in other seeds, an answer like y=1/7x, y=-1/7x is also accepted as correct. Any help would be great, because I'm stumped.
## DESCRIPTION
## Algebra, Exponential functions## ENDDESCRIPTION
## DBsubject(Algebra)
## DBchapter(Conic sections)
## DBsection(Hyperbolas)
## Date(11/09/2017)
## Institution(Community College of Denver, Colorado Community College System)
## Author(James Morski)
## Static(1)
## MO(1)
## KEYWORDS('algebra','hyperbola')
###########################
# Initialization
DOCUMENT();
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"AnswerFormatHelp.pl",
"contextLimitedPoint.pl",
"unorderedAnswer.pl",
"parserImplicitPlane.pl",
"PGML.pl",
"PGcourse.pl",
);
TEXT(beginproblem());
$showPartialCorrectAnswers = 1;
##########################
# Setup
Context("Numeric");
$a = random(1,8,1);
do { $b =random(1,8,1); } until ( $b != $a );
$c=Compute("($a^2+($b)^2)^(1/2)");
$chooser=random(1,2,1);
#vertical orientation
if ( $chooser==1) {
Context("LimitedPoint");
Context()->variables->add(y => "Real");
$f = Formula("(y^2)/$b^2-(x^2)/$a^2")->reduce;
$foci = List(Point("(0,$c)"), Point("(0,-$c)"));
$vertices= List( Point("(0,-$b)"),Point("(0,$b)"));
Context("ImplicitPlane")->variables->are(x=>'Real',y=>'Real');
$posasymptote = ImplicitPlane("$a*y=$b*x");
$negasymptote = ImplicitPlane("$a*y=-$b*x");
$asymptote = List($posasymptote,$negasymptote)
}
#horizontal orientation
else {
Context("LimitedPoint");
Context()->variables->add(y => "Real");
$f = Formula("(x^2)/$a^2-(y^2)/$b^2")->reduce;
$foci = List(Point("($c,0)"), Point("(-$c,0)"));
$vertices = List( Point("(-$a,0)"),Point("($a,0)"));
Context("ImplicitPlane")->variables->are(x=>'Real',y=>'Real');
$posasymptote = ImplicitPlane("y=($b/$a)x");
$negasymptote = ImplicitPlane("y=-($b/$a)x");
$asymptote = List($posasymptote,$negasymptote)
}
#################################
# Main text
BEGIN_PGML
For the given equation of a hyperbola, identify the foci and the vertices, and write the equations of the asymptote lines. Enter each as a comma separated list.
>>[`` [$f]=1 ``]<<
Foci:[___________________________]{$foci} [@ AnswerFormatHelp("points") @]*
Vertices: [_____________________]{$vertices} [@ AnswerFormatHelp("points") @]*
Asymptotes: [____________________________________________]{$asymptote} [@ AnswerFormatHelp("equations")@]*
END_PGML
#################################
# Solution
#BEGIN_PGML_SOLUTION
#Solution explanation goes here.
#END_PGML_SOLUTION
COMMENT('Uses PGML.');
ENDDOCUMENT();