diff --git a/Contrib/CCCS/CalculusOne/02.3/CCD_CCCS_Openstax_Calc1_C1-2016-002_03_85.pg b/Contrib/CCCS/CalculusOne/02.3/CCD_CCCS_Openstax_Calc1_C1-2016-002_03_85.pg index 357831eae4..9f6b6b377e 100644 --- a/Contrib/CCCS/CalculusOne/02.3/CCD_CCCS_Openstax_Calc1_C1-2016-002_03_85.pg +++ b/Contrib/CCCS/CalculusOne/02.3/CCD_CCCS_Openstax_Calc1_C1-2016-002_03_85.pg @@ -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() @]* diff --git a/Contrib/CCCS/CalculusOne/03.2/CCD_CCCS_Openstax_Calculus_C1-2016-002_3_2_59.pg b/Contrib/CCCS/CalculusOne/03.2/CCD_CCCS_Openstax_Calculus_C1-2016-002_3_2_59.pg index c263da2a1e..148bb8a727 100644 --- a/Contrib/CCCS/CalculusOne/03.2/CCD_CCCS_Openstax_Calculus_C1-2016-002_3_2_59.pg +++ b/Contrib/CCCS/CalculusOne/03.2/CCD_CCCS_Openstax_Calculus_C1-2016-002_3_2_59.pg @@ -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; diff --git a/Contrib/CCCS/CalculusOne/03.6/CCD_CCCS_Openstax_Calc1_C1-2016-002_3_6_224.pg b/Contrib/CCCS/CalculusOne/03.6/CCD_CCCS_Openstax_Calc1_C1-2016-002_3_6_224.pg index d6e685f9d7..e58d3ea29e 100644 --- a/Contrib/CCCS/CalculusOne/03.6/CCD_CCCS_Openstax_Calc1_C1-2016-002_3_6_224.pg +++ b/Contrib/CCCS/CalculusOne/03.6/CCD_CCCS_Openstax_Calc1_C1-2016-002_3_6_224.pg @@ -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)') @@ -21,6 +21,7 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", +"answerComposition.pl", "AnswerFormatHelp.pl", "PGML.pl", "PGcourse.pl", @@ -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)"); @@ -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 diff --git a/Contrib/CCCS/CalculusOne/04.3/CCD_CCCS_Openstax_Calc1_C1-2016-002_4_3_116.pg b/Contrib/CCCS/CalculusOne/04.3/CCD_CCCS_Openstax_Calc1_C1-2016-002_4_3_116.pg index 3b65cbbe76..cb541197ed 100644 --- a/Contrib/CCCS/CalculusOne/04.3/CCD_CCCS_Openstax_Calc1_C1-2016-002_4_3_116.pg +++ b/Contrib/CCCS/CalculusOne/04.3/CCD_CCCS_Openstax_Calc1_C1-2016-002_4_3_116.pg @@ -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)"); @@ -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 diff --git a/Contrib/CCCS/CalculusOne/04.7/CCD_CCCS_Openstax_Calc1_C1-2016-002_4_7_332_334.pg b/Contrib/CCCS/CalculusOne/04.7/CCD_CCCS_Openstax_Calc1_C1-2016-002_4_7_332_334.pg index d819f5d28c..89904c268c 100644 --- a/Contrib/CCCS/CalculusOne/04.7/CCD_CCCS_Openstax_Calc1_C1-2016-002_4_7_332_334.pg +++ b/Contrib/CCCS/CalculusOne/04.7/CCD_CCCS_Openstax_Calc1_C1-2016-002_4_7_332_334.pg @@ -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 diff --git a/Contrib/CCCS/CalculusOne/05.2/CCD_CCCS_Openstax_Calc1_C1-2016-002_5_2_106.pg b/Contrib/CCCS/CalculusOne/05.2/CCD_CCCS_Openstax_Calc1_C1-2016-002_5_2_106.pg index 5141b484f7..9b0c3570ab 100644 --- a/Contrib/CCCS/CalculusOne/05.2/CCD_CCCS_Openstax_Calc1_C1-2016-002_5_2_106.pg +++ b/Contrib/CCCS/CalculusOne/05.2/CCD_CCCS_Openstax_Calc1_C1-2016-002_5_2_106.pg @@ -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 diff --git a/Contrib/CCCS/CalculusTwo/07.2/CCD_CCCS_Openstax_Calc2_C1-2016-002_7_2_81-82.pg b/Contrib/CCCS/CalculusTwo/07.2/CCD_CCCS_Openstax_Calc2_C1-2016-002_7_2_81-82.pg index 8207d5ad90..e6022648e7 100644 --- a/Contrib/CCCS/CalculusTwo/07.2/CCD_CCCS_Openstax_Calc2_C1-2016-002_7_2_81-82.pg +++ b/Contrib/CCCS/CalculusTwo/07.2/CCD_CCCS_Openstax_Calc2_C1-2016-002_7_2_81-82.pg @@ -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"); @@ -113,6 +119,7 @@ Find the equation of the tangent line at [`t=\frac{\pi}{4}`]. [`y=`] [_______________]{$tanline} [@ AnswerFormatHelp("formulas") @]* + END_PGML Section::End(); @@ -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();