[npl] / trunk / NationalProblemLibrary / Rochester / setLimitsRates1_5Graphs / ur_lr_1-5_1.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# Annotation of /trunk/NationalProblemLibrary/Rochester/setLimitsRates1_5Graphs/ur_lr_1-5_1.pg

 1 : jjholt 255 ##KEYWORDS('Calculus') 2 : ##Tagged by ynw2d 3 : jj 143 4 : jjholt 255 ##DBsubject('Calculus') 5 : jjholt 446 ## DBchapter('Limits and Derivatives') 6 : jjholt 255 ##DBsection('Continuity') 7 : jj 143 8 : DOCUMENT(); # This should be the first executable line in the problem. 9 : 10 : loadMacros( 11 : "PG.pl", 12 : "PGbasicmacros.pl", 13 : "PGchoicemacros.pl", 14 : "PGanswermacros.pl", 15 : "PGgraphmacros.pl", 16 : "PGauxiliaryFunctions.pl" 17 : ); 18 : 19 : TEXT(beginproblem()); 20 : $showPartialCorrectAnswers = 1; 21 : 22 :$a=random(-3,3,1); 23 : $b=non_zero_random(-2,3,1); 24 :$c=random(-3,2,1); 25 : $m1=random(-1,1,0.5); 26 :$m2=($b -$a)/2; 27 : $m3=($c - $b - 1)/2; 28 :$m4=random(-1,1,0.5); 29 : @slice = NchooseK(3,3); 30 : 31 : @colors = ("blue", "red", "green"); 32 : @sc = @colors[@slice]; #scrambled colors 33 : @sa = ('A','B','C')[@slice]; 34 : 35 : $f1 = FEQ("${m1}*(x+1)+$a for x in [-2,-1) using color:$sc[0] and weight:2"); 36 : $f2 = FEQ("${m2}*(x-1)+$b for x in (-1,1) using color=$sc[0] and weight:2"); 37 : $f3 = FEQ("${m3}*(x-3)+$c for x in [1,3) using color=$sc[0] and weight=2"); 38 : $f4 = FEQ("1+$a for x in [-1,-1] using color=$sc[0] and weight=2"); 39 :$f5 = FEQ("${m4}*(x-3)+$c for x in (3,4] using color=$sc[0] and weight=2"); 40 : 41 :$graph = init_graph(-3,-6,5,6,'axes'=>[0,0],'grid'=>[8,12]); 42 : 43 : ($f1Ref,$f2Ref,$f3Ref,$f4Ref,$f5Ref) = plot_functions($graph,$f1,$f2,$f3,$f4,$f5); 44 : 45 : TEXT(EV2(<200, width=>200)); 50 : 51 : TEXT(EV2(< 58 :$PAR 59 : 60 : b) $$\displaystyle \lim_{x \to -1^+} F(x)$$ = \ 61 : $PAR 62 : 63 : c) $$\displaystyle \lim_{x \to -1} F(x)$$ = \ 64 :$PAR 65 : 66 : d) $$F(-1)$$ = \ 67 : $PAR 68 : 69 : e) $$\displaystyle \lim_{x \to 1^-} F(x)$$ = \ 70 :$PAR 71 : 72 : f) $$\displaystyle \lim_{x \to 1^+} F(x)$$ = \ 73 : $PAR 74 : 75 : g) $$\displaystyle \lim_{x \to 1} F(x)$$ = \ 76 :$PAR 77 : 78 : h) $$\displaystyle \lim_{x \to 3} F(x)$$ = \ 79 : $PAR 80 : 81 : i) $$F(3)$$ = \ 82 :$PAR 83 : 84 : EOT 85 : 86 : $ap1 = 1 +$a; 87 : $bp1 = 1 +$b; 88 : 89 : ANS(num_cmp($a, strings=>['DNE'])) ; 90 : ANS(num_cmp($a, strings=>['DNE'])) ; 91 : ANS(num_cmp($a, strings=>['DNE'])) ; 92 : ANS(num_cmp($ap1, strings=>['DNE'])); 93 : ANS(num_cmp($b, strings=>['DNE'])) ; 94 : ANS(num_cmp($bp1, strings=>['DNE'])); 95 : ANS(num_cmp('DNE', strings=>['DNE'])) ; 96 : ANS(num_cmp(\$c, strings=>['DNE'])) ; 97 : ANS(num_cmp('DNE', strings=>['DNE'])) ; 98 : 99 : ENDDOCUMENT(); # This should be the last executable line in the problem. 100 :