Problem7

From WeBWorK_wiki
Jump to navigation Jump to search

Prep Main Page > Web Conference 2 > Sample Problems > Problem 7

This is Library/Rochester/setAlgebra08LinearEqns/sw3_1_7.pg

DOCUMENT();

loadMacros(
"PG.pl",
"PGbasicmacros.pl",
"PGchoicemacros.pl",
"PGanswermacros.pl",
"PGauxiliaryFunctions.pl"
);

TEXT(beginproblem());
$showPartialCorrectAnswers = 1;

$a = random(2,9,1);
$b = random(2,4,1);
$c = non_zero_random(-10,10,1);

TEXT(EV2(<<EOT));
Solve the equation \(\displaystyle \frac{$a}{x}+\frac{$b}{2x} = $c\) algebraically.
$BR $BR \( x = \) \{ans_rule(20) \}
$BR$BR
Please also use your calculator to verify your answer. 
EOT

$ans = ($a + $b/2)/$c;
ANS(num_cmp($ans));

ENDDOCUMENT();