[npl] / trunk / NationalProblemLibrary / Rochester / setVectors2DotProduct / UR_VC_1_18.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Rochester/setVectors2DotProduct/UR_VC_1_18.pg

Wed May 10 16:17:05 2006 UTC (7 years ago) by jjholt
File size: 1352 byte(s)
Added tags.


    1 ## DESCRIPTION
2 ##   Application of the Dot Product
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('Dot Product', 'Projection')
6 ## Tagged by nhamblet
7
8 ## DBsubject('Calculus')
9 ## DBchapter('Vectors and the Geometry of Space')
10 ## DBsection('The Dot Product')
11 ## Date('6/2/2000')
12 ## Author('Joseph Neisendorfer')
13 ## Institution('Rochester')
14 ## TitleText1('')
15 ## EditionText1('')
16 ## AuthorText1('')
17 ## Section1('')
18 ## Problem1('')
19
20 DOCUMENT();
21
23 "PG.pl",
24 "PGbasicmacros.pl",
25 "PGchoicemacros.pl",
27 "PGauxiliaryFunctions.pl"
28 );
29
30 TEXT(beginproblem());
31 $showPartialCorrectAnswers = 1; 32 33$a = random(-3, 3);
34 $b = random(-3, 3); 35$c = random(1, 2);
36 $d = random(3, 5); 37$e = random(3, 5);
38 $f = random(1, 2); 39 40$ans1 = $a +$e*($c*$e + $d*$f)/(($e)**2 + ($f)**2) ;
41 $ans2 =$b + $f*($c*$e +$d*$f)/(($e)**2 + ($f)**2) ; 42 43 BEGIN_TEXT 44$PAR
45 Gandalf the Grey started in the Forest of Mirkwood at a point with coordinates
46 ($a,$b) and arrived in the Iron Hills at the point with coordinates (\{ $a +$c
47 \}, \{ $b +$d \}).  If he began walking in the direction of the vector $$\bf v 48 = e \mathbf{i} + f \mathbf{j}$$ and changes direction only once, when he turns at a right
49 angle, what are the coordinates of the point where he makes the turn.
50 $PAR 51 (\{ ans_rule(40) \}, \{ ans_rule(40) \}) 52 END_TEXT 53 ANS(num_cmp($ans1));
54 ANS(num_cmp(\$ans2));
55
56 ENDDOCUMENT();