Skip to content

Commit

Permalink
Merge pull request #946 from brittnilorton/master
Browse files Browse the repository at this point in the history
Typos and bug fixes
  • Loading branch information
drdrew42 authored Aug 17, 2022
2 parents cb0f03c + 8c7a553 commit 18c509f
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ $answer[1] = "sqrt($f_eval)";

BEGIN_PGML

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

[`\displaystyle \lim_{x \to [$x]} \sqrt{[$f]} = \sqrt{\lim_{x \to [$x]} ([$f])}`]
[@ $popup1->menu() @]*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $showPartialCorrectAnswers = 1;
Context("Numeric");
#Context()->variables->add(x => 'Real');

$a=random(0,16,1);
$a=random(1,16,1);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## DBsection(Chain rule (with trigonometric functions))
## Date(05/11/2018)
## Institution(Colorado Community College System)
## Author(Eric Fleming)
## Author(Eric Fleming-updated to use Composition_Ans by Brittni Lorton August 2022)
## MO(1)
## KEYWORDS('chain rule', 'trig', 'trigonometric functions', 'tan', 'tangent', 'tan(x)', 'sec', 'secant', 'sec(x)')

Expand All @@ -21,6 +21,7 @@ DOCUMENT();
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"answerComposition.pl",
"AnswerFormatHelp.pl",
"PGML.pl",
"PGcourse.pl",
Expand All @@ -39,7 +40,6 @@ $a=random(2,9,1);
$b=random(2,20,1);
$c=random(2,20,1);


$f=Formula("tan(sec($a x))");

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

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

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

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

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

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

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

END_PGML

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ $showPartialCorrectAnswers = 1;
$a=random(2,4,1);
$ans1=Compute("2*$a*sin(x)*cos(x)")->reduce;

$ans3=List("0, pi/2, pi, 3pi/2, 2pi");
$ans3=List("pi/2, pi, 3pi/2");

Context("Interval");
$ans2=Compute("(-infinity,infinity)");
Expand All @@ -53,13 +53,13 @@ $ans2=Compute("(-infinity,infinity)");

BEGIN_PGML

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]`].
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)`].

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

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

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)
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)


END_PGML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,27 @@ $showPartialCorrectAnswers = 1;

###########################
# Setup

$a=random(4,20,4);
$b=random(2,8,2);
$d=random(5,25,5);
$e=random(2,8,2);
$f=random(1,3,1);
$g=random(.2,2,.2);
$ans1=Compute("-b+ax-cx-dx^2");
$ans2=Compute("(a-c)/(2d)");

do{$a=random(4,20,4);
$b=random(2,8,2);}
until($a>$b);
$ans3=Compute(($a-$b)/(2));

do{$d=random(5,25,5);
$e=random(2,8,2);
$f=random(1,3,1);
$g=random(.2,2,.2);}
until($d>$f);
$ans4=Compute(($d-$f)/(2*$g));


$rev1=Compute("$a*x")->reduce;
$rev2=Compute("$d*x")->reduce;
$cost1=Compute("$b*x+x^2")->reduce;
$cost2=Compute("$e+$f*x+$g*x^2")->reduce;


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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $popup=PopUp(["?","$ans1","$ans3","$ans2"],"$ans3");
BEGIN_PGML
Use the Comparison Theorem to show that [``\int_{0}^{[$c]}[$f1] dx \le \int_{0}^{[$c]}[$f2] dx``].

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


END_PGML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,14 @@ $x_ta=$x_t->eval(t=>$b);
##Y-COORD##
$y_ta=$y_t->eval(t=>$b);

Context()->flags->set(
tolType => 'absolute',
tolerance => 0.0005,
);

##y-intercept of tan line##
$yint=Compute("$y_ta-$m*$x_ta")->reduce;
#$yint=Formula("$yint");

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

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


END_PGML

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


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



END_PGML

Section::End();
Expand Down

0 comments on commit 18c509f

Please sign in to comment.