Skip to content

Commit 8b23f9c

Browse files
authored
Merge pull request #933 from brittnilorton/master
bug fixes
2 parents 275b80d + 7575ab9 commit 8b23f9c

File tree

6 files changed

+12
-15
lines changed

6 files changed

+12
-15
lines changed

Contrib/CCCS/AlgebraicLiteracy/IA_2.4/OpenStax_IA_2.4_264.pg

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $showPartialCorrectAnswers = 1;
3636
Context("Numeric");
3737

3838
do{$t = random(23000,27000,100);
39-
$f = Compute("545000-21.48*$t")->reduce;
39+
$f = Compute(".32*$t")->reduce;
4040
$n = $t-$f;}
4141
until($f>0 and $n>0);
4242

Contrib/CCCS/AlgebraicLiteracy/IA_7.1/OpenStax_IA_7.1_39.pg

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ Context()->variables->are($var =>'Real');
3636
#Problem is of the form:
3737
#(x-a)^2/(x^2 - a^2) TIMES (x+a)^2/((x-a)(bx+c))
3838
#
39-
$a = random(2,10);
39+
do{$a = random(2,10);
4040
$b = random(2, 6);
41-
$c = non_zero_random(-7, 7);
41+
$c = non_zero_random(-7, 7);}
42+
until($c != $b*$a); #to prevent it from simplifying to a constant
4243

4344
#Question
4445
$g1 = Formula("($var^2 - 2*$a*$var + $a**2)/($var^2 - $a**2)")->reduce;

Contrib/CCCS/AlgebraicLiteracy/IA_8.4/OpenStax_IA_8.4_191.pg

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ $cA = $inA*$mA;
3434

3535
#Part B: Cube Roots
3636
$outB = list_random(2,3,5);
37-
$inB = random(2, 5);
37+
$inB = list_random(2,3,5);
3838
$rad1B = $outB**2;
3939
$rad2B = $outB*$inB;
4040
$nB = random(2, 10);
@@ -51,7 +51,7 @@ $ans2 = Formula("$nB*root(3, $rad1B) + $outB*root(3, $inB)");
5151

5252
BEGIN_PGML
5353

54-
Multiply and Simplify.
54+
Multiply and simplify.
5555

5656

5757
(a) [`` \sqrt{[$inA]} ( [$nA] + [$mA]\sqrt{[$inA]}) = ``] [_____________]{$ans1->cmp(mathQuillOpts => "rootsAreExponents: false")}

Contrib/CCCS/CalculusTwo/04.3/CCD_CCCS_Openstax_Calc2_C2-2016-002_4_3_124.pg

+1-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ Context()->variables->add(C=>"Real");
4848

4949
$k=random(0,4);
5050
$f=Formula("tan(y)x^($k)")->reduce;
51-
$answer=Formula("asin(C*e^(x^($k+1)/($k+1)))")->reduce;
52-
53-
####I may need these limits->with(limits=>[[-0.5,0.5],[0,0.2],[1,3]])->reduce;
51+
$answer=Formula("asin(C*e^(x^($k+1)/($k+1)))")->with(limits=>[[-0.5,0.5],[0,0.2],[1,3]])->reduce;
5452

5553

5654
###########################

Contrib/CCCS/CalculusTwo/06.2/CCD_CCCS_Openstax_Calc2_C1-2016-002_6_2_89.pg

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ $summ1 = Compute("((-1)^n)*(2*n)*(x^(2*n-1))")->reduce;
4545
$f = Compute("(2*x)/[(1+(x^2))^2]")->reduce;
4646

4747
##antiderivative of $f
48-
$int_f = Compute("-1/(1+(x^2))")->reduce;
48+
$int_f = Compute("1/(1+(x^2))")->reduce;
4949

5050
##answer
5151
$ans = Compute("( (-1)^(n)*(x^(2*n)) )")->reduce;

Contrib/CCCS/PreCalculus/6.2/CCD_CCCS_Openstax_AlgTrig_AT-1-001-AS_6_2_31.pg

+4-6
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,25 @@ $showPartialCorrectAnswers = 1;
4343

4444

4545
Context("Numeric");
46+
Context()->noreduce('(-x)-y','(-x)+y');
4647
$a = non_zero_random(-8,8,1);
4748
do{$b = random(2,5,1);} until ($b != $a);
4849
do{$c= non_zero_random(-5,5,1);} until ($c != $b) and ($c != $a);
4950

50-
if($c > 0)
51-
{$func = ("$a($b)^(-x) + $c");}
52-
else
53-
{$func = ("$a($b)^(-x) $c");};
54-
51+
$func = Formula("$a($b)^(-x) + $c")->reduce;
5552

5653
Context("Numeric");
5754
if ($a > 0)
5855
{$ans1 = infinity; $ans2 = $c;}
5956
else
60-
{$ans1 = -infinity; $ans2 = -$c;};
57+
{$ans1 = -infinity; $ans2 = $c;};
6158

6259
#################################
6360
# Main text
6461

6562
BEGIN_PGML
6663

64+
6765
Describe the end behavior of the function [`f(x) =`] `[$func]`
6866

6967

0 commit comments

Comments
 (0)