|
4 | 4 |
|
5 | 5 | ## Tagged by LD |
6 | 6 |
|
7 | | - |
8 | 7 | ## DBsubject(Calculus - single variable) |
9 | 8 | ## DBchapter(Limits and continuity) |
10 | 9 | ## DBsection(Finding limits using graphs) |
|
36 | 35 | ## Problem4('45') |
37 | 36 | ## KEYWORDS('calculus','limits', 'derivatives','limit') |
38 | 37 |
|
39 | | -DOCUMENT(); # This should be the first executable line in the problem. |
40 | | - |
41 | | -loadMacros( |
42 | | - "PGstandard.pl", |
43 | | - "PGchoicemacros.pl", |
44 | | - "PGgraphmacros.pl", |
45 | | - "PGcourse.pl" |
| 38 | +DOCUMENT(); # This should be the first executable line in the problem. |
| 39 | + |
| 40 | +loadMacros('PGstandard.pl', 'PGML.pl', 'plots.pl', 'PGcourse.pl'); |
| 41 | + |
| 42 | +$a = random(-3, 3, 1); |
| 43 | +$b = random(-2, 3, 1); |
| 44 | +$c = random(-3, 2, 1); |
| 45 | +$ap1 = 1 + $a; |
| 46 | +$bp1 = 1 + $b; |
| 47 | +$m1 = random(-1, 1, 0.5); |
| 48 | +$m2 = ($b - $a) / 2; |
| 49 | +$m3 = ($c - $b - 1) / 2; |
| 50 | +$m4 = random(-1, 1, 0.5); |
| 51 | +$ystart = $a - $m1; |
| 52 | +$yend = $c + $m4; |
| 53 | + |
| 54 | +$color = list_random("blue", "red", "green"); |
| 55 | + |
| 56 | +$plot = Plot( |
| 57 | + xmin => -3, |
| 58 | + xmax => 5, |
| 59 | + ymin => -6, |
| 60 | + ymax => 6, |
| 61 | + xtick_delta => 1, |
| 62 | + xminor => 0, |
| 63 | + ytick_delta => 1, |
| 64 | + yminor => 0, |
| 65 | + xlabel => '\(x\)', |
| 66 | + ylabel => '\(y\)', |
| 67 | + aria_label => 'The graph of the function y=F(x)', |
| 68 | + axes_on_top => 1, |
46 | 69 | ); |
47 | 70 |
|
48 | | -TEXT(beginproblem()); |
49 | | -$showPartialCorrectAnswers = 1; |
50 | | - |
51 | | -$a=random(-3,3,1); |
52 | | -$b=random(-2,3,1); |
53 | | -$c=random(-3,2,1); |
54 | | -$m1=random(-1,1,0.5); |
55 | | -$m2=($b - $a)/2; |
56 | | -$m3=($c - $b - 1)/2; |
57 | | -$m4=random(-1,1,0.5); |
58 | | -@slice = NchooseK(3,3); |
59 | | - |
60 | | -@colors = ("blue", "red", "green"); |
61 | | -@sc = @colors[@slice]; #scrambled colors |
62 | | -@sa = ('A','B','C')[@slice]; |
63 | | - |
64 | | -$f1 = FEQ("${m1}*(x+1)+$a for x in [-2,-1) using color:$sc[0] and weight:2"); |
65 | | -$f2 = FEQ("${m2}*(x-1)+$b for x in (-1,1) using color=$sc[0] and weight:2"); |
66 | | -$f3 = FEQ("${m3}*(x-3)+$c for x in [1,3) using color=$sc[0] and weight=2"); |
67 | | -$f4 = FEQ("1+$a for x in [-1,-1] using color=$sc[0] and weight=2"); |
68 | | -$f5 = FEQ("${m4}*(x-3)+$c for x in (3,4] using color=$sc[0] and weight=2"); |
69 | | - |
70 | | -$graph = init_graph(-3,-6,5,6,'axes'=>[0,0],'grid'=>[8,12]); |
71 | | - |
72 | | -($f1Ref,$f2Ref,$f3Ref,$f4Ref,$f5Ref) = plot_functions($graph,$f1,$f2,$f3,$f4,$f5); |
73 | | - |
74 | | -TEXT(EV2(<<EOT)); |
75 | | -Let F be the function below.$PAR |
76 | | -If you are having a hard time seeing the picture clearly, click on the picture. It will expand to a larger picture on its own page so that you can inspect it more clearly.$PAR |
77 | | -EOT |
78 | | - |
79 | | -TEXT(image( insertGraph($graph) )); |
80 | | - |
81 | | -TEXT(EV2(<<EOT)); |
82 | | -$BR |
83 | | -$BR |
84 | | -Evaluate each of the following expressions. $PAR |
85 | | -Note: Enter 'DNE' if the limit does not exist or is not defined. $PAR |
86 | | - |
87 | | -a) \( \displaystyle \lim_{x \to -1^-} F(x) \) = \<ans_rule(7)\> |
88 | | -$SPACE |
89 | | - |
90 | | - \( \displaystyle \lim_{x \to -1^+} F(x) \) = \<ans_rule(7)\> |
91 | | -$SPACE |
92 | | - |
93 | | - \( \displaystyle \lim_{x \to -1} F(x) \) = \<ans_rule(7)\> |
94 | | -$SPACE |
95 | | - |
96 | | - \( F(-1) \) = \<ans_rule(7)\> |
97 | | -$PAR |
98 | | - |
99 | | -b) \( \displaystyle \lim_{x \to 1^-} F(x) \) = \<ans_rule(8)\> |
100 | | -$SPACE |
101 | | - |
102 | | - \( \displaystyle \lim_{x \to 1^+} F(x) \) = \<ans_rule(8)\> |
103 | | -$SPACE |
104 | | - |
105 | | - \( \displaystyle \lim_{x \to 1} F(x) \) = \<ans_rule(8)\> |
106 | | -$SPACE |
107 | | - |
108 | | - \( F(1) \) = \<ans_rule(8)\> |
109 | | -$PAR |
110 | | - |
111 | | -c) \( \displaystyle \lim_{x \to 3^-} F(x) \) = \<ans_rule(8)\> |
112 | | -$SPACE |
113 | | - |
114 | | - \( \displaystyle \lim_{x \to 3^+} F(x) \) = \<ans_rule(8)\> |
115 | | -$SPACE |
116 | | - |
117 | | -\( \displaystyle \lim_{x \to 3} F(x) \) = \<ans_rule(8)\> |
118 | | -$SPACE |
119 | | - |
120 | | - \( F(3) \) = \<ans_rule(8)\> |
121 | | -$PAR |
122 | | - |
123 | | -EOT |
124 | | - |
125 | | -$ap1 = 1 + $a; |
126 | | -$bp1 = 1 + $b; |
127 | | - |
128 | | -ANS(num_cmp($a, strings=>['DNE'])) ; |
129 | | -ANS(num_cmp($a, strings=>['DNE'])) ; |
130 | | -ANS(num_cmp($a, strings=>['DNE'])) ; |
131 | | -ANS(num_cmp($ap1, strings=>['DNE'])); |
132 | | -ANS(num_cmp($b, strings=>['DNE'])) ; |
133 | | -ANS(num_cmp($bp1, strings=>['DNE'])); |
134 | | -ANS(num_cmp('DNE', strings=>['DNE'])) ; |
135 | | -ANS(num_cmp($bp1, strings=>['DNE'])); |
136 | | -ANS(num_cmp($c, strings=>['DNE'])) ; |
137 | | -ANS(num_cmp($c, strings=>['DNE'])) ; |
138 | | -ANS(num_cmp($c, strings=>['DNE'])) ; |
139 | | -ANS(num_cmp('DNE', strings=>['DNE'])) ; |
140 | | - |
141 | | -ENDDOCUMENT(); # This should be the last executable line in the problem. |
| 71 | +$plot->add_function( |
| 72 | + ["${m1}*(x+1)+$a", 'x', -2, -1, start_mark=>'circle', end_mark=>'open_circle', color=>$color, weight=>2], |
| 73 | + ["${m2}*(x-1)+$b", 'x', -1, 1, start_mark=>'open_circle', end_mark=>'open_circle', color=>$color, weight=>2], |
| 74 | + ["${m3}*(x-3)+$c", 'x', 1, 3, start_mark=>'circle', end_mark=>'open_circle', color=>$color, weight=>2], |
| 75 | + ["${m4}*(x-3)+$c", 'x', 3, 4, start_mark=>'open_circle', end_mark=>'circle', color=>$color, weight=>2] |
| 76 | +); |
142 | 77 |
|
| 78 | +$plot->add_dataset([ -1, $ap1 ], color => $color, marks => 'circle'); |
| 79 | + |
| 80 | +$alttext = |
| 81 | + "A graph showing a line segment starting with a solid circle at the point (-2,$ystart) and ending with an open circle at the point (-1,$a). There is a solid circle at the point (-1,$ap1). There is a line segment starting with an open circle at the point (-1,$a) and ending with an open circle at the point (1,$b). There is a line segment starting with a solid circle at the point (1,$bp1) and ending with an open circle at the point (3,$c). There is a line segment starting with an open circle at the point (3,$c) and ending with a solid circle at the point (4,$yend)."; |
| 82 | + |
| 83 | +$ans1 = Compute($a); |
| 84 | +$ans2 = Compute($a); |
| 85 | +$ans3 = Compute($a); |
| 86 | +$ans4 = Compute($ap1); |
| 87 | +$ans5 = Compute($b); |
| 88 | +$ans6 = Compute($bp1); |
| 89 | +$ans7 = Compute('DNE'); |
| 90 | +$ans8 = Compute($bp1); |
| 91 | +$ans9 = Compute($c); |
| 92 | +$ans10 = Compute($c); |
| 93 | +$ans11 = Compute($c); |
| 94 | +$ans12 = Compute('DNE'); |
| 95 | + |
| 96 | +BEGIN_PGML |
| 97 | +The graph of [`y=F(x)`] is given below. |
| 98 | + |
| 99 | +If you are having a hard time seeing the picture clearly, click on the picture. It will expand to a larger picture on its own page so that you can inspect it more clearly. |
| 100 | + |
| 101 | +[! $alttext !]{$plot} |
| 102 | + |
| 103 | +Evaluate each of the following expressions. |
| 104 | + |
| 105 | +Note: Enter 'DNE' if the limit does not exist or is not defined. |
| 106 | +[# |
| 107 | + [. a) .] [. [`` \lim_{x \to -1^-} F(x) ``] = [_]{$ans1}{5} .] |
| 108 | + [. [`` \lim_{x \to -1^+} F(x) ``] = [_]{$ans2}{5} .] |
| 109 | + [. [`` \lim_{x \to -1} F(x) ``] = [_]{$ans3}{5} .] |
| 110 | + [. [` F(-1) `] = [_]{$ans4}{5} .]* |
| 111 | + [. b) .] [. [`` \lim_{x \to 1^-} F(x) ``] = [_]{$ans5}{5} .] |
| 112 | + [. [`` \lim_{x \to 1^+} F(x) ``] = [_]{$ans6}{5} .] |
| 113 | + [. [`` \lim_{x \to 1} F(x) ``] = [_]{$ans7}{5} .] |
| 114 | + [. [` F(1) `] = [_]{$ans8}{5} .]* |
| 115 | + [. c) .] [. [`` \lim_{x \to 3^-} F(x) ``] = [_]{$ans9}{5} .] |
| 116 | + [. [`` \lim_{x \to 3^+} F(x) ``] = [_]{$ans10}{5} .] |
| 117 | + [. [`` \lim_{x \to 3} F(x) ``] = [_]{$ans11}{5} .] |
| 118 | + [. [` F(3) `] = [_]{$ans12}{5} .]* |
| 119 | +#]* |
| 120 | +END_PGML |
| 121 | + |
| 122 | +ENDDOCUMENT(); |
0 commit comments