[npl] / trunk / NationalProblemLibrary / Rochester / setAlgebra28ExpFunctions / pexp.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Rochester/setAlgebra28ExpFunctions/pexp.pg

Sun Mar 26 22:21:31 2006 UTC (7 years, 2 months ago) by jj
File size: 1764 byte(s)
```Initial import
```

```    1 ##DESCRIPTION
2 ##KEYWORDS('logarithms,exponentials','exponential growth,decay')
3 ##TYPE('word problem')
4 ##ENDDESCRIPTION
5
6 DOCUMENT();        # This should be the first executable line in the problem.
7
9 "PG.pl",
10 "PGbasicmacros.pl",
11 "PGchoicemacros.pl",
13 "PGauxiliaryFunctions.pl"
14 );
15
16 TEXT(beginproblem());
17 \$showPartialCorrectAnswers = 1;
18
19 \$e = random(2,9,1);
20
21 \$a1 = random(1,9,1);
22 \$ag = random(0,1,1);
23 if (\$ag == 0) {
24   \$a2 = 'downward';
25   \$ans_a = "\$e^x - \$a1";
26   }
27 if (\$ag == 1) {
28   \$a2 = 'upward';
29   \$ans_a = "\$e^x + \$a1";
30   }
31
32 \$b1 = random(1,9,1);
33 \$bg = random(0,1,1);
34 if (\$bg == 0) {
35   \$b2 = 'right';
36   \$ans_b = "\$e^(x - \$b1)";
37   }
38 if (\$bg == 1) {
39   \$b2 = 'left';
40   \$ans_b = "\$e^(x + \$b1)";
41   }
42
43 \$cg = random(0,2,1);
44 if (\$cg == 0) {
45   \$c1 = 'x-axis';
46   \$ans_c = "-\$e^x";
47   }
48 if (\$cg == 1) {
49   \$c1 = 'y-axis';
50   \$ans_c = "\$e^(-x)";
51   }
52 if (\$cg == 2) {
53   \$c1 = 'x-axis and the y-axis';
54   \$ans_c = "-\$e^(-x)";
55   }
56
57 #\$d1 = non_zero_random(-4,4,1);
58 #\$temp = 2 * \$d1;
59 #\$dg = random(0,1,1);
60 #if (\$dg == 0) {
61 #  \$d2 = 'x';
62 #  \$ans_d = "\$e**(\$temp-x)";
63 #  }
64 #if (\$dg == 1) {
65 #  \$d2 = 'y';
66 #  \$ans_d = "\$temp-\$e**x";
67 #  }
68
69 TEXT(EV2(<<EOT));
70 Starting with the graph of \( f(x) = \$e^{x} \), write the equation of the graph that results from
71 \$BR \$BR (a) shifting \( f(x) \) \$a1 units \$a2.  \( y = \) \{ans_rule(20) \}
72 \$BR \$BR (b) shifting \( f(x) \) \$b1 units to the \$b2.  \( y = \) \{ans_rule(20) \}
73 \$BR \$BR (c) reflecting \( f(x) \) about the \$c1.  \( y = \) \{ans_rule(20) \}
74 EOT
75 #\$PAR (d) reflecting \( f(x) \) about the line \$d2 = \$d1.  \( y = \) \{ans_rule(20) \}
76
77
78
79 ANS(fun_cmp(\$ans_a));
80 ANS(fun_cmp(\$ans_b));
81 ANS(fun_cmp(\$ans_c));
82 #ANS(fun_cmp(\$ans_d));
83
84 ENDDOCUMENT();        # This should be the last executable line in the problem.
85
```

 aubreyja at gmail dot com ViewVC Help Powered by ViewVC 1.0.9