| … | |
… | |
| 10 | ## TitleText1('Functions Modeling Change') |
10 | ## TitleText1('Functions Modeling Change') |
| 11 | ## EditionText1('3') |
11 | ## EditionText1('3') |
| 12 | ## AuthorText1('Connally') |
12 | ## AuthorText1('Connally') |
| 13 | ## Section1('9.5) |
13 | ## Section1('9.5) |
| 14 | ## Problem1('15') |
14 | ## Problem1('15') |
|
|
15 | ## TitleText2('Functions Modeling Change'); |
|
|
16 | ## EditionText2('4') |
|
|
17 | ## AuthorText2('Connally') |
|
|
18 | ## Section2('11.5') |
|
|
19 | ## Problem2('18') |
| 15 | ## Author('Adam Spiegler') |
20 | ## Author('Adam Spiegler') |
| 16 | ## Institution('Loyola University Chicago') |
21 | ## Institution('Loyola University Chicago') |
| 17 | |
22 | |
| 18 | DOCUMENT(); |
23 | DOCUMENT(); |
| 19 | |
24 | |
| 20 | loadMacros("PG.pl", |
25 | loadMacros("PG.pl", |
| 21 | "PGbasicmacros.pl", |
26 | "PGbasicmacros.pl", |
| 22 | "PGchoicemacros.pl", |
27 | "PGchoicemacros.pl", |
| 23 | "PGanswermacros.pl", |
28 | "PGanswermacros.pl", |
| 24 | "PGgraphmacros.pl", |
29 | "PGgraphmacros.pl", |
| 25 | "PGauxiliaryFunctions.pl", |
30 | "PGauxiliaryFunctions.pl", |
| 26 | "extraAnswerEvaluators.pl" |
31 | "extraAnswerEvaluators.pl", |
| 27 | ); |
32 | "MathObjects.pl", |
| 28 | |
33 | "PGcourse.pl", |
| 29 | TEXT(beginproblem()); # standard preamble to each problem. |
34 | "AnswerFormatHelp.pl", |
|
|
35 | ); |
|
|
36 | |
|
|
37 | TEXT(beginproblem()); |
|
|
38 | |
|
|
39 | Context("Numeric"); |
| 30 | |
40 | |
| 31 | |
41 | |
| 32 | $showPartialCorrectAnswers = 1; |
42 | $showPartialCorrectAnswers = 1; |
| 33 | |
43 | |
| 34 | $h = non_zero_random(1,7,1); |
44 | $h = non_zero_random(1,7,1); |
| 35 | $k = non_zero_random(1,7,1); |
45 | $k = non_zero_random(1,7,1); |
| 36 | $p = random(2,3,1); |
46 | $p = random(2,3,1); |
| 37 | |
47 | |
| 38 | if ($p == 2){ |
48 | if ($p == 2){ |
| 39 | $f[0] = "1/(x-4)^2+2 for x in <-1,3.99> using color:blue and weight:2"; |
49 | $f[0] = "1/(x-4)^2+2 for x in <-1,3.99> using color:blue and weight:2"; |
| 40 | $f[1] = "1/(x-4)^2+2 for x in <4.01,9> using color:blue and weight:2"; |
50 | $f[1] = "1/(x-4)^2+2 for x in <4.01,9> using color:blue and weight:2"; |
| 41 | $ymax = 10; $ymin = -1; $valign = 'top'; $yst = 1.9; |
51 | $ymax = 10; $ymin = -1; $valign = 'top'; $yst = 1.9; |
| 42 | $left = "INFINITY"; $left_sym = "\infty"} |
52 | $left = "INFINITY"; $left_sym = "\infty"} |
| 43 | else { |
53 | else { |
| … | |
… | |
| 51 | $graph->lb('reset'); |
61 | $graph->lb('reset'); |
| 52 | $graph->lb(new Label(4,-0.1,$h,'red','right','top')); |
62 | $graph->lb(new Label(4,-0.1,$h,'red','right','top')); |
| 53 | $graph->lb(new Label(-.15,$yst,"$k",'green','right',$valign)); |
63 | $graph->lb(new Label(-.15,$yst,"$k",'green','right',$valign)); |
| 54 | $graph->lb(new Label(8.7,-.05,"x",'black','left','bottom')); |
64 | $graph->lb(new Label(8.7,-.05,"x",'black','left','bottom')); |
| 55 | $graph->lb(new Label(-.05,$ymax-.1,"y",'black','right','top')); |
65 | $graph->lb(new Label(-.05,$ymax-.1,"y",'black','right','top')); |
| 56 | $graph->moveTo(4,$ymin); |
66 | $graph->moveTo(4,$ymin); |
| 57 | $graph->lineTo(4,$ymax,'red'); |
67 | $graph->lineTo(4,$ymax,'red'); |
| 58 | $graph->moveTo(-1,2); |
68 | $graph->moveTo(-1,2); |
| 59 | $graph->lineTo(9,2,'green'); |
69 | $graph->lineTo(9,2,'green'); |
| 60 | plot_functions( $graph, $f[0],$f[1] ); |
70 | plot_functions( $graph, $f[0],$f[1] ); |
| 61 | $fig = image(insertGraph($graph), width => 300, height => 300, tex_size => 500); |
71 | $fig = image(insertGraph($graph), width => 300, height => 300, tex_size => 500); |
| 62 | |
72 | |
| 63 | $right = "INFINITY"; |
73 | $right = "INFINITY"; |
| 64 | $pos = "$k"; |
74 | $pos = "$k"; |
| 65 | $neg = "$k"; |
75 | $neg = "$k"; |
| 66 | |
76 | |
| 67 | |
77 | |
|
|
78 | Context()->texStrings; |
| 68 | BEGIN_TEXT |
79 | BEGIN_TEXT |
| 69 | Question 15: |
80 | |
| 70 | $BR |
|
|
| 71 | $SPACE |
|
|
| 72 | $BR |
|
|
| 73 | Using the graph of the rational function \( y = f(x) \) given in the figure below, evaluate the limits. If you need to enter \( \infty \) or \( - \infty \), type INFINITY or -INFINITY. |
81 | Using the graph of the rational function \( y = f(x) \) given in the figure below, evaluate the limits. If you need to enter \( \infty \) or \( - \infty \), type INFINITY or -INFINITY. |
| 74 | $BR $SPACE $BR |
82 | $PAR |
| 75 | $BCENTER |
83 | $BCENTER |
| 76 | $fig |
84 | $fig |
| 77 | $ECENTER |
85 | $ECENTER |
| 78 | $BR |
86 | $BR |
| 79 | a) $SPACE \( \displaystyle \lim_{x \to \infty} f(x) = \) \{ ans_rule(10) \} |
87 | (a) \( \displaystyle \lim_{x \to \infty} f(x) = \) \{ ans_rule(10) \} |
| 80 | $BR $SPACE $BR |
88 | \{ AnswerFormatHelp("limits") \} |
|
|
89 | $PAR |
| 81 | b) $SPACE \( \displaystyle \lim_{x \to - \infty} f(x) = \) \{ ans_rule(10) \} |
90 | (b) \( \displaystyle \lim_{x \to - \infty} f(x) = \) \{ ans_rule(10) \} |
| 82 | $BR $SPACE $BR |
91 | \{ AnswerFormatHelp("limits") \} |
|
|
92 | $PAR |
| 83 | c) $SPACE \( \displaystyle \lim_{x \to $h^+} f(x) = \) \{ ans_rule(10) \} |
93 | (c) \( \displaystyle \lim_{x \to $h^+} f(x) = \) \{ ans_rule(10) \} |
| 84 | $BR $SPACE $BR |
94 | \{ AnswerFormatHelp("limits") \} |
|
|
95 | $PAR |
| 85 | d) $SPACE \( \displaystyle \lim_{x \to $h^-} f(x) = \) \{ ans_rule(10) \} |
96 | (d) \( \displaystyle \lim_{x \to $h^-} f(x) = \) \{ ans_rule(10) \} |
|
|
97 | \{ AnswerFormatHelp("limits") \} |
| 86 | $BR |
98 | $BR |
| 87 | END_TEXT |
99 | END_TEXT |
|
|
100 | Context()->normalStrings; |
| 88 | |
101 | |
| 89 | ANS(fun_cmp($pos, vars=>['I','N','F','T','Y']) ); |
102 | ANS( Compute($pos)->cmp() ); |
| 90 | ANS(fun_cmp($neg, vars=>['I','N','F','T','Y']) ); |
103 | ANS( Compute($neg)->cmp() ); |
| 91 | ANS(fun_cmp($right, vars=>['I','N','F','T','Y']) ); |
104 | ANS( Compute($right)->cmp() ); |
| 92 | ANS(fun_cmp($left, vars=>['I','N','F','T','Y']) ); |
105 | ANS( Compute($left)->cmp() ); |
| 93 | |
106 | |
|
|
107 | Context()->texStrings; |
| 94 | SOLUTION(EV3(<<'END_SOLUTION')); |
108 | SOLUTION(EV3(<<'END_SOLUTION')); |
| 95 | $BR $SPACE $BR |
109 | $PAR |
| 96 | $BBOLD SOLUTION $EBOLD |
110 | $BBOLD SOLUTION $EBOLD |
| 97 | $BR |
111 | $PAR |
| 98 | There is a horizontal asymptote at \( y = $k \), so |
112 | There is a horizontal asymptote at \( y = $k \), so |
| 99 | \( \displaystyle \lim_{x \to \infty} f(x) = $k \ \ \ \) and \( \ \ \ \displaystyle \lim_{x \to - \infty} f(x) = $k \). |
113 | \( \displaystyle \lim_{x \to \infty} f(x) = $k \) and \( \displaystyle \lim_{x \to - \infty} f(x) = $k \). |
| 100 | $BR $SPACE $BR |
114 | $PAR |
| 101 | There is a vertical asymptote at \( x = $h \) such that |
115 | There is a vertical asymptote at \( x = $h \) such that |
| 102 | \( \displaystyle \lim_{x \to $h^+} f(x) = \infty \ \ \ \) and \( \ \ \ \displaystyle \lim_{x \to $h^-} f(x) = $left_sym \). |
116 | \( \displaystyle \lim_{x \to $h^+} f(x) = \infty \) and \( \displaystyle \lim_{x \to $h^-} f(x) = $left_sym \). |
| 103 | $BR |
117 | |
| 104 | END_SOLUTION |
118 | END_SOLUTION |
|
|
119 | Context()->normalStrings; |
| 105 | |
120 | |
| 106 | |
121 | |
| 107 | ENDDOCUMENT(); |
122 | ENDDOCUMENT(); |