[npl] / trunk / NationalProblemLibrary / maCalcDB / setAlgebra05RationalExpressions / Test2_3.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/maCalcDB/setAlgebra05RationalExpressions/Test2_3.pg

Wed Oct 19 17:03:53 2005 UTC (7 years, 7 months ago) by jj
File size: 1530 byte(s)
Added subject tag.


    1 #DESCRIPTION
2 ##  Reducing fractions by simplifying and factoring
3 ##ENDDESCRIPTION
4 ##
5 ## Author:  Mark Schmitt
6 ## Date:    2001/02 School Year
7 ## Course:  Honors Algebra 2
8 ##
9
10 ##KEYWORDS('algebra', 'powers')
11 ## hcao tagged and PAID on 2-20-2004
12
13 ## DBsubject('Algebra')
14 ## DBchapter('Basic Algebra')
15 ## DBsection('Fractional Expressions')
16 ## Date('6/3/2002')
17 ## Author('')
18 ## Institution('')
19 ## TitleText1('College Algebra')
20 ## EditionText1('3')
21 ## AuthorText1('Stewart, Redlin, Watson')
22 ## Section1('1.5')
23 ## Problem1('34')
24 DOCUMENT();        # This should be the first executable line in the problem.
25
27 "PG.pl",
28 "PGbasicmacros.pl",
29 "PGchoicemacros.pl",
31 "PGauxiliaryFunctions.pl"
32 );
33
34 TEXT(&beginproblem);
35 $showPartialCorrectAnswers = 1; 36 37$A = non_zero_random(-9,9,1);
38 $B = non_zero_random(-9,9,1); 39$C = non_zero_random(-9,9,1);
40 $D = non_zero_random(-9,9,1); 41$E = non_zero_random(-9,9,1);
42 $F = non_zero_random(-9,9,1); 43 while ($A+$E-$C ==0 || $F-$A*$D-$C*$B ==0) {$A=non_zero_random(-9,9,1);}
44 while (gcd($A+$E-$C,$F-$A*$D-$C*$B)>1) {$F= non_zero_random(-9,9,1);$E =non_zero_random(-9,9,1);}
45
46 $lin =$B+$D; 47$con = $D*$B;
48
49 TEXT(EV2(<<EOT));
50 $\frac{A}{x+B} - \frac{C}{x+D} + \frac{E x+F}{x^2+lin x +con} = \frac{A}{B}$
51 where A = \{ans_rule(10)\}
52 $BR 53 and B = \{ans_rule(10)\} 54 55 56$BR
57 EOT
58
59 $ans1 = "($A+$E-$C) * x + ($F+$A*$D-$C*$B)"; 60$ans2 = "x**2 +$lin * x +$con";
61
62 &ANS(fun_cmp($ans1)); 63 &ANS(fun_cmp($ans2));
64
65 ENDDOCUMENT();        # This should be the last executable line in the problem.
66


 aubreyja at gmail dot com ViewVC Help Powered by ViewVC 1.0.9