Skip to content

Commit 174305e

Browse files
committed
Typos and bug fixes
1 parent 7575ab9 commit 174305e

7 files changed

+42
-16
lines changed

Contrib/CCCS/CalculusOne/02.3/CCD_CCCS_Openstax_Calc1_C1-2016-002_03_85.pg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ $answer[1] = "sqrt($f_eval)";
6161

6262
BEGIN_PGML
6363

64-
Determine which limit law justify the step(s) then evaluate the limit. Give exact answers.
64+
Determine which limit law justifies the step(s) then evaluate the limit. Give exact answers.
6565

6666
[`\displaystyle \lim_{x \to [$x]} \sqrt{[$f]} = \sqrt{\lim_{x \to [$x]} ([$f])}`]
6767
[@ $popup1->menu() @]*

Contrib/CCCS/CalculusOne/03.2/CCD_CCCS_Openstax_Calculus_C1-2016-002_3_2_59.pg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ $showPartialCorrectAnswers = 1;
3535
Context("Numeric");
3636
#Context()->variables->add(x => 'Real');
3737

38-
$a=random(0,16,1);
38+
$a=random(1,16,1);
3939

4040
$f = Formula("sqrt($a x)")->reduce;
4141

Contrib/CCCS/CalculusOne/03.6/CCD_CCCS_Openstax_Calc1_C1-2016-002_3_6_224.pg

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ DOCUMENT();
2121
loadMacros(
2222
"PGstandard.pl",
2323
"MathObjects.pl",
24+
"answerComposition.pl",
2425
"AnswerFormatHelp.pl",
2526
"PGML.pl",
2627
"PGcourse.pl",
@@ -49,20 +50,35 @@ $ans3=Formula("$a sec^2(sec($a x)) sec($a x) tan($a x)");
4950
###########################
5051
# Main text
5152

52-
BEGIN_PGML
53+
#BEGIN_PGML
5354

54-
Decompose [`\displaystyle y=[$f]`] into two functions [`y=f(u)`] and [`u=g(x)`] such that [`y=f(g(x))`]. Then find `\frac{dy}{dx}`.
55+
#Decompose [`\displaystyle y=[$f]`] into two functions [`y=f(u)`] and [`u=g(x)`] such that [`y=f(g(x))`]. Then find `\frac{dy}{dx}`.
5556

56-
[`f(u)=`][_______________]{$ans1} [@ AnswerFormatHelp("formulas") @]*
57+
#[`f(u)=`][_______________] [@ AnswerFormatHelp("formulas") @]*
5758

58-
[`g(x)=`][_______________]{$ans2} [@ AnswerFormatHelp("formulas") @]*
59+
#[`g(x)=`][_______________] [@ AnswerFormatHelp("formulas") @]*
5960

60-
`\frac{dy}{dx}=`[_______________]{$ans3} [@ AnswerFormatHelp("formulas") @]*
61+
#`\frac{dy}{dx}=`[_______________] [@ AnswerFormatHelp("formulas") @]*
6162

63+
#END_PGML
64+
Context()->texStrings;
65+
BEGIN_TEXT
66+
Decompose \( y=$f\) into two functions \(y=f(u)\) and \(u=g(x)\) such that \(y=f(g(x))\). Then find \( \frac{dy}{dx}\).
67+
$BR
68+
$BR
69+
\( f(u) \) = \{ ans_rule(20) \}
70+
\{ AnswerFormatHelp("formulas") \}
71+
$BR
72+
\( g(x) \) = \{ ans_rule(20) \}
73+
$BR
74+
END_TEXT
75+
Context()->normalStrings;
76+
COMPOSITION_ANS( $ans1, $ans2, vars=>['u','x'], showVariableHints=>1);
6277

63-
64-
END_PGML
65-
78+
BEGIN_TEXT
79+
\(\frac{dy}{dx}= \) \{ans_rule(20)\}
80+
END_TEXT
81+
ANS( $ans3->cmp() );
6682

6783
############################
6884
# Solution

Contrib/CCCS/CalculusOne/04.3/CCD_CCCS_Openstax_Calc1_C1-2016-002_4_3_116.pg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $showPartialCorrectAnswers = 1;
4343
$a=random(2,4,1);
4444
$ans1=Compute("2*$a*sin(x)*cos(x)")->reduce;
4545

46-
$ans3=List("0, pi/2, pi, 3pi/2, 2pi");
46+
$ans3=List("pi/2, pi, 3pi/2");
4747

4848
Context("Interval");
4949
$ans2=Compute("(-infinity,infinity)");
@@ -53,13 +53,13 @@ $ans2=Compute("(-infinity,infinity)");
5353

5454
BEGIN_PGML
5555

56-
Find the domain of [`y=[$a] \sin^2(x)`] . Then find the critical points of [`y=[$a] \sin^2(x)`] that lie in the interval [`[0, 2\pi]`].
56+
Find the domain of [`y=[$a] \sin^2(x)`]. Then find the critical points of [`y=[$a] \sin^2(x)`] that lie in the interval [`(0, 2\pi)`].
5757

5858
a) Domain of [`y=[$a] \sin^2(x)`] is [________________]{($ans2)}[@ AnswerFormatHelp("intervals") @]*
5959

