## DESCRIPTION ## Algebra: factored polynomial ## ENDDESCRIPTION ## KEYWORDS('algebra', 'factored 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", "contextPolynomialFactors.pl", "contextLimitedPowers.pl", ); TEXT(beginproblem()); ########################### # Setup # # Expanded form # Context("Numeric"); \$poly = Compute("8x^2+28x+12"); # # Factored form # Context("PolynomialFactors-Strict"); Context()->flags->set(singleFactors=>0); LimitedPowers::OnlyIntegers( minPower => 0, maxPower => 1, message => "either 0 or 1", ); \$factored = Compute("4(2x+1)(x+3)"); ########################### # Main text Context()->texStrings; BEGIN_TEXT Write the quadratic expression \( \$poly \) in factored form \( k(ax+b)(cx+d) \). \$BR \$BR \{ ans_rule(30)\} END_TEXT Context()->normalStrings; ############################ # Answer evaluation \$showPartialCorrectAnswers = 1; ANS( \$factored->cmp() ); ############################ # Solution Context()->texStrings; BEGIN_SOLUTION \${PAR}SOLUTION:\${PAR} Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT('MathObject version.'); ENDDOCUMENT();