## DESCRIPTION ## Linear Algebra ## ENDDESCRIPTION ## KEYWORDS ('linear algebra','matrix','eigenvalue') ## Tagged by cmd6a 4/30/06 ## DBsubject('Linear Algebra') ## DBchapter('Matrices') ## DBsection('Eigenvalues') ## Date('') ## Author('') ## Institution('Rochester') ## 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", "PGgraphmacros.pl", "PGmatrixmacros.pl", "PGnumericalmacros.pl", "PGauxiliaryFunctions.pl", "PGmorematrixmacros.pl" ); TEXT(beginproblem()); $showPartialCorrectAnswers = 1; $a = non_zero_random(-2,2,1); $e = random(1,2,1) + 3*random(-1,1,1) - $a; $b = random(-1,1,2); $sqrD = random(1,2,1) + 3*random(0,2,1); $D = $sqrD**2; $d = ($D - ($a+$e)**2)*$b/3 + $a*$e*$b; # characteristic polynomial is - (lambda^3 - (a+e)lambda^2 + (ae-bd)lambda - b^2k) # now forget about the minus in front # we want 3 distinct real roots, so we want local max and min with pos and neg values respectively # find max and min: # derivative is 3lamda^2 - 2(a+e)lambda + (ae-bd) # need 2 disctinct real roots # discriminant/4 is (a+e)^2 - 3ae + 3bd = (a+e)^2 - 3ae + D - (a+e)^2 + 3ae = D # ok, the discriminant is positive # roots are $max_root = ($a + $e + $sqrD)/3; $min_root = ($a + $e - $sqrD)/3; # local max and min values of the cubic polynomial (without the minus in front) have to be pos and neg, so $ans_min = $max_root**3 - ($a+$e)*$max_root**2 + ($a*$e - $b*$d)*$max_root; $ans_max = $min_root**3 - ($a+$e)*$min_root**2 + ($a*$e - $b*$d)*$min_root; BEGIN_TEXT \{ mbox( 'The matrix \(A=\)', display_matrix([[$a, $b, 0], [$d, $e, $b], ['k', 0, 0]]) )\} $BR has three distinct real eigenvalues if and only if $BR \{ans_rule(20)\} \( < k < \) \{ans_rule(20)\}. END_TEXT ANS(num_cmp($ans_min)); ANS(num_cmp($ans_max)); ENDDOCUMENT(); # This should be the last executable line in the problem.