[npl] / trunk / NationalProblemLibrary / SUNYSB / WebWorkInverse.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/SUNYSB/WebWorkInverse.pg

Tue Aug 8 15:08:53 2006 UTC (6 years, 9 months ago) by jjholt
File size: 3156 byte(s)
Added tags.  --JH


    1 ## DESCRIPTION
2 ## Algebra
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('algebra','inverse functions','domain')
6 ## Tagged by cmd6a 8/6/06
7
8 ## DBsubject('Algebra')
9 ## DBchapter('Functions')
10 ## DBsection('Inverse Functions')
11 ## Date('')
12 ## Author('')
13 ## Institution('SUNYSB')
14 ## TitleText1('')
15 ## EditionText1('')
16 ## AuthorText1('')
17 ## Section1('')
18 ## Problem1('')
19
20 DOCUMENT();        # This should be the first executable line in the problem.
21
23 "PG.pl",
24 "PGbasicmacros.pl",
25 "PGchoicemacros.pl",
27 "PGauxiliaryFunctions.pl"
28 );
29
30 TEXT(&beginproblem);
31
32 $showPartialCorrectAnswers = 0; 33 34$a1 = random(2,15,1);
35 $b1 = random(1,15,1); 36$c1 = random(-15,15,1);
37
38 $funct = "$a1 - x";
39
40 TEXT(EV2(<<EOT));
41 Let $f: R \longrightarrow R, f(x) = a1 - x$
42 $PAR 43 $$f^{-1}( x ) =$$ \{ans_rule(20) \}$PAR
44 EOT
45 $ans = 1/$a1;
46 &ANS(function_cmp($funct)); 47 48 ##############################mec2############################## 49 #$a1 = random(2,15,1);
50 #$b1 = random(1,15,1); 51 #$c1 = random(-15,15,1);
52 #
53 #$funct = "1/x -$a1";
54 #
55 #TEXT(EV2(<<EOT));
56 #Let $f(x) = \frac { 1 } { x + a1 }$
57 #$PAR 58 #$$f^{-1}( x ) =$$ \{ans_rule(20) \}$PAR
59 #EOT
60 #
61 #&ANS(function_cmp($funct)); 62 # 63 ##############################mec3############################## 64$a1 = random(2,15,1);
65 $b1 = random(1,15,1); 66$c1 = random(-15,15,1);
67
68 $funct = "($a1 - x)^(1/2)";
69
70 TEXT(EV2(<<EOT));
71 Let $f: [0,\infty) \longrightarrow R, f(x) = a1 - x^2$
72 $PAR 73 $$f^{-1}( x ) =$$ \{ans_rule(20) \}$PAR
74 EOT
75
76 &ANS(function_cmp($funct)); 77 78 ##############################mec4############################## 79$a1 = random(1,5,1);
80 $b1 = random(6,10,1); 81$c1 = random(-10,-1);
82
83 $ans = ($b1*$c1 -$a1)/(1 - $c1); 84 85 TEXT(EV2(<<EOT)); 86 Let $f: C \longrightarrow D, f(x) = \frac { x + a1} { x + b1 }$ 87$PAR
88 f is bijective from C to D.
89 $PAR 90 $$f^{-1}( c1 ) =$$ \{ans_rule(20) \}$PAR
91 EOT
92
93 &ANS(std_num_cmp($ans)); 94 ##############################mec5############################## 95$a1 = random(2,6,1);
96 $b1 = non_zero_random(-10,10,1); 97$c1 = non_zero_random(-5,5,1);
98 $c2 =$c1 + 1;
99 $d1 = random($c2,10,1);
100
101 TEXT(EV2(<<EOT));
102 Let $f(x) = \frac { 1 } { a1} x + b1 , \quad c1 \le x \le d1$
103 $PAR 104 The domain of $$f^{-1}$$ is the interval $$[A,B]$$ 105$PAR
106 where $$A =$$ \{ans_rule(10) \}
107 and where $$B =$$ \{ans_rule(10) \} $PAR 108 EOT 109 110$ans1 = $c1/$a1 + $b1; 111$ans2 = $d1/$a1 + $b1; 112 113 &ANS(std_num_cmp($ans1));
114 &ANS(std_num_cmp($ans2)); 115 116 ##############################mec6############################## 117$a1 = random(2,5,1);
118 $b1 = random(1,5,1); 119$c1 = random(2,5,1);
120
121 $x1 =$a1 + $c1; 122 123 TEXT(EV2(<<EOT)); 124 Let $f: R \longrightarrow R, f(x) = a1 + b1 x + c1 e^x$ 125 126 $$f^{-1}(x1) =$$ \{ans_rule(10) \} 127$PAR
128 EOT
129
130 &ANS(std_num_cmp(0));
131
132 ##############################mec7##############################
133 $a1 = random(2,15,1); 134$b1 = random(1,15,1);
135 $c1 = random(-15,15,1); 136 137 TEXT(EV2(<<EOT)); 138 If $$f: R \longrightarrow R, f(x) = a1 x - b1$$, then$BR
139 $$f^{-1}(y) =$$ \{ans_rule(20) \} $BR 140 $$f^{-1}( c1 ) =$$ \{ans_rule(20) \} 141$PAR
142 EOT
143 $ans1="(y+$b1)/$a1"; 144$ans2 = ($c1+$b1)/$a1; 145 &ANS(function_cmp($ans1, "y"), std_num_cmp(\$ans2));
146
147 ENDDOCUMENT();        # This should be the last executable line in the problem.