6060
b) [`\frac{dy}{dx} = `] [__________________]{($ans1)} [@ AnswerFormatHelp("formulas") @]*
6161

62-
c) Critical point(s) of [`y=[$a] \sin^2(x)`] on the interval [`[0, 2\pi]`] are [`x=`] [__________________]{($ans3)} [@ AnswerFormatHelp("numbers") @]* (Use a comma to separate answers, enter "NONE" if there are no critical points in the domain)
62+
c) Critical point(s) of [`y=[$a] \sin^2(x)`] on the interval [`(0, 2\pi)`] are [`x=`] [__________________]{($ans3)} [@ AnswerFormatHelp("numbers") @]* (Use a comma to separate answers, enter "NONE" if there are no critical points in the domain)
6363

6464

6565
END_PGML

Contrib/CCCS/CalculusOne/04.7/CCD_CCCS_Openstax_Calc1_C1-2016-002_4_7_332_334.pg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $showPartialCorrectAnswers = 1;
4040
###########################
4141
# Setup
4242

43-
$a=random(4,20,4);
43+
do{$a=random(4,20,4);
4444
$b=random(2,8,2);
4545
$d=random(5,25,5);
4646
$e=random(2,8,2);
@@ -53,7 +53,7 @@ $ans4=Compute(($d-$f)/(2*$g));
5353
$rev1=Compute("$a*x")->reduce;
5454
$rev2=Compute("$d*x")->reduce;
5555
$cost1=Compute("$b*x+x^2")->reduce;
56-
$cost2=Compute("$e+$f*x+$g*x^2")->reduce;
56+
$cost2=Compute("$e+$f*x+$g*x^2")->reduce;}until($ans3>0 and $ans4>0);
5757

5858

5959
###########################

Contrib/CCCS/CalculusOne/05.2/CCD_CCCS_Openstax_Calc1_C1-2016-002_5_2_106.pg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ $popup=PopUp(["?","$ans1","$ans3","$ans2"],"$ans3");
5454
BEGIN_PGML
5555
Use the Comparison Theorem to show that [``\int_{0}^{[$c]}[$f1] dx \le \int_{0}^{[$c]}[$f2] dx``].
5656

57-
[``\int_{0}^{[$c]}[$f1] dx \le \int_{0}^{[$c]}[$f2]``] [____________________]{$popup}
57+
[``\int_{0}^{[$c]}[$f1] dx \le \int_{0}^{[$c]}[$f2] dx``] [____________________]{$popup}
5858

5959

6060
END_PGML

Contrib/CCCS/CalculusTwo/07.2/CCD_CCCS_Openstax_Calc2_C1-2016-002_7_2_81-82.pg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,14 @@ $x_ta=$x_t->eval(t=>$b);
7373
##Y-COORD##
7474
$y_ta=$y_t->eval(t=>$b);
7575

76+
Context()->flags->set(
77+
tolType => 'absolute',
78+
tolerance => 0.0005,
79+
);
80+
7681
##y-intercept of tan line##
7782
$yint=Compute("$y_ta-$m*$x_ta")->reduce;
83+
#$yint=Formula("$yint");
7884

7985
##Folrmula for tangent line at the point determined by t=a*pi/4##
8086
$tanline=Formula("$m*x+$yint");
@@ -113,6 +119,7 @@ Find the equation of the tangent line at [`t=\frac{\pi}{4}`].
113119

114120
[`y=`] [_______________]{$tanline} [@ AnswerFormatHelp("formulas") @]*
115121

122+
116123
END_PGML
117124

118125
Section::End();
@@ -182,8 +189,11 @@ Section::Begin("Part 2 - 1 point");
182189
BEGIN_PGML
183190
Find the equation of the tangent line at [`t=\frac{[$a]\pi}{4}`].
184191

192+
185193
[`y=`] [_______________]{$tanline} [@ AnswerFormatHelp("formulas") @]*
186194

195+
196+
187197
END_PGML
188198

189199
Section::End();

0 commit comments

Comments
 (0)