## DESCRIPTION ## Vector Projections ## ENDDESCRIPTION ## Tagged by nhamblet ## DBsubject('Calculus') ## DBchapter('Vectors and the Geometry of Space') ## DBsection('The Dot Product') ## Date('6/3/2002') ## TitleText1('Calculus: Early Transcendentals') ## AuthorText1('Stewart') ## EditionText1('6') ## Section1('12.3') ## Problem1('41') ## TitleText2('Calculus: Early Transcendentals') ## AuthorText2('Rogawski') ## EditionText2('1') ## Section2('12.3') ## Problem2('41') ## KEYWORDS('Dot Product', 'Projection', 'Scalar', 'Vector', 'Orthogonal','vector') DOCUMENT(); loadMacros( "PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl" ); TEXT(beginproblem()); $showPartialCorrectAnswers = 1; $a = non_zero_random(-10, 10); $b = random(-10, 10); $c = random(-10, 10); $d = random(-10, 10); $e = random(-10, 10); $f = random(-10, 10); $square = ($a)**2 + ($b)**2 + ($c)**2; $adbecf = $a*$d + $b*$e + $c*$f; $sclr = $adbecf / sqrt($square); $vctr1 = $adbecf * $a / $square; $vctr2 = $adbecf * $b / $square; $vctr3 = $adbecf * $c / $square; $orth1 = $d - $vctr1; $orth2 = $e - $vctr2; $orth3 = $f - $vctr3; BEGIN_TEXT $PAR Let \( {\mathbf a} \) = ($a, $b, $c) and \( {\mathbf b} \) = ($d, $e, $f) be vectors. Find the scalar, vector, and orthogonal projections of \( {\mathbf b} \) onto \( {\mathbf a} \). $PAR Scalar Projection: \{ ans_rule(30) \} END_TEXT ANS(num_cmp($sclr)); BEGIN_TEXT $PAR Vector Projection: $BR (\{ ans_rule(30) \}, END_TEXT ANS(num_cmp($vctr1)); BEGIN_TEXT \{ ans_rule(30) \}, END_TEXT ANS(num_cmp($vctr2)); BEGIN_TEXT \{ ans_rule(30) \}) END_TEXT ANS(num_cmp($vctr3)); BEGIN_TEXT $PAR Orthogonal Projection: $BR (\{ ans_rule(30) \}, END_TEXT ANS(num_cmp($orth1)); BEGIN_TEXT \{ ans_rule(30) \}, END_TEXT ANS(num_cmp($orth2)); BEGIN_TEXT \{ ans_rule(30) \}) END_TEXT ANS(num_cmp($orth3)); ENDDOCUMENT();