## DESCRIPTION ## Algebra: laws of logarithms ## ENDDESCRIPTION ## KEYWORDS('algebra', 'laws of logarithms') ## 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", "AnswerFormatHelp.pl", ); TEXT(beginproblem()); ################################### # Setup Context("Numeric"); Context()->variables->are(x=>"Real",y=>"Real",z=>"Real"); Context()->variables->set(x=>{limits=>[2,3]}); Context()->variables->set(y=>{limits=>[2,3]}); Context()->variables->set(z=>{limits=>[2,3]}); $a = random(20,40,1);$b = random(20,40,1); do { $c = random(20,40,1); } until ($c != $b ); # TeX$expr = "\displaystyle \ln \left( \frac{ x^{$a} y^{$b} }{ z^{$c} } \right)";$answer = Compute("$a * ln(x) +$b * ln(y) - $c * ln(z)"); Context()->operators->undefine("/","^","**"); Context()->functions->undefine("sqrt"); ################################### # Main text Context()->texStrings; BEGIN_TEXT Using laws of logarithms, write the expression below using sums and/or differences of logarithmic expressions which do not contain the logarithms of products, quotients, or powers.$BR $BR $$\displaystyle expr =$$ \{ ans_rule(40) \} \{ AnswerFormatHelp("formulas") \} END_TEXT Context()->normalStrings; ################################### # Answers$showPartialCorrectAnswers = 1; ANS( $answer->cmp() ); ##################################### # Solution Context()->texStrings; BEGIN_SOLUTION${PAR}SOLUTION:\${PAR} Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT("MathObject version."); ENDDOCUMENT();