Skip to content

Commit 39719d2

Browse files
committed
typos and display fix
1 parent cb7e572 commit 39719d2

8 files changed

+38
-143
lines changed

Contrib/CCCS/CalculusOne/02.4/CCD_CCCS_Openstax_Calc1_C1-2016-002_04_139_143.pg

Lines changed: 15 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@ Parser::Number::NoDecimals();
3636

3737
###########################
3838
# Setup
39-
39+
Context("Numeric");
4040
Context()->noreduce('(-x)-y','(-x)+y');
4141

4242
# first function of the form (x^2+x-2)/(x-1)
4343
$x = non_zero_random(-6, 6, 1);
4444
$x0 = non_zero_random(-6, 6, 1);
45-
$num = Formula("x^2 + ($x+$x0)*x+$x*$x0")->reduce;
45+
$b = $x+$x0;
46+
$num = Formula("x^2 + $b*x+$x*$x0")->reduce;
4647
$denom = Formula("x+$x")->reduce;
47-
$f_1 = Formula("$num/$denom");
48+
$f_1 = Formula("$num/$denom")->reduce;
4849

4950
#answers for first function
5051
$popup1 = PopUp(
@@ -57,15 +58,16 @@ $popup2 = PopUp(
5758

5859
# second function of the form (3x^2+x-2)/(3x-1)
5960
Context("Fraction-NoDecimals");
61+
Context()->noreduce('(-x)-y','(-x)+y');
6062
$a1 = non_zero_random(-3, 3, 1);
6163
$a2 = non_zero_random(-3, 3, 1);
6264
$b1 = non_zero_random(-4, 4, 1);
6365
$b2 = non_zero_random(-4, 4, 1);
6466
$c = non_zero_random(-6, 6, 1);
6567
$num1 = Formula("$a1*$a2*x^2 + ($a1*$b2+$a2*$b1)*x + $b1*$b2")->reduce;
6668
$denom1 = Formula("$a1*x+$b1")->reduce;
67-
$f_2 = Formula("$num1/$denom1");
68-
$f_2simp = Formula("$a2*x+$b2");
69+
$f_2 = Formula("$num1/$denom1")->reduce;
70+
$f_2simp = Formula("$a2*x+$b2")->reduce;
6971

7072
$x_frac = Compute("-$b1/$a1");
7173
$y0 = $f_2simp->eval (x=>$x_frac);
@@ -149,44 +151,22 @@ if ($aa == 1) {
149151
BEGIN_PGML
150152

151153
(a)
152-
`f(x)=[$f_1]` ; at `x=-[$x]`; the function is: [@ $popup1->menu() @]* Classification: [@ $popup2->menu() @]*
154+
[`f(x)=[$f_1]`] ; at `x=-[$x]`; the function is: [@ $popup1->menu() @]* Classification: [@ $popup2->menu() @]*
153155

154156

155157
(b)
156158
[` f(x)=[$fun] `] ; at `x=[$x_frac]` the function is: [@ $popup3->menu() @]* Classification: [@ $popup4->menu() @]*
157159

158160

159161
(c)
160-
[` f(x)=[$f_3] `] ; at `x=1` the function is: [@ $popup5->menu() @]* Classification: [@ $popup6->menu() @]*
162+
[`` f(x)=[$f_3] ``] ; at `x=1` the function is: [@ $popup5->menu() @]* Classification: [@ $popup6->menu() @]*
161163

162164

163165
(d)
164166
[` f(x)=[$fun2] `] ; at `x=0` the function is: [@ $popup7->menu() @]* Classification: [@ $popup8->menu() @]*
165167

166168
END_PGML
167169

168-
############################
169-
170-
BEGIN_PGML_HINT
171-
172-
Recall the definition of continuity at a point and the types of discontinuity:
173-
174-
A function, [`f(x)`], is continuous at [`x=a`] provided all three of the following hold true.
175-
* [`f(a)`] is defined. (_the function value exists_)
176-
* [``\lim_{x\rightarrow a} f(x) ``] exists. (_the two sided limit exists_)
177-
* [``\lim_{x\rightarrow a} f(x) =f(a)``] (_the two sided limit is equal to the function value_)
178-
179-
If one or more of those three conditions fails, then the function [`f(x)`] is discontinuous at [`x=a`].
180-
181-
182-
If [`f(x)`] is discontinuous at [`x=a`], then
183-
1. [`f`] has a *removable discontinuity* at [`a`] if [``\lim_{x\rightarrow a} f(x)``] exists and is equal to a real number.
184-
2. [`f`] has a *jump discontinuity* at [`a`] if [``\lim_{x\rightarrow a^-} f(x)``] and [``\lim_{x\rightarrow a^+} f(x)``] both exist (and are equal to a real number) but are not equal to each other.
185-
3. [`f`] has an *infinite discontinuity* at [`a`] if [``\lim_{x\rightarrow a^-} f(x)=\pm \infty``] or [``\lim_{x\rightarrow a^+} f(x)=\pm \infty``]
186-
187-
188-
END_PGML_HINT
189-
190170

191171
############################
192172
# Answers
@@ -210,40 +190,18 @@ BEGIN_PGML
210190

211191

212192
(b)
213-
[` f(x)=[$f_3] `] ; at `x=1` the function is: [@ $popup5->menu() @]* Classification: [@ $popup6->menu() @]*
193+
[`` f(x)=[$f_3] ``] ; at `x=1` the function is: [@ $popup5->menu() @]* Classification: [@ $popup6->menu() @]*
214194

215195

216196
(c)
217-
`f(x)=[$f_1]` ; at `x=-[$x]` the function is: [@ $popup1->menu() @]* Classification: [@ $popup2->menu() @]*
197+
[`f(x)=[$f_1]`] ; at `x=-[$x]` the function is: [@ $popup1->menu() @]* Classification: [@ $popup2->menu() @]*
218198

219199

220200
(d)
221201
[` f(x)=[$fun2] `] ; at `x=0` the function is: [@ $popup7->menu() @]* Classification: [@ $popup8->menu() @]*
222202

223203
END_PGML
224204

225-
############################
226-
227-
BEGIN_PGML_HINT
228-
229-
Recall the definition of continuity at a point and the types of discontinuity:
230-
231-
A function, [`f(x)`], is continuous at [`x=a`] provided all three of the following hold true.
232-
* [`f(a)`] is defined. (_the function value exists_)
233-
* [``\lim_{x\rightarrow a} f(x) ``] exists. (_the two sided limit exists_)
234-
* [``\lim_{x\rightarrow a} f(x) =f(a)``] (_the two sided limit is equal to the function value_)
235-
236-
If one or more of those three conditions fails, then the function [`f(x)`] is discontinuous at [`x=a`].
237-
238-
239-
If [`f(x)`] is discontinuous at [`x=a`], then
240-
1. [`f`] has a *removable discontinuity* at [`a`] if [``\lim_{x\rightarrow a} f(x)``] exists and is equal to a real number.
241-
2. [`f`] has a *jump discontinuity* at [`a`] if [``\lim_{x\rightarrow a^-} f(x)``] and [``\lim_{x\rightarrow a^+} f(x)``] both exist (and are equal to a real number) but are not equal to each other.
242-
3. [`f`] has an *infinite discontinuity* at [`a`] if [``\lim_{x\rightarrow a^-} f(x)=\pm \infty``] or [``\lim_{x\rightarrow a^+} f(x)=\pm \infty``]
243-
244-
245-
END_PGML_HINT
246-
247205

248206
############################
249207
# Answers
@@ -267,11 +225,11 @@ BEGIN_PGML
267225

268226

269227
(b)
270-
[` f(x)=[$f_3] `] ; at `x=1` the function is: [@ $popup5->menu() @]* Classification: [@ $popup6->menu() @]*
228+
[`` f(x)=[$f_3] ``] ; at `x=1` the function is: [@ $popup5->menu() @]* Classification: [@ $popup6->menu() @]*
271229

272230

273231
(c)
274-
`f(x)=[$f_1]` ; at `x=-[$x]` the function is: [@ $popup1->menu() @]* Classification: [@ $popup2->menu() @]*
232+
[`f(x)=[$f_1]`] ; at `x=-[$x]` the function is: [@ $popup1->menu() @]* Classification: [@ $popup2->menu() @]*
275233

276234

277235
(d)
@@ -281,28 +239,6 @@ BEGIN_PGML
281239

282240
END_PGML
283241

284-
############################
285-
286-
BEGIN_PGML_HINT
287-
288-
Recall the definition of continuity at a point and the types of discontinuity:
289-
290-
A function, [`f(x)`], is continuous at [`x=a`] provided all three of the following hold true.
291-
* [`f(a)`] is defined. (_the function value exists_)
292-
* [``\lim_{x\rightarrow a} f(x) ``] exists. (_the two sided limit exists_)
293-
* [``\lim_{x\rightarrow a} f(x) =f(a)``] (_the two sided limit is equal to the function value_)
294-
295-
If one or more of those three conditions fails, then the function [`f(x)`] is discontinuous at [`x=a`].
296-
297-
298-
If [`f(x)`] is discontinuous at [`x=a`], then
299-
1. [`f`] has a *removable discontinuity* at [`a`] if [``\lim_{x\rightarrow a} f(x)``] exists and is equal to a real number.
300-
2. [`f`] has a *jump discontinuity* at [`a`] if [``\lim_{x\rightarrow a^-} f(x)``] and [``\lim_{x\rightarrow a^+} f(x)``] both exist (and are equal to a real number) but are not equal to each other.
301-
3. [`f`] has an *infinite discontinuity* at [`a`] if [``\lim_{x\rightarrow a^-} f(x)=\pm \infty``] or [``\lim_{x\rightarrow a^+} f(x)=\pm \infty``]
302-
303-
304-
END_PGML_HINT
305-
306242

307243
############################
308244
# Answers
@@ -325,41 +261,19 @@ BEGIN_PGML
325261

326262

327263
(b)
328-
`f(x)=[$f_1]` ; at `x=-[$x]` the function is: [@ $popup1->menu() @]* Classification: [@ $popup2->menu() @]*
264+
[``f(x)=[$f_1]``] ; at `x=-[$x]` the function is: [@ $popup1->menu() @]* Classification: [@ $popup2->menu() @]*
329265

330266

331267
(c)
332268
[` f(x)=[$fun2] `] ; at `x=0` the function is: [@ $popup7->menu() @]* Classification: [@ $popup8->menu() @]*
333269

334270

335271
(d)
336-
[` f(x)=[$f_3] `] ; at `x=1` the function is: [@ $popup5->menu() @]* Classification: [@ $popup6->menu() @]*
272+
[`` f(x)=[$f_3] ``] ; at `x=1` the function is: [@ $popup5->menu() @]* Classification: [@ $popup6->menu() @]*
337273

338274

339275
END_PGML
340276

341-
############################
342-
343-
BEGIN_PGML_HINT
344-
345-
Recall the definition of continuity at a point and the types of discontinuity:
346-
347-
A function, [`f(x)`], is continuous at [`x=a`] provided all three of the following hold true.
348-
* [`f(a)`] is defined. (_the function value exists_)
349-
* [``\lim_{x\rightarrow a} f(x) ``] exists. (_the two sided limit exists_)
350-
* [``\lim_{x\rightarrow a} f(x) =f(a)``] (_the two sided limit is equal to the function value_)
351-
352-
If one or more of those three conditions fails, then the function [`f(x)`] is discontinuous at [`x=a`].
353-
354-
355-
If [`f(x)`] is discontinuous at [`x=a`], then
356-
1. [`f`] has a *removable discontinuity* at [`a`] if [``\lim_{x\rightarrow a} f(x)``] exists and is equal to a real number.
357-
2. [`f`] has a *jump discontinuity* at [`a`] if [``\lim_{x\rightarrow a^-} f(x)``] and [``\lim_{x\rightarrow a^+} f(x)``] both exist (and are equal to a real number) but are not equal to each other.
358-
3. [`f`] has an *infinite discontinuity* at [`a`] if [``\lim_{x\rightarrow a^-} f(x)=\pm \infty``] or [``\lim_{x\rightarrow a^+} f(x)=\pm \infty``]
359-
360-
361-
END_PGML_HINT
362-
363277

364278
############################
365279
# Answers

Contrib/CCCS/CalculusOne/03.3/CCD_CCCS_Openstax_Calculus_C1-2016-002_3_3_130.pg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ $p4 = FEQ("2.5 for x in <2.5,5] using color:red weight:2");
5555

5656
add_functions($gr0,$p1,$p2,$p3,$p4);
5757

58+
$gr0->lb( new Label(0.5,4,"f(x)", 'blue', 'left', 'middle'));
59+
$gr0->lb( new Label(1,1.7,"g(x)", 'red', 'left', 'middle'));
60+
5861
#################################
5962
# Main text
6063

Contrib/CCCS/CalculusOne/03.4/CCD_CCCS_Openstax_Calculus_C1-2016-002_3_4_159.pg

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,6 @@ $popup1 = PopUp(
167167
["?","A","B", "C", "D"], "B",
168168
);
169169

170-
#($gr0->fn)[0]->steps(200);
171-
172-
$in=time();
173-
$gr0->gifName($gr0->gifName()."$in");
174-
$gr1->gifName($gr1->gifName()."$in");
175-
$gr2->gifName($gr2->gifName()."$in");
176-
$gr3->gifName($gr3->gifName()."$in");
177-
$gr4->gifName($gr4->gifName()."$in");
178-
179-
180170
#################################
181171
# Main text
182172

@@ -203,7 +193,7 @@ Velocity is positive on [_______________]{$vpos} [@ AnswerFormatHelp("intervals"
203193

204194
Velocity is negative on [_______________]{$vneg} [@ AnswerFormatHelp("intervals") @]*
205195

206-
Velocity is zero on [_______________]{$vzero} [@ AnswerFormatHelp("intervals") @]*
196+
Velocity is zero on [_______________]{$vzero->cmp(studentsMustReduceUnions => 0)} [@ AnswerFormatHelp("intervals") @]*
207197

208198

209199
Use interval notation for your answer. Remember that a single value, such as 3, can be notated with curly brackets as {3} in interval notation.

Contrib/CCCS/CalculusOne/03.9/CCD_CCCS_Openstax_Calc1_C1-2016-002_3_9_344.pg

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ $showPartialCorrectAnswers = 1;
3333
# Setup
3434

3535
Context("Numeric");
36-
Context()->variables->add(u => 'Real');
3736

3837
$a=non_zero_random(2,10,1);
3938
$b=non_zero_random(-10,10,1);
@@ -43,20 +42,17 @@ $e=random(2,9,1);
4342

4443
$f=Formula("($b x^$c+$d)")->reduce;
4544

46-
4745
$ans3=Formula("($e/ln($a))(($b* $c x^($c-1))/($b x^$c+$d))")->reduce;
4846

4947
###########################
5048
# Main text
51-
## I hope you get [`[$ans1]`], [`[$ans2]`], and [`[$ans3]`].
5249
BEGIN_PGML
5350

54-
Find `f^\prime(x)` for [`f(x)=\log_{[$a]}(([$f])^[$e])`].
51+
Find `f^\prime(x)` for [``f(x)=\log_{[$a]}\left(\left([$f]\right)^[$e]\right)``].
5552

5653
`f^\prime(x)=`[_______________________________]{$ans3} [@ AnswerFormatHelp("formulas") @]*
5754

5855

59-
6056
END_PGML
6157
############################
6258
BEGIN_PGML_HINT

Contrib/CCCS/CalculusOne/03.9/CCD_CCCS_Openstax_Calc1_C1-2016-002_3_9_350.pg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ $showPartialCorrectAnswers = 1;
3535
Context("Numeric");
3636
Context()->variables->set(x=>{limits=>[0.1,0.5]});
3737

38-
#$a=non_zero_random(-10,10,1);
39-
$a=-1;
38+
$a=non_zero_random(-10,10,1);
4039
$b=non_zero_random(-10,10,1);
4140
$c=non_zero_random(-10,10,1);
4241
$d=random(2,10,1);

Contrib/CCCS/CalculusOne/03.9/CCD_CCCS_Openstax_Calc1_C1-2016-002_3_9_353.pg

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
## DBsection(Logarithmic differentiation)
99
## Date(05/11/2018)
1010
## Institution(Colorado Community College System)
11-
## Author(Eric Fleming)
11+
## Author(Eric Fleming - edited Brittni Lorton Fall 2022)
1212
## MO(1)
1313
## KEYWORDS('chain rule', 'trig', 'trigonometric functions', 'cot', 'cotangent', 'cot(x)')
1414

@@ -35,40 +35,33 @@ $showPartialCorrectAnswers = 1;
3535
# Setup
3636

3737
Context("Numeric");
38-
39-
Context()->variables->add(u => 'Real');
40-
41-
$aa=non_zero_random(-10,-2,1);
42-
$aaa=non_zero_random(2,10,1);
43-
$a=max(abs($aa),$aaa);
44-
$aaaa=$a/abs($a);
45-
$absa=abs($a);
38+
$a=non_zero_random(-10,10,1);
4639
$b=non_zero_random(1,10,1);
4740
$c=non_zero_random(1,10,1);
4841
$d=random(2,10,1);
4942
$e=random(2,10,1);
50-
$i=random(2,10,1);
43+
$max = max($d,$e);
44+
$min = min($d,$e);
45+
46+
$f=random(2,10,1);
5147
$g=random(2,10,1);
5248
$h=random(2,10,1);
5349

54-
$divisor=gcd($d,$e);
55-
56-
$dd=$d/$divisor;
57-
$ee=$e/$divisor;
50+
Context("Fraction");
51+
$exp1 = Compute("1/$a");
52+
$exp2 = Compute("$min/$max");
53+
$exp3 = Compute("$h");
5854

59-
60-
61-
$f=Formula("(x^$b+$c)")->reduce;
62-
$gg=Formula("($i x+$g)^($h)");
63-
64-
$ans=Formula("(1/($a*x)+($b*$d*x^($b-1))/($e*(x^$b+$c))+($h*$i)/($i*x+$g))(x^($aaaa/$absa)($f^($dd/$ee)$gg))")->reduce->with(limits=>[9,10]);
55+
Context()->noreduce('(-x)-y','(-x)+y', 'x^(-a)');
56+
$fun = Formula("x**{$exp1}(x**$b+$c)**{$exp2}($f*x+$g)**$h")->reduce;
57+
$ans=Formula("(1/($a*x)+($exp2*$b*x**($b-1))/(x**$b+$c)+($h*$f)/($f*x+$g))*$fun")->reduce->with(limits=>[9,10]);
6558

6659
###########################
6760
# Main text
68-
## I hope you get [`[$ans1]`], [`[$ans2]`], and [`[$ans3]`].
61+
6962
BEGIN_PGML
7063

71-
Use logarithmic differentiation to find `\frac{dy}{dx}` for [`\displaystyle y=x^{[$aaaa]/[$absa]}\left([$f]\right)^{[$dd]/[$ee]}[$gg]`].
64+
Use logarithmic differentiation to find `\frac{dy}{dx}` for [`\displaystyle y= [$fun]`].
7265

7366
`\frac{dy}{dx}=`[______________________________________________________]{$ans} [@ AnswerFormatHelp("formulas") @]*
7467

Contrib/CCCS/CalculusOne/04.5/CCD_CCCS_Openstax_Calc1_C1-2016-002_4_5_217.pg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Draw a graph of a function, [`f(x)`], that satisfies the following specification
132132

133133
[`f'(x)<0`] for [`[$a]<x<[$c]`]
134134

135-
[`f''(x)<0`] for all [`x`]
135+
[`f''(x)<0`] for all [`x \neq [$c]`]
136136

137137
Which of the following graphs is a graph of [`f(x)`] that satisfies the given specifications on the interval [`[[$b],[$d]]`]? [_________________]{$popup1}
138138

Contrib/CCCS/CollegeAlgebra/2.6/CCD_CCCS_Openstax_AlgTrig_AT-1-001-AS_2_6_7.pg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if ( $b % 2) {
5050

5151
$video = MODES(
5252
HTML=>
53-
'<iframe width="420" height="315" src="//www.youtube.com/embed/xs-D0MixxLM" frameborder="0" allowfullscreen></iframe>',
53+
'<iframe width="420" height="315" src="https://www.youtube.com/embed/tjeCvpiI254" frameborder="0" allowfullscreen></iframe>',
5454
TeX =>
5555
"An embedded YouTube video."
5656
);

0 commit comments

Comments
 (0)