## DESCRIPTION ## Testing for Open Sets ## ENDDESCRIPTION ## KEYWORDS('Open Set', 'Ball') ## ## DBsubject('Calculus') ## DBchapter('') ## DBsection('') ## Date('9/5/2009') ## Author('Ted Shifrin') ## Institution('UGA') ## TitleText1('') ## EditionText1('') ## AuthorText1('') ## Section1('') ## Problem1('') DOCUMENT(); # This should be the first executable line in the problem. loadMacros("PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", "MathObjects.pl", ); TEXT(beginproblem()); $showPartialCorrectAnswers = 1; Context("Vector"); $a1 = non_zero_random(1, 10, 1); $b1 = non_zero_random(1, 10, 1); $r = random(1,4,1); $rr = $r**2; $a2 = non_zero_random(-5, 5, 1); $b2 = non_zero_random(-5, 5, 1); $a3 = random(-10, 10, 1); $b3 = random($a3+1, $a3+10, 1); $ans1 = min($a1,$b1); $ans2 = abs(sqrt($a2**2+$b2**2)-$r); $ans3 = ($b3-$a3)/sqrt(2); @points = ("$a1, $b1", "$a2, $b2", "$a3, $b3"); @sets = ( "xy \gt 0", "x^2+y^2 \ne $rr", "y \gt x" ); @answers = ("$ans1", "$ans2", "$ans3"); @choice=NchooseK(3,2); @subpoints=@points[@choice]; @subsets=@sets[@choice]; @subanswers=@answers[@choice]; $P0 = ColumnVector("<@subpoints[0]>"); $P1 = ColumnVector("<$subpoints[1]>"); Context()->texStrings; BEGIN_TEXT Given the point \( \mathbf a = $P0 \) in the set \( S = \left\{"\{"\} \left(\begin{array}{c}x\\y\end{array}\right): $subsets[0] \right\}\), give the radius \( \delta \) of the largest ball \(B(\mathbf a,\delta)\) that is contained in \( S\).$BR \{ans_rule(10)\} $BR Given the point \( \mathbf a = $P1 \) in the set \( S = \left\{"\{"\} \left(\begin{array}{c}x\\y\end{array}\right): $subsets[1] \right\}\), give the radius \(\delta\) of the largest ball \(B(\mathbf a,\delta)\) that is contained in \( S\).$BR \{ans_rule(10)\} $BR END_TEXT ANS(num_cmp([@subanswers])); ENDDOCUMENT(); # This should be the last executable line in the problem.