Skip to content

Commit 983a829

Browse files
authored
Merge pull request #1250 from brunners23/main
feat: Add Georgia Tech Problems
2 parents c1d4874 + 593af81 commit 983a829

File tree

10 files changed

+1440
-0
lines changed

10 files changed

+1440
-0
lines changed
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
##DESCRIPTION
2+
## Orthogonal sets, matrices, and projections
3+
##ENDDESCRIPTION
4+
5+
6+
## DBsubject(Linear algebra)
7+
## DBchapter(Vector geometry)
8+
## DBsection(Dot product, length, and unit vectors)
9+
## Date(11/25/2024)
10+
## Institution(Georgia Institute of Technology)
11+
## Author(Seth Brunner)
12+
## Level(2)
13+
14+
DOCUMENT();
15+
loadMacros(
16+
"PGstandard.pl",
17+
"PGgraders.pl",
18+
"MathObjects.pl",
19+
"PGchoicemacros.pl",
20+
"matrixExtensions.pl",
21+
"unionLists.pl",
22+
"unionTables.pl",
23+
"Alfredmacros.pl",
24+
"parserPopUp.pl",
25+
"PGcourse.pl",
26+
);
27+
28+
29+
TEXT(beginproblem());
30+
31+
Context("Numeric");
32+
33+
$dropdown_a = PopUp(["?", "A", "B", "C", "D","More than one of the given sets","None of the given sets"], "B");
34+
$dropdown_b = PopUp(["?", "A", "B", "C", "D","More than one of the given sets","None of the given sets"], "D");
35+
$dropdown_c = PopUp(["?", "A", "B", "C", "D","More than one of the given sets","None of the given sets"], "C");
36+
$dropdown_d = PopUp(["?", "A", "B", "C", "D","More than one of the given sets","None of the given sets"], "A");
37+
38+
$normu=random(1,5,1);
39+
$udotu=Compute("$normu**2");
40+
$normv=random(1,6,1);
41+
$vdotv=Compute("$normv**2");
42+
$ssl=Compute("$normu**2+$normv**2");
43+
while($normu==$normv)
44+
{
45+
$normv=random(1,6,1);
46+
}
47+
$dotP=0;
48+
49+
Context()->texStrings;
50+
51+
$mc1 = new_checkbox_multiple_choice();
52+
$mc1 -> qa (
53+
"Which of the following sets contain only unit vectors? $BITALIC Select all that apply$EITALIC.",
54+
55+
"\(\left\lbrace\frac1{$normu}\vec u,\frac1{$normv}\vec v\right\rbrace\)",
56+
57+
"\(\left\lbrace\frac{$normv}{$udotu\sqrt{$ssl}}\vec u+\frac{$normu}{$vdotv\sqrt{$ssl}}\vec v,\frac{$normu}{$udotu\sqrt{$ssl}}\vec u+\frac{$normv}{$vdotv\sqrt{$ssl}}\vec v\right\rbrace\)",
58+
);
59+
$mc1 -> extra(
60+
"\(\left\lbrace\vec u+\vec v,\vec u-\vec v\right\rbrace\)",
61+
62+
"\(\left\lbrace\frac1{$normu}\vec u+\frac1{$normv}\vec v,\frac1{$normu}\vec u-\frac1{$normv}\vec v\right\rbrace\)",
63+
);
64+
$mc1 -> makeLast("None of the above");
65+
66+
$mc2 = new_checkbox_multiple_choice();
67+
$mc2 -> qa (
68+
"Which of the following sets are orthogonal? $BITALIC Select all that apply$EITALIC.",
69+
70+
"\(\left\lbrace\frac1{$normu}\vec u,\frac1{$normv}\vec v\right\rbrace\)",
71+
72+
"\(\left\lbrace\frac1{$normu}\vec u+\frac1{$normv}\vec v,\frac1{$normu}\vec u-\frac1{$normv}\vec v\right\rbrace\)",
73+
);
74+
$mc2 -> extra(
75+
"\(\left\lbrace\vec u+\vec v,\vec u-\vec v\right\rbrace\)",
76+
77+
"\(\left\lbrace\frac{$normv}{$udotu\sqrt{$ssl}}\vec u+\frac{$normu}{$vdotv\sqrt{$ssl}}\vec v,\frac{$normu}{$udotu\sqrt{$ssl}}\vec u+\frac{$normv}{$vdotv\sqrt{$ssl}}\vec v\right\rbrace\)",
78+
);
79+
$mc2 -> makeLast("None of the above");
80+
81+
82+
$mc3 = new_checkbox_multiple_choice();
83+
$mc3 -> qa (
84+
"Based on the previous two questions, which of the following sets are orthonormal? $BITALIC Select all that apply$EITALIC.",
85+
86+
"\(\left\lbrace\frac1{$normu}\vec u,\frac1{$normv}\vec v\right\rbrace\)",
87+
);
88+
$mc3 -> extra(
89+
"\(\left\lbrace\vec u+\vec v,\vec u-\vec v\right\rbrace\)",
90+
91+
"\(\left\lbrace\frac{$normv}{$udotu\sqrt{$ssl}}\vec u+\frac{$normu}{$vdotv\sqrt{$ssl}}\vec v,\frac{$normu}{$udotu\sqrt{$ssl}}\vec u+\frac{$normv}{$vdotv\sqrt{$ssl}}\vec v\right\rbrace\)",
92+
93+
"\(\left\lbrace\frac1{$normu}\vec u+\frac1{$normv}\vec v,\frac1{$normu}\vec u-\frac1{$normv}\vec v\right\rbrace\)",
94+
);
95+
$mc3 -> makeLast("None of the above");
96+
97+
BEGIN_TEXT
98+
<p>
99+
Suppose \(\vec u\) and \(\vec v\) are vectors with \(\left\|\vec u\right\|=$normu\), \(\left\|\vec v\right\|=$normv\), and \(\vec u\cdot\vec v=$dotP\).
100+
</p>
101+
102+
$BR
103+
104+
\{ $mc1 -> print_q() \}
105+
106+
$BR
107+
108+
\{ $mc1 -> print_a() \}
109+
110+
$BR
111+
$BR
112+
113+
\{ $mc2 -> print_q() \}
114+
115+
$BR
116+
117+
\{ $mc2 -> print_a() \}
118+
119+
$BR
120+
$BR
121+
122+
\{ $mc3 -> print_q() \}
123+
124+
$BR
125+
126+
\{ $mc3 -> print_a() \}
127+
128+
129+
130+
END_TEXT
131+
Context()->normalStrings;
132+
133+
##################################################
134+
# Answers
135+
136+
$showPartialCorrectAnswers = 0;
137+
138+
install_problem_grader(~~&std_problem_grader);
139+
140+
$showPartialCorrectAnswers = 0;
141+
142+
ANS(checkbox_cmp($mc1->correct_ans()));
143+
ANS(checkbox_cmp($mc2->correct_ans()));
144+
ANS(checkbox_cmp($mc3->correct_ans()));
145+
146+
147+
148+
ENDDOCUMENT();
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
## DBsubject(Calculus - multivariable)
2+
3+
## DBchapter(Calculus of vector valued functions)
4+
5+
## DBsection(Parameterized curves)
6+
7+
## Institution(Georgia Institute of Technology)
8+
9+
## Author(Gregory Mayer, Hunter Lehman)
10+
11+
## Level(2)
12+
13+
## MO(1)
14+
15+
## Language(en)
16+
17+
18+
DOCUMENT();
19+
loadMacros(
20+
"PGstandard.pl",
21+
"MathObjects.pl",
22+
"PGchoicemacros.pl",
23+
"unionLists.pl",
24+
"parserPopUp.pl",
25+
"PGcourse.pl",
26+
);
27+
28+
TEXT(beginproblem(), $BR,$BBOLD, "True or False Exercise", $EBOLD, $BR,$BR);
29+
$showPartialCorrectAnswers = 0;
30+
31+
@questions = (
32+
"The speed of a particle with a position function \(r(t)\) is \(\frac{r'(t)}{|r'(t)|}\).",
33+
"If \(u\) and \(v\) are two vectors in \(\mathbb{R}^3\), then \(u \cdot v\) is a vector orthogonal to both \(u\) and \(v\).",
34+
"The point (2, -1, 3) lies on the graph of the sphere \((x - 2)^2 + (y + 1)^2 + (z - 3)^2 = 25\).",
35+
"\(\frac{d}{dt}[u(t) \times u(t)] = 2u'(t) \times u(t)\). ",
36+
"Parallel planes have parallel normal vectors. ",
37+
"The vector \(\frac{1}{\sqrt{3}} \hat i - \frac{1}{\sqrt{3}} \hat j + \frac{2}{\sqrt{3}} \hat k\) is a unit vector. ",
38+
"The only way that \(v \cdot w\) = 0 is if \(v\) = 0 or \(w\) = 0.",
39+
);
40+
41+
@corans = ('False', 'False', 'False', 'False', 'True', 'True', 'False');
42+
43+
# Choose Seven of the question and answer pairs at random.
44+
@which = NchooseK(7, 7);
45+
46+
@squestions = @questions[@which];
47+
@scorans = @corans[@which];
48+
49+
foreach my $i (0..6) {
50+
$popup[$i] = PopUp(['Choose','True', 'False'],$scorans[$i]);
51+
}
52+
53+
BEGIN_TEXT
54+
Indicate whether the following statements are true or false.
55+
$PAR
56+
\{ BeginList('OL',type=>'a') \}
57+
58+
$ITEM
59+
$squestions[0]
60+
$BR
61+
\{ $popup[0]->menu \}
62+
$ITEMSEP
63+
64+
$ITEM
65+
$squestions[1]
66+
$BR
67+
\{ $popup[1]->menu \}
68+
$ITEMSEP
69+
70+
$ITEM
71+
$squestions[2]
72+
$BR
73+
\{ $popup[2]->menu \}
74+
$ITEMSEP
75+
76+
$ITEM
77+
$squestions[3]
78+
$BR
79+
\{ $popup[3]->menu \}
80+
$ITEMSEP
81+
82+
$ITEM
83+
$squestions[4]
84+
$BR
85+
\{ $popup[4]->menu \}
86+
$ITEMSEP
87+
88+
$ITEM
89+
$squestions[5]
90+
$BR
91+
\{ $popup[5]->menu \}
92+
$ITEMSEP
93+
94+
$ITEM
95+
$squestions[6]
96+
$BR
97+
\{ $popup[6]->menu \}
98+
$ITEMSEP
99+
100+
\{ EndList('OL') \}
101+
102+
END_TEXT
103+
104+
install_problem_grader(~~&std_problem_grader);
105+
106+
# Enter the correct answers to be checked against the answers to the students.
107+
108+
foreach my $i (0..6) {
109+
ANS($popup[$i]->cmp);
110+
}
111+
112+
Context()->texStrings;
113+
114+
@solutions = (
115+
"$BBOLD False $EBOLD
116+
$BR
117+
The speed of a particle is defined as the magnitude of its velocity vector, not the normalized velocity. The correct formula for speed is \(|r'(t)|\), where \(r'(t)\) is the velocity vector. The given expression \(\frac{r'(t)}{|r'(t)|}\) would always have a magnitude of 1, representing only the direction of motion, not the speed. ",
118+
"$BBOLD False $EBOLD
119+
$BR
120+
\(u \cdot v\) is a scalar (dot product), not a vector. The cross product \(u × v\) would give a vector orthogonal to both u and v, but not the dot product.",
121+
"$BBOLD False $EBOLD
122+
$BR
123+
The sphere equation represents points whose distance from the center (2, -1, 3) equals the radius \(\sqrt{25} = 5\). Substituting (2, -1, 3) into the equation results in all squared terms becoming zero. Since any distance squared is non-negative, the equation reduces to \(0 = 25\), which is never true. This mathematical contradiction confirms (2, -1, 3) is not on the sphere. ",
124+
"$BBOLD False $EBOLD
125+
$BR
126+
The correct differentiation of \(u(t) \times u(t)\) (cross product of a vector with itself) with respect to \(t\) is \(u'(t) \times u(t) + u(t) \times u'(t) \). Note also that the cross product of a vector with itself happens to be zero. But either way the statement is false because it does not use the correct differentiation formula.",
127+
"$BBOLD True $EBOLD
128+
$BR
129+
Parallel planes have identical normal vectors or normal vectors that are scalar multiples of each other. ",
130+
"$BBOLD True $EBOLD
131+
$BR
132+
Magnitude = \(\sqrt{\left(\frac{1}{\sqrt{3}}\right)^2 + \left(\frac{1}{\sqrt{3}}\right)^2 + \left(\frac{2}{\sqrt{3}}\right)^2} = 1\). A vector with magnitude 1 is a unit vector. ",
133+
"$BBOLD False $EBOLD
134+
$BR
135+
Two non-zero orthogonal vectors can have a dot product of zero.",
136+
);
137+
138+
$solutions = "";
139+
foreach (@which) {
140+
$solutions .= "$ITEM $solutions[$_]";
141+
}
142+
143+
SOLUTION(EV3(<<'END_SOLUTION'));
144+
\{ BeginList('OL',type=>'a') \}
145+
$solutions
146+
\{ EndList('OL') \}
147+
END_SOLUTION
148+
Context()->normalStrings;
149+
150+
ENDDOCUMENT(); # This should be the last executable line in the problem.

0 commit comments

Comments
 (0)