[npl] / branches / UGA / 1.1.1.pg Repository:
ViewVC logotype

Annotation of /branches/UGA/1.1.1.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1457 - (view) (download)

1 : ted shifri 1457 ## DESCRIPTION
2 :     ## Vector Addition and Parallelograms
3 :     ## ENDDESCRIPTION
4 :    
5 :     ## KEYWORDS('Vector Addition', 'Parallelogram')
6 :    
7 :    
8 :     ## DBsubject('Calculus')
9 :     ## DBchapter('Vectors and the Geometry of Space')
10 :     ## DBsection('Vector Algebra')
11 :     ## Date('5/12/10')
12 :     ## Author('Ted Shifrin'
13 :     ## Institution('UGA')
14 :     ## TitleText1('')
15 :     ## EditionText1('')
16 :     ## AuthorText1('')
17 :     ## Section1('')
18 :     ## Problem1('')
19 :    
20 :     DOCUMENT();
21 :    
22 :     loadMacros("PG.pl",
23 :     "PGbasicmacros.pl",
24 :     "PGchoicemacros.pl",
25 :     "PGanswermacros.pl",
26 :     "PGauxiliaryFunctions.pl",
27 :     "PGmatrixmacros.pl",
28 :     "PGmorematrixmacros.pl",
29 :     "Parser.pl",
30 :     "MathObjects.pl",
31 :     );
32 :    
33 :     TEXT(beginproblem());
34 :     $showPartialCorrectAnswers = 1;
35 :    
36 :     Context("Vector");
37 :    
38 :    
39 :     $a = random(-3,3);
40 :     $b = random(-3,3);
41 :     $c = random(-3,3);
42 :     $d = non_zero_random(-3,3);
43 :     $e = non_zero_random(-3,3);
44 :     $f = non_zero_random(-3,3);
45 :     $a2 = $a+$d;
46 :     $b2 = $b+$e;
47 :     $c2 = $c+$f;
48 :     do{$g = non_zero_random(-3,3)} until ($g!=$d);
49 :     do{$h = non_zero_random(-3,3)} until ($h!=$e);
50 :     do{$i = non_zero_random(-3,3)} until ($i!=$f);
51 :     $a3 = $a+$g;
52 :     $b3 = $b+$h;
53 :     $c3 = $c+$i;
54 :    
55 :     $P = ColumnVector("<$a,$b,$c>");
56 :     $Q = ColumnVector("<$a2,$b2,$c2>");
57 :     $R = ColumnVector("<$a3,$b3,$c3>");
58 :    
59 :     $A1 = $a2+$g;
60 :     $A2 = $b2+$h;
61 :     $A3 = $c2+$i;
62 :     $B1 = $a2-$g;
63 :     $B2 = $b2-$h;
64 :     $B3 = $c2-$i;
65 :     $C1 = $a3-$d;
66 :     $C2 = $b3-$e;
67 :     $C3 = $c3-$f;
68 :    
69 :     $A = Vector("<$A1,$A2,$A3>");
70 :     $B = Vector("<$B1,$B2,$B3>");
71 :     $C = Vector("<$C1,$C2,$C3>");
72 :    
73 :     $ans = List(Compute("$A"),Compute("$B"),Compute("$C"));
74 :    
75 :    
76 :     Context()->texStrings;
77 :     BEGIN_TEXT
78 :    
79 :     Three vertices of a parallelogram are at
80 :     $PAR
81 :     \($P\), \($Q\), and \($R\).
82 :     $BR
83 :    
84 :     $PAR
85 :     What are the $BBOLD three $EBOLD possible locations of the fourth vertex?
86 :     $PAR
87 :    
88 :     Enter your answer as a list, with vectors written using the notation <\(a,b,c\)> (unlike our usual column vector notation) and separated by commas.
89 :     $BR
90 :     \{ans_rule(50)\}
91 :    
92 :     END_TEXT
93 :    
94 :     ANS($ans->cmp);
95 :    
96 :     ENDDOCUMENT();
97 :    
98 :    

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9