[npl] / trunk / NationalProblemLibrary / Utah / Intermediate_Algebra / set8_Quadratic_Equations_Functions_and_Inequalities / s8p22.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

Sat Feb 7 16:55:50 2009 UTC (4 years, 3 months ago) by jj
File size: 1177 byte(s)
Fixed NPL tags.

1 ## Author('Utah ww group')
2 ## Institution('Univeristy of Utah')
3 ## DBsubject('Algebra')
4 ## DBchapter('Equations and Inequalities')
6 ## AuthorText1('Ron Larson and Robert P. Hostetler')
7 ## TitleText1('Intermediate Algebra')
8 ## EditionText1('4')
9 ## Section1(' Quadratic Equations, Functions, and Inequalities ')
10 ## Problem1('')
11 ##KEYWORDS('algebra')
12
13 DOCUMENT();        # This should be the first executable line in the problem.
14
16 "PG.pl",
17 "PGbasicmacros.pl",
18 "PGchoicemacros.pl",
20 "PGauxiliaryFunctions.pl"
21 );
22
23
25 TEXT(&beginproblem);
26 $showPartialCorrectAnswers = 0; 27$showPartialCredit = 0;
28
29
30 $r1=random(2,5,1); 31$r2=-random(2,5,1);
32 if ($r2 == -$r1) {$r1++}; 33$rp = $r1+$r2;
34 $rm =$r1*$r2; 35 36 37 TEXT(EV2(<<EOT)); 38 39 The equation 40 $x^2 - rp x + rm = 0$ 41 has the solution 42 $$x =$$\{ ans_rule(10) \} $$\pm$$ 43 EOT 44 &ANS(num_cmp(($r1+$r2)/2)); 45 TEXT(EV2(<<EOT)); 46 \{ ans_rule(10) \} ~ 47 EOT 48 &ANS(num_cmp(($r1-\$r2)/2));
49 TEXT(EV2(<<EOT));
50  \{ ans_rule(5) \}.
51 EOT
52 &ANS(multivar_function_cmp("1",["i"]));
53
54 ENDDOCUMENT();        # This should be the last executable line in the problem.