[rochester] / trunk / rochester_problib / setAlgebra10QuadraticEqns / sw3_3_3.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

Fri Mar 21 21:03:25 2003 UTC (10 years, 3 months ago) by apizer
File size: 815 byte(s)
```new files
```

```    1 ##DESCRIPTION
2 ##  Algebra problem: quadratic equation
3 ##ENDDESCRIPTION
4
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);
19
20 \$x1 = -random(4,8,1);
21 \$x2 = -random(1,4,1);
22
23 # (x+x1)(x+x2)=0
24 \$b = \$x1+\$x2;
25 \$c = \$x1*\$x2;
26
27 TEXT(EV2(<<EOT));
28 Solve the equation \(x^2 ? {\$b} x ? {\$c}=0\) by factoring.
29 \$BR \$BR
30 The solutions are \( x_1 = \) \{ans_rule(15) \}
31 and \( x_2 = \) \{ans_rule(15) \} with \(x_1\le x_2\).
32 \$BR
33 EOT
34
35 \$ans1 = -\$x2;
36 \$ans2 = -\$x1;
37 &ANS(std_num_cmp(\$ans1));
38 &ANS(std_num_cmp(\$ans2));
39
40 ENDDOCUMENT();        # This should be the last executable line in the problem.
41
```