66## Institution(Univeristy of Utah)
77## Author(Utah ww group)
88## Level(5)
9+ ## MO(1)
910## Static(1)
1011## TitleText1('Calculus')
1112## AuthorText1('Dale Varberg, Edwin J. Purcell, and Steve E. Rigdon')
@@ -18,46 +19,46 @@ DOCUMENT(); # This should be the first executable line in the problem.
1819
1920loadMacros(
2021 "PGstandard.pl",
21- "PGchoicemacros .pl",
22+ "MathObjects .pl",
2223 "PGcourse.pl"
2324);
2425
2526TEXT( beginproblem() );
2627
2728$showPartialCorrectAnswers = 1;
2829
29- $pi = 3.141592654;
30- $ans1 = "(1/12)*cos(40*sqrt(2)*t)";
31- $ans2 = 1;
32- $ans3 = 2*$pi/40/sqrt(2);
30+ Context("Numeric");
31+ Context()->variables->are(t=>'Real');
3332
33+
34+ $ans1 = Compute("(1/12)*cos(40*sqrt(2)*t)");
35+ $ans2 = Real(1);
36+ $ans3 = Compute("2*pi/(40*sqrt(2))");
37+
38+ Context()->texStrings;
3439BEGIN_TEXT
3540
3641A spring with a spring constant \(k\) of 100 pounds per foot
3742is loaded with 1-pound weight and brought to equilibrium. It
3843is then stretched an additional 1 inch and released. Find
3944the equation of motion, the amplitude, and the period. Neglect
40- friction. Then
41-
42- $BR
43- $BR
45+ friction.
4446
47+ $PAR
48+ The displacement \(y\), in feet from equilibrium is
4549\( y(t) = \) \{ans_rule(80)\} $BR
46- where \(t\) is time in (seconds) and \(y(t)\) is displacement (in feet).
47- $BR
48- $BR
50+ where \(t\) is time in seconds since the spring was released, and the initial 1 in. stretch is regarded as a positive displacement.
51+ $PAR
4952
5053Amplitude: \{ans_rule(15)\} inch(es) $BR
5154
5255Period: \{ans_rule(15)\} second(s).
5356
5457END_TEXT
58+ Context()->normalStrings;
5559
56- #Answer: \( y(x) = C_{1} \) \{NAME_ANS_RULE(second_answer,25)\} \( + C_{2} \) \{NAMED_ANS_RULE(answer_rule,25)\}.
57-
58-
59- ANS(fun_cmp($ans1, vars=>"t"));
60- ANS(num_cmp($ans2));
61- ANS(num_cmp($ans3));
60+ ANS($ans1->cmp());
61+ ANS($ans2->cmp());
62+ ANS($ans3->cmp());
6263
6364ENDDOCUMENT(); # This should be the last executable line in the problem.
0 commit comments