[rochester] / tags / rel-1-9-02 / rochester_problib / setAlgebra05RationalExpressions / sw1_5_35.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /tags/rel-1-9-02/rochester_problib/setAlgebra05RationalExpressions/sw1_5_35.pg

Wed Jul 30 22:57:48 2003 UTC (9 years, 9 months ago)
File size: 985 byte(s)
This commit was manufactured by cvs2svn to create tag 'rel-1-9-02'.

    1 #DESCRIPTION
2 ##  Algebra problem: Simplify expression
3 ##ENDDESCRIPTION
4
5 ##KEYWORDS('algebra', 'fraction functions')
6
7 DOCUMENT();        # This should be the first executable line in the problem.
8
10 "PG.pl",
11 "PGbasicmacros.pl",
12 "PGchoicemacros.pl",
14 "PGauxiliaryFunctions.pl"
15 );
16
17 TEXT(beginproblem());
18
19 $showPartialCorrectAnswers = 1; 20 21$a = random(1,2,1);
22 $b = random(1,4,1); 23$c = random(4,5,1);
24 ## 1/(x+$a)(x+$b) - 1/(x+$a)(x-$c)
25 $b1 =$a+$b; 26$c1 = $a*$b;
27 $b2 = -$a+$c; 28$c2 = $a*$c;
29
30 BEGIN_TEXT
31 Simplify the expression
32 $\frac{1}{x^2+b1 x+c1} - \frac{1}{x^2-b2 x - c2}$
34 $\frac{f(x)}{g(x)}.$
35 $BR 36 Your answer for the function $$f(x)$$ is : \{ans_rule(20) \} 37$BR
38 Your answer for the function $$g(x)$$ is : \{ans_rule(20) \}
39 $BR 40 END_TEXT 41 42$ans1 = "-$c-$b";
43 $ans2 = "(x+$a)*(x+$b)*(x-$c)";
45 ANS(fun_cmp($ans1)); 46 ANS(fun_cmp($ans2));