## DESCRIPTION ## Dot Product ## ENDDESCRIPTION ## KEYWORDS('Dot Product', 'Angle') ## DBsubject('Calculus') ## DBchapter('Vectors and the Geometry of Space') ## DBsection('Dot Product') ## Date('5/27/10') ## Author('Ted Shifrin' ## Institution('UGA') ## TitleText1('') ## EditionText1('') ## AuthorText1('') ## Section1('') ## Problem1('') DOCUMENT(); loadMacros("PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", "PGmatrixmacros.pl", "PGmorematrixmacros.pl", "Parser.pl", "MathObjects.pl", ); TEXT(beginproblem()); $showPartialCorrectAnswers = 1; Context("Vector"); $a = random(1,4); do{$b = random(1,4)} until ($b != $a); do{$c = non_zero_random(-3,3)} until ($c**2!=1); do{$d = non_zero_random(-3,3)} until ($d!=$c && $d!=-$c && $d**2!=1); $m = $a*$b*($c+$d); $ans1 = Real("sqrt(($a)^2+($c*$b)^2+ 2*$c/($c+$d))"); $ans2 = Real("sqrt(($a)^2+($b*$d)^2+ 2*$d/($c+$d))"); $ans3 = Real("arccos((($a)^2+$c*$d*($b)^2 + 1)/($ans1*$ans2))"); Context()->texStrings; BEGIN_TEXT If \(\|\mathbf x\| = $a\), \(\|\mathbf y\| = $b\), and the angle between \(\mathbf x\) and \(\mathbf y\) is \(\theta = \arccos(1/$m)\), then $PAR (a) \(\|\mathbf x + $c\mathbf y\| = \) \{ans_rule(15)\} $PAR (b) \(\|\mathbf x + $d\mathbf y\| = \) \{ans_rule(15)\} $PAR (c) and the angle between the vectors \(\mathbf x + $c\mathbf y\) and \(\mathbf x + $d\mathbf y\) is (in radians) \{ans_rule(20)\} END_TEXT ANS($ans1->cmp,$ans2->cmp,$ans3->cmp); ENDDOCUMENT();