## DESCRIPTION ## Algebra: expanded polynomial ## ENDDESCRIPTION ## KEYWORDS('algebra', 'expanded polynomial') ## DBsubject('WeBWorK') ## DBchapter('WeBWorK Tutorial') ## DBsection('Fort Lewis Tutorial 2011') ## Date('01/30/2011') ## Author('Paul Pearson') ## Institution('Fort Lewis College') ## TitleText1('') ## EditionText1('') ## AuthorText1('') ## Section1('') ## Problem1('') ########################### # Initialization DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "contextLimitedPolynomial.pl", ); TEXT(beginproblem()); ########################### # Setup # # Vertex form # Context("Numeric"); $h = 3; $k = 5; $vertexform = Compute("(x-$h)^2-$k"); # # Expanded form # Context("LimitedPolynomial-Strict"); $b = -2 * $h; $c = $h**2 - $k; $expandedform = Formula("x^2 + $b x + $c")->reduce(); ########################### # Main text Context()->texStrings; BEGIN_TEXT The quadratic expression \( $vertexform \) is written in vertex form. Write the expression in expanded form \( ax^2 + bx + c \). $BR $BR \{ ans_rule(30) \} END_TEXT Context()->normalStrings; ############################ # Answer evaluation $showPartialCorrectAnswers = 1; ANS( $expandedform->cmp() ); ############################ # Solution Context()->texStrings; BEGIN_SOLUTION ${PAR}SOLUTION:${PAR} Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT('MathObject version.'); ENDDOCUMENT();