Skip to content

Commit

Permalink
Typos and bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brittnilorton committed Aug 17, 2022
1 parent 7575ab9 commit 174305e
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 16 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 @@ -21,6 +21,7 @@ DOCUMENT();
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"answerComposition.pl",
"AnswerFormatHelp.pl",
"PGML.pl",
"PGcourse.pl",
Expand Down Expand Up @@ -49,20 +50,35 @@ $ans3=Formula("$a sec^2(sec($a x)) sec($a x) tan($a x)");
###########################
# Main text

BEGIN_PGML
#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}`.
#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") @]*
#`\frac{dy}{dx}=`[_______________] [@ AnswerFormatHelp("formulas") @]*

#END_PGML
Context()->texStrings;
BEGIN_TEXT
Decompose \( y=$f\) into two functions \(y=f(u)\) and \(u=g(x)\) such that \(y=f(g(x))\). Then find \( \frac{dy}{dx}\).
$BR
$BR
\( f(u) \) = \{ ans_rule(20) \}
\{ AnswerFormatHelp("formulas") \}
$BR
\( g(x) \) = \{ ans_rule(20) \}
$BR
END_TEXT
Context()->normalStrings;
COMPOSITION_ANS( $ans1, $ans2, vars=>['u','x'], showVariableHints=>1);


END_PGML

BEGIN_TEXT
\(\frac{dy}{dx}= \) \{ans_rule(20)\}
END_TEXT
ANS( $ans3->cmp() );

############################
# Solution
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 @@ -40,7 +40,7 @@ $showPartialCorrectAnswers = 1;
###########################
# Setup

$a=random(4,20,4);
do{$a=random(4,20,4);
$b=random(2,8,2);
$d=random(5,25,5);
$e=random(2,8,2);
Expand All @@ -53,7 +53,7 @@ $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;
$cost2=Compute("$e+$f*x+$g*x^2")->reduce;}until($ans3>0 and $ans4>0);


###########################
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 174305e

Please sign in to comment.