## DBsubject('Calculus') ## DBchapter('Differentiation in Several Variables') ## DBsection('Optimization in Several Variables') ## KEYWORDS('calculus') ## TitleText1('Calculus: Early Transcendentals') ## EditionText1('2') ## AuthorText1('Rogawski') ## Section1('14.7') ## Problem1('7') ## Author('JustAsk - Vladimir Finkelshtein') ## Institution('W.H.Freeman') DOCUMENT(); loadMacros("PG.pl","PGbasicmacros.pl","PGanswermacros.pl"); loadMacros("Parser.pl"); loadMacros("freemanMacros.pl"); loadMacros("PGauxiliaryFunctions.pl"); loadMacros("PGgraphmacros.pl"); loadMacros("PGchoicemacros.pl"); TEXT(beginproblem()); do{ $a=non_zero_random(-4,4,1); } while($a == 2 || $a == -2); $ma = Real(-$a); $x0=non_zero_random(-8,8,1); $b=$x0*(($a)**2/2-2); Context()->texStrings; $context = Context(); $context->variables->add(y=>'Real'); $f=Formula("x^2+y^2+$a*x*y+$b*x")->reduce(); $fx=Formula("2*x+$a*y+$b")->reduce(); $fy=Formula("2*y+$a*x")->reduce(); $y=Formula("-$a/2*x")->reduce(); $ynr=Formula("-$a/2*x"); $ma2=Formula("-$a/2"); $y0=$y->eval(x=>$x0); $fxx=2; $fyy=2; $fxy=$a; $disc=$fxx*$fyy-($fxy)**2; if($disc>0) {$ans='a local minimum'; $wrongans1='test fails'; $wrongans2='a local maximum'; $wrongans3='a saddle point'; $sol="\quad f_{xx}($x0,$y0)=2>0"; $sign='>'; } if($disc<0) {$ans='a saddle point'; $wrongans1='test fails'; $wrongans2='a local maximum'; $wrongans3='a local minimum'; $sign='<'; } $mc = new_multiple_choice(); $mc -> qa ("","$ans",); $mc ->extra("$wrongans1","$wrongans2","$wrongans3",); BEGIN_TEXT \{ textbook_ref_exact("Rogawski ET 2e", "14.7","7") \} $PAR Find the critical point of the function \(f(x,y)=$f\) $PAR \(c=\) \{ans_rule()\} $PAR Use the Second Derivative Test to determine whether the point is \{$mc -> print_a\} $BR END_TEXT Context()->normalStrings; Context("Vector"); ANS(Point(Real($x0),Formula($y0))->cmp); Context("Numeric"); ANS(str_cmp($mc->correct_ans)); Context()->texStrings; SOLUTION(EV3(<<'END_SOLUTION')); $PAR $SOL $BR First, we find the critical point. $BR We set the first-order partial derivatives of \(f(x,y)=$f\) equal to zero and solve \[f_x(x,y)=$fx=0\] \[f_y(x,y)=$fy=0\] The second equation implies that \(y=$ynr\). Substituting into the first and solving for \(x\) gives: \[2x+$ynr+$b=0 \Rightarrow x=$x0\] The corresponding value of \(y\) is \(y=$ma2($x0)=$y0\). The critical point is \(($x0,$y0)\). $PAR Now we compute the Discriminant. We find the second-order partials: \[f_{xx}(x,y)=2 \quad f_{yy}(x,y)=2 \quad f_{xy}(x,y)=$a\] The discriminant is \[D(x,y)=f_{xx}f_{yy}-f_{xy}^2=2\cdot 2-($a)^2=$disc\] $PAR Applying the Second Derivative Test we have \[D($x0,$y0)=$disc $sign 0 $sol\] The Second Derivative test implies that \(f($x0,$y0)\) is $ans. $BR END_SOLUTION ENDDOCUMENT();