Skip to content

Commit 18c509f

Browse files
authored
Merge pull request #946 from brittnilorton/master
Typos and bug fixes
2 parents cb0f03c + 8c7a553 commit 18c509f

7 files changed

+36
-19
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: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
## DBsection(Chain rule (with trigonometric functions))
99
## Date(05/11/2018)
1010
## Institution(Colorado Community College System)
11-
## Author(Eric Fleming)
11+
## Author(Eric Fleming-updated to use Composition_Ans by Brittni Lorton August 2022)
1212
## MO(1)
1313
## KEYWORDS('chain rule', 'trig', 'trigonometric functions', 'tan', 'tangent', 'tan(x)', 'sec', 'secant', 'sec(x)')
1414

@@ -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",
@@ -39,7 +40,6 @@ $a=random(2,9,1);
3940
$b=random(2,20,1);
4041
$c=random(2,20,1);
4142

42-
4343
$f=Formula("tan(sec($a x))");
4444

4545
$ans1=Formula("tan(u)");
@@ -53,13 +53,16 @@ BEGIN_PGML
5353

5454
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}`.
5555

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

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

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

62+
COMPOSITION_ANS( $ans1, $ans2, vars=>['u','x'], showVariableHints=>1);
63+
BEGIN_PGML
6264

65+
`\frac{dy}{dx}=`[_______________]{$ans3} [@ AnswerFormatHelp("formulas") @]*
6366

6467
END_PGML
6568

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: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,27 @@ $showPartialCorrectAnswers = 1;
3939

4040
###########################
4141
# Setup
42-
43-
$a=random(4,20,4);
44-
$b=random(2,8,2);
45-
$d=random(5,25,5);
46-
$e=random(2,8,2);
47-
$f=random(1,3,1);
48-
$g=random(.2,2,.2);
4942
$ans1=Compute("-b+ax-cx-dx^2");
5043
$ans2=Compute("(a-c)/(2d)");
44+
45+
do{$a=random(4,20,4);
46+
$b=random(2,8,2);}
47+
until($a>$b);
5148
$ans3=Compute(($a-$b)/(2));
49+
50+
do{$d=random(5,25,5);
51+
$e=random(2,8,2);
52+
$f=random(1,3,1);
53+
$g=random(.2,2,.2);}
54+
until($d>$f);
5255
$ans4=Compute(($d-$f)/(2*$g));
56+
57+
5358
$rev1=Compute("$a*x")->reduce;
5459
$rev2=Compute("$d*x")->reduce;
5560
$cost1=Compute("$b*x+x^2")->reduce;
5661
$cost2=Compute("$e+$f*x+$g*x^2")->reduce;
5762

58-
5963
###########################
6064
# Main text
6165

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)