[npl] / trunk / NationalProblemLibrary / WHFreeman / Rogawski_Calculus_Early_Transcendentals_Second_Edition / 14_Differentiation_in_Several_Variables / 14.7_Optimization_in_Several_Variables / 14.7.28.pg Repository:
ViewVC logotype

Annotation of /trunk/NationalProblemLibrary/WHFreeman/Rogawski_Calculus_Early_Transcendentals_Second_Edition/14_Differentiation_in_Several_Variables/14.7_Optimization_in_Several_Variables/14.7.28.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2584 - (view) (download)

1 : aubreyja 2584 ## DBsubject('Calculus')
2 :     ## DBchapter('Differentiation in Several Variables')
3 :     ## DBsection('Optimization in Several Variables')
4 :     ## KEYWORDS('calculus')
5 :     ## TitleText1('Calculus: Early Transcendentals')
6 :     ## EditionText1('2')
7 :     ## AuthorText1('Rogawski')
8 :     ## Section1('14.7')
9 :     ## Problem1('28')
10 :     ## Author('JustAsk - Vladimir Finkelshtein')
11 :     ## Institution('W.H.Freeman')
12 :    
13 :     DOCUMENT();
14 :    
15 :     loadMacros("PG.pl","PGbasicmacros.pl","PGanswermacros.pl");
16 :     loadMacros("Parser.pl");
17 :     loadMacros("freemanMacros.pl");
18 :     loadMacros("PGauxiliaryFunctions.pl");
19 :     loadMacros("PGgraphmacros.pl");
20 :     loadMacros("PGchoicemacros.pl");
21 :    
22 :     TEXT(beginproblem());
23 :    
24 :     Context()->texStrings;
25 :     $context = Context();
26 :     $context->variables->add(y=>'Real');
27 :     $r=random(1,5,1);
28 :     $a=random(-5,5,1);
29 :     $b=$a+random(1,5,1);
30 :     $c=random(-5,5,1);
31 :     $d=$d+random(1,5,1);
32 :    
33 :     $r1=$r+1;
34 :     $q=random(1,6,1);
35 :     if($q==1) {
36 :     $quest="\(x^2+y^2 \le $r\)";
37 :     $ans1="closed";
38 :     $wrong1="not closed";
39 :     $ans2="bounded";
40 :     $wrong2="not bounded";
41 :     $sol="This domain is bounded since it is contained, for instance, in the disk \(x^2+y^2<$r1\). The domain is also closed since it contains all of its boundary points, which are the points of the circle \(x^2+y^2=$r\)"; }
42 :    
43 :     if($q==2) {
44 :     $quest="\(x^2+y^2 < $r\)";
45 :     $ans1="not closed";
46 :     $wrong1="closed";
47 :     $ans2="bounded";
48 :     $wrong2="not bounded";
49 :     $sol="This domain is bounded since it is contained, for instance, in the disk \(x^2+y^2<$r1\). It is not closed since its boundary \(x^2+y^2=$r\)is not contained in the domain"; }
50 :    
51 :    
52 :     if($q==3) {
53 :     $quest="\(x \ge $r\)";
54 :     $ans1="closed";
55 :     $wrong1="not closed";
56 :     $ans2="not bounded";
57 :     $wrong2="bounded";
58 :     $sol="This domain is not contained in any disk, hence it is not bounded. However, the domain contains all its boundary \(x=$r\), hence it is closed."; }
59 :    
60 :     if($q==4) {
61 :     $quest="\(x > 0, y > 0\)";
62 :     $ans1="not closed";
63 :     $wrong1="closed";
64 :     $ans2="not bounded";
65 :     $wrong2="bounded";
66 :     $sol="This domain is not contained in any disk, hence it is not bounded. The boundary is the positive \(x\) and \(y\) axes, and it is not contained in the domain, therefore the domain is not closed"; }
67 :    
68 :     if($q==5) {
69 :     $quest="\($a \le x \le $b, $c \le y \le $d\)";
70 :     $ans1="closed";
71 :     $wrong1="not closed";
72 :     $ans2="bounded";
73 :     $wrong2="not bounded";
74 :     $sol="This domain is contained in the disk \(x^2+y^2=10^2\), hence it is bounded. Moreover, the domain contains its boundary, therefore the domain is closed"; }
75 :    
76 :     if($q==6) {
77 :     $quest="\(x^2+y^2 \le $r, x>0\)";
78 :     $ans1="not closed";
79 :     $wrong1="closed";
80 :     $ans2="bounded";
81 :     $wrong2="not bounded";
82 :     $sol="This domain is bounded since it is contained, for instance, in the disk \(x^2+y^2<$r1\). It is not closed since the part \(\lbrace (0,y) \in \Re^2:|y|\le \sqrt{$r} \rbrace\) of its boundary is not containe in the domain"; }
83 :    
84 :     $mc = new_multiple_choice();
85 :     $mc -> qa ("\(\lbrace (x,y)\in \Re^2:\) $quest \( \rbrace\)","$ans1",);
86 :     $mc ->extra("$wrong1",);
87 :     $mc2 = new_multiple_choice();
88 :     $mc2 -> qa ("","$ans2",);
89 :     $mc2 ->extra("$wrong2",);
90 :    
91 :     BEGIN_TEXT
92 :     \{ textbook_ref_exact("Rogawski ET 2e", "14.7","28") \}
93 :     $PAR
94 :     Determine whether the domain
95 :     \{$mc -> print_q\} is
96 :     \{$mc -> print_a\}
97 :     \{$mc2 -> print_a\} $PAR
98 :     $BR
99 :     END_TEXT
100 :    
101 :     Context()->normalStrings;
102 :     ANS(str_cmp($mc->correct_ans));
103 :     ANS(str_cmp($mc2->correct_ans));
104 :     Context()->texStrings;
105 :    
106 :     SOLUTION(EV3(<<'END_SOLUTION'));
107 :     $PAR
108 :     $SOL
109 :     $BR
110 :     $sol
111 :     $BR
112 :     END_SOLUTION
113 :    
114 :     ENDDOCUMENT();

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9