Skip to content

Commit

Permalink
Merge pull request #933 from brittnilorton/master
Browse files Browse the repository at this point in the history
bug fixes
  • Loading branch information
drdrew42 authored May 30, 2022
2 parents 275b80d + 7575ab9 commit 8b23f9c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $showPartialCorrectAnswers = 1;
Context("Numeric");

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

Expand Down
5 changes: 3 additions & 2 deletions Contrib/CCCS/AlgebraicLiteracy/IA_7.1/OpenStax_IA_7.1_39.pg
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ Context()->variables->are($var =>'Real');
#Problem is of the form:
#(x-a)^2/(x^2 - a^2) TIMES (x+a)^2/((x-a)(bx+c))
#
$a = random(2,10);
do{$a = random(2,10);
$b = random(2, 6);
$c = non_zero_random(-7, 7);
$c = non_zero_random(-7, 7);}
until($c != $b*$a); #to prevent it from simplifying to a constant

#Question
$g1 = Formula("($var^2 - 2*$a*$var + $a**2)/($var^2 - $a**2)")->reduce;
Expand Down
4 changes: 2 additions & 2 deletions Contrib/CCCS/AlgebraicLiteracy/IA_8.4/OpenStax_IA_8.4_191.pg
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $cA = $inA*$mA;

#Part B: Cube Roots
$outB = list_random(2,3,5);
$inB = random(2, 5);
$inB = list_random(2,3,5);
$rad1B = $outB**2;
$rad2B = $outB*$inB;
$nB = random(2, 10);
Expand All @@ -51,7 +51,7 @@ $ans2 = Formula("$nB*root(3, $rad1B) + $outB*root(3, $inB)");

BEGIN_PGML

Multiply and Simplify.
Multiply and simplify.


(a) [`` \sqrt{[$inA]} ( [$nA] + [$mA]\sqrt{[$inA]}) = ``] [_____________]{$ans1->cmp(mathQuillOpts => "rootsAreExponents: false")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ Context()->variables->add(C=>"Real");

$k=random(0,4);
$f=Formula("tan(y)x^($k)")->reduce;
$answer=Formula("asin(C*e^(x^($k+1)/($k+1)))")->reduce;

####I may need these limits->with(limits=>[[-0.5,0.5],[0,0.2],[1,3]])->reduce;
$answer=Formula("asin(C*e^(x^($k+1)/($k+1)))")->with(limits=>[[-0.5,0.5],[0,0.2],[1,3]])->reduce;


###########################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $summ1 = Compute("((-1)^n)*(2*n)*(x^(2*n-1))")->reduce;
$f = Compute("(2*x)/[(1+(x^2))^2]")->reduce;

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

##answer
$ans = Compute("( (-1)^(n)*(x^(2*n)) )")->reduce;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,25 @@ $showPartialCorrectAnswers = 1;


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

if($c > 0)
{$func = ("$a($b)^(-x) + $c");}
else
{$func = ("$a($b)^(-x) $c");};

$func = Formula("$a($b)^(-x) + $c")->reduce;

Context("Numeric");
if ($a > 0)
{$ans1 = infinity; $ans2 = $c;}
else
{$ans1 = -infinity; $ans2 = -$c;};
{$ans1 = -infinity; $ans2 = $c;};

#################################
# Main text

BEGIN_PGML


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


Expand Down

0 comments on commit 8b23f9c

Please sign in to comment.