diff --git a/Contrib/UCalgary/249-1-0-0-C/1-1-0-An-C/1-1-0-An-C-graph-interval-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-1-0-An-C/1-1-0-An-C-graph-interval-jms.pg new file mode 100644 index 0000000000..063d79a7e5 --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-1-0-An-C/1-1-0-An-C-graph-interval-jms.pg @@ -0,0 +1,68 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Quadratic equations and functions) +## DBsection(Graphs) +## Date(3 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl",); +$a = non_zero_random(-3, 3, 1); #nonzero repeated root +$b = 2; #tried a random power, too much so go with 2 +if(abs($a)==1) +{$c = 10;} +else +{$c = abs($a)*4}; #dampening factor for graph +$p = non_zero_random(-1,1,1); #coefficient +/- 1 +# answers depend on $p and are switched based on sign +if($p==1) +{ +$inc = List("($a,5)"); +$dec = List("(-5,$a)"); +} +else +{ +$inc = List("(-5,$a)"); +$dec = List("($a,5)"); +} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5.5,0) -- (5.5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-5.5) -- (0,5.5) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5.5,-5.5) grid (5.5,5.5); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-4,-2,2,4} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[-,red, very thick] plot[domain={-4.98}:{4.98}] (\x,{$p*pow((\x-$a),$b)/($c) - $p*abs($a)}); +\draw[red, very thick] (-5,{$p*pow(-5-$a,$b)/$c- $p*abs($a)}) circle (2 pt); +\draw[red, very thick] (5,{$p*pow(5-$a,$b)/$c- $p*abs($a)}) circle (2 pt); +\draw[red] (5,{$p*pow(5-$a,$b)/$c- $p*abs($a)}) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +\Context("Interval"); +BEGIN_PGML +[@ image($graph_image, width => 600, tex_size => 1000) @]* + +Let [`f`] be a function defined on the open interval [`(-5,5)`] and consider the graph of [`y=f(x)`] given above (drawn in red). + +Enter your answers below as (open) intervals (use a list separated by commas, if needed). + +If there are no such intervals, type [|None|]*. + +a. [`f`] is increasing on the interval(s) [_]{$inc}{20} +b. [`f`] is decreasing on the interval(s) [_]{$dec}{20} + +[@helpLink('intervals')@]* + +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-1-0-An-C/1-1-0-An-C-interpret-graph1.pg b/Contrib/UCalgary/249-1-0-0-C/1-1-0-An-C/1-1-0-An-C-interpret-graph1.pg new file mode 100644 index 0000000000..02b3538e2d --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-1-0-An-C/1-1-0-An-C-interpret-graph1.pg @@ -0,0 +1,58 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Functions) +## DBsection(Graphs) +## Date(30 January 2025) +## Institution(University of Calgary) +## Author(Aiden Taylor) +## Level(4) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", + "PGML.pl", + "PGcourse.pl", + "PGtikz.pl" +); + +$showPartialCorrectAnswers = 1; + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[<->,thick] (-7,0) -- (7,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[<->,thick] (0,-3) -- (0,11) node[below right,outer sep=2pt]{\(y\)}; +\foreach \x in {-6,-4,...,-2,2,4,...,6} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-2,2,4,...,10} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[-,red, ultra thick] plot[domain={-3}:{2.99}] (\x,{pow(\x,2)}); +\filldraw[red, ultra thick] (-3,9) circle (3.5 pt); +\draw[red, ultra thick] (3,9) circle (3.5 pt); +\draw[very thin,color=gray] (-7,-3) grid (7,11); +\draw[red] (1,9) node[outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +\Context("Interval"); +BEGIN_PGML +[@ image($graph_image, width => 600, tex_size => 1000) @]* + +Refer to the graph of the function, [`f`], drawn above in red. + +(a) The value of [`f(1)`] is: [_]{"1"}{2} + +(b) For what values of [`x`] is [`f(x) = 4`]? [____]{"-2,2"}{5} +(Enter the values of [`x`] as a list, separated by commas.) + +(c) State the domain of [`f`]. [______]{"[-3,3)"}{20} +(Enter your answer as an interval. [@helpLink('intervals')@]*) + +(d) State the range of [`f`]. [______]{"[0,9]"}{20} +(Enter your answer as an interval.) +END_PGML + +ENDDOCUMENT(); \ No newline at end of file diff --git a/Contrib/UCalgary/249-1-0-0-C/1-1-0-An-C/1-1-0-An-C-quad-linear-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-1-0-An-C/1-1-0-An-C-quad-linear-jms.pg new file mode 100644 index 0000000000..3754d9d7cc --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-1-0-An-C/1-1-0-An-C-quad-linear-jms.pg @@ -0,0 +1,77 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Quadratic equations and functions) +## DBsection(Graphs) +## Date(3 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl",); +$a = non_zero_random(-1, 1, 1); #nonzero repeated root +$b = random(1,2,1); #linear or quadratic +if($b==2) +{$c = 10*$b;} +else +{$c = 2}; #dampening factor for graph +$p = non_zero_random(-1,1,1); #coefficient +/- 1 +# popup_type answers depend on $b +if($b==1) +{$type = 'linear function';} +else +{$type = 'quadtratic function';} +$popup_type = DropDown( + [ + 'linear function', + 'quadratic function', + ], + $type +); +# popup_slope answers depend on $b and $p +if($p==1 and $b==1) +{$slope = 'positive';} +elsif($p==-1 and $b==1) +{$slope = 'negative';} +else +{$slope = 'neither';} +$popup_slope = DropDown( + [ + 'negative', + 'positive', + 'neither', + ], + $slope +); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5.5,0) -- (5.5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-5.5) -- (0,5.5) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5.5,-5.5) grid (5.5,5.5); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-4,-2,2,4} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick] plot[domain={-5}:{5}] (\x,{$p*pow($b*(\x-$a),$b)/($c) - $p*abs($a*$b)}); +\draw[red] (5,{$p*pow($b*(5-$a),$b)/($c) - $p*abs($a*$b)}) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +\Context("Interval"); +BEGIN_PGML +[@ image($graph_image, width => 600, tex_size => 1000) @]* + +Consider the graph of the of the function [`y=f(x)`] given above in red. + +Based on the visible portion of the graph [`f`] is a [_]{$popup_type}. + +If [`f`] is a linear function, then the slope of [`y=f(x)`] is [_]{$popup_slope}. (If [`f`] is a quadratic function, choose "neither"). + +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-1-1-U-C/1-1-1-U-C-slope-int-1-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-1-1-U-C/1-1-1-U-C-slope-int-1-jms.pg new file mode 100644 index 0000000000..dbb775a501 --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-1-1-U-C/1-1-1-U-C-slope-int-1-jms.pg @@ -0,0 +1,52 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Linear equations and functions) +## DBsection(Equations of lines: slope-intercept form) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl",); +$a = random(1, 3, 1); #random positive slope numerator +$m = $a / 2; #slope is m = a/2 +$b = non_zero_random(-1, 1, 1); #random nonzero y-intercept +$l = $m * (-4) + $b; #lower limit, min of L +$u = $m * (4) + $b; #upper limit, max of L +$um = $u - 1; # for graph grid +$lm = $l + 1; # for graph grid +$xint = -$b / $m; #calculate x-intercept + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,$l) -- (0,$u) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,$l) grid (5,$u); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {$lm,...,$um} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick] plot[domain={-4}:{4}] (\x,$m*\x+$b); +\draw[red] (4,$u) node[below right, outer sep=2pt]{\(y=L(x)\)}; +END_TIKZ + +\Context("Interval"); +BEGIN_PGML +[@ image($graph_image, width => 600, tex_size => 1000) @]* + +Consider the graph of the line [`L`] given above. + +(a) The slope of [`L`] is [`m = `] [_]{"$m"} + +(b) The [`y`]-intercept of [`L`] is [`b = `] [_]{"$b"} + +(c) The [`x`]-intercept of [`L`] is [`x = `] [_]{"$xint"} + +Note: You may need to calculate the [`x`]-intercept by using your answers to parts (a) and (b). + +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-1-1-U-C/1-1-1-U-C-slope-int-2-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-1-1-U-C/1-1-1-U-C-slope-int-2-jms.pg new file mode 100644 index 0000000000..31975df599 --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-1-1-U-C/1-1-1-U-C-slope-int-2-jms.pg @@ -0,0 +1,62 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Linear equations and functions) +## DBsection(Equations of lines: slope-intercept form) +## Date(31 January 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl",); +$a = random(-4, -2, 2); #random even negative slope numerator +$b = non_zero_random(-2, 2, 1); #random nonzero +$c = random(3,5,2); #positive odd slope denominator relatively prime to $a*$b +$m = $a / $c; #slope is m = a/c +# L = $m(x-$b); +$l = $m * (4 - $b); #lower limit, min of L at x=4 since decreasing +$u = $m * (-4 - $b) ; #upper limit, max of L at x=-4 since decreasing +$um = $u + 1; # for graph grid +$umc = int($um); #floor of $um +$lm = $l - 1; # graph grid +$lmf = int($lm); # floor of $lm +# floor for y-axis grid marks +$yint = -$b * $m; #calculate y-intercept + + + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,$lm) -- (0,$um) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,$lm) grid (5,$um); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {$lmf,...,$umc} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick] plot[domain={-4.5}:{4.5}] (\x,$m*(\x-$b)); +\draw[red] (4,$l) node[above right, outer sep=2pt]{\(y=L(x)\)}; +END_TIKZ + +\Context("Interval"); +BEGIN_PGML +[@ image($graph_image, width => 600, tex_size => 1000) @]* + +Consider the graph of the line [`L`] given above. + +(a) The slope of [`L`] is [`m = `] [_]{"$m"} + +(b) The [`x`]-intercept of [`L`] is [`x = `] [_]{"$b"} + +(c) The [`y`]-intercept of [`L`] is [`b = `] [_]{"$yint"} + +Note: You may need to calculate the [`y`]-intercept by using your answers to parts (a) and (b). + +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-1-3-U-C/1-1-3-U-C-delta-slope-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-1-3-U-C/1-1-3-U-C-delta-slope-jms.pg new file mode 100644 index 0000000000..16bbf4856a --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-1-3-U-C/1-1-3-U-C-delta-slope-jms.pg @@ -0,0 +1,60 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Linear equations and functions) +## DBsection(Linear equations) +## Date(31 January 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$m = non_zero_random(-7,7,1); #random nonzero slope +if(abs($m)==1)# avoid slope of +/- 1 +{ +$m = $m + 3; +} +$b = non_zero_random(-20,20,1); #random y-int +$delx = random(2,9,1); #given change in x, pos +$dely = random(-9,-2,1); #given change in y, neg +$magy = abs($dely); +$f = Formula("($m*x + $b)")->reduce(); + +$yans = Compute("$m*$delx"); +$xans = Compute("$dely/$m"); + +BEGIN_PGML +Suppose that [`x`] and [`y`] are related by the linear equation [`y = [$f]`]. + ++ If [`x`] is increased by [`[$delx]`] units, then the corresponding change in [`y`] is [`\Delta y = \, `][_]{$yans}{5}. ++ If [`y`] is decreased by [`[$magy]`] units, then the corresponding change in [`x`] is [`\Delta x = \, `][_]{$xans}{5}. +END_PGML + +BEGIN_PGML_SOLUTION +Recall that the slope of a line is [`m = \dfrac{\Delta y}{\Delta x}`], where [`\Delta y`] is the change in [`y`] and [`\Delta x`] is the change in [`x`]. + +For the line [`y = [$f]`] we have [`m = [$m]`]. + ++ Given [`\Delta x = [$delx]`], we get [`\Delta y = m \Delta x = [$yans]`]. ++ Given [`\Delta y = [$dely]`], we get [`\Delta x = \dfrac{\Delta y}{m} = \dfrac{[$dely]}{[$m]}`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-1-3-U-C/1-1-3-U-C-point-slope-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-1-3-U-C/1-1-3-U-C-point-slope-jms.pg new file mode 100644 index 0000000000..46f8e95bab --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-1-3-U-C/1-1-3-U-C-point-slope-jms.pg @@ -0,0 +1,63 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Linear equations and functions) +## DBsection(Equations of lines: point-slope form) +## Date(31 January 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$m = non_zero_random(-7,7,1); #random nonzero slope +if(abs($m)==1)# avoid slope of +/- 1 +{ +$m = $m + 3; +} +$a = non_zero_random(-9,9,1); #random x-coordinate for first point +$b = random(-9,9,1); #random y-coordinate for first first point +$c = non_zero_random(-9,9,1); #random x-coordinate for second point +if($c == $a) # avoid $c=$a and rewrite +{ +$c = $a + 10; #rewrite $c and avoid $c=0 +} +$d = $m*($c-$a)+$b; #second y-coordinate on the line +$f = Compute("($m*(x-$a)+$b)")->reduce(); + +BEGIN_PGML +Let [`L`] be the line passing through the points [`([$a],[$b])`] and [`([$c],[$d])`]. + +The slope of the line [`L`] is [`m = \, `][_]{$m}{5}. + +The equation of the line [`L`], as a function of the independent variable [`x`], is [`y = \, `][_]{$f}{20}. +END_PGML + +BEGIN_PGML_SOLUTION +Recall that the slope of a line is [`m = \dfrac{\Delta y}{\Delta x}`], where [`\Delta y = y_2 - y_1`] is the change in [`y`] and [`\Delta x = x_2 - x_1`] is the change in [`x`]. + +We are given points [`(x_1,y_1) = ([$a],[$b])`] and [`(x_2,y_2) = ([$c],[$d])`], so [`m = \dfrac{[$d]-[$b]}{[$c]-[$a]} = [$m] `] is the slope of [`L`]. + +The equation of [`L`] can be obtained by rearranging the above formula for the slope and using [`(x,y)`] in place of [`(x_2,y_2)`]: [```y - y_1 = m(x-x_1) ```] + +Therefore the equation of [`L`] is [`y = [$m](x-[$a])+[$b] = [$f]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-1-4-U-C/1-1-4-U-C-int-from-eq-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-1-4-U-C/1-1-4-U-C-int-from-eq-jms.pg new file mode 100644 index 0000000000..9a3a56c87d --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-1-4-U-C/1-1-4-U-C-int-from-eq-jms.pg @@ -0,0 +1,72 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Linear equations and functions) +## DBsection(Linear functions) +## Date(31 January 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = non_zero_random(-9,9,1); +$b = abs($a)+random(2,5,1); + +$popup_xint = DropDown( + [ + 'x-intercept', + 'y-intercept' + ], + 'x-intercept' +); + +$popup_xvar = DropDown( + [ + 'x', + 'y' + ], + 'x' +); + +$popup_yint = DropDown( + [ + 'x-intercept', + 'y-intercept' + ], + 'y-intercept' +); + +$popup_yvar = DropDown( + [ + 'x', + 'y' + ], + 'y' +); + +BEGIN_PGML +Let [`f`] be a function of one variable. + +If [`f(0)=[$b]`], then the [_]{$popup_yint} of [`f`] is [_]{$popup_yvar} = [_]{$b}{2}. + +If [`f([$a])=0`], then the [_]{$popup_xint} of [`f`] is [_]{$popup_xvar} = [_]{$a}{2}. +END_PGML + +BEGIN_PGML_SOLUTION +Points on the graph of [`y=f(x)`] have the form [`(x,f(x))`], where [`x`] is in the domain of [`f`]. + +- If [`f(0)=[$b]`], then [`(0,[$b])`] is on the graph of [`f`] and [`y=[$b]`] is the [`y`]-intercept of [`f`]. +- If [`f([$a])=0`], then [`([$a],0)`] is on the graph of [`f`] and [`x=[$a]`] is an [`x`]-intercept of [`f`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-1-4-U-C/1-1-4-U-C-num-int-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-1-4-U-C/1-1-4-U-C-num-int-jms.pg new file mode 100644 index 0000000000..d75b273948 --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-1-4-U-C/1-1-4-U-C-num-int-jms.pg @@ -0,0 +1,50 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Linear equations and functions) +## DBsection(Linear functions) +## Date(31 January 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = non_zero_random(-9,9,1); +$b = non_zero_random(-9,9,1); +if($a == $b) +{$b = abs($a)+2;} #avoid $a and $b being equal + +BEGIN_PGML +Let [`f`] be a function of one variable. + +If [`[$a]`] is an [`x`]-intercept of [`f`], then this means that [`f\left(\right.`][_]{$a}{2}[`\left.\right)`] = [_]{0}{2}. + +If [`[$b]`] is the [`y`]-intercept of [`f`], then this means that [`f\left(\right.`][_]{0}{2}[`\left.\right)`] = [_]{$b}{2}. +END_PGML + +BEGIN_PGML_SOLUTION +Recall that points on the graph of [`y=f(x)`] have the form [`(x,f(x))`], where [`x`] is in the domain of [`f`]. + +- If [`[$a]`] is an [`x`]-intercept of [`f`], then the point [`([$a],0)`] is on the graph of [`y=f(x)`], and [`f([$a]) = 0`]. +- If [`[$b]`] is the [`y`]-intercept of [`f`], then the point [`(0,[$b])`] is on the graph of [`y=f(x)`], and [`f(0) = [$b]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-2-0-An-C/1-2-0-An-C-fcn-sub-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-2-0-An-C/1-2-0-An-C-fcn-sub-jms.pg new file mode 100644 index 0000000000..cd5e48bac1 --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-2-0-An-C/1-2-0-An-C-fcn-sub-jms.pg @@ -0,0 +1,69 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Functions) +## DBsection(Function notation) +## Date(3 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 9, 1)*random(-1,1,2); #coefficient +$b = random(2, 4, 1); #power +$b2 = 2*$b; +$c = non_zero_random(-9,9,1); #constant term +$num = random(2,4,1); #evaluate at +$pm = random(-1,1,2); #plus or minus 1 + +$f = Formula("sin(pi*x)+$a*x^($b)+$c")->reduce(); +Context()->variables->add(t => 'Real'); #adds a new real variable t + +$num_ans = Compute("sin(pi*($num))+$a*($num)^($b)+$c"); +$neg_ans = Compute("sin(pi*(-x))+$a*(-x)^($b)+$c"); +$sub_ans = Compute("sin(pi*(t+$pm))+$a*(t+$pm)^($b)+$c"); +$sq_ans = Compute("sin(pi*(t^2))+$a*(t)^($b2)+$c"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$f]``]. + +Evaluate the following expressions. Below, [`t`] is a variable. + +You do not need to simplify your answers, but enter exact values for all numerical answers. + +- [`f([$num])=\,`] [_]{$num_ans}{5} +- [`f(-x)=\,`][_]{$neg_ans}{20} +- [`f(t+[$pm])=\,`][_]{$sub_ans}{20} +- [`f(t^2)=\,`][_]{$sq_ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +- [``f([$num])=\sin(\pi([$num])) + [$a]([$num])^{[$b]} + [$c] = [$num_ans]``] +- [``f(-x)=[$neg_ans] = -\sin(\pi x)+[$a](-1)^{[$b]}x^{[$b]} + [$c]``] +- [``f(t+[$pm])=\sin(\pi(t+[$pm])) + [$a](t+[$pm])^{[$b]} + [$c] = [$sub_ans]``] +- [``f(t^2)=\sin(\pi(t^2)) + [$a](t^2)^{[$b]} + [$c] = [$sq_ans]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-2-0-An-C/1-2-0-An-C-mc1-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-2-0-An-C/1-2-0-An-C-mc1-jms.pg new file mode 100644 index 0000000000..c4b79c5cc7 --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-2-0-An-C/1-2-0-An-C-mc1-jms.pg @@ -0,0 +1,48 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Functions) +## DBsection(Function notation) +## Institution(University of Calgary) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2, 5, 1); #power +$b = random(-9,-3,1); #domain left endpoint +$c = random(4,10,1); #domain right endpoint +$d = random(3,9,1); #coefficient + +$radio1 = RadioButtons( + [ [ "\(f:($b,$c)\rightarrow \mathbb{R}\) given by \(f(x)=a^{$a}-$d a\) for all \(x\in ($b,$c)\)", "\(f:[$b,$c] \rightarrow \mathbb{R}\) given by \(f(x)=x^{$a}-$d x\) for all \(x\in[$b,$c]\)", "\(f:[$b,$c] \rightarrow \mathbb{R}\) given by \(f(x)=(x,x^{$a}-$d x)\) for all \(x\in[$b,$c]\)", "\(f:($b,$c) \rightarrow \mathbb{R}\) given by \(f(x^{$a})=-$d x\) for all \(x\in[$b,$c]\)" ], 'None of these' ], + "\(f:[$b,$c] \rightarrow \mathbb{R}\) given by \(f(x)=x^{$a}-$d x\) for all \(x\in[$b,$c]\)" # correct answer +); + +BEGIN_PGML +Let [`a`] be a real number. + +The subset [`\{(a,a^{[$a]}-[$d] a) : [$b] \leq a \leq [$c] \}`] of [`\mathbb{R}^2`] represents which of the following functions? + + +[_]{$radio1} +END_PGML + +$twoa = 2*$a; + +BEGIN_PGML_SOLUTION +- All of the functions have a codomain of [`\mathbb{R}`] which is consistent with this setting. +- First, replace [`a`] with [`x`] in the description of the subset so we can think in familiar terms: [`\{(x,x^{[$a]}-[$d] x) : [$b] \leq x \leq [$c] \}`]. +- The domain of the function is specified by the condition that [`[$b]\leq x \leq [$c]`] which we can rephrase by saying that [`x`] is in the closed interval [`[[$b],[$c]]`]. So the domain of [`f`] is [`[[$b],[$c]]`]. +- The image of the function is given by the second coordinate of the ordered pair [`(x,f(x)) = (x,x^{[$a]}-[$d] x)`], so [`f(x) = x^{[$a]}-[$d] x`] for all [`x\in[[$b],[$c]]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-3-1-Ap-C/1-3-1-AP-C-solve-for-theta-AT.pg b/Contrib/UCalgary/249-1-0-0-C/1-3-1-Ap-C/1-3-1-AP-C-solve-for-theta-AT.pg new file mode 100644 index 0000000000..2a52f83db6 --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-3-1-Ap-C/1-3-1-AP-C-solve-for-theta-AT.pg @@ -0,0 +1,65 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Trigonometry) +## DBchapter(Analytic trigonometry) +## DBsection(Solving trigonometric equations exactly) +## Level(6) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + 'PGchoicemacros.pl', + 'PGgraders.pl', + 'unionTables.pl' +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# TODO: +# - Have a set of equations to randomly pull from +# - Have a corresponding sets of solutions for multiple choice? (doesn't really incentivize solving the equation) +# - Or just have a box where they can enter thetas. + +# Create a matching list and use popups +$ml = new_match_list(); +$ml->rf_print_q(~~&pop_up_list_print_q); +$ml->ra_pop_up_list([ + 'No answer' => '?', + 'A' => 'A', + 'B' => 'B', + 'C' => 'C', + 'D' => 'D', +]); + +# Add correct questions and answers +$ml->qa( + '\(2\sin^2{\theta} = 1\)', + '\(\theta = \frac{\pi}{4}, \frac{3\pi}{4}, \frac{5\pi}{4}, \frac{7\pi}{4}\)', + '\(\cos^2{\theta} + \sin{\theta} = 1\)', + '\(\theta = 0,\frac{\pi}{2},\pi\)', + '\(\sec{\theta}\csc{\theta} = 2\csc{\theta}\)', + '\(\theta = \frac{\pi}{3}, \frac{5\pi}{3}\)', + '\(\tan^2{\theta} - \tan{\theta} = 0\)', + '\(\theta = 0, \frac{\pi}{4}, \pi, \frac{5\pi}{4}\)', +); +$ml->choose(4); + +BEGIN_PGML +Match the solutions, [`\theta`], with the equations that they satisfy. + +[@ ColumnMatchTable($ml) @]*** +END_PGML + +ANS(str_cmp($ml->ra_correct_ans)); +@correct = @{ $ml->ra_correct_ans() }; +$answerstring = join(', ', @correct); + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-3-1-Ap-C/1-3-1-Ap-C-eval-cos-sin-AT.pg b/Contrib/UCalgary/249-1-0-0-C/1-3-1-Ap-C/1-3-1-Ap-C-eval-cos-sin-AT.pg new file mode 100644 index 0000000000..08e6e8c3dc --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-3-1-Ap-C/1-3-1-Ap-C-eval-cos-sin-AT.pg @@ -0,0 +1,52 @@ +## DESCRIPTION +## Give a value for pi +## ENDDESCRIPTION + + +## DBsubject(Trigonometry) +## DBchapter(Trigonometric functions) +## DBsection(Sine & cosine functions - definitions, graphs, & properties) +## Level(6) +## KEYWORDS('template', 'pi') + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; +$a = random(2, 4, 1); + +Context()->variables->are(x=>"Real"); + +$f1 = Formula(sin(x)); +$f2 = Formula(cos(x)); + +#$ans1 = $f1->eval(x=>(pi/$a)); +#$ans2 = $f2->eval(x=>(pi/$a)); + +$ans1 = Compute("sin(pi/$a)"); +$ans2 = Compute("cos(pi/$a)"); + +BEGIN_PGML +Evaluate the sine and cosine of [`\frac{\pi}{[$a]}`]. + ++ [`\sin{\frac{\pi}{[$a]}} =`] [_]{$ans1} + ++ [`\cos{\frac{\pi}{[$a]}} =`] [_]{$ans2} +END_PGML + +BEGIN_PGML_SOLUTION +The solutions are: + ++ [`\sin{\frac{\pi}{[$a]}} = [$ans1]`] + ++ [`\cos{\frac{\pi}{[$a]}} = [$ans2]`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-3-2-Ap-C/1-3-2-Ap-C-exp-to-log-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-3-2-Ap-C/1-3-2-Ap-C-exp-to-log-jms.pg new file mode 100644 index 0000000000..e3fdb06636 --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-3-2-Ap-C/1-3-2-Ap-C-exp-to-log-jms.pg @@ -0,0 +1,46 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Exponential and logarithmic expressions and functions) +## DBsection(Exponential and logarithmic equations) +## Date(3 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 6, 1); #positive +$b = non_zero_random(-8,8,1); #non-zero +$log_ans = Compute("(x+$b)"); +$arg_ans = Compute("(x+$a)"); + +BEGIN_PGML +The equation [``e^{x+[$b]} = x+[$a]``] can be rewritten as the equation [`\ln \left( \right.`][_]{$arg_ans}{5}[`\left.\right) = \, `] [_]{$log_ans}{5}. +END_PGML + +BEGIN_PGML_SOLUTION +The natural logarithm and the natural exponential are inverse functions. +Therefore, for any real number [`y`] and any positive real number [`x`] we have that +[`y = \ln(x)`] if and only if [`e^y = x`] +Thus, [`e^{x+[$b]} = x+[$a]`] if and only if [`\ln([$arg_ans]) = [$log_ans]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-3-2-Ap-C/1-3-2-Ap-C-log-to-exp-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-3-2-Ap-C/1-3-2-Ap-C-log-to-exp-jms.pg new file mode 100644 index 0000000000..a87102c54f --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-3-2-Ap-C/1-3-2-Ap-C-log-to-exp-jms.pg @@ -0,0 +1,49 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Exponential and logarithmic expressions and functions) +## DBsection(Exponential and logarithmic equations) +## Date(3 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 6, 1); #positive +$b = non_zero_random(-8,8,1); #non-zero +$btimesx = Formula("$b*x")->reduce(); +$exp_ans = Compute("(x+$a)"); +$arg_ans = Compute("($b*x)"); + +BEGIN_PGML +In this problem, we will write [`\mathrm{exp}(x) = e^x`] for the natural ("base [`e`]") exponential function. + ++ The equation [`\ln(x+[$a]) = [$btimesx]`] can be rewritten as the equation [`\mathrm{exp} \left( \right.`][_]{$arg_ans}{5}[`\left.\right) = \, `] [_]{$exp_ans}{5}. +END_PGML + +BEGIN_PGML_SOLUTION +The natural logarithm and the natural exponential are inverse functions. +Therefore, for any real number [`y`] and any positive real number [`x`] we have that +[`y = \ln(x)`] if and only if [`\mathrm{exp}(y) = e^y = x`] +Thus, [`\ln(x+[$a]) = [$b]x`] if and only if [`\mathrm{exp}([$arg_ans]) = [$exp_ans]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-4-0-U-C/1-4-0-U-C-drop-down-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-4-0-U-C/1-4-0-U-C-drop-down-jms.pg new file mode 100644 index 0000000000..f8926ecc11 --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-4-0-U-C/1-4-0-U-C-drop-down-jms.pg @@ -0,0 +1,85 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + +## KEYWORDS() + +## DBsubject('') +## DBchapter('') +## DBsection('') +## Date('') +## Author('') +## Institution('University of Calgary') + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2, 9, 1) * random(-1, 1, 2); +$b = non_zero_random(-7, 7, 1); +$c = random(2,7,1); +$f = Formula("$a*x*(x-$b)^2+$c(x-$b)")->reduce(); +$g = Formula("($b*x-$a)/((x-$a)^3)")->reduce(); +$h = Formula("sqrt($c*x^2+$a*x)")->reduce(); +$k = Formula("$c*x/(sqrt(x-$a))")->reduce(); + +$ftype = 'a polynomial'; +$gtype = 'a rational function'; +$htype = 'an algebraic function'; +$ktype = 'an algebraic function'; + +$fpopup = DropDown( + [ + 'a polynomial', + 'a rational function', + 'an algebraic function' + ], + $ftype +); + +$gpopup = DropDown( + [ + 'a polynomial', + 'a rational function', + 'an algebraic function' + ], + $gtype +); + +$hpopup = DropDown( + [ + 'a polynomial', + 'a rational function', + 'an algebraic function' + ], + $htype +); + + +$kpopup = DropDown( + [ + 'a polynomial', + 'a rational function', + 'an algebraic function' + ], + $ktype +); + +BEGIN_PGML +For each of the following functions choose the best description of the type of function it is. + ++ The function [``f(x) = [$f]``] is [_]{$fpopup}. + ++ The function [``f(x) = [$h]``] is [_]{$hpopup}. + ++ The function [``f(x) = [$g]``] is [_]{$gpopup}. + ++ The function [``f(x) = [$k]``] is [_]{$kpopup}. + +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-4-0-U-C/1-4-0-U-C-drop-down-jms_1.pg b/Contrib/UCalgary/249-1-0-0-C/1-4-0-U-C/1-4-0-U-C-drop-down-jms_1.pg new file mode 100644 index 0000000000..51abd35ea9 --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-4-0-U-C/1-4-0-U-C-drop-down-jms_1.pg @@ -0,0 +1,60 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Rational equations and functions) +## DBsection(Rational functions) +## Institution(University of Calgary) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2, 9, 1) * random(-1, 1, 2); +$b = non_zero_random(-7, 7, 1); +$c = random(2,7,1); +$f = Formula("$a*x*(x-$b)^2+$c(x-$b)")->reduce(); +$g = Formula("($b*x-$a)/((x-$a)^3)")->reduce(); +$h = Formula("sqrt($c*x^2+$a*x)")->reduce(); +$k = Formula("$c*x/(sqrt(x-$a))")->reduce(); + +$ftype = 'a polynomial'; +$gtype = 'a rational function'; +$htype = 'an algebraic function'; +$ktype = 'an algebraic function'; + +sub popup { + #$type = $_[0]; # small typo using $_ to access arguments instead of @_ + $type = @_[0]; + $dd = DropDown( + [ + 'a polynomial', + 'a rational function', + 'an algebraic function' + ], + $type + ); + return $dd; +} + +BEGIN_PGML +For each of the following functions choose the best description of the type of function it is. + ++ The function [``f(x) = [$f]``] is [_]{popup($ftype)}. + ++ The function [``f(x) = [$h]``] is [_]{popup($htype)}. + ++ The function [``f(x) = [$g]``] is [_]{popup($gtype)}. + ++ The function [``f(x) = [$k]``] is [_]{popup($ktype)}. + +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-4-0-U-C/1-4-0-U-C-rational1-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-4-0-U-C/1-4-0-U-C-rational1-jms.pg new file mode 100644 index 0000000000..2850beedc2 --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-4-0-U-C/1-4-0-U-C-rational1-jms.pg @@ -0,0 +1,42 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Rational equations and functions) +## DBsection(Rational functions) +## Institution(University of Calgary) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserCheckboxList.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2, 9, 1); #positive +$b = random(1,9,2); #odd +$c = $a-1; + +$checks1 = CheckboxList( + [ "\(f(x)=\dfrac{$b x^{$a} -$c x}{x - $a}\)", "\(f(x)=\dfrac{1}{$a x + $c x^{$b}}\)", "\(f(x)=\dfrac{\sin($a x)}{\cos($b x)}\)", "\(f(x)=\dfrac{x+$b}{\sqrt{$a x + $c x^2}}\)", "\(f(x) = \dfrac{e^{$c x}}{\ln($b x)}\)" ], + ["\(f(x)=\dfrac{$b x^{$a} -$c x}{x - $a}\)", "\(f(x)=\dfrac{1}{$a x + $c x^{$b}}\)"], # correct answers + separator => $BRBR +); + +BEGIN_PGML +Select all functions below that are *rational functions*. + +[_]{$checks1} +END_PGML + +BEGIN_PGML_SOLUTION +- A rational function is a ratio of two polynomials (sums and differences of powers of [`x`]), so a rational function cannot involve roots, logarithms, exponentials, nor trigonometric functions. +- For example, [`f(x)=\dfrac{[$b] x^{[$a]} -[$c] x}{x - [$a]}`] is a ratio of the two polynomails [`[$b] x^{[$a]} -[$c] x`] and [`x - [$a]`], so [`f`] is a rational function. +- On the other hand, [`f(x)=\dfrac{x+[$b]}{\sqrt{[$a] x + [$c] x^2}}`] is not a rational function (it is called an *algebraic function*) because the denominator [`\sqrt{[$a] x + [$c] x^2}`] is not a polynomail (because of the square root). +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-6-0-U-C/1-6-0-U-C-alg-dom-dg.pg b/Contrib/UCalgary/249-1-0-0-C/1-6-0-U-C/1-6-0-U-C-alg-dom-dg.pg new file mode 100644 index 0000000000..38709f08a0 --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-6-0-U-C/1-6-0-U-C-alg-dom-dg.pg @@ -0,0 +1,48 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Functions) +## DBsection(Domain and range) +## Institution(University of Calgary) +## Author(Danny Glin) +## Level(2) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context("Interval"); + +$a = random(2, 9, 1); + +$f = Formula("sqrt(x^2-$a*x)")->reduce(); + +#$domain = Compute("(-inf,0)U($a,inf)"); +$domain = Compute("(-inf,0]U[$a,inf)"); # Made a small change here. - Aiden + +BEGIN_PGML +Find the domain of the function [`f(x)=[$f]`]. + +Enter your answer using interval notation and the union symbol, if needed. + +The domain is [_]{$domain}{20}[@helpLink('intervals')@]* +END_PGML + +BEGIN_PGML_SOLUTION +The domain of an algebraic function is the set of all [`x`] for which the function is defined (that is, "the formula for [`f`] makes sense"). + +We need to solve [`x^2-[$a]x \ge 0`] in order for the square root to be defined. Factoring, we see that this is equivalent to [`x(x-[$a]) \ge 0`], so either both factors need to be positive or both terms need to be negative, which gives [`x\le 0`] or [`x\ge [$a]`]. Therefore, the domain of [`f`] written in interval notation is [`[$domain]`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-1-0-0-C/1-6-0-U-C/1-6-0-U-C-rational-dom-jms.pg b/Contrib/UCalgary/249-1-0-0-C/1-6-0-U-C/1-6-0-U-C-rational-dom-jms.pg new file mode 100644 index 0000000000..8ae6908b32 --- /dev/null +++ b/Contrib/UCalgary/249-1-0-0-C/1-6-0-U-C/1-6-0-U-C-rational-dom-jms.pg @@ -0,0 +1,53 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Rational equations and functions) +## DBsection(Rational functions) +## Date(30 January 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) +## KEYWORDS(rational function, domain, interval) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context("Interval"); + +$a = random(2, 5, 1); # root in denominator, coefficient in numerator +$b = non_zero_random(-6,6,1); # constatn term in numerator +$ap2 = $a+2; # second root in denominator (dinstinct) +$lin = -$a-$ap2; #linear term +$con = $a*$ap2; # constant term + +$f = Formula("($a x + $b)/(x**2+$lin x + $con)")->reduce(); + +$domain = Compute("(-inf,$a)U($a,$ap2)U($ap2,inf)"); + +BEGIN_PGML +Find the domain of the rational function [``f(x)=[$f]``]. + +Give your answer using interval notation and the union symbol, if needed. + +The domain of [`f`] is [_]{$domain}{20}[@helpLink('intervals')@]* +END_PGML + +BEGIN_PGML_SOLUTION +The domain of a rational function is the set of all [`x`] so that the denominator is nonzero. We we need to solve [`x^2+[$lin] x + [$con]=0`] to find which values of [`x`] to exclude from the domain of [`f`]. +First factor the denominator [```0=x^2+[$lin] x + [$con] = (x-[$a])(x-[$ap2]),```] +so [`x=[$a]`] and [`x=[$ap2]`] are the roots of the denominator and cannot be included in the domain. Therefore, the domain of [`f`] written in interval notation is [`[$domain]`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-10-0-0-I/10-0-1-R-I/10-0-1-R-I-state-mvt-jms.pg b/Contrib/UCalgary/249-10-0-0-I/10-0-1-R-I/10-0-1-R-I-state-mvt-jms.pg new file mode 100644 index 0000000000..21717df622 --- /dev/null +++ b/Contrib/UCalgary/249-10-0-0-I/10-0-1-R-I/10-0-1-R-I-state-mvt-jms.pg @@ -0,0 +1,62 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Mean value theorem) +## Date(2 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(-5,5,1); +$b = $a + random(2,4,1); + +$quant = DropDown( + [ + 'for all', + 'for some' + ], + 'for some' +); + +$cont = DropDown( + [ + 'continuous', + 'differentiable', + 'constant' + ], + 'continuous' +); + + +$diff = DropDown( + [ + 'continuous', + 'differentiable', + 'constant' + ], + 'differentiable' +); + + +BEGIN_PGML +Complete the following statement of the **Mean Value Theoem** for the function [`f`] on the interval [`[[$a],[$b]].`] + +If [`f`] is [_]{$cont} on the closed interval [`[[$a],[$b]]`] and [`f`] is [_]{$diff} on the open interval [`([$a],[$b]),`] then [`f\left( \right.`][_]{$b}{2} [`\left.\right) - f\left( \right.`][_]{$a}{2} [`\left.\right) = f'(c)\left([$b]\right. - `][_]{$a}{2}[`\left.\right),`] [_]{$quant} [`c`] in the open interval [`([$a],[$b]).`] + +END_PGML + + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-10-0-0-I/10-0-1-R-I/10-0-1-R-I-state-mvt-spec-jms.pg b/Contrib/UCalgary/249-10-0-0-I/10-0-1-R-I/10-0-1-R-I-state-mvt-spec-jms.pg new file mode 100644 index 0000000000..29949105ac --- /dev/null +++ b/Contrib/UCalgary/249-10-0-0-I/10-0-1-R-I/10-0-1-R-I-state-mvt-spec-jms.pg @@ -0,0 +1,74 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Mean value theorem) +## Date(2 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(-5,5,1); +$b = $a + random(2,4,1); + +$c = non_zero_random(-3,3,1); +$d = random(-2,2,1); + +$g = Formula("x^2 + $c*x+$d")->reduce(); + +$gb = Compute("($b)^2 + $c*$b+$d"); +$ga = Compute("($a)^2 + $c*$a+$d"); + +$ans = Compute("($gb - $ga)/($b-$a)"); + +$quant = DropDown( + [ + 'for any number', + 'there exists a number' + ], + 'there exists a number' +); + +$cont = DropDown( + [ + 'continuous', + 'differentiable', + 'constant' + ], + 'continuous' +); + + +$diff = DropDown( + [ + 'continuous', + 'differentiable', + 'constant' + ], + 'differentiable' +); + + +BEGIN_PGML +Complete the following statement of the **Mean Value Theoem** for the function [`g(x) = [$g]`] on the interval [`[[$a],[$b]].`] + +Since [`g`] is [_]{$cont} on the closed interval [`[[$a],[$b]]`] and [`g`] is [_]{$diff} on the open interval [`([$a],[$b]),`] the Mean Value Theorem guarantees that [_]{$quant} [`c`] in the open interval [`([$a],[$b])`] we have [`g'(c) = \,`] [_]{$ans}{10} (the value of this blank should be a number). +END_PGML + +BEGIN_PGML_SOLUTION +Mean Value Theorem guarantees that [```g'(c) = \frac{g([$b]) - g([$a])}{[$b]-[$a]} = \frac{[$gb]-([$ga])}{[$b]-[$a]} = [$ans]```] for some [`c \in ([$a],[$b]).`] +END_PGML_SOLUTION + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-10-0-0-I/10-0-2-U-C/10-0-2-U-C-mvt-meaning-1-jms.pg b/Contrib/UCalgary/249-10-0-0-I/10-0-2-U-C/10-0-2-U-C-mvt-meaning-1-jms.pg new file mode 100644 index 0000000000..fc79ae1573 --- /dev/null +++ b/Contrib/UCalgary/249-10-0-0-I/10-0-2-U-C/10-0-2-U-C-mvt-meaning-1-jms.pg @@ -0,0 +1,76 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Rates of change - engineering and physics) +## Date(3 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(0,5,1); +$b = $a + random(2,5,1); +$bminusa = $b - $a; +$fa = non_zero_random(1,9,1); +$fb = $fa + random(5,20,1); +$fbminusfa = $fb-$fa; +$avg = Compute("($fb-$fa)/($b-$a)"); + + +$equal = DropDown( + [ + 'less than', + 'equal to', + 'greater than' + ], + 'equal to' +); + +$quant = DropDown( + [ + 'for all', + 'for at least one', + 'for no' + ], + 'for at least one' +); + + +BEGIN_PGML +Suppose that the concentration of a single chemical product [`A`] in a reversible chemical reaction [``X + Y \rightleftharpoons A``] is given by a differentiable function [``[A] = f(t)``], where [`t\geq 0`] is time measured in seconds and the concentration of [`A`] is measured in moles per litre (mol/L). The rate of the chemical reaction is the change in concentration of [`A`] with respect to time, measured in mol/L per second. + +You take samples and measure the concentration of [`A`] at various times during the reaction to try to understand the function [`f`]. Suppose that the concentration at time [`t=[$a]`] is [`[A]_{t=[$a]} = f([$a]) = [$fa],`] and suppose that the concentration at time [`t=[$b]`] is [`[A]_{t=[$b]} = f([$b]) = [$fb].`] + ++ The average reaction rate, over the time interval [`[[$a],[$b]]`] is equal to [_]{$avg}{10} (mol/L) per second. + ++ By the Mean Value Theorem, the instantaneous reaction rate [``\frac{d[A]}{dt} = f'(t)``] must be [_]{$equal} [_]{$avg}{10} (mol/L) per second [_]{$quant} point(s) in time in the interval [`([$a],[$b]).`] + +END_PGML + +BEGIN_PGML_SOLUTION +The average reaction rate, over the time interval [`[[$a],[$b]]`] is equal to [``\frac{f([$b])-f([$a])}{[$b]-[$a]} = \frac{[$fb]-[$fa]}{[$bminusa]} = \frac{[$fbminusfa]}{[$bminusa]}``] (mol/L) per second. + +By the Mean Value Theorem, the instantaneous reaction rate [``\frac{d[A]}{dt} = f'(t)``] must be **equal to** the average rate of change, [``\frac{[$fbminusfa]}{[$bminusa]}``] (mol/L) per second, **for at least one point** in time in the interval [`([$a],[$b]).`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-10-0-0-I/10-0-2-U-C/10-0-2-U-C-mvt-meaning-2-jms.pg b/Contrib/UCalgary/249-10-0-0-I/10-0-2-U-C/10-0-2-U-C-mvt-meaning-2-jms.pg new file mode 100644 index 0000000000..aa7854feb4 --- /dev/null +++ b/Contrib/UCalgary/249-10-0-0-I/10-0-2-U-C/10-0-2-U-C-mvt-meaning-2-jms.pg @@ -0,0 +1,86 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Mean value theorem) +## Date(3 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(0,5,1); +$b = $a + random(2,5,1); +$bminusa = $b - $a; +$fa = non_zero_random(1,9,1); +$fb = $fa + random(5,20,1); +$fbminusfa = $fb-$fa; +$avg = Compute("($fb-$fa)/($b-$a)"); + + +$average = DropDown( + [ + 'average velocity', + 'average acceleration', + 'instantaneous velocity', + 'instantaneous acceleration' + ], + 'average velocity' +); + +$instant = DropDown( + [ + 'average velocity', + 'average acceleration', + 'instantaneous velocity', + 'instantaneous acceleration' + ], + 'instantaneous velocity' +); + + +$quant = DropDown( + [ + 'for all', + 'for at least one', + 'for no' + ], + 'for at least one' +); + + +BEGIN_PGML +The position of a satellite in near Earth orbit is given by a differentiable function [`s=s(t),`] where [`t\geq 0`] is measured in seconds and the postion is measured in kilometres. An observer on the International Space Station is able to precisely measure the position of the satellite using laser-based optical and radar-based instruments. Suppose that the position at time [`t=[$a]`] is [`s([$a]) = [$fa] \, \rm{km},`] and suppose that the position at time [`t=[$b]`] is [`s([$b]) = [$fb] \, \rm{km}.`] + ++ With the information given, we can compute that the [_]{$average} of the satellite over the time interval [`[[$a],[$b]]`] is equal to [_]{$avg}{10} kilometres per second. + ++ By the Mean Value Theorem, the [_]{$instant} of the satellite must be equal to [_]{$avg}{10} kilometres per second [_]{$quant} point(s) in time in the interval [`([$a],[$b]).`] + +END_PGML + +BEGIN_PGML_SOLUTION +The **average velocity** of the satellite over the time interval [`[[$a],[$b]]`] is equal to [``\frac{s([$b])-s([$a])}{[$b]-[$a]}= \frac{[$fb]-[$fa]}{[$bminusa]} =\frac{[$fbminusfa]}{[$bminusa]}``] kilometres per second. + +By the Mean Value Theorem, the **instantaneous velocity** of the satellite must be equal to the average velocity, [``\frac{[$fbminusfa]}{[$bminusa]}``] kilometres per second, **for at least one point** in time in the interval [`([$a],[$b]).`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-10-0-0-I/10-0-2-U-C/10-0-2-U-C-mvt-meaning-3-jms.pg b/Contrib/UCalgary/249-10-0-0-I/10-0-2-U-C/10-0-2-U-C-mvt-meaning-3-jms.pg new file mode 100644 index 0000000000..2d287be7d4 --- /dev/null +++ b/Contrib/UCalgary/249-10-0-0-I/10-0-2-U-C/10-0-2-U-C-mvt-meaning-3-jms.pg @@ -0,0 +1,88 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Mean value theorem) +## Date(3 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-5,5,1); +$b = $a + random(2,7,1); +$bminusa = $b - $a; +$fa = non_zero_random(-20,20,1); +$fb = non_zero_random(-20,20,1); +$fbminusfa = $fb-$fa; +$avg = Compute("($fb-$fa)/($b-$a)"); + +$secant = DropDown( + [ + 'secant line', + 'tangent line', + 'vertical asymptote', + 'instantaneous acceleration' + ], + 'secant line' +); + +$tangent = DropDown( + [ + 'secant line', + 'tangent line', + 'vertical asymptote', + 'instantaneous acceleration' + ], + 'tangent line' +); + + +$quant = DropDown( + [ + 'for all', + 'for at least one', + ], + 'for at least one' +); + + +BEGIN_PGML +Let [`g`] be a differentiable function that is defined for all [`x \in \mathbb{R}.`] Suppose that the points [`([$a],[$fa])`] and [`([$b],[$fb])`] are both on the graph of [`y=g(x).`] + ++ Since these points are on the graph of [`y=g(x),`] we have [`g([$a]) = \,`] [_]{$fa}{5} and [`g([$b]) = \,`] [_]{$fb}{5}. + ++ The slope of the [_]{$secant} joining the points [`([$a],[$fa])`] and [`([$b],[$fb])`] is equal to [_]{$avg}{10}. + ++ By the Mean Value Theorem, the slope of the [_]{$tangent} to [`y=g(x)`] is equal to [_]{$avg}{10} [_]{$quant} point(s) in in the interval [`([$a],[$b]).`] + +END_PGML + +BEGIN_PGML_SOLUTION ++ Since [`([$a],[$fa])`] and [`([$b],[$fb])`] are on the graph of [`y=g(x),`] we have [`g([$a]) = [$fa]`] and [`g([$b]) = [$fb].`] + ++ The slope of the **secant line** joining the points [`([$a],[$fa])`] and [`([$b],[$fb])`] is equal to [``\frac{g([$b]) - g([$a])}{[$b]-[$a]} = \frac{[$fbminusfa]}{[$bminusa]}.``] + ++ By the Mean Value Theorem, the slope of the **tangent line** to [`y=g(x)`] is equal to the slope of the secant line joining [`([$a],[$fa]),`] which is [``\frac{[$fbminusfa]}{[$bminusa]},``] for at least one point(s) in in the interval [`([$a],[$b]).`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-10-0-0-I/10-0-2-U-C/10-0-2-U-C-mvt-meaning-4-jms.pg b/Contrib/UCalgary/249-10-0-0-I/10-0-2-U-C/10-0-2-U-C-mvt-meaning-4-jms.pg new file mode 100644 index 0000000000..0732411930 --- /dev/null +++ b/Contrib/UCalgary/249-10-0-0-I/10-0-2-U-C/10-0-2-U-C-mvt-meaning-4-jms.pg @@ -0,0 +1,78 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Mean value theorem) +## Date(3 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-5,5,1); +$b = $a + random(2,7,1); +$bminusa = $b - $a; +$fa = non_zero_random(-20,20,1); +$m_num = non_zero_random(-5,5,1); +$m_den = random(2,5,1); +$m = ($m_num)/($m_den); +$fb = Compute("$m*$bminusa + $fa"); +$fbminusfa = $fb-$fa; +$secant_eq = Formula("$m*(x-$a) + $fa")->reduce(); + +Context("Interval"); +$int = Compute("($a,$b)"); + +$parallel = DropDown( + [ + 'equal', + 'parallel', + 'perpendicular', + ], + 'parallel' +); + + +BEGIN_PGML +Let [`f`] be a differentiable function that is defined for all [`x \in \mathbb{R}.`] + +Suppose that the point [`([$a],[$fa])`] is on the graph of [`y=f(x),`] and suppose that the slope of the secant line joining the points [`([$a],f([$a]))`] and [`([$b], f([$b]))`] is equal to [``\frac{[$m_num]}{[$m_den]}.``] + ++ With the information given, we can determine that [`f([$a]) = \,`] [_]{$fa}{5} and [`f([$b]) = \,`] [_]{$fb}{5}. + ++ The equation of the secant line joining the points [`([$a],f([$a]))`] and [`([$b], f([$b]))`] is equal to [_]{$secant_eq}{20}. + ++ By the Mean Value Theorem, the slope of the tangent line to [`y=f(x)`] is equal to [``\frac{[$m_num]}{[$m_den]}``] for at least one point in in the open interval [_]{$int}{10}, and at such a point the tangent line is [_]{$parallel} to the secant line joining the points [`([$a],f([$a]))`] and [`([$b], f([$b])).`] + +END_PGML + +BEGIN_PGML_SOLUTION ++ Since the point [`([$a],[$fa])`] is on the graph of [`f`], we have that [`f([$a]) = [$fa]`] and to find [`f([$b])`] we first need to find the equation of the secant line. + ++ The equation of the secant line joining the points [`([$a],f([$a]))`] and [`([$b], f([$b]))`] is equal to [`[$secant_eq]`] because the slope of the line is [`\frac{[$m_num]}{[$m_den]}=[$m]`] and the point [`([$a],[$fa])`] is on the line. + ++ We can now determine that [`f([$b]) = [$m]([$b]-[$a]) + [$fa] = [$fb]`] since the point [`([$b], f([$b]))`] is on the graph of [`y=f(x)`] and it is also on the secant line joining the points [`([$a],f([$a]))`] and [`([$b], f([$b])).`] + ++ By the Mean Value Theorem, the slope of the tangent line to [`y=f(x)`] is equal to [``\frac{[$m_num]}{[$m_den]}``] for at least one point in in the open interval [`[$int],`] and at such a point the tangent line is **parallel** to the secant line joining the points [`([$a],f([$a]))`] and [`([$b], f([$b])).`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-10-0-0-I/10-1-1-Ap-C/10-1-1-Ap-C-mvt-big-small-1-jms.pg b/Contrib/UCalgary/249-10-0-0-I/10-1-1-Ap-C/10-1-1-Ap-C-mvt-big-small-1-jms.pg new file mode 100644 index 0000000000..142f8a9e33 --- /dev/null +++ b/Contrib/UCalgary/249-10-0-0-I/10-1-1-Ap-C/10-1-1-Ap-C-mvt-big-small-1-jms.pg @@ -0,0 +1,79 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Mean value theorem) +## Date(2 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-5,5,1); +$b = $a + random(2,5,1); +$bminusa = $b - $a; +$fb = non_zero_random(-9,9,1); +$l = non_zero_random(-2,3,1); +$u = $l + random(3,4,1); +$lbma = $l*$bminusa; +$ubma = $u*$bminusa; +$fal = Compute("$fb-$u*($b-$a)"); +$fau = Compute("$fb-$l*($b-$a)"); + +#version largest / smallest +$ver = random(-1,1,2); +if($ver == -1) +{ +$bigsmall = 'smallest'; +$ans = $fal; +$f = Compute("$u(x-$b)+$fb"); +$fans = Formula("$u(x-$b)+$fb")->reduce(); +} +else +{$bigsmall = 'largest'; +$ans = $fau; +$f = Compute("$l(x-$b)+$fb"); +$fans = Formula("$l(x-$b)+$fb")->reduce(); +} + +BEGIN_PGML +Let [`f`] be a differentiable function with [`f([$b]) = [$fb],`] and suppose that [`[$l] \leq f'(x) \leq [$u]`] for all [`x`] in the interval [`([$a],[$b]).`] + +This information and the Mean Value Theorem allows us to determine that [$bigsmall] possible value of [`f([$a])`] is equal to [_]{$ans}{5}. + +The function [`f(x) = \, `] [_]{$f}{20} satisfies the above properties and achieves the [$bigsmall] possible value of [`f([$a]).`] +END_PGML + +BEGIN_PGML_SOLUTION +Since [`f`] is differentiable, we know that [`f`] is differentiable on [`([$a],[$b])`] and [`f`] is continuous on [`[[$a],[$b]].`] We can therefore apply the Mean Value Theorem, which states that for some [`c \in ([$a],[$b])`] we have +[``` f'(c) = \frac{f([$b]) - f([$a])}{[$b]-[$a]} = \frac{[$fb] - f([$a])}{[$bminusa]}.```] +By assumption [`[$l] \leq f'(c) \leq [$u]`], so we can rearrange the inequality +[```[$l] \leq \frac{[$fb] - f([$a])}{[$bminusa]} \leq [$u]```] +to get that +[```[$l]([$bminusa]) \leq [$fb] - f([$a]) \leq [$u]([$bminusa]) \qquad \Longrightarrow \qquad [$lbma] - [$fb] \leq -f([$a]) \leq [$ubma] - [$fb],```] +which after multiplying the inequality by [`(-1)`] becomes: +[``` [$fal] \leq f([$a]) \leq [$fau].```] +Therefore, the [$bigsmall] possible value of [`f([$a])`] is [`[$ans].`] + +The linear function [`f(x) = [$fans]`] is the unique function that satisfies the above properties and achieves the [$bigsmall] possible value of [`f([$a]).`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-10-0-0-I/10-1-1-Ap-C/10-1-1-Ap-C-mvt-big-small-2-jms.pg b/Contrib/UCalgary/249-10-0-0-I/10-1-1-Ap-C/10-1-1-Ap-C-mvt-big-small-2-jms.pg new file mode 100644 index 0000000000..fc0db3a961 --- /dev/null +++ b/Contrib/UCalgary/249-10-0-0-I/10-1-1-Ap-C/10-1-1-Ap-C-mvt-big-small-2-jms.pg @@ -0,0 +1,80 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Mean value theorem) +## Date(2 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-5,5,1); +$b = $a + random(2,4,1); +$bminusa = $b - $a; +$fa = non_zero_random(-9,9,1); +$l = non_zero_random(-2,3,1); +$u = $l + random(3,5,1); +$lbma = $l*$bminusa; +$ubma = $u*$bminusa; +$fbl = Compute("$l*($b-$a)+$fa"); +$fbu = Compute("$u*($b-$a)+$fa"); + + +#version largest / smallest +$ver = random(-1,1,2); +if($ver == -1) +{ +$bigsmall = 'smallest'; +$ans = $fbl; +$f = Compute("$l*(x-$a)+$fa"); +$fans = Formula("$l*(x-$a)+$fa")->reduce(); +} +else +{$bigsmall = 'largest'; +$ans = $fbu; +$f = Compute("$u*(x-$a)+$fa"); +$fans = Formula("$u*(x-$a)+$fa")->reduce(); +} + +BEGIN_PGML +Let [`f`] be a differentiable function with [`f([$a]) = [$fa],`] and suppose that [`[$l] \leq f'(x) \leq [$u]`] for all [`x`] in the interval [`([$a],[$b]).`] + +This information and the Mean Value Theorem allows us to determine that the [$bigsmall] possible value of [`f([$b])`] is equal to [_]{$ans}{5}. + +The function [`f(x) = \, `] [_]{$f}{20} satisfies the above properties and achieves the [$bigsmall] possible value of [`f([$b]).`] +END_PGML + +BEGIN_PGML_SOLUTION +Since [`f`] is differentiable, we know that [`f`] is differentiable on [`([$a],[$b])`] and [`f`] is continuous on [`[[$a],[$b]].`] We can therefore apply the Mean Value Theorem, which states that for some [`c \in ([$a],[$b])`] we have +[``` f'(c) = \frac{f([$b]) - f([$a])}{[$b]-[$a]} = \frac{f([$b]) - [$fa]}{[$bminusa]}.```] +By assumption [`[$l] \leq f'(c) \leq [$u]`], so we can rearrange the inequality +[```[$l] \leq \frac{f([$b]) - [$fa]}{[$bminusa]} \leq [$u]```] +to get that +[```[$l]([$bminusa]) \leq f([$b]) - [$fa] \leq [$u]([$bminusa]) \qquad \Longrightarrow \qquad [$lbma] + [$fa] \leq f([$b]) \leq [$ubma] + [$fa],```] +which we can simplify to: +[``` [$fbl] \leq f([$b]) \leq [$fbu].```] +Therefore, the [$bigsmall] possible value of [`f([$b])`] is [`[$ans].`] + +The linear function [`f(x) = [$fans]`] is the unique function that satisfies the above properties and achieves the [$bigsmall] possible value of [`f([$b]).`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-10-0-0-I/10-1-1-Ap-C/10-1-1-Ap-C-mvt-upper-lower-1-jms.pg b/Contrib/UCalgary/249-10-0-0-I/10-1-1-Ap-C/10-1-1-Ap-C-mvt-upper-lower-1-jms.pg new file mode 100644 index 0000000000..4f6ef55628 --- /dev/null +++ b/Contrib/UCalgary/249-10-0-0-I/10-1-1-Ap-C/10-1-1-Ap-C-mvt-upper-lower-1-jms.pg @@ -0,0 +1,69 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Mean value theorem) +## Date(2 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-5,5,1); +$b = $a + random(2,4,1); +$bminusa = $b - $a; +$fb = non_zero_random(-9,9,1); +$l = non_zero_random(-2,3,1); +$u = $l + random(3,4,1); +$lbma = $l*$bminusa; +$ubma = $u*$bminusa; +$fal = Compute("$fb-$u*($b-$a)"); +$fau = Compute("$fb-$l*($b-$a)"); + +$popup = DropDown( + [ + 'Extreme Value Theorem', + 'Intermediate Value Theorem', + 'Mean Value Theorem' + ], + 'Mean Value Theorem' +); + + +BEGIN_PGML +Let [`f`] be a differentiable function with [`f([$b]) = [$fb],`] and suppose that [`[$l] \leq f'(x) \leq [$u]`] for all [`x`] in the interval [`([$a],[$b]).`] + +This information and the [_]{$popup} allows us to determine that [_]{$fal}{2} [` \leq f([$a]) \leq `] [_]{$fau}{2}. +END_PGML + +BEGIN_PGML_SOLUTION +Since [`f`] is differentiable, we know that [`f`] is differentiable on [`([$a],[$b])`] and [`f`] is continuous on [`[[$a],[$b]].`] We can therefore apply the Mean Value Theorem, which states that for some [`c \in ([$a],[$b])`] we have +[``` f'(c) = \frac{f([$b]) - f([$a])}{[$b]-[$a]} = \frac{[$fb] - f([$a])}{[$bminusa]}.```] +By assumption [`[$l] \leq f'(c) \leq [$u]`], so we can rearrange the inequality +[```[$l] \leq \frac{[$fb] - f([$a])}{[$bminusa]} \leq [$u]```] +to get that +[```[$l]([$bminusa]) \leq [$fb] - f([$a]) \leq [$u]([$bminusa]) \qquad \Longrightarrow \qquad [$lbma] - [$fb] \leq -f([$a]) \leq [$ubma] - [$fb],```] +which after multiplying the inequality by [`(-1)`] becomes: +[``` [$fal] \leq f([$a]) \leq [$fau].```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-10-0-0-I/10-1-1-Ap-C/10-1-1-Ap-C-mvt-upper-lower-2-jms.pg b/Contrib/UCalgary/249-10-0-0-I/10-1-1-Ap-C/10-1-1-Ap-C-mvt-upper-lower-2-jms.pg new file mode 100644 index 0000000000..9ca180c5f4 --- /dev/null +++ b/Contrib/UCalgary/249-10-0-0-I/10-1-1-Ap-C/10-1-1-Ap-C-mvt-upper-lower-2-jms.pg @@ -0,0 +1,70 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Mean value theorem) +## Date(2 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-5,5,1); +$b = $a + random(2,4,1); +$bminusa = $b - $a; +$fa = non_zero_random(-9,9,1); +$l = non_zero_random(-2,3,1); +$u = $l + random(3,5,1); +$lbma = $l*$bminusa; +$ubma = $u*$bminusa; +$fbl = Compute("$l*($b-$a)+$fa"); +$fbu = Compute("$u*($b-$a)+$fa"); + + +$popup = DropDown( + [ + 'Extreme Value Theorem', + 'Intermediate Value Theorem', + 'Mean Value Theorem' + ], + 'Mean Value Theorem' +); + + +BEGIN_PGML +Let [`f`] be a differentiable function with [`f([$a]) = [$fa],`] and suppose that [`[$l] \leq f'(x) \leq [$u]`] for all [`x`] in the interval [`([$a],[$b]).`] + +This information and the [_]{$popup} allows us to determine that [_]{$fbl}{5}[`\, \leq f([$b]) \leq\, `] [_]{$fbu}{5}. +END_PGML + +BEGIN_PGML_SOLUTION +Since [`f`] is differentiable, we know that [`f`] is differentiable on [`([$a],[$b])`] and [`f`] is continuous on [`[[$a],[$b]].`] We can therefore apply the Mean Value Theorem, which states that for some [`c \in ([$a],[$b])`] we have +[``` f'(c) = \frac{f([$b]) - f([$a])}{[$b]-[$a]} = \frac{f([$b]) - [$fa]}{[$bminusa]}.```] +By assumption [`[$l] \leq f'(c) \leq [$u]`], so we can rearrange the inequality +[```[$l] \leq \frac{f([$b]) - [$fa]}{[$bminusa]} \leq [$u]```] +to get that +[```[$l]([$bminusa]) \leq f([$b]) - [$fa] \leq [$u]([$bminusa]) \qquad \Longrightarrow \qquad [$lbma] + [$fa] \leq f([$b]) \leq [$ubma] + [$fa],```] +which we can simplify to: +[``` [$fbl] \leq f([$b]) \leq [$fbu].```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-10-0-0-I/10-1-2-Ap-C/10-1-2-Ap-C-mvt-solar-jms.pg b/Contrib/UCalgary/249-10-0-0-I/10-1-2-Ap-C/10-1-2-Ap-C-mvt-solar-jms.pg new file mode 100644 index 0000000000..c9effd32a1 --- /dev/null +++ b/Contrib/UCalgary/249-10-0-0-I/10-1-2-Ap-C/10-1-2-Ap-C-mvt-solar-jms.pg @@ -0,0 +1,94 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Rates of change - general) +## Date(3 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.001, tolType => 'absolute'); + +$limit = 91.332; +$distance = random(30,50,1); #distance in km +$time = floor(60*$distance/$limit) + non_zero_random(-5,5,5); #time in minutes +$avg = Compute("($distance)/($time/60)"); #average speed in km/h + +$mvt = DropDown( + [ + 'The Extreme Value Theorem', + 'The Intermediate Value Theorem', + 'The Mean Value Theorem', + 'The Fundamental Theorem of Calculus' + ], + 'The Mean Value Theorem' +); + +if($avg > $limit) +{$yn = 'Yes';} +else +{$yn = 'There is not enough information to decide';} + +$popup_yn = DropDown( + [ + 'Yes', + 'No', + 'There is not enough information to decide' + ], + $yn +); + + + +BEGIN_PGML +A team of engineers is attemping to build a new solar-powered vehicle that would break the land speed record for a solar-powered car. In a recent test, the vehicle travelled [`[$distance]\, \rm{km}`] in [`[$time]`] minutes. + ++ The average speed of the test vechicle in kilometres per hour was [_]{$avg}{5} [`\rm{km/h}.`] + +According to Wikipedia, as of 2014 the land speed record for a solar powerd car is [`[$limit] \, \rm{km/h}.`] + ++ Did the test vehicle break land speed record for a solar car at any point during the test? + + [_]{$popup_yn} + ++ Which theorem from calculus is the most relevant to answering the previous question? + + [_]{$mvt} + +END_PGML + +BEGIN_PGML_SOLUTION ++ Fist convert the time to hours: [``[$time] \, \rm{min} = \frac{[$time]}{60} \, \rm{h}.``] The average speed of the test vehichle was [``\frac{[$distance] \, \rm{km}}{[$time]/60 \, \rm{h}} = [$avg] \, \rm{km/h}.``] + ++ We can now attempt to apply the **Mean Value Theorem** to determine if the team's new vehicle broke the landspeed record at any point during the test. + + The Mean Value Theorem tells us that the vehicle's instantaneous velocity was equal to its average velocity of [``[$avg] \, \rm{km/h}``] at one or more points in time during the test. + + The solar-powered land speed record as of 2014 was [`[$limit] \, \rm{km/h}.`] + + + If the average velocity of the test vehicle was higher than the landspeed record, then we know that the test vehicle broke the solar-powered land speed record. + + + If the average velocity of the test vehicle was lower than the solar-powered land speed record, then we do not know if the test vehicle broke the record speed. It could be that the record was broken, but the vehicle travelled for a long time well below the record speed making the average speed over the course of the test much lower than the record speed. + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-10-0-0-I/10-1-2-Ap-C/10-1-2-Ap-C-mvt-sound-jms.pg b/Contrib/UCalgary/249-10-0-0-I/10-1-2-Ap-C/10-1-2-Ap-C-mvt-sound-jms.pg new file mode 100644 index 0000000000..58e4f92d6b --- /dev/null +++ b/Contrib/UCalgary/249-10-0-0-I/10-1-2-Ap-C/10-1-2-Ap-C-mvt-sound-jms.pg @@ -0,0 +1,96 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Rates of change - general) +## Date(3 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.001, tolType => 'absolute'); + +$limit = 343; +$distance = random(700,900,5); #distance in km +$time = floor((1000*$distance)/(60*$limit)) + non_zero_random(-10,10,5); #time in minutes +$avg = Compute("(1000*$distance)/(60*$time)"); #average velocity in m/s +$second = $time*60; #time in seconds +$metres = $distance*1000; #distance in metres + +$mvt = DropDown( + [ + 'The Extreme Value Theorem', + 'The Intermediate Value Theorem', + 'The Mean Value Theorem', + 'The Fundamental Theorem of Calculus' + ], + 'The Mean Value Theorem' +); + +if($avg > $limit) +{$yn = 'Yes';} +else +{$yn = 'There is not enough information to decide';} + +$popup_yn = DropDown( + [ + 'Yes', + 'No', + 'There is not enough information to decide' + ], + $yn +); + + + +BEGIN_PGML +A team of engineers is attemping to build a new supersonic (faster than sound) passenger aircraft. In a recent test, the prototype plane travelled [`[$distance]\, \rm{km}`] in [`[$time]`] minutes, based on radar measurements from the airport's air traffic control tower. + ++ The average speed of the prototype plane during the test, in **metres per second**, was [_]{$avg}{5} [`\rm{m/s}.`] + +The speed of sound in air is approximately [`[$limit] \, \rm{m/s}.`] + ++ Did the prototype plane break the sound barrier (travel faster than the speed of sound) at any point during the test? + + [_]{$popup_yn} + ++ Which theorem from calculus is the most relevant to answering the previous question? + + [_]{$mvt} + +END_PGML + +BEGIN_PGML_SOLUTION ++ First convert the time to seconds: [``[$time] \, \rm{min} = 60\, \rm{s/min} \times [$time]\, \rm{min} = [$second]\, \rm{s},``] and convert the distance travelled to metres: [``[$distance] \, \rm{km} = 1000 \rm{m/km} \times [$distance] \, \rm{km} = [$metres] \, \rm{m}.``] The average speed of the prototype plane was [``\frac{[$metres] \, \rm{m}}{[$second] \, \rm{s}} = [$avg] \, \rm{m/s}.``] + ++ We can now attempt to apply the **Mean Value Theorem** to determine if the prototype broke the sound barrier at any point during the test. + + The Mean Value Theorem tells us that the prototype's instantaneous velocity was equal to its average velocity of [``[$avg] \, \rm{m/s}``] at one or more points in time during the test. + + The speed of sound in air is approximately [`[$limit] \, \rm{m/s}.`] + + + If the prototype's average velocity is higher than the speed of sound, then we know that the test vehicle broke the sound barrier. + + + If the prototype's average velocity is lower than the speed of sound, then we **do not know** if the prototype plane travelled faster the speed of sound. It could be that the sound barrier was broken, but the plane travelled for a long time during the test at speeds well below the speed of sound making the average velocity during the test much lower. + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-10-0-0-I/10-1-2-Ap-C/10-1-2-Ap-C-mvt-speeding-tickets-jms.pg b/Contrib/UCalgary/249-10-0-0-I/10-1-2-Ap-C/10-1-2-Ap-C-mvt-speeding-tickets-jms.pg new file mode 100644 index 0000000000..95ccdfb43c --- /dev/null +++ b/Contrib/UCalgary/249-10-0-0-I/10-1-2-Ap-C/10-1-2-Ap-C-mvt-speeding-tickets-jms.pg @@ -0,0 +1,101 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Rates of change - general) +## Date(3 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.001, tolType => 'absolute'); + +$limit = random(70,110,10); +$distance = random(200,500,25); +$time = floor(60*$distance/$limit) + non_zero_random(-15,30,5); #time in minutes +$avg = Compute("($distance)/($time/60)"); + +#avoid extremely high speeds +if($avg > 130) +{$time = $time+15; +$avg = Compute("($distance)/($time/60)");} + + +$mvt = DropDown( + [ + 'The Extreme Value Theorem', + 'The Intermediate Value Theorem', + 'The Mean Value Theorem', + 'The Fundamental Theorem of Calculus' + ], + 'The Mean Value Theorem' +); + +if($avg > $limit) +{$yn = 'Yes';} +else +{$yn = 'There is not enough information to decide';} + +$popup_yn = DropDown( + [ + 'Yes', + 'No', + 'There is not enough information to decide' + ], + $yn +); + + + +BEGIN_PGML +Suppose that someone you know took a road trip to their hometown. They drove [`[$distance]\, \rm{km}`] and the trip took them [`[$time]`] minutes. + ++ Their average speed on their road trip in kilometres per hour was [_]{$avg}{5} [`\rm{km/h}.`] + +Suppose that the posted speed limit for the duration of their trip was [`[$limit] \, \rm{km/h}.`] + ++ Were they speeding (traveling faster than the posted speed limit) at any point in time during their road trip? + + [_]{$popup_yn} + ++ Which theorem from calculus is the most relevant to answering the previous question? + + [_]{$mvt} + +[|Please always drive safely and follow the posted speed limits!|]* +END_PGML + +BEGIN_PGML_SOLUTION ++ First convert the time they travelled to hours: [``[$time] \, \rm{min} = \frac{[$time]}{60} \, \rm{h}.``] Their average speed on their road trip was [``\frac{[$distance] \, \rm{km}}{[$time]/60 \, \rm{h}} = [$avg] \, \rm{km/h}.``] + ++ We can now attempt to apply the **Mean Value Theorem** to determine if they were speeding at any given moment in time. + + The Mean Value Theorem tells us that their instantaneous velocity was equal to their average velocity of [``[$avg] \, \rm{km/h}``] for at least one point in time during the trip. + + The posted speed limit was [`[$limit] \, \rm{km/h}.`] + + + If their average velocity is higher than the posted speed limit, then we know that they were speeding at some point in time. + + + If their average velocity is lower than the posted speed limit, then we **do not know** if they were speeding or not. For example, it could be that they were speeding, but stopped for lunch and ended up with a low average velocity. + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-1-0-R-C/11-1-0-R-C-anti-der-defn-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-1-0-R-C/11-1-0-R-C-anti-der-defn-jms.pg new file mode 100644 index 0000000000..eb7999538c --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-1-0-R-C/11-1-0-R-C-anti-der-defn-jms.pg @@ -0,0 +1,60 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Conceptual understanding of integration) +## Date(4 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$ver = random(-1,1,2); +if($ver == -1) +{ +$rel = 'an antiderivative'; +$first = 'f'; +$second = 'g'; +} +else +{ +$rel = 'the derivative'; +$first = 'g'; +$second = 'f'; +} + + +$popup = DropDown( + [ + 'an antiderivative', + 'an approximation', + 'the derivative' + ], + $rel +); + +BEGIN_PGML +Let [`f`] and [`g`] be two differentiable functions defined for all [`x\in \mathbb{R}.`] + +If [``\frac{d}{dx}f(x) = g(x)``], then we say that the function [`[$first]`] is [_]{$popup} of the function [`[$second].`] +END_PGML + +BEGIN_PGML_SOLUTION +If [``\frac{d}{dx}f(x) = g(x)``], then we say that + ++ the function [`f`] is **an antiderivative** of the function [`g,`] or that + ++ the function [`g`] is **the derivative** of the function [`f.`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-1-1-An-C/11-1-1-An-C-anti-der-ms-1-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-1-1-An-C/11-1-1-An-C-anti-der-ms-1-jms.pg new file mode 100644 index 0000000000..323408c01d --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-1-1-An-C/11-1-1-An-C-anti-der-ms-1-jms.pg @@ -0,0 +1,65 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Antiderivatives (with trigonometric functions)) +## Date(4 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserCheckboxList.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(3, 9, 2); #odd +$threea = 3*$a; +$b = random(2,9,1)*random(-1,1,2); #not +/- 1 +$c = non_zero_random(-10,10,1); +$f = Formula("$a*x^3 + sin(x) + $b")->reduce(); +$afrac4 = Compute("$a/4"); +$ans1 = "\dfrac{$a}{4} x^4 - \cos(x) + $b x"; +$ans2 = "- \cos(x) + \dfrac{$a}{4} x^4 + $b x + $c"; +$wrong1 = "$a x^4 + \cos(x) + $b x"; +$wrong2 = "$threea x^2 - \cos(x)"; +$wrong3 = "\cos(x) + \dfrac{$a}{4} x^4 + $b"; + +$checks1 = CheckboxList( + [[ "\(F(x) = $ans1\)", "\(F(x) = $ans2\)", "\(F(x) = $wrong1\)", "\(F(x) = $wrong2\)", "\(F(x) = $wrong3\)"]], + ["\(F(x) = $ans1\)", "\(F(x) = $ans2\)"] # correct answers +); + +BEGIN_PGML +Select all functions below that are antiderivatives of the function [`f(x) = [$f]`] + +[_]{$checks1} +END_PGML + +$foura = $a*4; +$sixa = $a*6; + +BEGIN_PGML_SOLUTION +There are two antiderivatives of [`f`] in the list that differ by the constant term, [`[$c],`] and the order that the terms appear: + ++ [``\begin{aligned}\frac{d}{dx} \left([$ans1]\right) &= \frac{d}{dx} \left(\dfrac{[$a]}{4} x^4\right) + \frac{d}{dx} (-\cos(x)) + \frac{d}{dx} \left([$b] x\right) \\ &= [$f] = f(x) \end{aligned}``] + ++ [``\begin{aligned}\frac{d}{dx} \left([$ans2]\right) & = \frac{d}{dx} (-\cos(x)) + \frac{d}{dx} \left(\dfrac{[$a]}{4} x^4\right) + \frac{d}{dx} \left([$b] x\right) + \frac{d}{dx}([$c]) \\ &= [$f] = f(x)\end{aligned}``] + +The remaining functions in the list are not antiderivatives of [`f.`] You can check by taking their derivatives: + ++ [``\begin{aligned}\frac{d}{dx} \left([$wrong1]\right) & = \frac{d}{dx}([$a] x^4) + \frac{d}{dx}(\cos(x)) + \frac{d}{dx}([$b] x) \\ &= [$foura]x^3 - \sin(x) + [$b] \neq f(x)\end{aligned}``] + ++ [``\begin{aligned}\frac{d}{dx} \left([$wrong2]\right) & = \frac{d}{dx}([$threea]x^2) + \frac{d}{dx}(-\cos(x)) \\ &= [$sixa]x + \sin(x) \neq f(x) \end{aligned}``] + ++ [``\begin{aligned}\frac{d}{dx} \left([$wrong3]\right) & = \frac{d}{dx}(\cos(x)) + \frac{d}{dx}\left(\dfrac{[$a]}{4} x^4\right) + \frac{d}{dx}([$b]) \\ &= - \sin(x) + [$a]x^3 \neq f(x)\end{aligned}``] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-1-1-An-C/11-1-1-An-C-anti-der-ms-2-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-1-1-An-C/11-1-1-An-C-anti-der-ms-2-jms.pg new file mode 100644 index 0000000000..abe3467d7e --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-1-1-An-C/11-1-1-An-C-anti-der-ms-2-jms.pg @@ -0,0 +1,67 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Antiderivatives (with trigonometric functions)) +## Date(4 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserCheckboxList.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(3, 9, 2); #odd +$twoa = $a*2; +$b = random(2,9,1)*random(-1,1,2); #not +/- 1 +$c = random(2,9,1)*random(-1,1,2); #not +/- 1 +$d = non_zero_random(-20,20,2); +$f = Formula("$a/sqrt{x} + $b cos(x) + $c")->reduce(); +$afrac4 = Compute("$a/4"); +$ans1 = "$twoa \sqrt{x} + $b \sin(x) + $c x"; +$ans2 = "$c x + $b \sin(x) + $twoa \sqrt{x} + $d"; +$wrong1 = "-\dfrac{$a}{2} \dfrac{1}{x^{3/2}} - $b \sin(x)"; +$wrong2 = "$twoa \sqrt{x} - $b \sin(x) + $c \dfrac{x^2}{2}"; +$wrong3 = "\dfrac{$twoa}{x^{3/2}} + $b \sin(x) + $c x"; + +$checks1 = CheckboxList( + [[ "\(F(x) = $ans1\)", "\(F(x) = $ans2\)", "\(F(x) = $wrong1\)", "\(F(x) = $wrong2\)", "\(F(x) = $wrong3\)"]], + ["\(F(x) = $ans1\)", "\(F(x) = $ans2\)"] # correct answers +); + +BEGIN_PGML +Select all functions below that are antiderivatives of the function [``f(x) = [$f]``] + +[_]{$checks1} +END_PGML + +$threea = $a*3; + +BEGIN_PGML_SOLUTION +Recall that [`\sqrt{x} = x^{1/2}.`] + +There are two antiderivatives of [`f`] in the list that differ by the constant term, [`[$d],`] and the order that the terms appear: + ++ [``\frac{d}{dx} \left([$ans1]\right) = [$f] = f(x)``] + ++ [``\frac{d}{dx} \left([$ans2]\right) = [$f] = f(x)``] + +The remaining functions in the list are not antiderivatives of [`f,`] you can check by taking their derivatives: + ++ [``\begin{aligned}\frac{d}{dx} \left( [$wrong1] \right) & = -\dfrac{[$a]}{2} \frac{d}{dx} (x^{-3/2}) - [$b] \frac{d}{dx} \sin(x) \\ & = \frac{[$threea]}{4} x^{-5/2} - [$b] \cos(x) \neq f(x)\end{aligned}``] + ++ [``\begin{aligned}\frac{d}{dx} \left( [$wrong2] \right) & = [$twoa] \frac{d}{dx} \sqrt{x} - [$b] \frac{d}{dx} \sin(x) + [$c] \frac{d}{dx} \dfrac{x^2}{2} \\ & = \frac{[$a]}{\sqrt{x}} - [$b]\cos(x) + [$c] x \neq f(x)\end{aligned}``] + ++ [``\begin{aligned}\frac{d}{dx} \left( [$wrong3] \right) & = [$twoa]\frac{d}{dx}(x^{-3/2}) + [$b] \frac{d}{dx}\sin(x) + [$c] \frac{d}{dx} x \\ & = -[$threea]x^{-5/2} + [$b]\cos(x) + [$c] \neq f(x)\end{aligned}``] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-1-1-An-C/11-1-1-An-C-anti-mc-1-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-1-1-An-C/11-1-1-An-C-anti-mc-1-jms.pg new file mode 100644 index 0000000000..86eab3bab0 --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-1-1-An-C/11-1-1-An-C-anti-mc-1-jms.pg @@ -0,0 +1,54 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Antiderivatives (with trigonometric functions)) +## Date(4 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2, 9, 1)*random(-1,1,2); +$b = random(3,9,2); #odd +$c = random(-10,10,2); +$g = Formula("e^x + $a/x + $b x")->reduce(); + +$radio1 = RadioButtons( + [ [ "\(G(x)=e^x + $a \ln(x) + \dfrac{$b}{2} x^2 + $c\)", "\(G(x)=\ln(x) + $a \ln(x) + \dfrac{$b}{2} x\)", "\(G(x)=e^x - $a x^{-2} + $b x^2\)", "\(G(x)=e^x + $a \ln(x) + $b \)"], 'None of the above functions are antiderivatives of \(g(x)\)' ], + "\(G(x)=e^x + $a \ln(x) + \dfrac{$b}{2} x^2 + $c\)" # correct answer +); + +BEGIN_PGML +Which of the following functions is an antiderivative of the function [``g(x) = [$g]``]? + +[_]{$radio1} +END_PGML + +$aplus1 = $a + 1; +$atimesm2 = (-2)*$a; +$btimes2 = 2*$b; +BEGIN_PGML_SOLUTION ++ There is a function that is an antiderivative of [`g(x)`]: + + [``\begin{aligned}\frac{d}{dx}\left(e^x + [$a] \ln(x) + \dfrac{[$b]}{2} x^2 + [$c]\right) & = \frac{d}{dx}\left( e^x \right) + [$a] \frac{d}{dx}\left( \ln(x) \right) + \dfrac{[$b]}{2} \frac{d}{dx}\left( x^2 \right) + \frac{d}{dx}\left( [$c] \right) \\ &= [$g] + 0 = g(x)\end{aligned}``] + +The remaining functions are **not** antiderivatives of [`g(x)`]: ++ [`` \frac{d}{dx}\left(\ln(x) + [$a] \ln(x) + \dfrac{[$b]}{2} x\right) = \frac{d}{dx} \ln(x) + [$a] \frac{d}{dx} \ln(x) + \frac{[$b]}{2} \frac{d}{dx} (x) = \frac{[$aplus1]}{x} + \frac{[$b]}{2} \neq g(x)``] + ++ [`` \frac{d}{dx}\left( e^x - [$a] x^{-2} + [$b] x^2 \right) = \frac{d}{dx} e^x - [$a] \frac{d}{dx} (x^{-2}) + [$b] \frac{d}{dx} (x^2) = e^x - [$atimesm2] x^{-3} + [$btimes2]x \neq g(x)``] + ++ [`` \frac{d}{dx} \left( e^x + [$a] \ln(x) + [$b] \right) = e^x + \frac{[$a]}{x} \neq g(x)``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-1-2-Ap-C/11-1-2-Ap-C-fcn-anti-der-1-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-1-2-Ap-C/11-1-2-Ap-C-fcn-anti-der-1-jms.pg new file mode 100644 index 0000000000..2bd6ea319e --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-1-2-Ap-C/11-1-2-Ap-C-fcn-anti-der-1-jms.pg @@ -0,0 +1,61 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Antiderivatives (with trigonometric functions)) +## Date(4 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 9, 1)*random(-1,1,2); +$b = random(3, 7, 1); +$c = non_zero_random(-9,9,1); +$d = random(2,4,1); +$ab = $a*$b; +$bm1 = $b-1; + +$fder = Formula("$ab*x^($bm1)+$c*e^(-x) + pi/$d*cos(x)")->reduce(); +$f = Compute("$a*x^($b)-$c*e^(-x) + pi/$d*sin(x)"); + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$fder]``]. Find the general antiderivative of [`f(x)`]. + +[`F(x) = \,`][_]{$f}{20} [`\, + C,`] + +where [`C`] is a constant. +END_PGML + +BEGIN_PGML_SOLUTION +[``F(x) = \frac{[$ab]}{[$bm1]+1}x^{[$bm1]+1} - [$c]*e^{-x} + \frac{\pi}{[$d]}\sin(x) + C = [$f]+C,``] + +because [``F'(x) = [$fder].``] + +Be careful with the [`e^{-x}`] term, since [``\frac{d}{dx}e^{-x} = -e^{-x}.``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-1-2-Ap-C/11-1-2-Ap-C-fcn-anti-der-2-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-1-2-Ap-C/11-1-2-Ap-C-fcn-anti-der-2-jms.pg new file mode 100644 index 0000000000..c4ab862e17 --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-1-2-Ap-C/11-1-2-Ap-C-fcn-anti-der-2-jms.pg @@ -0,0 +1,61 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Antiderivatives (with trigonometric functions)) +## Date(4 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-1,1,2); +$b = random(3, 4, 1); +$c = non_zero_random(-9,9,1); +$d = random(2,8,1); +$ab = $a*$b; +$bm1 = $b-1; + +$fder = Formula("pi*$ab*x^($bm1)+$c/x - $d*sin(x)")->reduce(); +$f = Compute("$a*pi*x^($b)+$c*ln(abs(x)) + $d*cos(x)")->reduce(); + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +$f->{limits} = [-3,-1]; + +BEGIN_PGML +Let [``g(x)=[$fder]``]. Find the general antiderivative of [`g(x)`]. + +[`G(x) =\, `][_]{$f}{20} [`\, + C,`] + +where [`C`] is a constant. +END_PGML + +BEGIN_PGML_SOLUTION +[``G(x) = \frac{[$ab]\pi}{[$bm1]+1}x^{[$bm1]+1} - [$c]\ln{|x|} - [$d]\cos(x) + C = [$f]+C,``] + +because [``G'(x) = [$fder].``] + +Remember that the general antiderivative of [``\frac{1}{x}``] is [``\ln{|x|}``] (don't forget the absolute value). +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-1-2-Ap-C/11-1-2-Ap-C-fcn-anti-der-3-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-1-2-Ap-C/11-1-2-Ap-C-fcn-anti-der-3-jms.pg new file mode 100644 index 0000000000..f83f0df08e --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-1-2-Ap-C/11-1-2-Ap-C-fcn-anti-der-3-jms.pg @@ -0,0 +1,61 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Antiderivatives (with trigonometric functions)) +## Date(4 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(3,7,2); +$b = random(3, 4, 1); + +$d = random(2,8,1)*random(-1,1,2); + +$fder = Formula("$a*sqrt(x) + $d*sec^2(x)")->reduce(); +$f = Compute("$a/(3/2)*x^(3/2) + $d*tan(x)"); + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +$f->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$fder]``]. Find the general antiderivative of [`f(x)`]. + +[`F(x) =\, `][_]{$f}{20} [`\, + C,`] + +where [`C`] is a constant. +END_PGML + +$twoa = $a*2; + +BEGIN_PGML_SOLUTION +[``F(x) = \frac{[$a]}{3/2}x^{3/2} + [$d]\tan(x) + C = \frac{[$twoa]}{3}x^{3/2} + [$d]\tan(x) + C,``] + +because [``F'(x) = [$fder].``] + +Hint: write [`\sqrt{x} = x^{1/2}.`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-2-1-R-C/11-2-1-R-C-two-anti-der-1-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-2-1-R-C/11-2-1-R-C-two-anti-der-1-jms.pg new file mode 100644 index 0000000000..e5bf594cb4 --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-2-1-R-C/11-2-1-R-C-two-anti-der-1-jms.pg @@ -0,0 +1,75 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Conceptual understanding of integration) +## Date(7 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$const= DropDown( + [ + '0', + 'a fixed constant', + 'any differentiable function' + ], + 'a fixed constant' +); + +$zero = DropDown( + [ + '0', + 'a fixed constant', + 'any differentiable function' + ], + '0' +); + +#randomize order of bullets +$ver = random(-1,1,0); + +if($ver == -1) +{$fcn1 = "F(x)-G(x)"; +$popup1 = $const; +$fcn2 = "F'(x) - G'(x)"; +$popup2 = $zero;} +else +{$fcn1 = "F'(x) - G'(x)"; +$popup1 = $zero; +$fcn2 = "F(x)-G(x)"; +$popup2 = $const;} + + + +BEGIN_PGML +Suppose that [`F`] and [`G`] are two antiderivatives of a continuous function [`f.`] + +Then we know that: + ++ [`[$fcn1]`] is equal to [_]{$popup1} for all [`x.`] + ++ [`[$fcn2]`] is equal to [_]{$popup2} for all [`x.`] +END_PGML + +BEGIN_PGML_SOLUTION + ++ It is a consequence of the Mean Value Theorem that two antiderivatives of a function [`f`] differ by a constant function, so [`F(x) - G(x)`] is equal to is equal to a fixed constant for all [`x.`] + ++ Since both [`F`] and [`G`] are antiderivatives of [`f`], we have [`F'(x) - G'(x) = f(x) - f(x) = 0`] for all [`x.`] + +END_PGML_SOLUTION + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-2-2-U-C/11-2-2-U-C-two-anti-der-gph-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-2-2-U-C/11-2-2-U-C-two-anti-der-gph-jms.pg new file mode 100644 index 0000000000..ba2e7513fe --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-2-2-U-C/11-2-2-U-C-two-anti-der-gph-jms.pg @@ -0,0 +1,75 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Conceptual understanding of integration) +## Date(7 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$slope = DropDown( + [ + 'y-intercepts', + 'slope of their tangent lines for each x', + 'asymptotes' + ], + 'slope of their tangent lines for each x' +); + +$int = DropDown( + [ + 'y-intercepts', + 'slope of their tangent lines for each x', + 'asymptotes' + ], + 'y-intercepts' +); + +#randomize order of bullets +$ver = random(-1,1,0); + +if($ver == -1) +{$samediff1 = "the same"; +$popup1 = $slope; +$samediff2 = "different"; +$popup2 = $int;} +else +{$samediff1 = "different"; +$popup1 = $int; +$samediff2 = "the same"; +$popup2 = $slope;} + + + +BEGIN_PGML +Suppose that [`F`] and [`G`] are two different antiderivatives of a continuous function [`f.`] That is, [`F(x) \neq G(x)`] for some [`x,`] but both [`F`] and [`G`] are antiderivatives of the same function [`f.`] + +Then we know that: + ++ [`F`] and [`G`] have [$samediff1] [_]{$popup1} + ++ [`F`] and [`G`] have [$samediff2] [_]{$popup2} +END_PGML + +BEGIN_PGML_SOLUTION + ++ It is a consequence of the Mean Value Theorem that two antiderivatives of a function [`f`] differ by a constant function, so [`F(x) - G(x)`] is equal to is equal to a fixed constant for all [`x.`] Since [`F(x) \neq G(x)`], we have [`F(x) = G(x) + k`] for some **non-zero** constant [`k`] and the graphs of [`F`] and [`G`] will have different y-intercepts + ++ Since both [`F`] and [`G`] are antiderivatives of [`f`], we have [`F'(x) = f(x) = G'(x)`] for all [`x;`] therefore, the slope of the tangent lines to the graphs of [`F`] and [`G`] will be the same at each [`x.`] + +END_PGML_SOLUTION + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-2-3-U-C/11-2-3-U-C-two-anti-der-mc-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-2-3-U-C/11-2-3-U-C-two-anti-der-mc-jms.pg new file mode 100644 index 0000000000..7a59362197 --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-2-3-U-C/11-2-3-U-C-two-anti-der-mc-jms.pg @@ -0,0 +1,45 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Conceptual understanding of integration) +## Date(7 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2, 9, 1); + +$correct = "If \(F\) and \(G\) are antiderivatives of \(f,\) then there exists a constant \(k\) so that \(G(x) = F(x) +k\) for all \(x.\)"; + +$wrong1 = "If \(F\) and \(G\) are antiderivatives of \(f,\) then there exists a non-zero constant \(k\) so that \(G(x) = F(x) +k\) for at least one \(x.\)"; + +$wrong2 = "If \(F\) and \(G\) are distinct antiderivatives of \(f,\) then for any constant \(k,\) \(G(x) = F(x) +k\) for any \(x.\)"; + +$wrong3 = "If \(F\) and \(G\) are distinct antiderivatives of \(f,\) then for any non-zero constant \(k,\) \(G(x) = F(x) +k\) for some \(x.\)"; + +$radio1 = RadioButtons( + [ [ $correct, $wrong1, $wrong2, $wrong3 ] ], + $correct # correct answer +); + +BEGIN_PGML +Which of the statements below best represents the following claim? + +"Two antiderivatives of a function [`f`] differ by a constant." + +[_]{$radio1} +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-3-1-Ap-I/11-3-1-Ap-I-ivp-1-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-3-1-Ap-I/11-3-1-Ap-I-ivp-1-jms.pg new file mode 100644 index 0000000000..ca6019d7ae --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-3-1-Ap-I/11-3-1-Ap-I-ivp-1-jms.pg @@ -0,0 +1,68 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Antiderivatives (with trigonometric functions)) +## Date(9 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +$a = random(1,5,1); +$b = non_zero_random(-5,5,1); +$fprime0 = non_zero_random(-5,5,1); +$f0 = non_zero_random(-5,5,1); +$c = $fprime0 + $a; +$d = $f0 + $b; +$fderder = Formula("$a*sin(x)+$b*cos(x)")->reduce(); +$fder = Formula("-$a*cos(x)+$b*sin(x)+$c")->reduce(); +$f = Compute("-$a*sin(x)-$b*cos(x) + $c*x + $d"); +$ans = Formula("-$a*sin(x)-$b*cos(x) + $c*x + $d")->reduce(); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + + +BEGIN_PGML +Suppose that [``f''(x) = [$fderder],``] [``f'(0) = [$fprime0],``] and [``f(0) = [$f0].``] + +Find [`f(x).`] + +[`f(x) = \, `] [_]{$f}{20} + +END_PGML + +BEGIN_PGML_SOLUTION +First we find that +[```f'(x) = \int f''(x) \, dx = \int [$fderder] \, dx = -[$a]\cos(x)+[$b]\sin(x) + C,```] +and since [`[$fprime0] = f'(0) = -[$a]\cos(0)+[$b]\sin(0) + C = -[$a] + C`] we get that [`C = [$c].`] +Now +[```f(x) = \int f'(x) \, dx = \int [$fder] \, dx = -[$a]\sin(x)-[$b]\cos(x) + [$c]x + D,```] +and since [`[$f0] = f(0) = -[$a]\sin(0)-[$b]\cos(0) + [$c](0) + D = -[$b]+D`] we get that [`D = [$d].`] + +Therefore, [`f(x) = [$ans].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-3-1-Ap-I/11-3-1-Ap-I-ivp-2-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-3-1-Ap-I/11-3-1-Ap-I-ivp-2-jms.pg new file mode 100644 index 0000000000..450eebca52 --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-3-1-Ap-I/11-3-1-Ap-I-ivp-2-jms.pg @@ -0,0 +1,68 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Antiderivatives (without trigonometric functions)) +## Date(9 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +$a = random(1,5,1); +$b = non_zero_random(-5,5,1); +$fprime0 = non_zero_random(-5,5,1); +$f0 = non_zero_random(-5,5,1); +$c = $fprime0 - $a + $b; +$d = $f0 - $a - $b; +$fderder = Formula("$a*e^x+$b*e^(-x)")->reduce(); +$fder = Formula("$a*e^x-$b*e^(-x)+$c")->reduce(); +$f = Compute("$a*e^x+$b*e^(-x)+$c*x + $d"); +$ans = Formula("$a*e^x+$b*e^(-x) + $c*x + $d")->reduce(); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + + +BEGIN_PGML +Suppose that [``g''(x) = [$fderder],``] [``g'(0) = [$fprime0],``] and [``g(0) = [$f0].``] + +Find [`g(x).`] + +[`g(x) = \, `] [_]{$f}{20} + +END_PGML + +BEGIN_PGML_SOLUTION +First we find that +[```g'(x) = \int g''(x) \, dx = \int [$fderder] \, dx = [$a]e^x - [$b]e^{-x} + C,```] +and since [`[$fprime0] = g'(0) = [$a]e^0 - [$b]e^0 + C = [$a] - [$b] + C`] we get that [`C = [$c].`] +Now +[```g(x) = \int g'(x) \, dx = \int [$fder] \, dx = [$a]e^x + [$b]e^{-x} + [$c]x + D,```] +and since [`[$f0] = g(0) = [$a]e^0 + [$b]e^0 + [$c](0) + D = [$a]+[$b]+D`] we get that [`D = [$d].`] + +Therefore, [`f(x) = [$ans].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-3-1-Ap-I/11-3-1-Ap-I-ivp-3-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-3-1-Ap-I/11-3-1-Ap-I-ivp-3-jms.pg new file mode 100644 index 0000000000..bc7b3ea4cf --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-3-1-Ap-I/11-3-1-Ap-I-ivp-3-jms.pg @@ -0,0 +1,66 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Antiderivatives (without trigonometric functions)) +## Date(9 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +$pt = random(1,3,1)**2; +$a = random(1,5,1); +$twoa = $a*2; +$twothirdsa = $a*2/3; +$b = non_zero_random(-5,5,1); +$twob = 2*$b; +$fpt = non_zero_random(-5,5,1); +$c = $fpt - ($twoa/3)*($pt)**(3/2) - ($twob)*sqrt($pt); +$fder = Formula("$a*sqrt(x)+$b/(sqrt(x))")->reduce(); +$f = Compute("($twoa/3)*x^(3/2)+($twob)*sqrt(x) + $c"); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +$f->{limits} = [1,3]; + + +BEGIN_PGML +Suppose that [``h'(x) = [$fder],``] and [``h([$pt]) = [$fpt].``] + +Find [`h(x).`] + +[`h(x) = \, `] [_]{$f}{20} +END_PGML + + + +BEGIN_PGML_SOLUTION +First we find that +[```h(x) = \int h'(x) \, dx = \int [$fder] \, dx = ([$a])\frac{2}{3} x^{3/2} + ([$b])2\sqrt{x} + C = \frac{[$twoa]}{3} x^{3/2} + [$twob]\sqrt{x} + C.```] +Now, since [``[$fpt] = h([$pt]) = \frac{[$twoa]}{3}([$pt])^{3/2} + [$twob]\sqrt{[$pt]} + C``] we get that [``C = [$fpt] - \frac{[$twoa]}{3}([$pt])^{3/2} - [$twob]\sqrt{[$pt]}.``] + +Therefore, [``h(x) = \frac{[$twoa]}{3} x^{3/2} + [$twob]\sqrt{x} + [$fpt] - \frac{[$twoa]}{3}([$pt])^{3/2} - [$twob]\sqrt{[$pt]}.``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-1-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-1-jms.pg new file mode 100644 index 0000000000..535a1a2a58 --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-1-jms.pg @@ -0,0 +1,64 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Techniques of integration) +## DBsection(Substitution (without trigonometric functions)) +## Date(8 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 4, 1); +$b = non_zero_random(-9,9,1); +$c = random(5,15,1); +$d = random(2,9,1)*random(-1,1,2); +$cp1 = $c+1; +$am1 = $a-1; + +$fder = Formula("$d*x^($am1)*(x^($a)+$b)^($c)")->reduce(); +$u = Compute("x^($a)+$b"); +$du = Compute("$a*x^($am1)"); +$f = Compute("($d/($a*$cp1))*(x^($a)+$b)^($cp1)"); + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Evaluate the following indefinite integral by making a substitution. + +The best substitution to make is [`u = \, `][_]{$u}{10} which has differential [`du = \,`] [_]{$du}{10} [`dx.`] + +Then +[``\int [$fder] \, dx = \,``][_]{$f}{20} [`\, + C,`] +where [`C`] is a constant. +END_PGML + +$acp1 = $a*$cp1; +BEGIN_PGML_SOLUTION +We make the substitution [`u = x^{[$a]} + [$b],`] so [`du = [$a]x^{[$am1]} \, dx.`] +Then +[``` \int [$fder] \, dx = \int \frac{[$d]}{[$a]} u^{[$c]} \, du = \frac{[$d]}{[$a]} \frac{u^{[$cp1]}}{[$cp1]} + C = \frac{[$d]}{[$acp1]}(x^{[$a]}+[$b])^{[$cp1]} + C.```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-2-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-2-jms.pg new file mode 100644 index 0000000000..05055ba0af --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-2-jms.pg @@ -0,0 +1,70 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Techniques of integration) +## DBsection(Substitution (with trigonometric functions)) +## Date(8 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-1, 1, 2); +$c = random(5,15,1); +$d = random(2,9,1)*random(-1,1,2); +$cp1 = $c+1; + +if($a == -1) +{ +$u = Compute("cos(x)"); +$du = Compute("-sin(x)"); +} +else +{ +$u = Compute("sin(x)"); +$du = Compute("cos(x)"); +} + +$fder = Formula("$d*$du*($u)^($c)")->reduce(); +$f = Compute("($d/($cp1))*($u)^($cp1)"); + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Evaluate the following indefinite integral by making a substitution. + +The best (and simplest) substitution to make is [`u = \, `][_]{$u}{10} which has differential [`du = \,`] [_]{$du}{10} [`dx.`] + +Then +[``\int [$fder] \, dx = \,``][_]{$f}{20} [`\, + C,`] +where [`C`] is a constant. +END_PGML + +BEGIN_PGML_SOLUTION +We make the substitution [`u = [$u],`] so [`du = [$du] \, dx.`] +Then +[``` \int [$fder] \, dx = \int [$d] u^{[$c]} \, du = [$d] \frac{u^{[$cp1]}}{[$cp1]} + C = \frac{[$d]}{[$cp1]}([$u])^{[$cp1]} + C.```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-3-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-3-jms.pg new file mode 100644 index 0000000000..4277854926 --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-3-jms.pg @@ -0,0 +1,78 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Techniques of integration) +## DBsection(Substitution (without trigonometric functions)) +## Date(8 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-1, 1, 2); #for version +$b = random(2,9,1); +$c = 1/2; #square root +$d = random(2,9,1)*random(-1,1,2); +$cp1 = $c+1; + +if($a == -1) +{ +$u = Compute("e^x + $b"); +$du = Compute("e^x"); +$fder = Formula("$d*$du*sqrt($u)")->reduce(); +$f = Compute("($d/($cp1))*($u)^($cp1)"); +} +else +{ +$u = Compute("ln(x) + $b"); +$du = Compute("1/x"); +$fder = Formula("($d/x)*sqrt($u)")->reduce(); +$f = Compute("($d/($cp1))*($u)^($cp1)"); +} + + + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +$f->{limits} = [1,3]; +$u->{limits} = [1,3]; +$du->{limits} = [1,3]; + +BEGIN_PGML +Evaluate the following indefinite integral by making a substitution. + +The best substitution to make is [`u = \, `][_]{$u}{10} which has differential [`du = \,`] [_]{$du}{10} [`dx.`] + +Then +[``\int [$fder] \, dx = \,``][_]{$f}{20} [`\, + C,`] +where [`C`] is a constant. +END_PGML + +$twod = 2*$d; + +BEGIN_PGML_SOLUTION +We make the substitution [`u = [$u],`] so [`du = [$du] \, dx.`] +Then +[``` \int [$fder] \, dx = \int [$d] u^{1/2} \, du = [$d] \frac{u^{3/2}}{3/2} + C = \frac{[$twod]}{3}([$u])^{3/2} + C.```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-4-mc-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-4-mc-jms.pg new file mode 100644 index 0000000000..911005b3fb --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-4-mc-jms.pg @@ -0,0 +1,48 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Techniques of integration) +## DBsection(Substitution (without trigonometric functions)) +## Date(17 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(3,9,2); + +$radio1 = RadioButtons( + [ [ "\( \displaystyle \frac{1}{2} \left( \ln ($a f(x)) \right)^2 + C \)", + "\( \displaystyle \frac{1}{$a} \left( \ln ($a f(x)) \right)^2 + C \)", +"\( \displaystyle \ln ($a f(x)) + C \) ", +"\( \displaystyle $a\ln ($a f(x)) + C \)", +"\( \displaystyle $a \left( \ln ($a f(x)) \right)^2 + C \)" ]], + "\( \displaystyle \frac{1}{2} \left( \ln ($a f(x)) \right)^2 + C \)" # correct answer +); + +BEGIN_PGML +Let [`f`] be a differentiable function. + + +The integral [``` \int \frac{\ln([$a] f(x))}{f(x)}f'(x)\, dx ```] +is equal to which of the following? + +[_]{$radio1} +END_PGML + +BEGIN_PGML_SOLUTION +Make the substitution [``u = \ln([$a]f(x)``], then [``du = \frac{1}{[$a]f(x)}[$a]f'(x)\, dx = \frac{1}{f(x)}f'(x)\, dx.``] +Then, the integral becomes [``` \int \frac{\ln([$a] f(x))}{f(x)}f'(x)\, dx = \int u\, du = \frac{1}{2}u^2 + C = \frac{1}{2} \left( \ln ([$a] f(x)) \right)^2 + C ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-5-mc-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-5-mc-jms.pg new file mode 100644 index 0000000000..9cb04b33ea --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-5-1-Ap-C/11-5-1-Ap-C-sub-anti-der-5-mc-jms.pg @@ -0,0 +1,45 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Techniques of integration) +## DBsection(Substitution (without trigonometric functions)) +## Date(17 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(3,9,2); + +$radio1 = RadioButtons( + [ [ "\(\displaystyle \dfrac{1}{A^2} \int u^{3/2} - $a u^{1/2}\, du\)", +"\(\displaystyle \dfrac{1}{A} \int \sqrt{u} \, du\)", +"\(\displaystyle \dfrac{1}{A^3} \int (u- $a)^3\sqrt{u} \, du\)", +"\(\displaystyle \dfrac{1}{A^2} \int \ln($a u)u^{1/2} \, du\)", +"\(\displaystyle \dfrac{1}{A^3} \int (u-$a)^2\sqrt{u} \, du\)"]], + "\(\displaystyle \dfrac{1}{A^2} \int u^{3/2} - $a u^{1/2}\, du\)" # correct answer +); + +BEGIN_PGML +Let [`A`] be a positive constant. After making the substitution [`u = [$a]+Ae^x`] the integral [``` \int e^{2x}\sqrt{[$a]+Ae^x} \, dx ```] +becomes which of the following integrals? + +[_]{$radio1} +END_PGML + +BEGIN_PGML_SOLUTION +If [`u = [$a]+Ae^x`] then [`du = Ae^x \, dx`] so [``\frac{1}{A} \, du = e^x \, dx.``] In the integrand, notice that [`e^2x = e^x\cdot e^x`] so we can replace one copy of [`e^x`] by using [`du`], and the remaining [`e^x`] can be written in terms of [`u`] as [`e^x = \frac{u-[$a]}{A}.`] +Now, [```\int e^{2x}\sqrt{[$a]+Ae^x} \, dx = \int e^{x}\sqrt{[$a]+Ae^x} \, e^x dx = \int \frac{u-[$a]}{A}\sqrt{u} \frac{1}{A}\, du = \frac{1}{A^2} \int u^{3/2} - [$a]u^{1/2} \, du ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-5-2-U-C/11-5-2-U-C-chain-sub-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-5-2-U-C/11-5-2-U-C-chain-sub-jms.pg new file mode 100644 index 0000000000..0f5f9d165f --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-5-2-U-C/11-5-2-U-C-chain-sub-jms.pg @@ -0,0 +1,38 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Conceptual understanding of integration) +## Date(8 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$popup = DropDown( + [ + 'Power Rule', + 'Product Rule', + 'Quotient Rule', + 'Chain Rule', + 'Mean Value Theorem' + ], + 'Chain Rule' +); + +BEGIN_PGML +The technique of "Integration by Substitution," sometimes also called "[`u`]-Substitution," is the antiderivative version of the [_]{$popup} for differentiation. +END_PGML + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-5-4-Ap-C/11-5-4-Ap-C-dx-1-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-5-4-Ap-C/11-5-4-Ap-C-dx-1-jms.pg new file mode 100644 index 0000000000..1aaaea58a8 --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-5-4-Ap-C/11-5-4-Ap-C-dx-1-jms.pg @@ -0,0 +1,60 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Chain rule (with trigonometric functions)) +## Date(9 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +Context()->variables->add(dx=>"Real"); +$a = non_zero_random(-5,5,1); +$b = non_zero_random(-5,5,1); +$u = Formula("e^($a*x) + cos($b*pi*x)")->reduce(); +$du = Compute("($a*e^($a*x) - $b*pi*sin($b*pi*x))*dx"); + + + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + + +BEGIN_PGML +Let [`u(x) = [$u].`] Find the differential of [`u.`] + +[`du = \,`] [_]{$du}{10} + +END_PGML + + + +BEGIN_PGML_SOLUTION +We are given the function [`u = [$u],`] and by definition [`du = u'(x) \, dx,`] so +[``` du = u'(x) \, dx = [$du].```] +Don't forget the "[`dx`]"! +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-5-4-Ap-C/11-5-4-Ap-C-dx-2-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-5-4-Ap-C/11-5-4-Ap-C-dx-2-jms.pg new file mode 100644 index 0000000000..8c64427aa3 --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-5-4-Ap-C/11-5-4-Ap-C-dx-2-jms.pg @@ -0,0 +1,61 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Chain rule (without trigonometric functions)) +## Date(9 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +Context()->variables->add(dx=>"Real"); +$a = random(3,5,1)*random(-1,1,2); +$am1 = $a-1; +$b = random(2,9,1); +$u = Formula("x^($a)*ln($b*x)")->reduce(); +$du = Compute("($a*x^($am1)*ln($b*x) + x^($am1))*dx"); + + + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +$du->{limits} = [1,3]; + + +BEGIN_PGML +Let [``f(x) = [$u].``] Find the differential of [`f.`] + +[`df = \,`] [_]{$du}{10} + +END_PGML + + + +BEGIN_PGML_SOLUTION +We are given the function [``f = [$u],``] and by definition [`df = f'(x) \, dx,`] so +[``` df = f'(x) \, dx = [$du].```] +Don't forget the "[`dx`]"! +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-11-0-0-C/11-5-4-Ap-C/11-5-4-Ap-C-dx-3-jms.pg b/Contrib/UCalgary/249-11-0-0-C/11-5-4-Ap-C/11-5-4-Ap-C-dx-3-jms.pg new file mode 100644 index 0000000000..5f65e7321c --- /dev/null +++ b/Contrib/UCalgary/249-11-0-0-C/11-5-4-Ap-C/11-5-4-Ap-C-dx-3-jms.pg @@ -0,0 +1,59 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Chain rule (without trigonometric functions)) +## Date(9 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +Context()->variables->add(dx=>"Real"); +$a = random(3,5,1); +$am1 = $a-1; +$b = random(2,9,1); +$u = Formula("sqrt(x^($a)+$b*x)")->reduce(); +$du = Compute("(($a*x^($am1)+$b)/(2*sqrt(x^($a)+$b*x)))*dx"); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +$du->{limits} = [1,3]; + + +BEGIN_PGML +Let [``g(x) = [$u].``] Find the differential of [`g.`] + +[`dg = \,`] [_]{$du}{10} + +END_PGML + + + +BEGIN_PGML_SOLUTION +We are given the function [``g = [$u],``] and by definition [`dg = g'(x) \, dx,`] so +[``` dg = g'(x) \, dx = [$du].```] +Don't forget the "[`dx`]"! +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-1-2-U-C/12-1-2-U-C-application-1-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-1-2-U-C/12-1-2-U-C-application-1-jms.pg new file mode 100644 index 0000000000..759ec1bf7d --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-1-2-U-C/12-1-2-U-C-application-1-jms.pg @@ -0,0 +1,45 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Conceptual understanding of integration) +## Date(28 July 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = 0; +$b = $a + random(2,7,1); + +$correct = "the total amount of energy absorbed by the solar panel over a \($b\) hour time period."; +$wrong1 = "the rate of energy absorption of the solar panel over the time interval \([$a,$b]\)."; +$wrong2 = "the average amount of energy absorbed by the solar panel each hour over the time interval \([$a,$b]\)."; +$wrong3 = "the total amount of energy absorbed by the solar panel during the \($b\)-th hour only."; + +$radio1 = RadioButtons( + [ [ $correct, $wrong1, $wrong2, $wrong3 ], 'None of the above.' ], + $correct # correct answer +); + +BEGIN_PGML +The rate at which a solar panel absorbs energy is given by the continuous function [`f(t)`] in Joules per hour, where [`t`] is time measured in hours. + +Which statement below best describes the following quantity? + +[``\int_{[$a]}^{[$b]} f(t) \, dt ``] is ... + +[_]{$radio1} +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-1-2-U-C/12-1-2-U-C-def-int-idea-1-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-1-2-U-C/12-1-2-U-C-def-int-idea-1-jms.pg new file mode 100644 index 0000000000..180af573bb --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-1-2-U-C/12-1-2-U-C-def-int-idea-1-jms.pg @@ -0,0 +1,45 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Conceptual understanding of integration) +## Date(10 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(-2, 5, 1); +$b = $a + random(2,5,1); + +$correct = "the sum of the area of the regions below \(y=f(x)\) and above the \(x\)-axis less the sum of the area of the regions above \(y=f(x)\) and below the \(x\)-axis over the closed interval \([$a,$b]\)."; +$wrong1 = "the sum of the absolute values of the areas of the regions between the graph of \(y=f(x)\) and the \(x\)-axis over the closed interval \([$a,$b]\)."; +$wrong2 = "the total positive area of the region between the graph of \(y=f(x)\) and the \(x\)-axis over the closed interval \([$a,$b]\)."; +$wrong3 = "the general antiderivative of \(f\) with its domain restricted to the closed interval \([$a,$b]\)."; + +$radio1 = RadioButtons( + [ [ $correct, $wrong1, $wrong2, $wrong3 ], 'None of the above.' ], + $correct # correct answer +); + +BEGIN_PGML +Let [`f`] be a continuous function. + +Which statement below best describes the following quantity? + +[``\int_{[$a]}^{[$b]} f(x) \, dx ``] is ... + +[_]{$radio1} +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-1-2-U-C/12-1-2-U-C-def-int-idea-2-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-1-2-U-C/12-1-2-U-C-def-int-idea-2-jms.pg new file mode 100644 index 0000000000..ce72b87d27 --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-1-2-U-C/12-1-2-U-C-def-int-idea-2-jms.pg @@ -0,0 +1,45 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Conceptual understanding of integration) +## Date(10 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(-2, 5, 1); +$b = $a + random(2,5,1); + +$wrong1 = "the sum of the area of the regions below \(y=f(x)\) and above the \(x\)-axis less the sum of the area of the regions above \(y=f(x)\) and below the \(x\)-axis over the closed interval \([$a,$b]\)."; +$correct = "the sum of the positive areas of the regions between the graph of \(y=f(x)\) and the \(x\)-axis over the closed interval \([$a,$b]\)."; +$wrong2 = "the total area of the region between the graph of \(y=f(x)\) and the \(x\)-axis minus the total area of the region between between the graph of \(y=f(x)\) and the \(x\)-axis over the closed interval \([$a,$b]\)."; +$wrong3 = "the general antiderivative of \(|f(x)|\) with its domain restricted to the closed interval \([$a,$b]\)."; + +$radio1 = RadioButtons( + [ [ $correct, $wrong1, $wrong2, $wrong3 ], 'None of the above.' ], + $correct # correct answer +); + +BEGIN_PGML +Let [`f`] be a continuous function. + +Which statement below best describes the following quantity? + +[``\int_{[$a]}^{[$b]} |f(x)| \, dx ``] is ... + +[_]{$radio1} +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-2-1-An-C/12-2-1-An-C-area-function-1-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-2-1-An-C/12-2-1-An-C-area-function-1-jms.pg new file mode 100644 index 0000000000..1b193f8411 --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-2-1-An-C/12-2-1-An-C-area-function-1-jms.pg @@ -0,0 +1,123 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Conceptual understanding of integration) +## Date(10 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +#intervals +# (-10,$a), ($a,$c), ($c,$e), and ($e,10) + +$a = random(-8,-6,1); +$b = $a + random(2,3,1); +$c = $b + random(2,4,1); +$d = $c + random(2,3,1); +$e = $d + random(2,4,1); + +# funciton values + +$fm10 = random(2,7,1)*random(-1,1,2); +$fa = 0; +$fb = random(2,7,1)*random(-1,1,2); +$fc = 0; +$fd = random(2,7,1)*random(-1,1,2); +$fe = 0; +$f10 = random(2,7,1)*random(-1,1,2); + +# area values A(x) = int_$a ^x f(t) dt +# all shapes are triangles 1/2 base height +# base = interval length; height = function values +$Fb = Compute("1/2*($b-$a)*$fb"); +$Fc = Compute("1/2*($c-$a)*$fb"); +$Fd = Compute("1/2*($c-$a)*$fb + 1/2*($d-$c)*$fd"); +$Fe = Compute("1/2*($c-$a)*$fb + 1/2*($e-$c)*$fd"); + +#ask above b or c and d or e +$pt1 = list_random($b,$c); +$pt2 = list_random($d,$e); + +if($pt1 == $b) +{$Apt1 = $Fb;} +else +{$Apt1 = $Fc;} + +if($pt2 == $d) +{$Apt2 = $Fd;} +else +{$Apt2 = $Fe;} + +$popup = DropDown( + [ + 'a function of one variable: t', + 'a function of one variable: x', + 'a function of two variables: t and x', + 'not a function' + ], + 'a function of one variable: x' +); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) --($d,$fd); +\draw[red, very thick] ($d,$fd) -- ($e,$fe); +\draw[->,red, very thick] ($e,$fe) -- (10,$f10); +\filldraw[red, very thick] ($a,$fa) circle (2.5 pt); +\filldraw[red, very thick] ($b,$fb) circle (2.5 pt); +\filldraw[red, very thick] ($c,$fc) circle (2.5 pt); +\filldraw[red, very thick] ($d,$fd) circle (2.5 pt); +\filldraw[red, very thick] ($e,$fe) circle (2.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the continuous function [`y=f(x)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +Let [``A(x) = \int_{[$a]}^{x} f(t)\, dt ``]. + ++ The quantity [`A`] is [_]{$popup} + +Determine the following values of [`A.`] + ++ [`A([$pt1]) = \, `] [_]{$Apt1}{5} + ++ [`A([$pt2]) = \, `] [_]{$Apt2}{5} + +END_PGML + +BEGIN_PGML_SOLUTION ++ [``A(x) = \int_{[$a]}^{x} f(t)\, dt ``] is a function of [`x`], and the value of [`A(x)`] is the net area between the graph of [`y=f(t)`] and the (horizontal) [`t`]-axis over the interval [`[[$a],x].`] + ++ We compute [`A([$pt1])`] and [`A([$pt2])`] by evaluating the areas of the appropriate triangles formed by the graph of [`y=f(x)`] and the [`x`]-axis, and adding them together (if needed). We use that the area of a triangle of base length [`b`] and height [`h`] is equal to [``\frac{bh}{2}.``] In our situation, the base-length will be given by the length of a (sub)-interval of [`[[$a],x]`] and the height will be given by the appropriate value of the function [`f.`] + +Remember that regions above the [`t`]- or [`x`]-axis are assigned positive values and regions below the [`t`]- or [`x`]-axis are assigned negative values, which are "built-in" to the values of the function [`f`] below. + + + + [``A([$pt1]) \int_{[$a]}^{[$pt1]} f(t) \, dt = \frac{1}{2}([$pt1]-[$a])f([$b]) = \frac{1}{2}([$pt1]-[$a])([$fb]) = [$Apt1]``] + + + [``A([$pt2]) = \int_{[$a]}^{[$pt2]} f(t) \, dt ``] and we can split up the integral over the intervals [`[[$a],[$c]]`] and [`[[$c],[$pt2]]`]: [```\begin{aligned}A([$pt2]) & = \int_{[$a]}^{[$pt2]} f(t) \, dt \\ & = \int_{[$a]}^{[$c]} f(t) \, dt + \int_{[$c]}^{[$pt2]} f(t) \, dt \\ & = \frac{1}{2}([$c]-[$a])f([$b]) + \frac{1}{2}([$pt2]-[$c])f([$d]) \\ & = \frac{1}{2}([$c]-[$a])([$fb]) + \frac{1}{2}([$pt2]-[$c])([$fd]) \\ & = [$Apt2]\end{aligned}```] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-2-1-An-C/12-2-1-An-C-area-function-2-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-2-1-An-C/12-2-1-An-C-area-function-2-jms.pg new file mode 100644 index 0000000000..b46a71a9c8 --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-2-1-An-C/12-2-1-An-C-area-function-2-jms.pg @@ -0,0 +1,128 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Conceptual understanding of integration) +## Date(10 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +#intervals +# (-10,$a), ($a,$c), ($c,$e), and ($e,10) + +$a = random(-8,-6,1); +$b = $a + random(2,3,1); +$c = $b + random(2,4,1); +$d = $c + random(2,3,1); +$e = $d + random(2,4,1); + +# funciton values +# make sure that fb and fd have opposite sign + +$fm10 = random(2,7,1)*random(-1,1,2); +$fa = 0; +$fb = random(2,7,1)*random(-1,1,2); +$fc = 0; +if($fb > 0) +{$fd = random(-7,-2,1);} +else +{$fd = random(2,7,1);} +$fe = 0; +$f10 = random(2,7,1)*random(-1,1,2); + +# area values A(x) = int_$a ^x f(t) dt +# all shapes are triangles 1/2 base height +# base = interval length; height = function values +# using absolute value of f in this problem +$Fb = Compute("1/2*($b-$a)*abs($fb)"); +$Fc = Compute("1/2*($c-$a)*abs($fb)"); +$Fd = Compute("1/2*($c-$a)*abs($fb) + 1/2*($d-$c)*abs($fd)"); +$Fe = Compute("1/2*($c-$a)*abs($fb) + 1/2*($e-$c)*abs($fd)"); + +#ask above b or c and d or e +$pt1 = list_random($b,$c); +$pt2 = list_random($d,$e); + +if($pt1 == $b) +{$Apt1 = $Fb;} +else +{$Apt1 = $Fc;} + +if($pt2 == $d) +{$Apt2 = $Fd;} +else +{$Apt2 = $Fe;} + +$popup = DropDown( + [ + 'a function of one variable: t', + 'a function of one variable: x', + 'a function of two variables: t and x', + 'not a function' + ], + 'a function of one variable: x' +); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) --($d,$fd); +\draw[red, very thick] ($d,$fd) -- ($e,$fe); +\draw[->,red, very thick] ($e,$fe) -- (10,$f10); +\filldraw[red, very thick] ($a,$fa) circle (2.5 pt); +\filldraw[red, very thick] ($b,$fb) circle (2.5 pt); +\filldraw[red, very thick] ($c,$fc) circle (2.5 pt); +\filldraw[red, very thick] ($d,$fd) circle (2.5 pt); +\filldraw[red, very thick] ($e,$fe) circle (2.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the continuous function [`y=f(x)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +Let [``A(x) = \int_{[$a]}^{x} |f(t)|\, dt ``]. + ++ The quantity [`A`] is [_]{$popup} + +Determine the following values of [`A.`] + ++ [`A([$pt1]) = \, `] [_]{$Apt1}{5} + ++ [`A([$pt2]) = \, `] [_]{$Apt2}{5} + +END_PGML + +BEGIN_PGML_SOLUTION ++ [``A(x) = \int_{[$a]}^{x} |f(t)|\, dt ``] is a function of [`x`], and since we are integrating [`|f(t)|,`] the value of [`A(x)`] is the **total** area between the graph of [`y=f(t)`] and the (horizontal) [`t`]-axis over the interval [`[[$a],x].`] + ++ We compute [`A([$pt1])`] and [`A([$pt2])`] by evaluating the areas of the appropriate triangles formed by the graph of [`y=f(x)`] and the [`x`]-axis, and adding them together (if needed). We use that the area of a triangle of base length [`b`] and height [`h`] is equal to [``\frac{bh}{2}.``] In our situation, the base-length will be given by the length of a (sub)-interval of [`[[$a],x]`] and the height will be given by the appropriate value of the function [`f.`] + +Remember that since we are integrating [`|f(t)|,`] we assign all regions above/below the [`t`]- or [`x`]-axis positive values by taking the absolute value of the values of the function [`f.`] + + + [``A([$pt1]) = \int_{[$a]}^{[$pt1]} |f(t)| \, dt = \frac{1}{2}([$pt1]-[$a])|f([$b])| = \frac{1}{2}([$pt1]-[$a])|[$fb]| = [$Apt1]``] + + + [``A([$pt2]) = \int_{[$a]}^{[$pt2]} |f(t)| \, dt ``] and we can split up the integral over the intervals [`[[$a],[$c]]`] and [`[[$c],[$pt2]]`]: [```\begin{aligned}A([$pt2]) & = \int_{[$a]}^{[$pt2]} |f(t)| \, dt \\ & = \int_{[$a]}^{[$c]} |f(t)| \, dt + \int_{[$c]}^{[$pt2]} |f(t)| \, dt \\ & = \frac{1}{2}([$c]-[$a])|f([$b])| + \frac{1}{2}([$pt2]-[$c])|f([$d])| \\ & = \frac{1}{2}([$c]-[$a])|[$fb]| + \frac{1}{2}([$pt2]-[$c])|[$fd]| \\ & = [$Apt2]\end{aligned}```] + + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-3-1-Ap-C/12-3-1-Ap-C-area-graph-1-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-3-1-Ap-C/12-3-1-Ap-C-area-graph-1-jms.pg new file mode 100644 index 0000000000..9a25a4227e --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-3-1-Ap-C/12-3-1-Ap-C-area-graph-1-jms.pg @@ -0,0 +1,128 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Definite integrals (without trigonometric functions)) +## Date(10 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); + +#intervals +# (-10,$a), ($a,$c), ($c,$e), and ($e,10) + +$a = random(-8,-6,1); +$b = $a + random(2,4,1); +$c = $b + random(2,3,1); +$d = $c + random(2,4,1); +$e = $d + random(2,3,1); + +# funciton values + +$fm10 = random(2,7,1)*random(-1,1,2); +$fa = 0; +$fb = random(2,7,1)*random(-1,1,2); +$fc = 0; +# make sure that fb and fd have opposite sign +if($fb > 0) +{$fd = random(-7,-2,1);} +else +{$fd = random(2,7,1);} +$fe = 0; +# make sure that fm10 and f10 have opposite sign +if($fm10 > 0) +{$f10 = random(-7,-2,1);} +else +{$f10 = random(2,7,1);} + +# area values A(x) = int_$a ^x f(t) dt +# all shapes are triangles 1/2 base height +# base = interval length; height = function values +$Fm10 = Compute("1/2*(-10-$a)*$fm10"); +$Fb = Compute("1/2*($b-$a)*$fb"); +$Fc = Compute("1/2*($c-$a)*$fb"); +$Fd = Compute("1/2*($c-$a)*$fb + 1/2*($d-$c)*$fd"); +$Fe = Compute("1/2*($c-$a)*$fb + 1/2*($e-$c)*$fd"); +$F10 = Compute("1/2*($c-$a)*$fb + 1/2*($e-$c)*$fd + 1/2(10-$e)*$f10"); + +#ask aboout b or c and d or e +$pt1 = list_random($b,$c); +$pt2 = list_random($d,$e); + +if($pt1 == $b) +{$Apt1 = $Fb;} +else +{$Apt1 = $Fc;} + +if($pt2 == $d) +{$Apt2 = $Fd;} +else +{$Apt2 = $Fe;} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) --($d,$fd); +\draw[red, very thick] ($d,$fd) -- ($e,$fe); +\draw[red, very thick] ($e,$fe) -- (10,$f10); +\filldraw[red, very thick] (-10,$fm10) circle (2.5 pt); +\filldraw[red, very thick] ($a,$fa) circle (2.5 pt); +\filldraw[red, very thick] ($b,$fb) circle (2.5 pt); +\filldraw[red, very thick] ($c,$fc) circle (2.5 pt); +\filldraw[red, very thick] ($d,$fd) circle (2.5 pt); +\filldraw[red, very thick] ($e,$fe) circle (2.5 pt); +\filldraw[red, very thick] (10,$f10) circle (2.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the continuous function [`y=f(x)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +Evaluate the following definite integrals. + ++ [``\int_{[$a]}^{-10} f(x) \, dx = \, ``] [_]{$Fm10}{5} + ++ [``\int_{[$a]}^{[$pt1]} f(x) \, dx = \, ``] [_]{$Apt1}{5} + ++ [``\int_{[$a]}^{[$pt2]} f(x) \, dx = \, ``][_]{$Apt2}{5} + ++ [``\int_{[$a]}^{10} f(x) \, dx = \, ``] [_]{$F10}{5} + +END_PGML + +BEGIN_PGML_SOLUTION +We compute these definite integrals by evaluating the areas of the appropriate triangles formed by the graph of [`y=f(x)`] and the [`x`]-axis, and adding them together (if needed). We use that the area of a triangle of base length [`b`] and height [`h`] is equal to [``\frac{bh}{2}.``] In our situation, the base-length will be given by the length of a (sub)-interval of [`[[$a],b]`] and the height will be given by the appropriate value of the function [`f.`] + +Remember that regions above the [`x`]-axis are assigned positive values and regions below the [`x`]-axis are assigned negative values, which are "built-in" to the values of the function [`f`] below. + + + Note that in the first integral we are integrating right-to-left so we can first flip the limits of integration: [```\begin{aligned}\int_{[$a]}^{-10} f(x) \, dx & = - \int_{-10}^{[$a]} f(x) \, dx \\ & = -\frac{1}{2}([$a]-(-10))f(-10) \\ & = -\frac{1}{2}([$a]+10)([$fm10]) \\ & = [$Fm10].\end{aligned}```] + + + [``\int_{[$a]}^{[$pt1]} f(x) \, dx = \frac{1}{2}([$pt1]-[$a])f([$b]) = \frac{1}{2}([$pt1]-[$a])([$fb]) = [$Apt1]``] + + + We can split up the integral over the intervals [`[[$a],[$c]]`] and [`[[$c],[$pt2]]`]: [```\begin{aligned}\int_{[$a]}^{[$pt2]} f(x) \, dx & = \int_{[$a]}^{[$c]} f(x) \, dx + \int_{[$c]}^{[$pt2]} f(x) \, dx \\ & = \frac{1}{2}([$c]-[$a])f([$b]) + \frac{1}{2}([$pt2]-[$c])f([$d]) \\ & = \frac{1}{2}([$c]-[$a])([$fb]) + \frac{1}{2}([$pt2]-[$c])([$fd]) \\ & = [$Apt2]\end{aligned}```] + + + Again, we can split up the integral: [```\int_{[$a]}^{10} f(x) \, dx = \int_{[$a]}^{[$c]} f(x) \, dx + \int_{[$c]}^{[$e]} f(x) \, dx + \int_{[$e]}^{10} f(x) \, dx ```] + + So we get [```\begin{aligned}\int_{[$a]}^{-10} f(x) \, dx & = \frac{1}{2}([$c]-[$a])f([$b]) + \frac{1}{2}([$e]-[$c])f([$d]) + \frac{1}{2}(10-[$e])f(10) \\ & = \frac{1}{2}([$c]-[$a])([$fb]) + \frac{1}{2}([$e]-[$c])([$fd]) + \frac{1}{2}(10-[$e])([$f10]) \\ & = [$F10].\end{aligned}```] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-3-1-Ap-C/12-3-1-Ap-C-area-graph-2-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-3-1-Ap-C/12-3-1-Ap-C-area-graph-2-jms.pg new file mode 100644 index 0000000000..6059e38336 --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-3-1-Ap-C/12-3-1-Ap-C-area-graph-2-jms.pg @@ -0,0 +1,139 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Definite integrals (without trigonometric functions)) +## Date(10 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); + +#intervals +$a = random(-8,-6,1); +$b = $a + random(2,4,1); +$c = $b + random(2,3,1); +$d1 = $c + random(1,2,1); +$d2 = $d1 + random(1,2,1); +$e = $d2 + random(2,3,1); + +# funciton values +$fm10 = random(2,6,1)*random(-1,1,2); +$fa = $fm10; +#make sure fb has same sign as fm10, fa +if($fm10 < 0) +{$fb = random(-7,-2,1);} +else +{$fb = random(2,7,1);} +$fc = 0; +# make sure that fb and fd have opposite sign +if($fb > 0) +{$fd = random(-6,-2,1);} +else +{$fd = random(2,6,1);} +$fe = 0; +# make sure that fe and f10 have the same sign +$f10 = random(2,7,1)*random(-1,1,2); + +# area values over sub-intervals +# all shapes are rectangles (base height) or triangles (1/2 base height) +# base = interval length; height = function values +$Am10toa = Compute("($a-(-10))*$fm10"); #rectangle +$Aatob = 1/2*($b-$a)*(max($fm10,$fb)-min($fm10,$fb)) +($b-$a)*min($fm10,$fb); #rectangle + trangle +$Abtoc = Compute("1/2*($c-$b)*$fb"); #triangle +$Actod1 = Compute("1/2*($d1-$c)*$fd");#triangle +$Ad1tod2 = Compute("($d2-$d1)*$fd"); #rectangle +$Ad2toe = Compute("1/2*($e-$d2)*$fd"); #triangle +$Aeto10 = Compute("1/2*(10-$e)*$f10"); #triangle + +#ask aboout b or c and d or e +$pt1 = list_random($b,$c); +$pt2 = list_random($d1,$e); + +if($pt1 == $b) +{$Apt1to10 = Compute("$Abtoc + $Actod1 + $Ad1tod2 + $Ad2toe + $Aeto10");} +else +{$Apt1to10 = Compute("$Actod1 + $Ad1tod2 + $Ad2toe + $Aeto10");} + +if($pt2 == $d1) +{$Am10topt2 = Compute("$Am10toa + $Aatob + $Abtoc + $Actod1");} +else +{$Am10topt2 = Compute("$Am10toa + $Aatob + $Abtoc + $Actod1 + $Ad1tod2 + $Ad2toe");} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) -- ($d1,$fd); +\draw[red, very thick] ($d1,$fd) -- ($d2,$fd); +\draw[red, very thick] ($d2,$fd) -- ($e,$fe); +\draw[red, very thick] ($e,$fe) -- (10,$f10); +\filldraw[red, very thick] (-10,$fm10) circle (2.5 pt); +\filldraw[red, very thick] ($a,$fa) circle (2.5 pt); +\filldraw[red, very thick] ($b,$fb) circle (2.5 pt); +\filldraw[red, very thick] ($c,$fc) circle (2.5 pt); +\filldraw[red, very thick] ($d1,$fd) circle (2.5 pt); +\filldraw[red, very thick] ($d2,$fd) circle (2.5 pt); +\filldraw[red, very thick] ($e,$fe) circle (2.5 pt); +\filldraw[red, very thick] (10,$f10) circle (2.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the continuous function [`y=f(x)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +Evaluate the following definite integrals. + ++ [``\int_{-10}^{[$pt2]} f(x) \, dx = \, ``] [_]{$Am10topt2}{5} + ++ [``\int_{[$pt1]}^{10} f(x) \, dx = \, ``] [_]{$Apt1to10}{5} + +END_PGML + +$rec = min($fm10,$fb); +$tri = max($fm10,$fb)-min($fm10,$fb); +$Am10tod1 = $Am10toa + $Aatob + $Abtoc + $Actod1; + +BEGIN_PGML_SOLUTION +We compute these definite integrals by evaluating the areas of the appropriate rectangles and triangles formed by the graph of [`y=f(x)`] and the [`x`]-axis, over sub-intervals of the domain of integration, and adding them together. +Remember that regions above the [`x`]-axis are assigned "positive areas" and regions below the [`x`]-axis are assigned "negative areas", which are "built-in" to the values of the function [`f`]. + +Here is an example calculation for the integral [``\int_{-10}^{[$d1]} f(x) \, dx ``] + +First split the integral up over sub-intervals +[```\int_{-10}^{[$d1]} f(x) \, dx = \int_{-10}^{[$a]} f(x) \, dx + \int_{[$a]}^{[$b]} f(x) \, dx + \int_{[$b]}^{[$c]} f(x) \, dx + \int_{[$c]}^{[$d1]} f(x) \, dx,```] +and then compute the individual definite integrals using the areas of basic shapes. + ++ [`` \int_{-10}^{[$a]} f(x) \, dx``] is the area of a rectangle of width [`[$a-(-10)]`] and height [`[$fm10]`], so [`` \int_{-10}^{[$a]} f(x) \, dx = [$a-(-10)]([$fm10]) = [$Am10toa].``] + ++ [``\int_{[$a]}^{[$b]} f(x) \, dx``] can be evaluated by splitting the region over the interval [`[[$a],[$b]]`] into a rectangle of width [`[$b-$a]`] and height [`[$rec],`] and a triangle of base-length [`[$b-$a]`] and height [`[$tri].`] Then [``\int_{[$a]}^{[$b]} f(x) \, dx = [$b-$a]([$rec]) + \frac{1}{2}[$b-$a]([$tri]) = [$Aatob].``] + + **Note** for some versions of this problem, the there will **not** be a triangular region to evaluate [``\int_{[$a]}^{[$b]} f(x) \, dx.``] + ++ [``\int_{[$b]}^{[$c]} f(x) \, dx``] is the area of a triangle of base-length [`[$c-$b]`] and height [`[$fb],`] so +[``\int_{[$b]}^{[$c]} f(x) \, dx = \frac{1}{2}[$c-$b]([$fb]) = [$Abtoc]``] + ++ [``\int_{[$c]}^{[$d1]} f(x) \, dx``] is the area of a triangle of base-length [`[$d1-$c]`] and height [`[$fd],`] so +[``\int_{[$c]}^{[$d1]} f(x) \, dx = \frac{1}{2}[$d1-$c]([$fd]) = [$Actod1]``] + +Therefore, [``\int_{-10}^{[$d1]} f(x) \, dx = [$Am10toa] + [$Aatob] + [$Abtoc] + [$Actod1] = [$Am10tod1].``] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-3-1-Ap-C/12-3-1-Ap-C-area-graph-3-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-3-1-Ap-C/12-3-1-Ap-C-area-graph-3-jms.pg new file mode 100644 index 0000000000..daa4b7f1ce --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-3-1-Ap-C/12-3-1-Ap-C-area-graph-3-jms.pg @@ -0,0 +1,122 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Definite integrals (without trigonometric functions)) +## Date(11 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); + +#intervals +$a = random(-8,-6,1); +$c = random(2,3,1); +$d = $c + random(2,3,1); +$e = $d + random(1,2,1); + +# funciton values +#rectangle +$fm10 = random(2,5,1)*random(-1,1,2); +$fa = $fm10; +#quarter circle +$r = random(2,5,1); +$rsq = abs($r)**2; #squared radius +$sign = random(-1,1,2); +$rsign = $r*$sign; +# values for positive x +$fc = 0; +$fd = random(2,7,1)*random(-1,1,2); +$fe = $fd; +$f10 = random(2,7,1)*random(-1,1,2); + +# signed area of quarter circle +$circ = Compute("($sign/4)*pi*($r**2)"); + +# area values over sub-intervals +# all shapes are rectangles (base height), triangles (1/2 base height), or 1/4 circles +# base = interval length; height = function values +# $Am10toa = Compute("($a-(-10))*$fm10"); #rectangle +$Aatomr = Compute("1/2*(-$r-$a)*$fa"); +$A0toc = Compute("1/2*($c-0)*($rsign)");#triangle +$Actod = Compute("1/2($d-$c)*$fd"); #triangle +$Adtoe = Compute("($e-$d)*$fd"); #rectangle +#Aeto10 will not be "nice" since we would need the equation of this line segment in general + +$ans = Compute("1/2*(-$r-$a)*$fa + ($sign/4)*pi*($r**2) + 1/2*($c-0)*($rsign) + 1/2($d-$c)*$fd + ($e-$d)*$fd"); + + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- (-$r,0); +\draw[red, very thick, smooth] plot[domain={-$r}:{0}] (\x,{$sign*pow($rsq-\x*\x,1/2)}); +\draw[red, very thick] (0,$sign*$r) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) -- ($d,$fd); +\draw[red, very thick] ($d,$fd) -- ($e,$fe); +\draw[red, very thick] ($e,$fe) -- (10,$f10); +\filldraw[red, very thick] (-10,$fm10) circle (2.5 pt); +\filldraw[red, very thick] ($a,$fa) circle (2.5 pt); +\filldraw[red, very thick] (-$r,0) circle (2.5 pt); +\filldraw[red, very thick] (0,$sign*$r) circle (2.5 pt); +\filldraw[red, very thick] ($c,$fc) circle (2.5 pt); +\filldraw[red, very thick] ($d,$fd) circle (2.5 pt); +\filldraw[red, very thick] ($e,$fe) circle (2.5 pt); +\filldraw[red, very thick] (10,$f10) circle (2.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the continuous function [`y=f(x)`]. + +You can assume that the curved portion of the graph is a sector of a circle centred at [`(0,0)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +Evaluate the following definite integrals. + ++ [``\int_{-[$r]}^{0} f(x) \, dx = \, ``] [_]{$circ}{5} + ++ [``\int_{[$a]}^{[$e]} f(x) \, dx = \, ``] [_]{$ans}{5} + +END_PGML + +$mrma = -$r-$a; +$anslesscirc = $ans-$circ; + +BEGIN_PGML_SOLUTION ++ [``\int_{-[$r]}^{0} f(x) \, dx ``] is the signed area of the quarter circle of radius [`r=[$r]`] centred at [`(0,0),`] so we have [``\int_{-[$r]}^{0} f(x) \, dx = \, \frac{[$sign]}{4}\pi[$r]^2 = \frac{[$sign*$rsq]}{4}\pi.``] + ++ We will split the integral up over sub-intervals and then use the appropriate areas of (quarter) circles, rectangles and triangles to find the desired integral. + + [```\int_{[$a]}^{[$e]} f(x) \, dx = \int_{[$a]}^{-[$r]} f(x) \, dx + \int_{-[$r]}^{0} f(x) \, dx + \int_{0}^{[$c]} f(x) \, dx + \int_{[$c]}^{[$d]} f(x) \, dx + \int_{[$d]}^{[$e]} f(x) \, dx```] + + + [``\int_{[$a]}^{-[$r]} f(x) \, dx = \frac{1}{2}(-[$r]-[$a])([$fa]) = \frac{1}{2}([$mrma])([$fa]) = [$Aatomr]``] is the signed area of triangle with base length [`[$mrma]`] and height [`[$fa].`] + + + From above: [``\int_{-[$r]}^{0} f(x) \, dx = \, \frac{[$sign]}{4}\pi[$r]^2 = \frac{[$sign*$rsq]}{4}\pi.``] + + + [``\int_{0}^{[$c]} f(x) \, dx = \frac{1}{2}([$c]-0)([$rsign]) = \frac{1}{2}([$c])([$rsign]) = [$A0toc]``] is the signed area of a triangle of base length [`[$c]`] and height [`[$rsign].`] + + + [``\int_{[$c]}^{[$d]} f(x) \, dx = \frac{1}{2}([$d]-[$c])([$fd]) = \frac{1}{2}([$d-$c])([$fd]) = [$Actod]``] is the signed area of a triangle of base length [`[$d-$c]`] and height [`[$fd].`] + + + [``\int_{[$d]}^{[$e]} f(x) \, dx = ([$e]-[$d])([$fd]) = ([$e-$d])([$fe]) = [$Adtoe] ``] is the signed area of a rectangle of width [`[$e-$d]`] and height [`[$fe].`] + +Therefore, [```\int_{[$a]}^{[$e]} f(x) \, dx = ([$Aatomr]) + \left(\frac{[$sign*$rsq]}{4}\pi\right) + ([$A0toc]) + ([$Actod]) + ([$Adtoe]) = [$anslesscirc] + \left(\frac{[$sign*$rsq]}{4}\pi\right)```] + + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-3-2-Ap-C/12-3-2-Ap-C-pw-def-no-ftc-1-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-3-2-Ap-C/12-3-2-Ap-C-pw-def-no-ftc-1-jms.pg new file mode 100644 index 0000000000..7e6353c06a --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-3-2-Ap-C/12-3-2-Ap-C-pw-def-no-ftc-1-jms.pg @@ -0,0 +1,109 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Definite integrals (without trigonometric functions)) +## Date(11 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "PGtikz.pl" # Graphing tool used in the solution +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-3,-2,1); +$absa = abs($a); + +$m = non_zero_random(-2,2,1); +if($m<0) +{$b = random(1,3,1);} +else +{$b = random(-3,-1,1);} + +$ma = $m*$a; + + +$r = random(2,5,1); +$rsq = $r**2; +$twor = 2*$r; + +$sign = random(-1,1,2); + +$f1 = Formula("$m*x+$b")->reduce(); +$f2 = Formula("$sign*sqrt($rsq - (x-$r)**2)")->reduce(); + +$ans = Compute("1/2*$absa*($ma) + $absa*$b + $sign*pi/4*$rsq"); +$ans1 = Compute("1/2*$absa*($ma) + $absa*$b"); +$ans2 = Compute("$sign*pi/4*$rsq"); + +$limit = max($r,abs($m*$a+$b)); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] ($a,0) -- ($twor,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-$limit) -- (0,$limit) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] ($a,-$limit) grid ($twor,$limit); +\foreach \x in {$a,...,$twor} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-$limit,...,$limit} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[red, very thick] plot[domain={$a}:{0}] (\x, $m*\x+$b); +\draw[red, very thick, smooth] plot[domain={0}:{$twor}] (\x,{$sign*pow({$rsq-(\x-$r)*(\x-$r)},1/2)}); +END_TIKZ + +BEGIN_PGML +Consider the piecewise defined function [``` f(x) = \begin{cases} [$f1] & x < 0 \\ [$f2] & 0 \leq x \leq [$twor] \end{cases} ```] + +Evaluate the definite integral: +[``\int_{[$a]}^{[$r]} f(x) \, dx = \, ``][_]{$ans}{5} +END_PGML + +BEGIN_PGML_HINT +Consider graphing the piecewise defined function [`y=f(x).`] + +Note that if [`y = [$f2]`], then [`(x-[$r])^2 + y^2 = [$rsq].`] +END_PGML_HINT + +if($sign == 1) +{$updown = 'above';} +else +{$updown = 'below';} + +$coeff = Formula("$sign*pi")->reduce(); + + +BEGIN_PGML_SOLUTION +First, split up the integral into two parts based on where the definition of [`f`] changes "pieces" +[```\int_{[$a]}^{[$r]} f(x) \, dx = \int_{[$a]}^{0} f(x) \, dx + \int_{0}^{[$r]} f(x) \, dx,```] +now we will compute these two integrals separately using a graph of [`f`]. + +We obtain the graph of the function [`y=f(x)`] by graphing the line [`y=[$f1]`] for [`x<0,`] and the function [`y=[$f2]`] for [`0\leq x \leq [$twor]`], which is a semicircle [$updown] the [`x`]-axis with radius [`[$r]`] centred at the point [`([$r],0)`] on the [`x`]-axis. + + [@ image($graph_image, height =>500, width => 500, tex_size => 800) @]* + + Now we can see that [``\int_{[$a]}^{0} f(x) \, dx``] is the signed area of a triangle with base-length [`[$absa]`] and height [`[$m*$a+$b] - [$b] = [$m*$a]`] plus the signed area of rectangle of width [`[$absa]`] and height [`[$b]`]. Therefore, [``\int_{[$a]}^{0} f(x) \, dx = \frac{1}{2}[$absa]([$m*$a]) + [$absa]([$b]) = [$ans1].``] + + We also observe that [``\int_{0}^{[$r]} f(x) \, dx``] is the signed area of a quarter circle radius [`[$r]`] and [``\int_{0}^{[$r]} f(x) \, dx =\frac{[$coeff]}{4}[$r]^2 = \frac{[$coeff*$rsq]}{4}``] + +Putting this together we have: +[```\int_{[$a]}^{[$r]} f(x) \, dx = \int_{[$a]}^{0} f(x) \, dx + \int_{0}^{[$r]} f(x) \, dx = [$ans1] + \frac{[$coeff*$rsq]}{4}.```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-3-2-Ap-C/12-3-2-Ap-C-pw-def-no-ftc-2-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-3-2-Ap-C/12-3-2-Ap-C-pw-def-no-ftc-2-jms.pg new file mode 100644 index 0000000000..c9d8b2586b --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-3-2-Ap-C/12-3-2-Ap-C-pw-def-no-ftc-2-jms.pg @@ -0,0 +1,102 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Definite integrals (without trigonometric functions)) +## Date(11 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "PGtikz.pl" # Graphing tool used in the solution +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-4,-2,1); +$absa = abs($a); + +$m = non_zero_random(-2,2,1); +$ma = $m*$a; + +$r = random(2,5,1); +$rsq = $r**2; +$twor = 2*$r; + +$sign = random(-1,1,2); + +$f1 = Formula("$m*x")->reduce(); +$f2 = Formula("$sign*sqrt($rsq - (x-$r)**2)")->reduce(); + +$ans = Compute("1/2*$absa*($ma) + $sign*pi/2*$rsq"); +$ans1 = Compute("1/2*$absa*($ma)"); +$ans2 = Compute("$sign*pi/2*$rsq"); + +$limit = max($r,abs($m*$a)); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] ($a,0) -- ($twor,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-$limit) -- (0,$limit) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] ($a,-$limit) grid ($twor,$limit); +\foreach \x in {$a,...,$twor} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-$limit,...,$limit} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[red, very thick] plot[domain={$a}:{0}] (\x, $m*\x); +\draw[red, very thick, smooth] plot[domain={0}:{$twor}] (\x,{$sign*pow({$rsq-(\x-$r)*(\x-$r)},1/2)}); +END_TIKZ + +BEGIN_PGML +Consider the piecewise defined function [``` f(x) = \begin{cases} [$f1] & x < 0 \\ [$f2] & 0 \leq x \leq [$twor] \end{cases} ```] + +Evaluate the definite integral: +[``\int_{[$a]}^{[$twor]} f(x) \, dx = \, ``][_]{$ans}{5} +END_PGML + +BEGIN_PGML_HINT +Consider graphing the piecewise defined function [`y=f(x).`] + +Note that if [`y = [$f2]`], then [`(x-[$r])^2 + y^2 = [$rsq].`] +END_PGML_HINT + +if($sign == 1) +{$updown = 'above';} +else +{$updown = 'below';} + +$coeff = Formula("$sign*pi")->reduce(); + +BEGIN_PGML_SOLUTION +First, split up the integral into two parts based on where the definition of [`f`] changes "pieces" +[```\int_{[$a]}^{[$twor]} f(x) \, dx = \int_{[$a]}^{0} f(x) \, dx + \int_{0}^{[$twor]} f(x) \, dx,```] +now we will compute these two integrals separately using a graph of [`f`]. + +We obtain the graph of the function [`y=f(x)`] by graphing the line [`y=[$f1]`] for [`x<0,`] and the function [`y=[$f2]`] for [`0\leq x \leq [$twor]`], which is a semicircle [$updown] the [`x`]-axis with radius [`[$r]`] centred at the point [`([$r],0)`] on the [`x`]-axis. + + [@ image($graph_image, height =>500, width => 500, tex_size => 800) @]* + + Now we can see that [``\int_{[$a]}^{0} f(x) \, dx``] is the signed area of a triangle with base-length [`[$absa]`] and height [`[$m*$a].`] Therefore, [``\int_{[$a]}^{0} f(x) \, dx = \frac{1}{2}[$absa]([$m*$a]) = [$ans1].``] + + We also observe that [``\int_{0}^{[$twor]} f(x) \, dx``] is the signed area of a semicircle radius [`[$r]`] and [``\int_{0}^{[$twor]} f(x) \, dx =\frac{[$coeff]}{2}[$r]^2 = \frac{[$coeff*$rsq]}{2}``] + +Putting this together we have: +[```\int_{[$a]}^{[$twor]} f(x) \, dx = \int_{[$a]}^{0} f(x) \, dx + \int_{0}^{[$twor]} f(x) \, dx = [$ans1] + \frac{[$coeff*$rsq]}{2}.```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-3-2-Ap-C/12-3-2-Ap-C-pw-def-no-ftc-3-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-3-2-Ap-C/12-3-2-Ap-C-pw-def-no-ftc-3-jms.pg new file mode 100644 index 0000000000..97c2c12835 --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-3-2-Ap-C/12-3-2-Ap-C-pw-def-no-ftc-3-jms.pg @@ -0,0 +1,91 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Definite integrals (without trigonometric functions)) +## Date(11 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "PGtikz.pl" # Graphing tool used in the solution +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-5,-2,1); +$b = random(3,5,1); +$t = $a + random(2,3,1); +if($t == 0) +{$t = $t+1;} +$c = non_zero_random(-5,5,1); + +$m = non_zero_random(-2,2,1); +$mbt = $m*($b-$t); + +$f1 = Formula("$c")->reduce(); +$f2 = Formula("$m*(x-$t)")->reduce(); + +$ans = Compute("$c*($t-$a) + (1/2)*($b-$t)*$mbt"); +$ans1 = Compute("$c*($t-$a) "); +$ans2 = Compute("(1/2)*($b-$t)*$mbt"); + +$limit = max(abs($c)+1,abs($m*($b-$t))); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] ($a,0) -- ($b,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-$limit) -- (0,$limit) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] ($a,-$limit) grid ($b,$limit); +\foreach \x in {$a,...,$b} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-$limit,...,$limit} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[red, very thick] plot[domain={$a}:{$t}] (\x, $c); +\draw[red, very thick, smooth] plot[domain={$t}:{$b}] (\x,{$m*(\x-$t)}); +END_TIKZ + +BEGIN_PGML +Consider the piecewise defined function [``` f(x) = \begin{cases} [$f1] & x \leq [$t] \\ [$f2] & x > [$t] \end{cases} ```] + +Evaluate the definite integral: +[``\int_{[$a]}^{[$b]} f(x) \, dx = \, ``][_]{$ans}{5} +END_PGML + +BEGIN_PGML_HINT +Consider graphing the piecewise defined function [`y=f(x).`] +END_PGML_HINT + +BEGIN_PGML_SOLUTION +First, split up the integral into two parts based on where the definition of [`f`] changes "pieces" +[```\int_{[$a]}^{[$b]} f(x) \, dx = \int_{[$a]}^{[$t]} f(x) \, dx + \int_{[$t]}^{[$b]} f(x) \, dx,```] +now we will compute these two integrals separately using a graph of [`f`]. + +We obtain the graph of the function [`y=f(x)`] by graphing the horizontal line [`y=[$f1]`] for [`[$a] \leq x \leq [$t],`] and the function [`y=[$f2]`] for [`[$t] < x \leq [$b]`], which is a line with slope [`[$m]`] and [`x`]-intercept [`x=[$t].`] + + [@ image($graph_image, height =>500, width => 500, tex_size => 800) @]* + +Now [``\int_{[$a]}^{[$t]} f(x) \, dx``] is the signed area of a rectangle with width [`[$t]-[$a] = [$t-$a]`] and height [`[$c],`] so we have [``\int_{[$a]}^{[$t]} f(x) \, dx = [$t-$a]([$c]) = [$ans1].``] + +On the other hand [``\int_{[$t]}^{[$b]} f(x) \, dx``] is the signed are of a triangle with base-length [`[$b]-[$t] = [$b-$t]`] and height [`[$mbt]`], and we get [``\int_{[$t]}^{[$b]} f(x) \, dx = \frac{1}{2}[$b-$t]([$mbt]) = [$ans2].``] + +Therefore, [```\int_{[$a]}^{[$b]} f(x) \, dx = \int_{[$a]}^{[$t]} f(x) \, dx + \int_{[$t]}^{[$b]} f(x) \, dx, = [$ans1] +[$ans2] = [$ans].```] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-3-4-An-C/12-3-4-An-C-abstract-int-1-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-3-4-An-C/12-3-4-An-C-abstract-int-1-jms.pg new file mode 100644 index 0000000000..df9047e04f --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-3-4-An-C/12-3-4-An-C-abstract-int-1-jms.pg @@ -0,0 +1,61 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Definite integrals (without trigonometric functions)) +## Date(11 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-5,-2,1); +$b = $a + random(2,4,1); +$c = $b + random(2,4,1); +$d = $c + random(2,4,1); + +$atoc = non_zero_random(-20,20,1); +$btod = non_zero_random(-20,20,1); +$btoc = non_zero_random(-20,20,1); + +$ans_atob = Compute("$atoc - $btoc"); +$ans_atod = Compute("$ans_atob + $btod"); + +BEGIN_PGML +Suppose that [`f`] is a continuous function and that +[``` \int_{[$a]}^{[$c]}f(x) \, dx = [$atoc], \quad \int_{[$b]}^{[$d]}f(x) \, dx = [$btod] \quad \text{and} \quad \int_{[$b]}^{[$c]}f(x) \, dx = [$btoc] ```] + +Determine the value of the following definite integrals. + ++ [`` \int_{[$a]}^{[$b]}f(x) \, dx = \, ``] [_]{$ans_atob}{5} + ++ [`` \int_{[$a]}^{[$d]}f(x) \, dx = \, ``] [_]{$ans_atod}{5} +END_PGML + +BEGIN_PGML_SOLUTION ++ Note that [``` \int_{[$a]}^{[$c]}f(x) \, dx = \int_{[$a]}^{[$b]}f(x) \, dx + \int_{[$b]}^{[$c]}f(x) \, dx,```] +and the values of two of these integrals are given, so [```\int_{[$a]}^{[$b]}f(x) \, dx = \int_{[$a]}^{[$c]}f(x) \, dx - \int_{[$b]}^{[$c]}f(x) \, dx, = [$atoc]-[$btoc] = [$ans_atob].```] + ++ We can use the first result we found and the given information to see that +[``` \int_{[$a]}^{[$d]}f(x) \, dx = \int_{[$a]}^{[$b]}f(x) \, dx + \int_{[$b]}^{[$d]}f(x) \, dx = [$ans_atob] + [$btod] = [$ans_atod]. ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-3-4-An-C/12-3-4-An-C-abstract-int-2-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-3-4-An-C/12-3-4-An-C-abstract-int-2-jms.pg new file mode 100644 index 0000000000..77c98cd872 --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-3-4-An-C/12-3-4-An-C-abstract-int-2-jms.pg @@ -0,0 +1,71 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Definite integrals (without trigonometric functions)) +## Date(11 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(1,3,1); +$b = $a + random(2,4,1); +$c = $b + random(2,4,1); +$d = $c + random(2,4,1); + +$l = non_zero_random(-3,3,1); +$k = random(2,3,1)*random(-1,1,2); +if(abs($l) == abs($k)) +{$l = abs($l)+1;} + +$atoc = non_zero_random(-20,20,1); +$btod = non_zero_random(-20,20,1); +$ctod = non_zero_random(-20,20,1); + +$ans_btoc = Compute("$btod - $ctod"); +$ans_atob_kl = Compute("$k*($atoc - $ans_btoc) + $l*($b-$a)"); + +BEGIN_PGML +Suppose that [`f`] is a continuous function and that +[``` \int_{[$a]}^{[$c]}f(x) \, dx = [$atoc], \quad \int_{[$b]}^{[$d]}f(x) \, dx = [$btod] \quad \text{and} \quad \int_{[$c]}^{[$d]}f(x) \, dx = [$ctod] ```] + +Determine the value of the following definite integrals. + ++ [`` \int_{[$b]}^{[$c]} f(x) \, dx = \, ``] [_]{$ans_btoc}{5} + ++ [`` \int_{[$a]}^{[$b]} \left([$k]f(x) + [$l]\right) \, dx = \, ``] [_]{$ans_atob_kl}{5} + + +END_PGML + +BEGIN_PGML_SOLUTION ++ First notice that [``` \int_{[$b]}^{[$d]} f(x) \, dx = \int_{[$b]}^{[$c]} f(x) \, dx + \int_{[$c]}^{[$d]} f(x) \, dx,```] therefore [``` \int_{[$b]}^{[$c]} f(x) \, dx = \int_{[$b]}^{[$d]} f(x) \, dx - \int_{[$c]}^{[$d]} f(x) \, dx = [$btod] - [$ctod] = [$ans_btoc].```] + ++ First, we have [``` \int_{[$a]}^{[$b]} \left([$k]f(x) + [$l]\right) \, dx = [$k] \int_{[$a]}^{[$b]} f(x)\, dx + \int_{[$a]}^{[$b]} [$l]\, dx. ```] Similar to the previous part, +[``` \int_{[$a]}^{[$b]} f(x)\, dx = \int_{[$a]}^{[$c]} f(x)\, dx - \int_{[$b]}^{[$c]} f(x)\, dx = [$atoc]-[$ans_btoc] = [$atoc - $ans_btoc].```] +The integral of a contstant function gives the (singed) are of rectangle: +[``` \int_{[$a]}^{[$b]} [$l]\, dx = [$l]([$b]-[$a]) = [$l*($b-$a)].```] +Therefore, +[``` \int_{[$a]}^{[$b]} \left([$k]f(x) + [$l]\right) \, dx = [$k] \int_{[$a]}^{[$b]} f(x)\, dx + \int_{[$a]}^{[$b]} [$l]\, dx = [$k]([$atoc - $ans_btoc]) + [$l*($b-$a)] = [$ans_atob_kl].```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-12-0-0-C/12-3-4-An-C/12-3-4-An-C-abstract-int-3-jms.pg b/Contrib/UCalgary/249-12-0-0-C/12-3-4-An-C/12-3-4-An-C-abstract-int-3-jms.pg new file mode 100644 index 0000000000..9344dbf05a --- /dev/null +++ b/Contrib/UCalgary/249-12-0-0-C/12-3-4-An-C/12-3-4-An-C-abstract-int-3-jms.pg @@ -0,0 +1,74 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Definite integrals (without trigonometric functions)) +## Date(11 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-5,-2,1); +$b = $a + random(2,4,1); +$c = $b + random(2,4,1); +$d = $c + random(2,4,1); + + +$k = random(2,3,1); +$l = random(-3,-1,1); + +$fatob = non_zero_random(-20,20,1); +$fbtod = non_zero_random(-20,20,1); +$fctod = non_zero_random(-20,20,1); +$gatoc = non_zero_random(-20,20,1); +$gbtod = non_zero_random(-20,20,1); +$gctod = non_zero_random(-20,20,1); + +$fmg_btod = Compute("$fbtod - $gbtod"); +$kflg_atod = Compute("$k*($fatob + $fbtod) + $l*($gatoc + $gctod)"); + +BEGIN_PGML +Suppose that [`f`] and [`g`] are continuous functions with the property that +[``` \int_{[$a]}^{[$b]}f(x) \, dx = [$fatob], \quad \int_{[$b]}^{[$d]}f(x) \, dx = [$fbtod] \quad \text{and} \quad \int_{[$c]}^{[$d]}f(x) \, dx = [$fctod] ```] +and +[``` \int_{[$a]}^{[$c]}g(x) \, dx = [$gatoc], \quad \int_{[$b]}^{[$d]}g(x) \, dx = [$gbtod] \quad \text{and} \quad \int_{[$c]}^{[$d]}g(x) \, dx = [$gctod]. ```] + +Determine the value of the following definite integrals. + ++ [`` \int_{[$b]}^{[$d]} f(x)-g(x) \, dx = \, ``] [_]{$fmg_btod}{5} + ++ [`` \int_{[$a]}^{[$d]} [$k]f(x)+[$l]g(x) \, dx = \, ``] [_]{$kflg_atod}{5} + +END_PGML + +BEGIN_PGML_SOLUTION + ++ The first integral is the difference of two of the given integrals [``` \int_{[$b]}^{[$d]} f(x)-g(x) \, dx = \int_{[$b]}^{[$d]} f(x) \, dx - \int_{[$b]}^{[$d]} g(x) \, dx = [$fbtod]-[$gbtod] = [$fmg_btod].```] + ++ The second integral we can first split up into integrals of [`f`] and [`g`] [``` \int_{[$a]}^{[$d]} [$k]f(x)+[$l]g(x) \, dx = [$k] \int_{[$a]}^{[$d]} f(x)\, dx + [$l] \int_{[$a]}^{[$d]} g(x)\, dx ```] +and now we can split up the domains of integration to use the information given +[``` = [$k] \left(\int_{[$a]}^{[$b]} f(x)\, dx + \int_{[$b]}^{[$d]} f(x)\, dx \right) + [$l] \left( \int_{[$a]}^{[$c]} g(x)\, dx + \int_{[$c]}^{[$d]} g(x)\, dx\right) ```] +[``` = [$k]([$fatob] + [$fbtod]) + [$l]([$gatoc] + [$gctod]) = [$kflg_atod].```] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-0-1-R-C/13-0-1-R-C-state-ftc-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-0-1-R-C/13-0-1-R-C-state-ftc-jms.pg new file mode 100644 index 0000000000..316b8f8092 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-0-1-R-C/13-0-1-R-C-state-ftc-jms.pg @@ -0,0 +1,55 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(15 April) +## Institution(University of Calgary) +## Author(2025) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(-3,3,1); +$b = $a + random(2,6,1); + +$popup1 = DropDown( + [ + 'an antiderivative', + 'the area', + 'the derivative', + 'a tangent line' + ], + 'an antiderivative' +); + +$popup2 = DropDown( + [ + 'any', + 'the unique', + 'a very special' + ], + 'any' +); + +BEGIN_PGML +Let [`f`] be a continuous function defined on the interval [`[[$a],[$b]]`]. + +The **Fundamental Theorem of Calculus** states that: + ++ The function +[``A(x) = \int_{[$a]}^x f(t) \, dt, ``] defined for all [`x\in[[$a],[$b]],`] is [_]{$popup1} of the function [`f.`] + ++ Let [`F`] be [_]{$popup2} antiderivative of [`f`], then [``\int_{[$a]}^{[$b]} f(x) \, dx = F\left( \right. ``] [_]{$b}{2} [``\left.\right)\, - F\left( \right.``] [_]{$a}{2} [``\left.\right).``] +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-0-2-C-C/13-0-2-C-C-cpt-anti-der-int-jms-1.pg b/Contrib/UCalgary/249-13-0-0-C/13-0-2-C-C/13-0-2-C-C-cpt-anti-der-int-jms-1.pg new file mode 100644 index 0000000000..8ee6893c3d --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-0-2-C-C/13-0-2-C-C-cpt-anti-der-int-jms-1.pg @@ -0,0 +1,65 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(15 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(1,4,1); +$pow = random(1,2,1); +$powp1 = $pow+1; +$b = random(2,9,1); +$c = non_zero_random(-9,9,1); +Context()->variables->add(t=>"Real"); + +$fdert = Formula("$b*t^($pow) + $c")->reduce(); +$f_ans = Compute("($b/$powp1)*x**($powp1) + $c*x - ($b/$powp1)*($a)**($powp1) - $c*$a"); +$fder_ans = Compute("$b*x^($pow) + $c"); + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Find expressions for each of the following functions. + ++ [`` \int_{[$a]}^{x} [$fdert]\, dt = \, ``] [_]{$f_ans}{20} + ++ [`` \frac{d}{dx} \int_{[$a]}^{x} [$fdert]\, dt = \, ``] [_]{$fder_ans}{20} + +END_PGML + + +$f = Formula("($b)*x^($powp1)/$powp1 + $c*x - (($b/$powp1)*($a**$powp1) + $c*$a)")->reduce(); +$fderx = Formula("$b*x^($pow) + $c")->reduce(); + +BEGIN_PGML_SOLUTION +We can use the definition of the definite integral, or the Fundamental Theorem of Calculus (FTC). We will use the FTC. +[``` \int_{[$a]}^{x} [$fdert]\, dt = \left. \frac{[$b]}{[$powp1]}t^{[$powp1]} + [$c]t \right\vert_{1}^{x} = [$f].```] +By the Fundamental Theorem of Calculus we have +[``` \frac{d}{dx} \int_{[$a]}^{x} [$fdert]\, dt = [$fderx].```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-0-2-C-C/13-0-2-C-C-cpt-anti-der-int-jms-2.pg b/Contrib/UCalgary/249-13-0-0-C/13-0-2-C-C/13-0-2-C-C-cpt-anti-der-int-jms-2.pg new file mode 100644 index 0000000000..e0daef5e25 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-0-2-C-C/13-0-2-C-C-cpt-anti-der-int-jms-2.pg @@ -0,0 +1,62 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(15 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(1,4,1); +$b = random(2,9,1); +$c = non_zero_random(-9,9,1); +Context()->variables->add(t=>"Real"); + +$fdert = Formula("$b*sin(t) + $c*e^t")->reduce(); +$f_ans = Compute("-$b*cos(x) + $c*e^x + $b*cos(pi*$a) - $c*(e**(pi*$a))"); +$fder_ans = Compute("$b*sin(x) + $c*e^x"); + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Find expressions for each of the following functions. + ++ [`` \int_{[$a]\pi}^{x} [$fdert]\, dt = \, ``] [_]{$f_ans}{20} + ++ [`` \frac{d}{dx} \int_{[$a]}^{x} [$fdert]\, dt = \, ``] [_]{$fder_ans}{20} + +END_PGML + +$f = Formula("-$b*cos(x) + $c*e^x + $b*cos(pi*$a) - $c*(e**(pi*$a))")->reduce(); +$fderx = Formula("$b*sin(x) + $c*e^x")->reduce(); + +BEGIN_PGML_SOLUTION +We will use the Fundamental Theorem of Calculus (FTC): +[``` \left. \int_{[$a]\pi}^{x} [$fdert]\, dt = \left[-[$b]\cos(t) + [$c]e^t \right] \right\vert_{[$a]\pi}^{x} = [$f].```] +By the Fundamental Theorem of Calculus we have +[``` \frac{d}{dx} \int_{[$a]}^{x} [$fdert]\, dt = [$fderx].```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-1-Ap-C-poly-definite-jms-1.pg b/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-1-Ap-C-poly-definite-jms-1.pg new file mode 100644 index 0000000000..f32aeabb55 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-1-Ap-C-poly-definite-jms-1.pg @@ -0,0 +1,70 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(15 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a1 = random(-3,3,1); +$b1 = $a1 + random(2,6,1); +$pow1 = random(2,4,1); +$pow1p1 = $pow1+1; +$p = random(2,5,1)*random(-1,1,2); +$q = non_zero_random(-9,9,1); +$f1 = Formula("$p*x^($pow1) + $q*x")->reduce(); +$ans1 = Compute("($p/$pow1p1)*(($b1)**$pow1p1)+$q*(($b1)**2)/2 - ($p/$pow1p1)*(($a1)**$pow1p1) -$q*(($a1)**2)/2"); + +$a2 = random(-3,3,1); +$b2 = $a2 + random(2,6,1); +$pow2 = random(3,4,1); +$pow2p1 = $pow2+1; +$r = random(2,5,1)*random(-1,1,2); +$s = non_zero_random(-5,5,1); +$t = non_zero_random(-5,5,1); +$f2 = Formula("$r*x^($pow2) + $s*x^2 + $t")->reduce(); +$ans2 = Compute("($r/$pow2p1)*(($b2)**$pow2p1)+($s/3)*(($b2)**3) + $t*$b2 - ($r/$pow2p1)*(($a2)**$pow2p1) - ($s/3)*(($a2)**3) - $t*$a2"); + +BEGIN_PGML +Evaluate the following definite integrals. + ++ [``\int_{[$a1]}^{[$b1]} [$f1] \, dx = \, ``] [_]{$ans1}{10} + ++ [``\int_{[$a2]}^{[$b2]} [$f2] \, dx = \, ``] [_]{$ans2}{10} + +Make sure that you give the exact value of your answer (do not "round off"). +END_PGML + +$f1_int = Formula("($p)*(x**$pow1p1)/$pow1p1+$q*(x**2)/2")->reduce(); +$f2_int = Formula("($r)*(x**$pow2p1)/$pow2p1+($s)*(x**3)/3 + $t*x")->reduce(); + +BEGIN_PGML_SOLUTION +We will use the Fundamental Theorem of Calculus. + ++ [``\int_{[$a1]}^{[$b1]} [$f1] \, dx = \left. [$f1_int] \right\vert_{[$a1]}^{[$b1]} = \frac{[$p]}{[$pow1p1]}([$b1])^{[$pow1p1]} + \frac{[$q]}{2}([$b1])^2 - \frac{[$p]}{[$pow1p1]}([$a1])^{[$pow1p1]} - \frac{[$q]}{2}([$a1])^2 = [$ans1]``] + ++ [``\int_{[$a2]}^{[$b2]} [$f2] \, dx = \left. [$f2_int] \right\vert_{[$a2]}^{[$b2]} = \frac{[$r]}{[$pow2p1]}([$b2])^{[$pow2p1]}+ \frac{[$s]}{3}([$b2])^3 + [$t]([$b2]) - \frac{[$r]}{[$pow2p1]}([$a2])^{[$pow2p1]} - \frac{[$s]}{3}([$a2])^3 - [$t]([$a2]) = [$ans2]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-1-Ap-C-poly-definite-jms-2.pg b/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-1-Ap-C-poly-definite-jms-2.pg new file mode 100644 index 0000000000..ce7e0c0137 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-1-Ap-C-poly-definite-jms-2.pg @@ -0,0 +1,69 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(15 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a1 = random(0,1,1); +$b1 = $a1 + random(1,4,1); +$pow1 = random(2,3,1); +$pow1p1 = $pow1+1; +$p = random(2,5,1)*random(-1,1,2); +$q = non_zero_random(-6,6,1); +$f1 = Formula("$p*x^($pow1) + $q")->reduce(); +$ans1 = Compute("($p/$pow1p1)*(($b1)**$pow1p1)+$q*($b1) - ($p/$pow1p1)*(($a1)**$pow1p1) -$q*($a1)"); + +$a2 = random(-1,1,1); +$b2 = $a2 + random(2,5,1); +$pow2 = random(3,4,1); +$pow2p1 = $pow2+1; +$r = random(2,5,1)*random(-1,1,2); +$s = non_zero_random(-5,5,1); +$f2 = Formula("$r*x^($pow2) + $s*x^2")->reduce(); +$ans2 = Compute("($r/$pow2p1)*(($b2)**$pow2p1)+($s/3)*(($b2)**3) - ($r/$pow2p1)*(($a2)**$pow2p1) - ($s/3)*(($a2)**3)"); + +BEGIN_PGML +Evaluate the following definite integrals. + ++ [``\int_{[$a1]}^{[$b1]} [$f1] \, dx = \, ``] [_]{$ans1}{10} + ++ [``\int_{[$a2]}^{[$b2]} [$f2] \, dx = \, ``] [_]{$ans2}{10} + +Make sure that you give the exact value of your answer (do not "round off"). +END_PGML + +$f1_int = Formula("($p)*(x**$pow1p1)/$pow1p1+$q*(x)")->reduce(); +$f2_int = Formula("($r)*(x**$pow2p1)/$pow2p1+($s)*(x**3)/3")->reduce(); + +BEGIN_PGML_SOLUTION +We will use the Fundamental Theorem of Calculus. + ++ [``\int_{[$a1]}^{[$b1]} [$f1] \, dx = \left. [$f1_int] \right\vert_{[$a1]}^{[$b1]} = \frac{[$p]}{[$pow1p1]}([$b1])^{[$pow1p1]} + [$q]([$b1]) - \frac{[$p]}{[$pow1p1]}([$a1])^{[$pow1p1]} - [$q]([$a1]) = [$ans1]``] + ++ [``\int_{[$a2]}^{[$b2]} [$f2] \, dx = \left. [$f2_int] \right\vert_{[$a2]}^{[$b2]} = \frac{[$r]}{[$pow2p1]}([$b2])^{[$pow2p1]}+ \frac{[$s]}{3}([$b2])^3 - \frac{[$r]}{[$pow2p1]}([$a2])^{[$pow2p1]} - \frac{[$s]}{3}([$a2])^3 = [$ans2]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-2-Ap-C-exp-definite-jms-1.pg b/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-2-Ap-C-exp-definite-jms-1.pg new file mode 100644 index 0000000000..a5f6b06335 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-2-Ap-C-exp-definite-jms-1.pg @@ -0,0 +1,65 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(15 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a1 = random(-3,1,1); +$b1 = $a1 + random(1,4,1); +$p = random(2,5,1)*random(-1,1,2); +$q = non_zero_random(-9,9,1); +$f1 = Formula("$p*e^x + $q")->reduce(); +$ans1 = Compute("($p)*(e**($b1))+$q*($b1) - ($p)*(e**($a1)) - $q*($a1)"); + +$a2 = random(-3,2,1); +$b2 = $a2 + random(1,4,1); +$r = random(2,5,1)*random(-1,1,2); +$s = non_zero_random(2,5,1); +$f2 = Formula("$r*e^x + $s*e^(-x)")->reduce(); +$ans2 = Compute("$r*(e**($b2)) - $s*(e**(-$b2)) - $r*(e**($a2)) + $s*(e**(-$a2))"); + +BEGIN_PGML +Evaluate the following definite integrals. + ++ [``\int_{[$a1]}^{[$b1]} [$f1] \, dx = \, ``] [_]{$ans1}{10} + ++ [``\int_{[$a2]}^{[$b2]} [$f2] \, dx = \, ``] [_]{$ans2}{10} + +Make sure that you give the exact value of your answer (do not "round off"). +END_PGML + +$f1_int = Formula("$p*e^x + $q*x")->reduce(); +$f2_int = Formula("$r*e^x - $s*e^(-x)")->reduce(); + +BEGIN_PGML_SOLUTION +We will use the Fundamental Theorem of Calculus. + ++ [`` \left. \int_{[$a1]}^{[$b1]} [$f1] \, dx = [$f1_int] \right\vert_{[$a1]}^{[$b1]} = [$p]e^{[$b1]} + [$q]([$b1]) - [$p]e^{[$a1]} - [$q]([$a1]) \approx [$ans1]``] + ++ [``\left. \int_{[$a2]}^{[$b2]} [$f2] \, dx = [$f2_int] \right\vert_{[$a2]}^{[$b2]} = [$r]e^{[$b2]} - [$s]e^{-[$b2]} - [$r]e^{[$a2]} + [$s]e^{-[$a2]} \approx [$ans2]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-2-Ap-C-exp-ln-definite-jms-2.pg b/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-2-Ap-C-exp-ln-definite-jms-2.pg new file mode 100644 index 0000000000..d620f384fc --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-2-Ap-C-exp-ln-definite-jms-2.pg @@ -0,0 +1,65 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(15 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a1 = random(1,2,1); +$b1 = $a1 + random(1,3,1); +$p = random(2,5,1)*random(-1,1,2); +$q = non_zero_random(-9,9,1); +$f1 = Formula("$p*e^x + $q/x")->reduce(); +$ans1 = Compute("($p)*(e**($b1))+$q*ln($b1) - ($p)*(e**($a1)) - $q*ln($a1)"); + +$a2 = random(-4,-3,1); +$b2 = $a2 + random(1,2,1); +$r = random(2,5,1)*random(-1,1,2); +$s = non_zero_random(2,5,1); +$f2 = Formula("$r*e^x + $s/x")->reduce(); +$ans2 = Compute("$r*(e**($b2)) + $s*ln(abs($b2)) - $r*(e**($a2)) - $s*ln(abs($a2))"); + +BEGIN_PGML +Evaluate the following definite integrals. + ++ [``\int_{[$a1]}^{[$b1]} [$f1] \, dx = \, ``] [_]{$ans1}{10} + ++ [``\int_{[$a2]}^{[$b2]} [$f2] \, dx = \, ``] [_]{$ans2}{10} + +Make sure that you give the exact value of your answer (do not "round off"). +END_PGML + +$f1_int = Formula("$p*e^x + $q*ln(abs(x))")->reduce(); +$f2_int = Formula("$r*e^x + $s*ln(abs(x))")->reduce(); + +BEGIN_PGML_SOLUTION +We will use the Fundamental Theorem of Calculus. + ++ [`` \left. \int_{[$a1]}^{[$b1]} [$f1] \, dx = [$f1_int] \right\vert_{[$a1]}^{[$b1]} = [$p]e^{[$b1]} + [$q]\ln([$b1]) - [$p]e^{[$a1]} - [$q]\ln([$a1]) \approx [$ans1]``] + ++ [``\left. \int_{[$a2]}^{[$b2]} [$f2] \, dx = [$f2_int] \right\vert_{[$a2]}^{[$b2]} = [$r]e^{[$b2]} + [$s]\ln|[$b2]| - [$r]e^{[$a2]} - [$s]\ln|[$a2]| \approx [$ans2]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-3-Ap-C-trig-definite-jms-1.pg b/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-3-Ap-C-trig-definite-jms-1.pg new file mode 100644 index 0000000000..2c0a4fca9e --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-3-Ap-C-trig-definite-jms-1.pg @@ -0,0 +1,64 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(15 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a1 = list_random('2', '3', '4', '6'); +$b1 = list_random('2', '3', '4', '6'); +$p = random(2,5,1)*random(-1,1,2); +$q = non_zero_random(-9,9,1); +$f1 = Formula("$p*cos(x) + $q")->reduce(); +$ans1 = Compute("($p)*sin(pi/$b1)+$q*(pi/$b1) - ($p)*sin(-pi/$a1) - $q*(-pi/$a1)"); + +$b2 = list_random('2', '3', '4', '6'); +$r = non_zero_random(2,5,1); +$s = non_zero_random(2,5,1); +$f2 = Formula("$r*sin(x) + $s*cos(x)")->reduce(); +$ans2 = Compute("-$r*cos(pi/$b2) + $s*sin(pi/$b2) + $r*cos(0) - $s*sin(0)"); + +BEGIN_PGML +Evaluate the following definite integrals. + ++ [``\int_{-\pi/[$a1]}^{\pi/[$b1]} [$f1] \, dx = \, ``] [_]{$ans1}{10} + ++ [``\int_{0}^{\pi/[$b2]} [$f2] \, dx = \, ``] [_]{$ans2}{10} + +Make sure that you give the exact value of your answer (do not "round off"). +END_PGML + +$f1_int = Formula("$p*sin(x) + $q*x")->reduce(); +$f2_int = Formula("-$r*cos(x) + $s*sin(x)")->reduce(); + +BEGIN_PGML_SOLUTION +We will use the Fundamental Theorem of Calculus. + ++ [``\left. \int_{-\pi/[$a1]}^{\pi/[$b1]} [$f1] \, dx = [$f1_int] \right\vert_{-\pi/[$a1]}^{\pi/[$b1]} = [$p]\sin(\pi/[$b1]) + [$q](\pi/[$b1]) - \sin(-\pi/[$a1]) - [$q](-\pi/[$a1]) \approx [$ans1]``] + ++ [``\left. \int_{0}^{[$b2]} [$f2] \, dx = [$f2_int] \right \vert_{0}^{\pi/[$b2]} = -[$r]\cos(\pi/[$b2]) + [$s]\sin(\pi/[$b2]) + [$r]\cos(0) - [$s]\sin(0) \approx [$ans2]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-3-Ap-C-trig-definite-jms-2.pg b/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-3-Ap-C-trig-definite-jms-2.pg new file mode 100644 index 0000000000..fd2a0b8c9c --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-1-0-Ap-C/13-1-3-Ap-C-trig-definite-jms-2.pg @@ -0,0 +1,62 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(15 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a1 = list_random('2', '3', '4', '6'); +$b1 = $a1; +$p = random(2,5,1)*random(-1,1,2); +$f1 = Formula("$p*cos(x)")->reduce(); +$ans1 = Compute("($p)*sin(pi/$b1) - ($p)*sin(-pi/$a1)"); + +$b2 = list_random('2', '3', '4', '6'); +$r = non_zero_random(2,5,1); +$f2 = Formula("$r*sin(x)")->reduce(); +$ans2 = Compute("-$r*cos(pi/$b2) + $r*cos(0)"); + +BEGIN_PGML +Evaluate the following definite integrals. + ++ [``\int_{-\pi/[$a1]}^{\pi/[$b1]} [$f1] \, dx = \, ``] [_]{$ans1}{10} + ++ [``\int_{0}^{\pi/[$b2]} [$f2] \, dx = \, ``] [_]{$ans2}{10} + +Make sure that you give the exact value of your answer (do not "round off"). +END_PGML + +$f1_int = Formula("$p*sin(x)")->reduce(); +$f2_int = Formula("-$r*cos(x)")->reduce(); + +BEGIN_PGML_SOLUTION +We will use the Fundamental Theorem of Calculus. + ++ [``\left. \int_{-\pi/[$a1]}^{\pi/[$b1]} [$f1] \, dx = [$f1_int] \right\vert_{-\pi/[$a1]}^{\pi/[$b1]} = [$p]\sin(\pi/[$b1]) - \sin(-\pi/[$a1]) \approx [$ans1]``] + ++ [``\left. \int_{0}^{[$b2]} [$f2] \, dx = [$f2_int] \right \vert_{0}^{\pi/[$b2]} = -[$r]\cos(\pi/[$b2]) + [$r]\cos(0) \approx [$ans2]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-1-4-Ap-C/13-1-4-Ap-C-pw-def-int-1-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-1-4-Ap-C/13-1-4-Ap-C-pw-def-int-1-jms.pg new file mode 100644 index 0000000000..e9ab4f4da4 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-1-4-Ap-C/13-1-4-Ap-C-pw-def-int-1-jms.pg @@ -0,0 +1,72 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(16 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-3,1,1); +$c = random(2,4,1); # want to be positive to use square root +$b = $c + random(1,3,1); + +# a to c +$p = random(2,5,1)*random(-1,1,2); +$f1 = Formula("x+$p")->reduce(); +$f1_int = Formula("x^2/2 + $p*x")->reduce(); +$ans1 = Compute("(($c)**2)/2 + $p*$c - (($a)**2)/2 - $p*$a"); + +# c to b +$r = non_zero_random(2,5,1); +$twor = 2*$r; +$f2 = Formula("$r*sqrt(x)")->reduce(); +$f2_int = Formula("$twor*x*sqrt(x)/3")->reduce(); +$ans2 = Compute("$twor/3*$b*sqrt($b) - $twor/3*$c*sqrt($c)"); + +# a to b +$ans = Compute("(($c)**2)/2 + $p*$c - (($a)**2)/2 - $p*$a + $twor/3*$b*sqrt($b) - $twor/3*$c*sqrt($c)"); + +BEGIN_PGML +Let [`f`] be the piecewise defined function given by +[``` f(x) = \begin{cases} [$f1] & x < [$c] \\ & \\ [$f2] & x \geq [$c] \end{cases} ```] + +Evaluate the following definite integral. + +[`` \int_{[$a]}^{[$b]} f(x) \, dx = \, ``] [_]{$ans}{5} + +Make sure that you give the exact value of your answer (do not "round off"). +END_PGML + +BEGIN_PGML_SOLUTION +First, we split up the integral based on the definition of [`f`] and the interval over which we are integrating +[``` \int_{[$a]}^{[$b]} f(x) \, dx = \int_{[$a]}^{[$c]} f(x) \, dx + \int_{[$c]}^{[$b]} f(x) \, dx = \int_{[$a]}^{[$c]} [$f1] \, dx + \int_{[$c]}^{[$b]} [$f2] \, dx ```] +Now we will use the Fundamental Theorem of Calculus to evaluate each of the integrals on the righthand side: +[``` \left. \int_{[$a]}^{[$c]} [$f1] \, dx = [$f1_int] \right\vert_{[$a]}^{[$c]} = \frac{[$c]^2}{2} + [$p]([$c]) -\frac{([$a])^2}{2} - [$p]([$a]) = [$ans1]```] +and +[``` \left.\left. \int_{[$c]}^{[$b]} [$f2] \, dx = [$r]\frac{x^{3/2}}{\frac{3}{2}} \right\vert_{[$c]}^{[$b]} = [$f2_int] \right\vert_{[$c]}^{[$b]} = \frac{[$twor]}{3}[$b]\sqrt{[$b]} - \frac{[$twor]}{3}[$c]\sqrt{[$c]} \approx [$ans2]```] +therefore, +[``` \int_{[$a]}^{[$b]} f(x) \, dx = \int_{[$a]}^{[$c]} f(x) \, dx + \int_{[$c]}^{[$b]} f(x) \, dx = [$ans1]+\frac{[$twor]}{3}[$b]\sqrt{[$b]} - \frac{[$twor]}{3}[$c]\sqrt{[$c]}.```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-1-4-Ap-C/13-1-4-Ap-C-pw-def-int-2-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-1-4-Ap-C/13-1-4-Ap-C-pw-def-int-2-jms.pg new file mode 100644 index 0000000000..ea3b10be42 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-1-4-Ap-C/13-1-4-Ap-C-pw-def-int-2-jms.pg @@ -0,0 +1,76 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(16 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-3,0,1); +$c = random(1,4,1); # want to be positive to use square root +$b = $c + random(1,5,1); + +# a to c +$p = random(2,5,1)*random(-1,1,2); +$q = non_zero_random(-5,5,1); +$pow = random(1,3,1); +$powp1 = $pow+1; +$f1 = Formula("$p*x^($pow)+$q")->reduce(); +$f1_int = Formula("$p*x^($powp1)/($powp1) + $q*x")->reduce(); +$ans1 = Compute("($p*($c)**($powp1))/($powp1) + $q*$c - ($p*($a)**($powp1))/($powp1) - $q*$a"); + +# c to b +$r = non_zero_random(2,5,1); +$s = non_zero_random(-5,5,1); +$twor = 2*$r; +$f2 = Formula("$r/sqrt(x) + $s")->reduce(); +$f2_int = Formula("$twor*sqrt(x) + $s*x")->reduce(); +$ans2 = Compute("$twor*sqrt($b) + $s*$b - $twor*sqrt($c) - $s*$c"); + +# a to b +$ans = Compute("($p*($c)**($powp1))/($powp1) + $q*$c - ($p*($a)**($powp1))/($powp1) - $q*$a + $twor*sqrt($b) + $s*$b - $twor*sqrt($c) - $s*$c"); + +BEGIN_PGML +Let [`g`] be the piecewise defined function given by +[``` g(x) = \begin{cases} [$f1] & x \leq [$c] \\ & \\ \displaystyle [$f2] & x > [$c] \end{cases} ```] + +Evaluate the following definite integral. + +[`` \int_{[$a]}^{[$b]} g(x) \, dx = \, ``] [_]{$ans}{5} + +Make sure that you give the exact value of your answer (do not "round off"). +END_PGML + +BEGIN_PGML_SOLUTION +First, we split up the integral based on the definition of [`f`] and the interval over which we are integrating +[``` \int_{[$a]}^{[$b]} g(x) \, dx = \int_{[$a]}^{[$c]} g(x) \, dx + \int_{[$c]}^{[$b]} g(x) \, dx = \int_{[$a]}^{[$c]} [$f1] \, dx + \int_{[$c]}^{[$b]} [$f2] \, dx ```] +Now we will use the Fundamental Theorem of Calculus to evaluate each of the integrals on the righthand side: +[``` \left. \int_{[$a]}^{[$c]} [$f1] \, dx = [$f1_int] \right\vert_{[$a]}^{[$c]} = [$p]\frac{([$c])^{[$powp1]}}{[$powp1]} + [$q]([$c]) -[$p]\frac{([$a])^{[$powp1]}}{[$powp1]} - [$q]([$a]) = [$ans1]```] +and +[``` \left.\int_{[$c]}^{[$b]} [$f2] \, dx = [$f2_int] \right\vert_{[$c]}^{[$b]} = [$twor]\sqrt{[$b]} + [$s]([$b]) - [$twor]\sqrt{[$c]} - [$s]([$c])\approx [$ans2]```] +therefore, +[``` \int_{[$a]}^{[$b]} g(x) \, dx = \int_{[$a]}^{[$c]} g(x) \, dx + \int_{[$c]}^{[$b]} g(x) \, dx = [$ans1]+[$twor]\sqrt{[$b]} + [$s]([$b]) - [$twor]\sqrt{[$c]} - [$s]([$c]).```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-1-4-Ap-C/13-1-4-Ap-C-pw-def-int-3-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-1-4-Ap-C/13-1-4-Ap-C-pw-def-int-3-jms.pg new file mode 100644 index 0000000000..4bd5d0dab7 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-1-4-Ap-C/13-1-4-Ap-C-pw-def-int-3-jms.pg @@ -0,0 +1,71 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(16 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-3,0,1); +$c = list_random('4','6'); +$b = list_random('2','3'); + +# a to c +$p = random(2,5,1); +$f1 = Formula("$p*e^x")->reduce(); +$f1_int = Formula("$p*e^x")->reduce(); +$ans1 = Compute("($p)*e**(pi/$c) - ($p)*e**($a)"); + +# c to b +$r = random(2,5,1)*random(-1,1,2); +$f2 = Formula("$r*cos(x)")->reduce(); +$f2_int = Formula("$r*sin(x)")->reduce(); +$ans2 = Compute("$r*sin(pi/$b) - $r*sin(pi/$c)"); + +# a to b +$ans = Compute("($p)*e**(pi/$c) - ($p)*e**($a) + $r*sin(pi/$b) - $r*sin(pi/$c)"); + +BEGIN_PGML +Let [`g`] be the piecewise defined function given by +[``` g(x) = \begin{cases} [$f1] & \displaystyle x \leq \frac{\pi}{[$c]} \\ & \\ [$f2] & \displaystyle x > \frac{\pi}{[$c]} \end{cases} ```] + +Evaluate the following definite integral. + +[`` \int_{[$a]}^{\pi/[$b]} g(x) \, dx = \, ``] [_]{$ans}{5} + +Make sure that you give the exact value of your answer (do not "round off"). +END_PGML + +BEGIN_PGML_SOLUTION +First, we split up the integral based on the definition of [`f`] and the interval over which we are integrating +[``` \int_{[$a]}^{\pi/[$b]} g(x) \, dx = \int_{[$a]}^{\pi/[$c]} g(x) \, dx + \int_{\pi/[$c]}^{\pi/[$b]} g(x) \, dx = \int_{[$a]}^{\pi/[$c]} [$f1] \, dx + \int_{\pi/[$c]}^{\pi/[$b]} [$f2] \, dx ```] +Now we will use the Fundamental Theorem of Calculus to evaluate each of the integrals on the righthand side: +[``` \left. \int_{[$a]}^{\pi/[$c]} [$f1] \, dx = [$f1_int] \right\vert_{[$a]}^{\pi/[$c]} = [$p]e^{\pi/[$c]} - [$p]e^{[$a]} ```] +and +[``` \left.\int_{\pi/[$c]}^{\pi/[$b]} [$f2] \, dx = [$f2_int] \right\vert_{\pi/[$c]}^{\pi/[$b]} = [$r]\sin(\pi/[$b]) - [$r]\sin(\pi/[$c])```] +therefore, +[``` \int_{[$a]}^{\pi/[$b]} g(x) \, dx = \int_{[$a]}^{\pi/[$c]} g(x) \, dx + \int_{\pi/[$c]}^{\pi/[$b]} g(x) \, dx = [$p]e^{\pi/[$c]} - [$p]e^{[$a]} + [$r]\sin(\pi/[$b]) - [$r]\sin(\pi/[$c]).```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-1-4-Ap-C/13-1-4-Ap-C-pw-def-int-4-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-1-4-Ap-C/13-1-4-Ap-C-pw-def-int-4-jms.pg new file mode 100644 index 0000000000..49dac0e24e --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-1-4-Ap-C/13-1-4-Ap-C-pw-def-int-4-jms.pg @@ -0,0 +1,71 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(16 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-3,0,1); +$c = list_random('4','6'); +$b = list_random('2','3'); + +# a to c +$p = random(2,5,1); +$f1 = Formula("$p*e^(-x)")->reduce(); +$f1_int = Formula("-$p*e^(-x)")->reduce(); +$ans1 = Compute("(-$p)*e**(-pi/$c) - (-$p)*e**(-$a)"); + +# c to b +$r = random(2,5,1); +$f2 = Formula("$r*sin(x)")->reduce(); +$f2_int = Formula("-$r*cos(x)")->reduce(); +$ans2 = Compute("-$r*cos(pi/$b) + $r*cos(pi/$c)"); + +# a to b +$ans = Compute("(-$p)*e**(-pi/$c) - (-$p)*e**(-$a) -$r*cos(pi/$b) + $r*cos(pi/$c)"); + +BEGIN_PGML +Let [`f`] be the piecewise defined function given by +[``` f(x) = \begin{cases} [$f1] & \displaystyle x < \frac{\pi}{[$c]} \\ & \\ [$f2] & \displaystyle x \geq \frac{\pi}{[$c]} \end{cases} ```] + +Evaluate the following definite integral. + +[`` \int_{[$a]}^{\pi/[$b]} f(x) \, dx = \, ``] [_]{$ans}{5} + +Make sure that you give the exact value of your answer (do not "round off"). +END_PGML + +BEGIN_PGML_SOLUTION +First, we split up the integral based on the definition of [`f`] and the interval over which we are integrating +[``` \int_{[$a]}^{\pi/[$b]} f(x) \, dx = \int_{[$a]}^{\pi/[$c]} f(x) \, dx + \int_{\pi/[$c]}^{\pi/[$b]} f(x) \, dx = \int_{[$a]}^{\pi/[$c]} [$f1] \, dx + \int_{\pi/[$c]}^{\pi/[$b]} [$f2] \, dx ```] +Now we will use the Fundamental Theorem of Calculus to evaluate each of the integrals on the righthand side: +[``` \left. \int_{[$a]}^{\pi/[$c]} [$f1] \, dx = [$f1_int] \right\vert_{[$a]}^{\pi/[$c]} = -[$p]e^{-\pi/[$c]} +[$p]e^{-[$a]} ```] +and +[``` \left.\int_{\pi/[$c]}^{\pi/[$b]} [$f2] \, dx = [$f2_int] \right\vert_{\pi/[$c]}^{\pi/[$b]} = -[$r]\cos(\pi/[$b]) + [$r]\cos(\pi/[$c])```] +therefore, +[``` \int_{[$a]}^{\pi/[$b]} f(x) \, dx = \int_{[$a]}^{\pi/[$c]} f(x) \, dx + \int_{\pi/[$c]}^{\pi/[$b]} f(x) \, dx = -[$p]e^{-\pi/[$c]} + [$p]e^{-[$a]} - [$r]\cos(\pi/[$b]) + [$r]\cos(\pi/[$c]).```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-2-1-Ap-C/13-2-1-Ap-C-definite-sub-jms-1.pg b/Contrib/UCalgary/249-13-0-0-C/13-2-1-Ap-C/13-2-1-Ap-C-definite-sub-jms-1.pg new file mode 100644 index 0000000000..1b9279219f --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-2-1-Ap-C/13-2-1-Ap-C-definite-sub-jms-1.pg @@ -0,0 +1,63 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(16 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a1 = random(0,3,1); #positive for sqrt +$b1 = $a1 + random(2,6,1); +$p = random(2,5,1)*random(-1,1,2); +$twop = 2*$p; +$f1 = Formula("$p*e^(sqrt(x))/sqrt(x)")->reduce(); +$ans1 = Compute("$twop*(e**(sqrt($b1))) - $twop(e**(sqrt($a1)))"); + +$a2 = 1; +$b2 = $a2 + random(1,6,1); +$r = random(1,4,1); +$s = random(2,6,1); +$threes = 3*$s; +$f2 = Formula("(ln(x)+$r)^2/($s*x)")->reduce(); +$ans2 = Compute("(ln($b2)+$r)^3/($threes) - (ln($a2)+$r)^3/($threes)"); + +BEGIN_PGML +Evaluate the following definite integrals. + ++ [``\int_{[$a1]}^{[$b1]} [$f1] \, dx = \, ``] [_]{$ans1}{10} + ++ [``\int_{[$a2]}^{[$b2]} [$f2] \, dx = \, ``] [_]{$ans2}{10} + +Make sure that you give the exact value of your answer (do not "round off"). +END_PGML + +BEGIN_PGML_SOLUTION +We will use Substitution and the Fundamental Theorem of Calculus. + ++ In the first integral, we will take [`u = \sqrt{x}`] so [``du = \frac{1}{2\sqrt{x}}\, dx ``] or [``2du = \frac{1}{\sqrt{x}}\, dx.``] Then making sure that we also adjust the limits of integration when making the substitution, we have [```\left. \int_{[$a1]}^{[$b1]} [$f1] \, dx = \int_{\sqrt{[$a1]}}^{\sqrt{[$b1]}} [$twop]e^{u}\, du = [$twop]e^{u} \right\vert_{\sqrt{[$a1]}}^{\sqrt{[$b1]}} = [$twop]e^{\sqrt{[$b1]}} - [$twop]e^{\sqrt{[$a1]}} \approx [$ans1]```] + ++ In the second integral, we will use the substitution [`u = \ln(x)+[$r]`] so [``du = \frac{1}{x}\, dx``], and again taking care to adjust the limits of integration when making a substitution, we get [```\left. \int_{[$a2]}^{[$b2]} [$f2] \, dx = \int_{\ln([$a2])+[$r]}^{\ln([$b2])+[$r]} \frac{u^2}{[$s]} \, du = \frac{u^3}{3} \right\vert_{[$r]}^{\ln([$b2])+[$r]} = \frac{(\ln([$b2])+[$r])^3}{[$threes]} - \frac{[$r]^3}{[$threes]} \approx [$ans2]```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-2-1-Ap-C/13-2-1-Ap-C-definite-sub-jms-2.pg b/Contrib/UCalgary/249-13-0-0-C/13-2-1-Ap-C/13-2-1-Ap-C-definite-sub-jms-2.pg new file mode 100644 index 0000000000..3b079cf42f --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-2-1-Ap-C/13-2-1-Ap-C-definite-sub-jms-2.pg @@ -0,0 +1,64 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(16 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a1 = random(-3,2,1); +$b1 = $a1 + random(2,6,1); +$p = random(2,5,1)*random(-1,1,2); +$q = random(2,7,1); +$aa1q = ($a1)**2+$q; +$bb1q = ($b1)**2+$q; +$f1 = Formula("$p*x*cos(x^2+$q)")->reduce(); +$ans1 = Compute("$p*sin($bb1q)/2 - $p*sin($aa1q)/2"); + +$a2 = 0; +$b2 = list_random('2','3','4','6'); +$r = random(2,8,1)*random(-1,1,2); +$f2 = Formula("$r*cos(x)*sqrt(sin(x))")->reduce(); +$twor = $r*2; +$ans2 = Compute("$twor*((sin(pi/$b2))**(3/2))/3-$twor*((sin(0))**(3/2))/3"); + +BEGIN_PGML +Evaluate the following definite integrals. + ++ [``\int_{[$a1]}^{[$b1]} [$f1] \, dx = \, ``] [_]{$ans1}{10} + ++ [``\int_{[$a2]}^{\pi/[$b2]} [$f2] \, dx = \, ``] [_]{$ans2}{10} + +Make sure that you give the exact value of your answer (do not "round off"). +END_PGML + +BEGIN_PGML_SOLUTION +We will use Substitution and the Fundamental Theorem of Calculus. + ++ In the first integral, we will take [`u = x^2+[$q]`] so [``du = 2x\, dx ``] or [``\frac{du}{2} = x\, dx.``] Then making sure that we also adjust the limits of integration when making the substitution, we have [```\left. \int_{[$a1]}^{[$b1]} [$f1] \, dx = \int_{([$a1])^2+[$q]}^{([$b1])^2+[$q]} \frac{[$p]}{2}\cos(u)\, du = \frac{[$p]}{2} \sin(u) \right\vert_{[$aa1q]}^{[$bb1q]} = \frac{[$p]}{2} \sin([$bb1q]) - \frac{[$p]}{2} \sin([$aa1q]) \approx [$ans1]```] + ++ In the second integral, we will use the substitution [`u = \sin(x)`] so [``du = \cos(x)\, dx``], and again taking care to adjust the limits of integration when making a substitution, we get [```\left. \int_{[$a2]}^{\pi/[$b2]} [$f2] \, dx = \int_{\sin(0)}^{\sin(\pi/[$b2])} [$r]\sqrt{u} \, du = \frac{[$twor]}{3} u^{3/2} \right\vert_{0}^{\sin(\pi/[$b2])} = \frac{[$twor]}{3}(\sin(\pi/[$b2]))^{3/2} - \frac{[$twor]}{3}(0)^{3/2} = \frac{[$twor]}{3}(\sin(\pi/[$b2]))^{3/2} \approx [$ans2]```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-2-1-Ap-C/13-2-1-Ap-C-definite-sub-jms-3-abstract.pg b/Contrib/UCalgary/249-13-0-0-C/13-2-1-Ap-C/13-2-1-Ap-C-definite-sub-jms-3-abstract.pg new file mode 100644 index 0000000000..1ce33fbd86 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-2-1-Ap-C/13-2-1-Ap-C-definite-sub-jms-3-abstract.pg @@ -0,0 +1,52 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(17 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(3,7,1); +$c = random(6,18,2); + +$b = Compute("($a)**2"); +$d = Compute("$c-2"); + +$ans = Compute("2*$c"); + +BEGIN_PGML +Let [`f`] be a continuous function. + +Suppose that [``\int_1^{[$a]} xf(x)\,dx =[$c]``] and [``\displaystyle \int_{[$a]}^{[$b]}\!\! f(x)\,dx =[$d]``]. + +Then the integral [``\int_1^{[$b]} f(\sqrt{t})\,dt``] is equal to [_]{$ans}{5}. +END_PGML + +BEGIN_PGML_SOLUTION +We will use the substitution [`u = \sqrt{t}`] so [``du = \frac{1}{2\sqrt{t}} \, dt.``] Notice that we can rearrange this to have [``dt = 2\sqrt{t}\, du = 2 u \, du.``] +Now it follows that +[```\int_1^{[$b]} f(\sqrt{t}) = \int_{\sqrt{1}}^{\sqrt{[$b]}} 2u f(u) \,du = 2 \int_{1}^{[$a]} u f(u) \,du = 2([$c]) = [$ans].```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-2-2-U-C/13-2-2-U-C-def-sub-mc-1-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-2-2-U-C/13-2-2-U-C-def-sub-mc-1-jms.pg new file mode 100644 index 0000000000..21abf24578 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-2-2-U-C/13-2-2-U-C-def-sub-mc-1-jms.pg @@ -0,0 +1,51 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Techniques of integration) +## DBsection(Substitution (without trigonometric functions)) +## Date(17 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2, 6, 1); +$b = non_zero_random(-5,5,1); + +$p = random(1,4,1); +$q = $p + random(2,4,1); + +$c = $a*$p+$b; +$d = $a*$q+$b; + +$radio1 = RadioButtons( + [ [ "\(\displaystyle \int_{$c}^{$d} \frac{f(u)}{$a} \,du\)", "\(\displaystyle \int_{$p}^{$q} \frac{f(u)}{$a} \,du\)", "\(\displaystyle \int_{$c}^{$d} f(u) \,du\)", "\(\displaystyle \int_{$p}^{$q} f(u) \,du\)", "\(\displaystyle \int_{$c}^{$d} $a f(u) \,du\)", "\(\displaystyle \int_{$p}^{$q} $a f(u) \,du\)"]], + "\(\displaystyle \int_{$c}^{$d} \frac{f(u)}{$a} \,du\)" # correct answer +); + +BEGIN_PGML +Let [`f`] be a continuous function. + +After making the substitution [`u = [$a]x+[$b]`] the integral +[``` \int_{[$p]}^{[$q]} f([$a]x+[$b])\,dx ```] +becomes which of the following? +[_]{$radio1} +END_PGML + +BEGIN_PGML_SOLUTION +With [`u = [$a]x+[$b]`], we have [`du = [$a] \, dx`] so [``\frac{1}{[$a]} du = dx.``] +Therefore, making sure to adjust the limits of integration by using the substitution, we have +[``` \int_{[$p]}^{[$q]} f([$a]x+[$b])\,dx = \int_{[$a]([$p])+[$b]}^{[$a]([$q])+[$b]} \frac{f(u)}{[$a]} \,du = \int_{[$c]}^{[$d]} \frac{f(u)}{[$a]} \,du ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-2-2-U-C/13-2-2-U-C-def-sub-mc-2-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-2-2-U-C/13-2-2-U-C-def-sub-mc-2-jms.pg new file mode 100644 index 0000000000..8be0da6e32 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-2-2-U-C/13-2-2-U-C-def-sub-mc-2-jms.pg @@ -0,0 +1,51 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Techniques of integration) +## DBsection(Substitution (without trigonometric functions)) +## Date(17 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2, 6, 1); +$twoa = $a*2; + +$p = random(0,2,1); +$q = $p + random(1,3,1); + +$c = $a*($p**2); +$d = $a*($q**2); + +$radio1 = RadioButtons( + [ [ "\(\displaystyle \int_{$c}^{$d} \frac{f(u)}{$twoa} \,du\)", "\(\displaystyle \int_{$p}^{$q} \frac{f(u)}{$twoa} \,du\)", "\(\displaystyle \int_{$c}^{$d} u f(u) \,du\)", "\(\displaystyle \int_{$p}^{$q} f(u) \,du\)", "\(\displaystyle \int_{$c}^{$d} \frac{f(u)}{$a} \,du\)", "\(\displaystyle \int_{$p}^{$q} $twoa f(u) \,du\)"]], + "\(\displaystyle \int_{$c}^{$d} \frac{f(u)}{$twoa} \,du\)" # correct answer +); + +BEGIN_PGML +Let [`f`] be a continuous function. + +After making the substitution [`u = [$a]x^2`] the integral +[``` \int_{[$p]}^{[$q]} xf([$a]x^2)\,dx ```] +becomes which of the following? +[_]{$radio1} +END_PGML + +BEGIN_PGML_SOLUTION +With [`u = [$a]x^2`], we have [`du = [$a](2x) = [$twoa] x \, dx`] so [``\frac{1}{[$twoa]} du = x dx.``] +Therefore, making sure to adjust the limits of integration by using the substitution, we have +[``` \int_{[$p]}^{[$q]} xf([$a]x^2)\,dx = \int_{[$a]([$p])^2}^{[$a]([$q])^2} \frac{f(u)}{[$twoa]} \,du = \int_{[$c]}^{[$d]} \frac{f(u)}{[$twoa]} \,du ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-2-2-U-C/13-2-2-U-C-def-sub-mc-3-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-2-2-U-C/13-2-2-U-C-def-sub-mc-3-jms.pg new file mode 100644 index 0000000000..7789fb6fd0 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-2-2-U-C/13-2-2-U-C-def-sub-mc-3-jms.pg @@ -0,0 +1,54 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Techniques of integration) +## DBsection(Substitution (with trigonometric functions)) +## Date(17 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2, 6, 1); +$b = random(1, 6, 1); + +$q = list_random('2','3','4','6'); + +if($q eq '2') +{$d = 1;} +elsif($q eq '3') +{$d = '\sqrt{3}/2';} +elsif($q eq '4') +{$d = '\sqrt{2}/2';} +elsif($q eq '6') +{$d = '1/2';} + +$radio1 = RadioButtons( + [ [ "\(\displaystyle\int_{0}^{$d} $a \sqrt{u^2 + $b} \,du\)", "\(\displaystyle\int_{0}^{\pi/$q} $a \sqrt{u^2 + $b} \,du\)", "\(\displaystyle\int_{0}^{\pi/$q} $a \cos(x) \sqrt{u^2 + $b} \,du\)", "\(\displaystyle\int_{0}^{$d} -$a \sqrt{u + $b} \,du\)", "\(\displaystyle\int_{0}^{$d} $a \sqrt{u} \,du\)"]], + "\(\displaystyle\int_{0}^{$d} $a \sqrt{u^2 + $b} \,du\)" # correct answer +); + +BEGIN_PGML +After making the substitution [`u = \sin(x)`] the integral +[``` \int_{0}^{\pi/[$q]} [$a]\cos(x)\sqrt{\sin^2(x)+[$b]}\,dx ```] +becomes which of the following? +[_]{$radio1} +END_PGML + +BEGIN_PGML_SOLUTION +With [`u = \sin(x)`], we have [`du = \cos(x) \, dx.`] +Therefore, making sure to adjust the limits of integration by using the substitution, we have +[``` \int_{0}^{[$q]} [$a]\cos(x)\sqrt{\sin^2(x)+[$b]} \,dx = \int_{\sin(0)}^{\sin(\pi/[$q])} [$a] \sqrt{u^2 + [$b]} \,du = \int_{0}^{[$d]} [$a] \sqrt{u^2 + [$b]} \,du ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-2-2-U-C/13-2-2-U-C-def-sub-mc-4-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-2-2-U-C/13-2-2-U-C-def-sub-mc-4-jms.pg new file mode 100644 index 0000000000..d5f6c1bf84 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-2-2-U-C/13-2-2-U-C-def-sub-mc-4-jms.pg @@ -0,0 +1,54 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Techniques of integration) +## DBsection(Substitution (without trigonometric functions)) +## Date(17 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2, 6, 1); +$b = random(1, 3, 1); +$bp1 = $b + 1; + +$q = random(2,5,1); +$bpq = $b + $q; +$d = "\ln($q)+$b"; + + +$radio1 = RadioButtons( + [ [ "\(\displaystyle\int_{$b}^{$d} $a \sqrt{u} \,du\)", + "\(\displaystyle\int_{1}^{$q} $a \sqrt{u} \,du\)", + "\(\displaystyle\int_{\ln($bp1)}^{\ln($bpq)} $a \sqrt{u} \,du\)", + "\(\displaystyle\int_{$b}^{$d} $a \sqrt{u+$b} \,du\)", + "\(\displaystyle\int_{1}^{$q} $a \sqrt{u+$b} \,du\)"]], + "\(\displaystyle\int_{$b}^{$d} $a \sqrt{u} \,du\)" # correct answer +); + +BEGIN_PGML +After making the substitution [`u = \ln(x)+[$b]`] the integral +[``` \int_{1}^{[$q]} \frac{[$a]\sqrt{\ln(x)+[$b]}}{x} \,dx ```] +becomes which of the following? +[_]{$radio1} +END_PGML + +BEGIN_PGML_SOLUTION +With [`u = \ln(x)+[$b]`], we have [``du = \frac{1}{x} \, dx.``] + +Therefore, making sure to adjust the limits of integration by using the substitution and noticing that [`\ln(1) = 0`], we have +[``` \int_{1}^{[$q]} \frac{[$a]\sqrt{\ln(x)+[$b]}}{x}\,dx = \int_{\ln(1)+[$b]}^{\ln([$q])+[$b]} [$a] \sqrt{u} \,du = \int_{[$b]}^{[$d]} [$a] \sqrt{u} \,du ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-3-1-Ap-I/13-3-1-Ap-I-der-int-jms-1.pg b/Contrib/UCalgary/249-13-0-0-C/13-3-1-Ap-I/13-3-1-Ap-I-der-int-jms-1.pg new file mode 100644 index 0000000000..8ad3a00be2 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-3-1-Ap-I/13-3-1-Ap-I-der-int-jms-1.pg @@ -0,0 +1,67 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(16 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +Context()->variables->add(t=>"Real"); + +$a = random(1,6,1); +$pow = random(2,5,1); +$b = random(2,5,1)*random(-1,1,2); +$c = random(2,6,1); + +$ft = Formula("$b*t^($pow) + $c*ln(t)")->reduce(); +$fx = Compute("$b*x^($pow) + $c*ln(x)"); +$fx_print = Formula("$b*x^($pow) + $c*ln(x)")->reduce(); + +$gx = Compute("$c*sin($b*sqrt(x)) + $pow*e^(x)"); +$gx_print = Formula("$c*sin($b*sqrt(x)) + $pow*e^(x)")->reduce(); + + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Evaluate the following derivatives. + ++ [`` \frac{d}{dx} \int_{[$a]}^{x} [$ft]\, dt = \, ``] [_]{$fx}{20} + ++ [`` \frac{d}{dx} \int [$gx_print]\, dx = \, ``] [_]{$gx}{20} + +END_PGML + +BEGIN_PGML_SOLUTION +By the Fundamental Theorem of Calculus we have +[``` \frac{d}{dx} \int_{[$a]}^{x} [$ft]\, dt = [$fx_print].```] + +By the definition of the Indefinite Integral ("General Antiderivative") we have +[``` \frac{d}{dx} \int [$gx_print]\, dx = [$gx_print]. ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-3-1-Ap-I/13-3-1-Ap-I-der-int-jms-2.pg b/Contrib/UCalgary/249-13-0-0-C/13-3-1-Ap-I/13-3-1-Ap-I-der-int-jms-2.pg new file mode 100644 index 0000000000..f53e137da5 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-3-1-Ap-I/13-3-1-Ap-I-der-int-jms-2.pg @@ -0,0 +1,67 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(16 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +Context()->variables->add(t=>"Real"); + +$a = random(1,6,1); +$pow = random(2,5,1); +$b = random(2,5,1)*random(-1,1,2); +$c = random(2,6,1); + +$ft = Formula("$c*(e^t)*sin(t)+$b*(e^(-t))*cos(t)")->reduce(); +$fx = Compute("$c*(e^x)*sin(x)+$b*(e^(-x))*cos(x)"); +$fx_print = Formula("$c*(e^x)*sin(x)+$b*(e^(-x))*cos(x)")->reduce(); + +$gx = Compute("sqrt($c*x^($pow)+$a)"); +$gx_print = Formula("sqrt($c*x^($pow)+$a)")->reduce(); + + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Evaluate the following derivatives. + ++ [`` \frac{d}{dx} \int [$gx_print]\, dx = \, ``] [_]{$gx}{20} + ++ [`` \frac{d}{dx} \int_{[$a]}^{x} [$ft]\, dt = \, ``] [_]{$fx}{20} + +END_PGML + +BEGIN_PGML_SOLUTION +By the definition of the Indefinite Integral ("General Antiderivative") we have +[``` \frac{d}{dx} \int [$gx_print]\, dx = [$gx_print]. ```] + +By the Fundamental Theorem of Calculus we have +[``` \frac{d}{dx} \int_{[$a]}^{x} [$ft]\, dt = [$fx_print].```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-3-2-Ap-I/13-3-2-Ap-I-ftc-chain-1-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-3-2-Ap-I/13-3-2-Ap-I-ftc-chain-1-jms.pg new file mode 100644 index 0000000000..ad611aac18 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-3-2-Ap-I/13-3-2-Ap-I-ftc-chain-1-jms.pg @@ -0,0 +1,76 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(16 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +Context()->variables->add(t=>"Real"); + + +$d = random(1,6,1); +$r = random(2,8,1)*random(-1,1,2); +$s = random(2,8,1)*random(-1,1,2); + +$gt = Formula("$r*ln(t)+$s*t")->reduce(); +$vx = Formula("x^2"); +$gvx = Compute("($r*ln(x^2)+$s*x^2)*(2*x)"); +$gvx_print = Formula("($r*ln(x^2)+$s*x^2)*(2*x)")->reduce(); + + +$a = random(1,6,1); +$b = random(2,9,1); + +$ft = Formula("$b*t*ln(t)")->reduce(); +$fx = Compute("$b*x*ln(x)"); +$fx_print = Formula("$b*x*ln(x)")->reduce(); +$ux = Formula("x^2+1"); +$fux = Compute("$b*(x^2+1)*ln(x^2+1)*(2*x)"); +$fux_print = Formula("$b*(x^2+1)*ln(x^2+1)*(2*x)")->reduce(); +$f_ans = Compute("$fux-$fx"); + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Evaluate the following derivatives. + ++ [`` \frac{d}{dx} \int_{[$a]}^{[$vx]}[$gt]\, dt = \, ``] [_]{$gvx}{20} + ++ [`` \frac{d}{dx} \int_{x}^{[$ux]}[$ft]\, dt = \, ``] [_]{$f_ans}{20} + +END_PGML + +BEGIN_PGML_SOLUTION +By the Fundamental Theorem of Calculus and the Chain Rule we have +[``` \frac{d}{dx} \int_{[$a]}^{[$vx]} [$gt]\, dt = [$gvx_print]. ```] + +After splitting up the integral, by the Fundamental Theorem of Calculus and the Chain Rule we have +[``` \frac{d}{dx} \int_{x}^{[$ux]} [$ft]\, dt = \frac{d}{dx} \left( \int_{1}^{[$ux]} [$ft]\, dt + \int_{x}^{1} [$ft]\, dt \right) = \frac{d}{dx} \left(\int_{1}^{[$ux]} [$ft]\, dt - \int_{1}^{x} [$ft]\, dt\right)= [$fux_print] - [$fx_print]. ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-3-2-Ap-I/13-3-2-Ap-I-ftc-chain-2-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-3-2-Ap-I/13-3-2-Ap-I-ftc-chain-2-jms.pg new file mode 100644 index 0000000000..47346c33be --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-3-2-Ap-I/13-3-2-Ap-I-ftc-chain-2-jms.pg @@ -0,0 +1,76 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(16 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +Context()->variables->add(t=>"Real"); + +$r= random(1,6,1); +$p= random(2,9,1); +$s = random(2,7,1)*random(-1,1,2); + +$gt = Formula("$p*sin(t)+$s*cos(t)")->reduce(); +$vx = Formula("e^x"); +$gvx = Compute("($p*sin(e^x)+$s*cos(e^x))*(e^x)"); +$gvx_print = Formula("($p*sin(e^x)+$s*cos(e^x))*(e^x)")->reduce(); + + +$a = random(1,6,1); +$b = random(2,5,1)*random(-1,1,2); +$c = random(2,9,1); + +$ft = Formula("$c*(t)*e^(t)")->reduce(); +$ux = Formula("sin($b*x)"); +$fuxdux = Compute("($b*cos($b*x))*($c*(sin($b*x))*e^(sin($b*x)))"); +$fux = Formula("($c*(sin($b*x))*e^(sin($b*x)))")->reduce(); +$fuxdux_print = Formula("($c*(sin($b*x))*e^(sin($b*x)))*($b*cos($b*x))")->reduce(); + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Evaluate the following derivatives. + ++ [`` \frac{d}{dx} \int_{[$r]}^{[$vx]} [$gt]\, dt = \, ``] [_]{$gvx}{20} + ++ [`` \frac{d}{dx} \int_{[$a]}^{[$ux]} [$ft]\, dt = \, ``] [_]{$fuxdux}{20} + +END_PGML + +BEGIN_PGML_SOLUTION + +By the Fundamental Theorem of Calculus and the Chain Rule we have +[``` \frac{d}{dx} \int_{[$r]}^{[$vx]} [$gt]\, dt = [$gvx_print].```] + +By the Fundamental Theorem of Calculus and the Chain Rule (twice!) we have +[``` \frac{d}{dx} \int_{[$a]}^{[$ux]} [$ft]\, dt = [$fux] \cdot \frac{d}{dx}([$ux]) = [$fuxdux_print].```] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-4-1-Ap-A/13-4-1-Ap-A-ftc-increase-decrease-AT.pg b/Contrib/UCalgary/249-13-0-0-C/13-4-1-Ap-A/13-4-1-Ap-A-ftc-increase-decrease-AT.pg new file mode 100644 index 0000000000..89d2775cee --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-4-1-Ap-A/13-4-1-Ap-A-ftc-increase-decrease-AT.pg @@ -0,0 +1,75 @@ +## DESCRIPTION +## Apply the FTC and earlier knowledge to determine intervals of increase/decrease of functions presented as integrals +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$i = random(0,3,1); +@a = (4,9,16,36); +$sqrt_a = sqrt($a[$i]); + +$I = Interval(-sqrt($a[$i]),sqrt($a[$i])); + +$expr1 = LayoutTable( + [ + [ + '\(F(x)\) is increasing on '.$SPACE.labeled_ans_rule("answer1",10).$SPACE, + '\(F(x)\) is decreasing on '.$SPACE.labeled_ans_rule("answer2",10).$SPACE + ] + ] +); + +$expr2 = LayoutTable( + [ + [ + '\(F(x)\) has a local maximum at \(x = \)'.$SPACE.labeled_ans_rule("answer3",10).$SPACE, + '\(F(x)\) has a local minimum at \(x = \)'.$SPACE.labeled_ans_rule("answer4",10).$SPACE + ] + ] +); + +BEGIN_PGML +Using the *Fundamental Theorem of Calculus*, find the intervals where the function +[```F(x) = \int_0^x{(t^2 - [$a[$i]])dt}```] +is increasing or decreasing. +[$expr1]* + +[@helpLink('intervals')@]* + +Also, determine the local extrema of this function. + +[$expr2]* +END_PGML + +LABELED_ANS("answer1",Compute("(-Inf,-sqrt($a[$i])) U (sqrt($a[$i]),Inf)")->cmp()); +LABELED_ANS("answer2",$I->cmp()); +LABELED_ANS("answer3",Compute(-$sqrt_a)->cmp()); +LABELED_ANS("answer4",Compute($sqrt_a)->cmp()); + +BEGIN_PGML_SOLUTION +Using the **Fundamental Theorem of Calculus**, we can say that +[```F^{\prime}(x) = x^2 - [$a[$i]],```] +and with the first order derivative we can then use the **First Derivative Test** to determine that [`x = \pm [$sqrt_a]`] are local extrema. + +We know that the function is neither increasing nor decreasing at the local extrema, so we inspect the intervals [`(-\infty,-[$sqrt_a])`], [`(-[$sqrt_a],[$sqrt_a])`], and [`([$sqrt_a],\infty)`], where we find that the function is **increasing** on the interval [`(-\infty,-[$sqrt_a]) \cup ([$sqrt_a],\infty)`] and **decreasing** on the interval [`(-[$sqrt_a],[$sqrt_a])`]. + +Finally, to find the local extrema, we can again use the **First Derivative Test** to say that [`F(x)`] has a local maximum at [`x = -[$sqrt_a]`] because this is where the function changes from increasing to decreasing, and that [`F(x)`] has a local minimum at [`x = [$sqrt_a]`] because this is where the function changes from decreasing to increasing. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-4-2-Ap-A/13-4-2-Ap-A-ftc-concavity-AT.pg b/Contrib/UCalgary/249-13-0-0-C/13-4-2-Ap-A/13-4-2-Ap-A-ftc-concavity-AT.pg new file mode 100644 index 0000000000..c2e78622a5 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-4-2-Ap-A/13-4-2-Ap-A-ftc-concavity-AT.pg @@ -0,0 +1,52 @@ +## DESCRIPTION +## Apply the FTC and earlier knowledge to determine intervals of concavity of functions presented as integrals +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2,9,1); + +$expr = LayoutTable( + [ + [ + '\(F(x)\) is concave up on'.$SPACE.labeled_ans_rule("answer1",10).$SPACE, + '\(F(x)\) is concave down (convex) on'.$SPACE.labeled_ans_rule("answer2",10).$SPACE + ] + ] +); + +BEGIN_PGML +Using the *Fundamental Theorem of Calculus*, find the intervals where the function +[```F(x) = \int_0^x{\left(\frac{t^2}{2} - [$a]t\right)dt}```] +is concave up or concave down (convex). +[$expr]* +END_PGML + +LABELED_ANS("answer1",Compute("(-Inf,$a)")->cmp()); +LABELED_ANS("answer2",Compute("($a,Inf)")->cmp()); + +BEGIN_PGML_SOLUTION +Using the **Fundamental Theorem of Calculus**, we can say that +[```F^{\prime}(x) = \frac{x^2}{2} - [$a]x,```] +where taking another derivative gives us +[```F^{\prime\prime}(x) = x - [$a].```] +This implies that our inflection point is at [`x = [$a]`], and by testing points in both [`(-\infty,[$a])`] and [`([$a],\infty)`], we find that [`F(x)`] is concave down on [`(-\infty,[$a])`] and concave up on [`([$a],\infty)`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-4-4-Ap-A/13-4-4-Ap-A-ftc-closed-interval-method-AT.pg b/Contrib/UCalgary/249-13-0-0-C/13-4-4-Ap-A/13-4-4-Ap-A-ftc-closed-interval-method-AT.pg new file mode 100644 index 0000000000..2f8bb1a60e --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-4-4-Ap-A/13-4-4-Ap-A-ftc-closed-interval-method-AT.pg @@ -0,0 +1,136 @@ +## DESCRIPTION +## Apply the FTC and the Closed Interval Method to find global extrema of functions presented as integrals on a closed interval +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$crit_a = 0; +$crit_zero = 0; +$left_endpnt = 0; +$right_endpnt = 0; + +while (has_duplicates($crit_a,$crit_zero,$left_endpnt,$right_endpnt)) { +$a = random(1,4,1); +while ($a == 0) { + $a = random(1,4,1); +} +$c = random(2,4,1); +$ac = $a*$c; +$A = random(-5,0,1); +$B = random(0,5,1); +while (($A == $B) || (abs($A - $B) < 3)) { + $A = random(-5,0,1); + $B = random(0,5,1); +} + +$crit_a = F($c,$a,$a); +$crit_zero = F($c,$a,0); +$left_endpnt = F($c,$a,$A); +$right_endpnt = F($c,$a,$B); +} + +$expr = LayoutTable( + [ + [ + 'The Global minimum is '.$SPACE.labeled_ans_rule("answer1",10).$SPACE.', which occurs at \(x = \)'.$SPACE.labeled_ans_rule("answer2",10) + ], + [ + 'The Global maximum is '.$SPACE.labeled_ans_rule("answer3",10).$SPACE.', which occurs at \(x = \)'.$SPACE.labeled_ans_rule("answer4",10) + ] + ] +); + +sub F { + my ($c,$a,$x) = @_; + return (1/6)*$c*$x*$x*(2*$x - 3*$a); +} + +sub has_duplicates { + my @array = @_; + my %seen; + + foreach my $element (@array) { + if (exists $seen{$element}) { + return 1; # Duplicate found + } + $seen{$element} = 1; # Mark element as seen + } + return 0; # No duplicates found +} + +BEGIN_PGML +Using the *Fundamental Theorem of Calculus* determine the global extrema of +[```F(x) = \int_0^x{([$c]t^2 - [$ac]t)dt}```] +on the closed interval [`[[$A],[$B]]`]. +[$expr]* +END_PGML + +if (($a <= $B) && ($a >= $A)) { + if ($crit_a > $crit_zero) { + LABELED_ANS("answer1",Compute($crit_zero)->cmp()); + LABELED_ANS("answer2",Compute(0)->cmp()); + LABELED_ANS("answer3",Compute($crit_a)->cmp()); + LABELED_ANS("answer4",Compute($a)->cmp()); + } else { + LABELED_ANS("answer3",Compute($crit_zero)->cmp()); + LABELED_ANS("answer4",Compute(0)->cmp()); + LABELED_ANS("answer1",Compute($crit_a)->cmp()); + LABELED_ANS("answer2",Compute($a)->cmp()); + } +} else { + if (($crit_zero > $left_endpnt) && ($crit_zero > $right_endpnt)) { + LABELED_ANS("answer3",Compute($crit_zero)->cmp()); + LABELED_ANS("answer4",Compute(0)->cmp()); + if ($left_endpnt > $right_endpnt) { + LABELED_ANS("answer1",Compute($right_endpnt)->cmp()); + LABELED_ANS("answer2",Compute($B)->cmp()); + } else { + LABELED_ANS("answer1",Compute($left_endpnt)->cmp()); + LABELED_ANS("answer2",Compute($A)->cmp()); + } + } else{ + if ($left_endpnt > $right_endpnt) { + LABELED_ANS("answer3",Compute($left_endpnt)->cmp()); + LABELED_ANS("answer4",Compute($A)->cmp()); + if ($right_endpnt < $crit_zero) { + LABELED_ANS("answer1",Compute($right_endpnt)->cmp()); + LABELED_ANS("answer2",Compute($B)->cmp()); + } else { + LABELED_ANS("answer1",Compute($crit_zero)->cmp()); + LABELED_ANS("answer2",Compute(0)->cmp()); + } + } else { + LABELED_ANS("answer3",Compute($right_endpnt)->cmp()); + LABELED_ANS("answer4",Compute($B)->cmp()); + if ($left_endpnt < $crit_zero) { + LABELED_ANS("answer1",Compute($left_endpnt)->cmp()); + LABELED_ANS("answer2",Compute($A)->cmp()); + } else { + LABELED_ANS("answer1",Compute($crit_zero)->cmp()); + LABELED_ANS("answer2",Compute(0)->cmp()); + } + } + } +} + +BEGIN_PGML_SOLUTION + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-1G-Ap-A-int-graph-inc-dec-1-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-1G-Ap-A-int-graph-inc-dec-1-jms.pg new file mode 100644 index 0000000000..5e61862c29 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-1G-Ap-A-int-graph-inc-dec-1-jms.pg @@ -0,0 +1,159 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(17 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl", "parserPopUp.pl"); + + +#intervals +# (-10,$a), ($a,$c), ($c,$e), and ($e,10) + +$a = random(-8,-6,1); +$b = $a + random(2,4,1); +$c = $b + random(2,3,1); +$d = $c + random(2,4,1); +$e = $d + random(2,3,1); + +# funciton values + +$fm10 = random(2,6,1)*random(-1,1,2); +$fa = 0; +$fb = random(2,6,1)*random(-1,1,2); +$fc = 0; +$fd = random(2,6,1)*random(-1,1,2); +$fe = 0; +$f10 = random(2,6,1)*random(-1,1,2); + +# make pop-ups + +if($fm10 < 0) +{$m10toa_incdec = 'decreasing'; +$m10toa_posneg = '<';} +else +{$m10toa_incdec = 'increasing'; +$m10toa_posneg = '>';} + +$m10toa = DropDown( + [ + 'increasing', + 'decreasing', + 'neither increasing nor decreasing' + ], + $m10toa_incdec +); + +if($fb < 0) +{$atoc_incdec = 'decreasing'; +$atoc_posneg = '<';} +else +{$atoc_incdec = 'increasing'; +$atoc_posneg = '>';} + +$atoc = DropDown( + [ + 'increasing', + 'decreasing', + 'neither increasing nor decreasing' + ], + $atoc_incdec +); + +if($fd < 0) +{$ctoe_incdec = 'decreasing'; +$ctoe_posneg = '<';} +else +{$ctoe_incdec = 'increasing'; +$ctoe_posneg = '>';} + +$ctoe = DropDown( + [ + 'increasing', + 'decreasing', + 'neither increasing nor decreasing' + ], + $ctoe_incdec +); + +if($f10 < 0) +{$eto10_incdec = 'decreasing'; +$eto10_posneg = '<'; +} +else +{$eto10_incdec = 'increasing'; +$eto10_posneg = '>';} + +$eto10 = DropDown( + [ + 'increasing', + 'decreasing', + 'neither increasing nor decreasing' + ], + $eto10_incdec +); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) --($d,$fd); +\draw[red, very thick] ($d,$fd) -- ($e,$fe); +\draw[red, very thick] ($e,$fe) -- (10,$f10); +\filldraw[red, very thick] (-10,$fm10) circle (2.5 pt); +\filldraw[red, very thick] ($a,$fa) circle (2.5 pt); +\filldraw[red, very thick] ($b,$fb) circle (2.5 pt); +\filldraw[red, very thick] ($c,$fc) circle (2.5 pt); +\filldraw[red, very thick] ($d,$fd) circle (2.5 pt); +\filldraw[red, very thick] ($e,$fe) circle (2.5 pt); +\filldraw[red, very thick] (10,$f10) circle (2.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the continuous function [`y=f(x)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +Define the function [`A`] by [``A(x) = \int_{[$a]}^{x} f(t) \, dt ``] for all [`x`] in the interval [`[-10,10].`] + ++ On the interval [`(-10,[$a])`] the function [`A`] is [_]{$m10toa} + ++ On the interval [`([$a],[$c])`] the function [`A`] is [_]{$atoc} + ++ On the interval [`([$c],[$e])`] the function [`A`] is [_]{$ctoe} + ++ On the interval [`([$e],10)`] the function [`A`] is [_]{$eto10} + +END_PGML + +BEGIN_PGML_SOLUTION +By the Fundamental Theorem of Calculus [``A'(x) = \frac{d}{dx} \int_{[$a]}^{x} f(t) \, dt = f(x),``] so [`A`] is increasing where [`f(x) >0`] and [`A`] is decreasing where [`f(x) < 0`]. + ++ Note that [`f(x) [$m10toa_posneg] 0`] on the interval [`(-10,[$a])`], so the function [`A`] is [$m10toa_incdec] on this interval. + ++ Note that [`f(x) [$atoc_posneg] 0`] on the interval [`([$a],[$c])`], so the function [`A`] is [$atoc_incdec] on this interval. + ++ Note that [`f(x) [$ctoe_posneg] 0`] on the interval [`([$c],[$e])`], so the function [`A`] is [$ctoe_incdec] on this interval. + ++ Note that [`f(x) [$eto10_posneg] 0`] on the interval [`([$e],10)`], so the function [`A`] is [$eto10_incdec] on this interval. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-1G-Ap-A-int-graph-inc-dec-2-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-1G-Ap-A-int-graph-inc-dec-2-jms.pg new file mode 100644 index 0000000000..2dd4f976b7 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-1G-Ap-A-int-graph-inc-dec-2-jms.pg @@ -0,0 +1,82 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(17 April 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#roots +$a = random(-4,-3,1); +$b = $a + random(3,4,1); +$c = $b + random(2,3,1); +$k = random(-1,1,2); + +Context("Interval"); + +if($k < 0) +{ +$inc = List("(-5,$a)","($b,$c)"); +$dec = List("($a,$b)","($c,5)"); +} +else +{ +$dec = List("(-5,$a)","($b,$c)"); +$inc = List("($a,$b)","($c,5)"); +} + +$critical = List("$a","$b","$c"); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-7) grid (5,7); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth] plot[domain={-5}:{5}] (\x,{$k*(\x-$a)*(\x-$b)*(\x-$c)/20}); +\draw[red] ($b,1) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph [`y=f(x)`] of the function [`f`] on the interval [`(-5,5)`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +Define the function [``A(x) = \int_{-4}^x f(t)\, dt ``] for all [`x \in (-5,5).`] + +Determine the open subintervals of [`(-5,5)`] on which the function [`A`] is increasing or decreasing. + + Enter the intervals that you find as a list separated by commas, if there are no such intervals enter [|None|]*. + + [`A`] is increasing on the interval(s): [_]{$inc}{20} + + [`A`] is decreasing on the interval(s): [_]{$dec}{20} + +[@helpLink('intervals')@]* + +END_PGML + +BEGIN_PGML_SOLUTION +[`A`] is increasing on intervals where [`A'(x)>0`] and [`A`] is decreasing on intervals where [`A'(x)<0`]. + +By the Fundamental Theorem of Calculus [``A'(x) = \frac{d}{dx}\int_{-4}^x f(t)\, dt = f(x) ``] + +[`A`] is increasing on the intervals [`[$inc]`] where [`f(x) > 0`]. + +[`A`] is decreasing on the intervals [`[$dec]`] where [`f(x) < 0`]. + +[`A`] has critical points at [`x = [$critical]`] because [`f([$a])=0, f([$b])=0`] and [`f([$c])=0`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-2G-Ap-A-int-graph-concave-1-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-2G-Ap-A-int-graph-concave-1-jms.pg new file mode 100644 index 0000000000..217f99bf43 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-2G-Ap-A-int-graph-concave-1-jms.pg @@ -0,0 +1,226 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(17 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +$a = random(-8,-4,1); +$b = $a + random(2,4,1); +$c = $b + random(2,4,1); +$d = $c + random(2,4,1); + +# ensure that consecutive values of the function are different to avoid a constant first derivative +$fm10 = non_zero_random(-3,3,1); +$fa = $fm10 + non_zero_random(-3,3,1); +$fb = $fa + non_zero_random(-3,3,1); +$fc = $fb + non_zero_random(-3,3,1); +$fd = $fc + non_zero_random(-3,3,1); +$f10 = $fd + non_zero_random(-3,3,1); + +$upper = max(max($fm10, $fa, $fb, $fc, $fd, $f10) + 1,2); +$lower = min(min($fm10, $fa, $fb, $fc, $fd, $f10) - 1,-2); + +# determine behaviour on small intervals; always inc/dec/constant +if($fm10 > $fa) +{$tentoa = 'is concave downward';} +elsif($fm10 < $fa) +{$tentoa = 'is concave upward';} + +if($fa > $fb) +{$atob = 'is concave downward';} +elsif($fa < $fb) +{$atob = 'is concave upward';} + +if($fb > $fc) +{$btoc = 'is concave downward';} +elsif($fb < $fc) +{$btoc = 'is concave upward';} + +if($fc > $fd) +{$ctod = 'is concave downward';} +elsif($fc < $fd) +{$ctod = 'is concave upward';} + +if($fd > $f10) +{$dtoten = 'is concave downward';} +elsif($fd < $f10) +{$dtoten = 'is concave upward';} + +# determine behavior on some concatenated intervals sometimes "neither" bevahiour +# use eq for string comparison == does not behave correctly for this comparison +if($tentoa eq $atob) +{$tentob = $tentoa;} +else +{$tentob = 'changes concavity at a point inside the interval';} + +if($atob eq $btoc) +{$atoc = $atob;} +else +{$atoc = 'changes concavity at a point inside the interval';} + +if($btoc eq $ctod) +{$btod = $btoc;} +else +{$btod = 'changes concavity at a point inside the interval';} + +#produce popups for each of the eight intervals above +$popup_tentoa = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity on a point inside the interval' + ], + $tentoa +); + +$popup_tentob = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $tentob +); + +$popup_atob = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $atob +); + +$popup_atoc = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $atoc +); + +$popup_btoc = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $btoc +); + +$popup_ctod = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $ctod +); + +$popup_btod = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $btod +); + +$popup_dtoten = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $dtoten +); + +# choose random subsets of intervals, paired with popup, to ask below +# use eq for string comparison == does not behave correctly for this comparison + +# one end -10 to a or d to 10 +$I1 = list_random("(-10,$a)","($d,10)"); + +if($I1 eq "(-10,$a)") +{$popup1 = $popup_tentoa;} +else +{$popup1 = $popup_dtoten;} + +# one interior a to b, b to c, or c to d +$I2 = list_random("($a,$b)","($b,$c)", "($c,$d)"); + +if($I2 eq "($a,$b)") +{$popup2 = $popup_atob;} +elsif($I2 eq "($b,$c)") +{$popup2 = $popup_btoc;} +else +{$popup2 = $popup_ctod;} + +# one concatenated -10 to b, a to c, or b to d +$I3 = list_random("(-10,$b)","($a,$c)", "($b,$d)"); + +if($I3 eq "(-10,$b)") +{$popup3 = $popup_tentob;} +elsif($I3 eq "($a,$c)") +{$popup3 = $popup_atoc;} +else +{$popup3 = $popup_btod;} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,$lower) -- (0,$upper) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,$lower) grid (10,$upper); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {$lower,...,-1,1,...,$upper} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) -- ($d,$fd); +\draw[->,red, very thick] ($d,$fd) -- (10,$f10); +\draw[red] (10,$f10) node [above right]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Suppose that [`f`] is a differentiable function with the graph [`y=f(x)`] given below. + +[@ image($graph_image, width => 700, tex_size => 800) @]* + +Define the function [``A(x) = \int_{[$b]}^{x} f(t) \, dt ``] for all [`x`] in the interval [`[-10,10].`] + +a) On the interval [`[$I1]`] the function [`A`] [_]{$popup1} + +a) On the interval [`[$I2]`] the function [`A`] [_]{$popup2} + +a) On the interval [`[$I3]`] the function [`A`] [_]{$popup3} + +END_PGML + +BEGIN_PGML_SOLUTION +By the Fundamental Theorem of Calculus [``A'(x) = \frac{d}{dx} \int_{[$b]}^{x} f(t) \, dt = f(x),``] and therefore [`A''(x) = f'(x).`] + ++ [`A`] is concave upward on intervals where [`A''(x)=f'(x)>0`] and this is equivalent to saying that [`f`] is increasing. + ++ [`A`] is concave downward on intervals where [`A''(x)=f'(x)<0`] and this is equivalent to saying that [`f`] is decreasing. + +We can read the above information off the given graph of [`y=f(x)`]. + +Note that the concavity of [`A`] will change inside an interval if the function [`f`] changes from increasing to decreasing at a point inside that interval. +END_PGML_SOLUTION + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-2G-Ap-A-int-graph-concave-2-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-2G-Ap-A-int-graph-concave-2-jms.pg new file mode 100644 index 0000000000..3450c04197 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-2G-Ap-A-int-graph-concave-2-jms.pg @@ -0,0 +1,102 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(17 April 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#roots +$a = random(-3,-2,1); +$b = $a + random(3,4,1); +$ab = $a*$b; +$k = random(-1,1,2); +# fix some problematic cases for the graph overflowing the grid +if($a == -3 && $k==1) +{$c = -6;} +elsif($a == -3 && $k== -1) +{$c = 6;} +elsif($a == -2 && $k== 1) +{$c = random(-3,-2,1);} +elsif($a == -2 && $k== -1) +{$c = random(2,3,1);} +else +{$c = random(1,2,1);} + +Context("Interval"); + +if($k < 0) +{ +$upward = "($a,$b)"; +$downward = List("(-5,$a)","($b,5)"); +} +else +{ +$downward= "($a,$b)"; +$upward = List("(-5,$a)","($b,5)"); +} + +$inflection = List("$a", "$b"); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-7) grid (5,7); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth] plot[domain={-5}:{5}] (\x,{$k*((\x*\x*\x)/18 - ($a/12)*(\x*\x) - ($b/12)*(\x*\x) + ($ab/6)*\x)+$c}); +\draw[red] (5,6) node [above right]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the graph [`y=f(x)`] of the differentiable function [`f`] on the interval [`(-5,5)`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +Define the function [``A(x) = \int_{-4}^x f(t)\, dt ``] for all [`x \in (-5,5).`] + +Determine the open subintervals of [`(-5,5)`] on which [`A`] is concave upward or concave downward. + + Enter the intervals that you find as a list separated by commas, if there are no such values enter [|None|]*. + + [`A`] is concave upward on the interval(s): [_]{$upward}{20} + + [`A`] is concave downward on the interval(s): [_]{$downward}{20} + + [@helpLink('intervals')@]* + +b) List the [`x`]-coordinates of the inflection points of [`A`] in the interval [`(-5,5)`], if any. + + Enter the [`x`]-values that you find as a list separated by commas, if there are no such values enter [|None|]*. + + [`A`] has inflection point(s) at [`x = \,`] [_]{$inflection}{15} + +END_PGML + +BEGIN_PGML_SOLUTION +By the Fundamental Theorem of Calculus [``A'(x) = \frac{d}{dx} \int_{-4}^x h(t)\, dt = f(x)``] and so [`A''(x) = f'(x).`] + ++ [`A`] is concave upward on intervals where [`A''(x)=f'(x)>0`] and this is equivalent to saying that [`f`] is increasing. + ++ [`A`] is concave downward on intervals where [`A''(x)=f'(x)<0`] and this is equivalent to saying that [`f`] is decreasing. + +a) [`f`] is increasing on the interval(s): [`[$upward]`], so [`A`] is concave upward on the interval(s): [`[$upward]`] + + [`f`] is decreasing on the interval(s): [`[$downward]`], so [`A`] is concave downard on the interval(s): [`[$downward]`] + +b) The function [`A`] has inflection points where the function is continuous and the concavity of [`A`] changes. The function [`A`] is continuous on [`(-5,5)`] because it is a differentiable function, and the concavity of [`A`] changes at [`x = [$inflection]`] so [`A`] has inflection points at [`x = [$inflection]`]. + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-3G-Ap-A-loc-ext-int-graph-1-jms.pg b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-3G-Ap-A-loc-ext-int-graph-1-jms.pg new file mode 100644 index 0000000000..2cc5fcbd75 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-3G-Ap-A-loc-ext-int-graph-1-jms.pg @@ -0,0 +1,146 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(17 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +#intervals +# (-10,$a), ($a,$c), ($c,$e), and ($e,10) + +$a = random(-8,-6,1); +$b = $a + random(2,3,1); +$c = $b + random(2,4,1); +$d = $c + random(2,3,1); +$e = $d + random(2,4,1); + +#funciton values + +$fm10 = random(2,7,1)*random(-1,1,2); +$fa = 0; +$fb = random(2,7,1)*random(-1,1,2); +$fc = 0; +$fd = random(2,7,1)*random(-1,1,2); +$fe = 0; +$f10 = random(2,7,1)*random(-1,1,2); + +# determine local extrema behavour at critical points $a, $c and $e +if($fm10 > 0 & $fb < 0) +{$a_maxmin = 'a local maximum';} +elsif($fm10 < 0 & $fb > 0) +{$a_maxmin = 'a local minimum';} +else +{$a_maxmin = 'neither a local maximum nor local minimum';} + +if($fb > 0 & $fd < 0) +{$c_maxmin = 'a local maximum';} +elsif($fb < 0 & $fd > 0) +{$c_maxmin = 'a local minimum';} +else +{$c_maxmin = 'neither a local maximum nor local minimum';} + +if($fd > 0 & $fm10 < 0) +{$e_maxmin = 'a local maximum';} +elsif($fd < 0 & $fm10 > 0) +{$e_maxmin = 'a local minimum';} +else +{$e_maxmin = 'neither a local maximum nor local minimum';} + +# produce popups for local max / local min / neither +$popup_a = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum' + ], + $a_maxmin +); + +$popup_c = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum' + ], + $c_maxmin +); + +$popup_e = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum' + ], + $e_maxmin +); + +# popup for critical / singular point + +$crit = DropDown( + [ + 'critical', + 'singular' + ], + 'critical' +); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) .. controls ($b,$fb) .. ($c,$fc); +\draw[red, very thick] ($c,$fc) .. controls ($d,$fd) .. ($e,$fe); +\draw[->,red, very thick] ($e,$fe) -- (10,$f10); +\filldraw[red, very thick] ($a,$fa) circle (2.5 pt); +\filldraw[red, very thick] ($c,$fc) circle (2.5 pt); +\filldraw[red, very thick] ($e,$fe) circle (2.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the continuous function [`y=f(x).`] + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +Define the function [``A(x) = \int_{-4}^x f(t)\, dt ``] for all [`x\in(-10,10).`] + +a) The function [`A`] has a [_]{$crit} point and [_]{$popup_a} at [`x=[$a].`] + +b) The function [`A`] has a [_]{$crit} point and [_]{$popup_c} at [`x=[$c].`] + +c) The function [`A`] has a [_]{$crit} point and [_]{$popup_e} at [`x=[$e].`] + +END_PGML + +BEGIN_PGML_SOLUTION +By the Fundamental Theorem of Calculus, [``A'(x) = \frac{d}{dx} \int_{-4}^x f(t)\, dt = f(x) ``] + ++ [``f([$a]) = 0, f([$c]) = 0 ``] and [``f([$e]) = 0``], so [`x=[$a], x=[$c]`] and [`x=[$e]`] are all **critical points** of the function [`A.`] + ++ If [`A`] is increasing on the left and decreasing on the right of a critical point [`x=c`], then [`A`] has a local maximum at [`x=c.`] + ++ If [`A`] is decreasing on the left and increasing on the right of a critical point [`x=c`], then [`A`] has a local minimum at [`x=c.`] + ++ If [`A`] is increasing (repsectively, decreasing) to the left and right of a critical point [`x=c`], then [`f`] does not have a local extrema at [`x=c.`] + ++ [`A`] is increasing on intervals where [`f(x)>0,`] and [`A`] is decreasing on intervals where [`f(x)<0.`] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-4G-Ap-A-ftc-closed-int-jms-1.pg b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-4G-Ap-A-ftc-closed-int-jms-1.pg new file mode 100644 index 0000000000..293cdc04ef --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-4G-Ap-A-ftc-closed-int-jms-1.pg @@ -0,0 +1,134 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(17 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); + +#intervals +# (-10,$a), ($a,$c), ($c,$e), and ($e,10) + +$a = random(-7,-6,1); +$b = $a + random(2,3,1); +$c = $b + random(2,4,1); +$d = $c + random(2,3,1); +$e = $d + random(2,4,1); + +# funciton values + +$fm10 = random(2,7,1)*random(-1,1,2); +$fa = 0; +$fb = random(2,7,1)*random(-1,1,2); +$fc = 0; +# make sure that fb and fd have opposite sign +if($fb > 0) +{$fd = random(-7,-2,1);} +else +{$fd = random(2,7,1);} +$fe = 0; +# make sure that fm10 and f10 have opposite sign +if($fm10 > 0) +{$f10 = random(-7,-2,1);} +else +{$f10 = random(2,7,1);} + +# area values A(x) = int_$a ^x f(t) dt +# all shapes are triangles 1/2 base height +# base = interval length; height = function values +$Fm10 = Compute("1/2*(-10-$a)*$fm10"); +$Fa = 0; +$Fb = Compute("1/2*($b-$a)*$fb"); +$Fc = Compute("1/2*($c-$a)*$fb"); +$Fd = Compute("1/2*($c-$a)*$fb + 1/2*($d-$c)*$fd"); +$Fe = Compute("1/2*($c-$a)*$fb + 1/2*($e-$c)*$fd"); +$F10 = Compute("1/2*($c-$a)*$fb + 1/2*($e-$c)*$fd + 1/2(10-$e)*$f10"); + +$max = max($Fm10,$Fa,$Fb,$Fc,$Fd,$Fe,$F10); +$min = min($Fm10,$Fa,$Fb,$Fc,$Fd,$Fe,$F10); + +#ask aboout b or c and d or e +$pt1 = list_random($b,$c); +$pt2 = list_random($d,$e); + +if($pt1 == $b) +{$Apt1 = $Fb;} +else +{$Apt1 = $Fc;} + +if($pt2 == $d) +{$Apt2 = $Fd;} +else +{$Apt2 = $Fe;} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) --($d,$fd); +\draw[red, very thick] ($d,$fd) -- ($e,$fe); +\draw[red, very thick] ($e,$fe) -- (10,$f10); +\filldraw[red, very thick] (-10,$fm10) circle (2.5 pt); +\filldraw[red, very thick] ($a,$fa) circle (2.5 pt); +\filldraw[red, very thick] ($b,$fb) circle (2.5 pt); +\filldraw[red, very thick] ($c,$fc) circle (2.5 pt); +\filldraw[red, very thick] ($d,$fd) circle (2.5 pt); +\filldraw[red, very thick] ($e,$fe) circle (2.5 pt); +\filldraw[red, very thick] (10,$f10) circle (2.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the continuous function [`y=f(x)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +Define [``A(x) = \int_{[$a]}^{x} f(t) \, dt``] for all [`x`] in the closed interval [`[-10,10].`] + ++ The global (absolute) maximum value of [`A`] on the interval [`[-10,10]`] is [_]{$max}{5}. + ++ The global (absolute) minimum value of [`A`] on the interval [`[-10,10]`] is [_]{$min}{5}. + +END_PGML + +BEGIN_PGML_SOLUTION +We will apply the Closed Interval Method. + +By the Fundamental Theorem of Calculus, [``A'(x) = \frac{d}{dx}\int_{[$a]}^{x} f(t) \, dt = f(x).``] + +Therefore, [`A`] has critical points at [`x=[$a]`], [`[$c]`] and [`[$e]`]. + +Now, we will find the value of [`A`] at each of the critical points and the endpoints of the interval to find the global maximum and minimum. + ++ [``A(-10) = \int_{[$a]}^{-10} f(t) \, dt = -\int_{-10}^{[$a]} f(t) \, dt = [$Fm10]``] + ++ [``A([$a]) = \int_{[$a]}^{[$a]} f(t) \, dt = [$Fa]``] + ++ [``A([$c]) = \int_{[$a]}^{-10} f(t) \, dt = [$Fc]``] + ++ [``A([$e]) = \int_{[$a]}^{-10} f(t) \, dt = [$Fe]``] + ++ [``A(10) = \int_{[$a]}^{10} f(t) \, dt = [$F10]``] + +So the global (absolute) maximum value of [`A`] is [`[$max]`], and the global (absolute) minimum value of [`A`] is [`[$min].`] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-4G-Ap-A-ftc-closed-int-jms-2.pg b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-4G-Ap-A-ftc-closed-int-jms-2.pg new file mode 100644 index 0000000000..7fccf90de8 --- /dev/null +++ b/Contrib/UCalgary/249-13-0-0-C/13-4-G-Ap-A/13-4-4G-Ap-A-ftc-closed-int-jms-2.pg @@ -0,0 +1,125 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Fundamental theorem of calculus) +## Date(17 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); + +#intervals +$a = random(-8,-6,1); +$b = $a + random(2,4,1); +$c = $b + random(2,3,1); +$d1 = $c + random(1,2,1); +$d2 = $d1 + random(1,2,1); +$e = $d2 + random(2,3,1); + +# funciton values +$fm10 = random(2,6,1)*random(-1,1,2); +$fa = $fm10; +#make sure fb has same sign as fm10, fa +if($fm10 < 0) +{$fb = random(-7,-2,1);} +else +{$fb = random(2,7,1);} +$fc = 0; +# make sure that fb and fd have opposite sign +if($fb > 0) +{$fd = random(-6,-2,1);} +else +{$fd = random(2,6,1);} +$fe = 0; +# make sure that fe and f10 have the same sign +$f10 = random(2,7,1)*random(-1,1,2); + +# area values over sub-intervals +# all shapes are rectangles (base height) or triangles (1/2 base height) +# base = interval length; height = function values +$Am10toa = Compute("($a-(-10))*$fm10"); #rectangle +$Aatob = 1/2*($b-$a)*(max($fm10,$fb)-min($fm10,$fb)) +($b-$a)*min($fm10,$fb); #rectangle + trangle +$Abtoc = Compute("1/2*($c-$b)*$fb"); #triangle +$Actod1 = Compute("1/2*($d1-$c)*$fd");#triangle +$Ad1tod2 = Compute("($d2-$d1)*$fd"); #rectangle +$Ad2toe = Compute("1/2*($e-$d2)*$fd"); #triangle +$Aeto10 = Compute("1/2*(10-$e)*$f10"); #triangle + +# function values +$Fm10 = Compute("-$Am10toa-$Aatob"); +$Fc = Compute("$Abtoc"); +$Fe = Compute("$Abtoc + $Actod1 + $Ad1tod2 + $Ad2toe"); +$F10 = Compute("$Abtoc + $Actod1 + $Ad1tod2 + $Ad2toe + $Aeto10"); + +$max = max($Fm10,$Fc,$Fe,$F10); +$min = min($Fm10,$Fc,$Fe,$F10); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) -- ($d1,$fd); +\draw[red, very thick] ($d1,$fd) -- ($d2,$fd); +\draw[red, very thick] ($d2,$fd) -- ($e,$fe); +\draw[red, very thick] ($e,$fe) -- (10,$f10); +\filldraw[red, very thick] (-10,$fm10) circle (2.5 pt); +\filldraw[red, very thick] ($a,$fa) circle (2.5 pt); +\filldraw[red, very thick] ($b,$fb) circle (2.5 pt); +\filldraw[red, very thick] ($c,$fc) circle (2.5 pt); +\filldraw[red, very thick] ($d1,$fd) circle (2.5 pt); +\filldraw[red, very thick] ($d2,$fd) circle (2.5 pt); +\filldraw[red, very thick] ($e,$fe) circle (2.5 pt); +\filldraw[red, very thick] (10,$f10) circle (2.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the continuous function [`y=f(x)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +Define [``A(x) = \int_{[$b]}^{x} f(t) \, dt``] for all [`x`] in the closed interval [`[-10,10].`] + ++ The global (absolute) maximum value of [`A`] on the interval [`[-10,10]`] is [_]{$max}{5}. + ++ The global (absolute) minimum value of [`A`] on the interval [`[-10,10]`] is [_]{$min}{5}. + +END_PGML + +BEGIN_PGML_SOLUTION +We will apply the Closed Interval Method. + +By the Fundamental Theorem of Calculus, [``A'(x) = \frac{d}{dx}\int_{[$a]}^{x} f(t) \, dt = f(x).``] + +Therefore, [`A`] has critical points at [`x=[$c]`] and [`x=[$e]`]. + +Now, we will find the value of [`A`] at each of the critical points and the endpoints of the interval to find the global maximum and minimum. + ++ [``A(-10) = \int_{[$b]}^{-10} f(t) \, dt = - \int_{-10}^{[$b]} f(t) \, dt = [$Fm10]``] + ++ [``A([$c]) = \int_{[$b]}^{[$c]} f(t) \, dt = [$Fc]``] + ++ [``A([$e]) = \int_{[$b]}^{[$e]} f(t) \, dt = [$Fe]``] + ++ [``A(10) = \int_{[$b]}^{10} f(t) \, dt = [$F10]``] + +So the global (absolute) maximum value of [`A`] is [`[$max]`], and the global (absolute) minimum value of [`A`] is [`[$min].`] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-14-0-0-C/14-0-1-R-C/14-0-1-R-C-infinite-interval-AT.pg b/Contrib/UCalgary/249-14-0-0-C/14-0-1-R-C/14-0-1-R-C-infinite-interval-AT.pg new file mode 100644 index 0000000000..e56b4df357 --- /dev/null +++ b/Contrib/UCalgary/249-14-0-0-C/14-0-1-R-C/14-0-1-R-C-infinite-interval-AT.pg @@ -0,0 +1,49 @@ +## DESCRIPTION +## Identify an integral as being improper because it is over an infinite interval +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Improper integrals) +## Level(1) +## KEYWORDS() + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + 'parserRadioButtons.pl' +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$radio = RadioButtons( + + [ + '\(\displaystyle\int_1^{\infty}{e^{-x}dx}\)', + '\(\displaystyle\int_4^9{x\sqrt{x}dx}\)', + '\(\displaystyle\int_1^2{\frac{dx}{x^2}}\)', + '\(\displaystyle\int_{0}^3{\frac{dx}{\sqrt{1 + x}}}\)' + ], + '\(\displaystyle\int_1^{\infty}{e^{-x}dx}\)', # correct answer +); + +BEGIN_PGML +Identify which of the following integrals is **improper**: + +[_]{$radio} + +END_PGML + +BEGIN_PGML_SOLUTION +The integral +[```\displaystyle\int_1^{\infty}{e^{-x}dx}```] +is improper (even though it converges) because one of the limits of integration is infinite. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-14-0-0-C/14-0-2-U-C/14-0-2-U-C-asymptote-algebraic-AT.pg b/Contrib/UCalgary/249-14-0-0-C/14-0-2-U-C/14-0-2-U-C-asymptote-algebraic-AT.pg new file mode 100644 index 0000000000..f87e10f813 --- /dev/null +++ b/Contrib/UCalgary/249-14-0-0-C/14-0-2-U-C/14-0-2-U-C-asymptote-algebraic-AT.pg @@ -0,0 +1,46 @@ +## DESCRIPTION +## Identify an integral as improper because the function has a vertical asymptote in the domain of integration (algebraically) +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Improper integrals) +## Level(2) +## KEYWORDS() + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + 'parserCheckboxList.pl' +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$checks = CheckboxList( + [ + "\(\displaystyle\int_0^1{\frac{dx}{x^{1/3}}}\)", + "\(\displaystyle\int_1^2{\frac{dx}{x^2}}\)", + "\(\displaystyle\int_{-1}^2{\frac{dx}{x^3}}\)", + "\(\displaystyle\int_0^1{\frac{dx}{1+x}}\)" + ], + [ 0, 2 ] +); + +BEGIN_PGML +Identify which integrals are improper because the integrand has a vertical asymptote in the domain of integration. + +[_]{$checks} + +END_PGML + +BEGIN_PGML_SOLUTION + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-14-0-0-C/14-0-3-U-C/14-0-3-U-C-asymptote-graphic-2-AT.pg b/Contrib/UCalgary/249-14-0-0-C/14-0-3-U-C/14-0-3-U-C-asymptote-graphic-2-AT.pg new file mode 100644 index 0000000000..ac07ddf9ff --- /dev/null +++ b/Contrib/UCalgary/249-14-0-0-C/14-0-3-U-C/14-0-3-U-C-asymptote-graphic-2-AT.pg @@ -0,0 +1,160 @@ +## DESCRIPTION +## Identify an integral as improper because the function has a vertical asymptote in the domain of integration (graphically) +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Improper integrals) +## Level(2) +## KEYWORDS() + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + 'PGtikz.pl', + 'parserPopUp.pl', + 'niceTables.pl', + 'plots.pl', + 'parserCheckboxList.pl' +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$f1 = Compute("x^{-1}")->reduce; +$f2 = Compute("exp(-x)")->reduce; +$f3 = Compute("x^2")->reduce; +$f4 = Compute("1/(x-5)^{2}")->reduce; +$xmin = 0; +$xmax = 10; +$ymin = 0; +$ymax = 10; +$x0 = 0; +$x1 = 10; +$xtick_delta = 2; +$ytick_delta = 2; + +$plot1 = Plot( + xmin => $xmin, + xmax => $xmax, + ymin => $ymin, + ymax => $ymax, + xtick_delta => $xtick_delta, + ytick_delta => $ytick_delta +); +$plot1->add_function( + $f1, 'x', $x0, $x1, + color => 'blue', + name => 'A', + fill => 'xaxis', + fill_min => $x0, + fill_max => $x1, + fill_color => 'green', + fill_opacity => 0.5 +); + +$plot2 = Plot( + xmin => $xmin, + xmax => $xmax, + ymin => $ymin, + ymax => $ymax, + xtick_delta => $xtick_delta, + ytick_delta => $ytick_delta +); +$plot2->add_function( + $f2, 'x', $x0, $x1, + color => 'blue', + name => 'A', + fill => 'xaxis', + fill_min => $x0, + fill_max => $x1, + fill_color => 'green', + fill_opacity => 0.5 +); + +$plot3 = Plot( + xmin => $xmin, + xmax => $xmax, + ymin => $ymin, + ymax => $ymax, + xtick_delta => $xtick_delta, + ytick_delta => $ytick_delta +); +$plot3->add_function( + $f3, 'x', $x0, $x1, + color => 'blue', + name => 'A', + fill => 'xaxis', + fill_min => $x0, + fill_max => $x1, + fill_color => 'green', + fill_opacity => 0.5 +); + +$plot4 = Plot( + xmin => $xmin, + xmax => $xmax, + ymin => $ymin, + ymax => $ymax, + xtick_delta => $xtick_delta, + ytick_delta => $ytick_delta +); +$plot4->add_function( + $f4, 'x', $x0, $x1, + color => 'blue', + name => 'A', + fill => 'xaxis', + fill_min => $x0, + fill_max => $x1, + fill_color => 'green', + fill_opacity => 0.5 +); + +$checks = CheckboxList( + [ + ["\(y = \frac{1}{x}\)", + "\(y = \exp{(-x)}\)", + "\(y = x^2\)", + "\(y = \frac{1}{(x-5)^2}\)"], + ], + [ 0, 3 ], + separator => $BRBR +); + +BEGIN_PGML +Consider the following graphs of functions and their integrals which are represented by the shaded areas under the graphs. +[# + [. [`y = [$f1]`] .] + [. [`y = [$f2]`] .]* + [. [![$altText]!]{$plot1}{200} .] + [. [![$altText]!]{$plot2}{200} .]* + [. [`y = [$f3]`] .] + [. [`y = [$f4]`] .]* + [. [![$altText]!]{$plot3}{200} .] + [. [![$altText]!]{$plot4}{200} .]* +#]* + +If we integrated each function from [`x=[$xmin]`] to [`x=[$xmax]`], then which functions integral would be **improper**? + +[_]{$checks} + +END_PGML + +BEGIN_PGML_HINT +Consider the graphs and note if there is any kind of special **behaviour** that these functions might have that would make the integral improper. +END_PGML_HINT + +BEGIN_PGML_SOLUTION +The solution would be the functions [`y = [$f1]`] and [`y = [$f4]`]. + +You can see that the integrals of [`y = [$f2]`] and [`y = [$f3]`] would not be improper as there are no obvious **vertical asymptotes** in their intervals of integration. + +On the otherhand, the graphs of [`y=[$f1]`] and [`y=[$f4]`] have vertical asymptotes at [`x = 0`] and [`x=5`], respectively, which would result in their integrals being improper. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-14-0-0-C/14-0-3-U-C/14-0-3-U-C-asymptote-graphic-AT.pg.old b/Contrib/UCalgary/249-14-0-0-C/14-0-3-U-C/14-0-3-U-C-asymptote-graphic-AT.pg.old new file mode 100644 index 0000000000..1984754526 --- /dev/null +++ b/Contrib/UCalgary/249-14-0-0-C/14-0-3-U-C/14-0-3-U-C-asymptote-graphic-AT.pg.old @@ -0,0 +1,106 @@ +## DESCRIPTION +## Identify an integral as improper because the function has a vertical asymptote in the domain of integration (graphically) +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Improper integrals) +## Level(2) +## KEYWORDS() + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + 'PGtikz.pl', + 'parserPopUp.pl', + 'niceTables.pl' +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +@all_plots = ( + { + form => 'pow(\x,-1/2)', + domain => '0.05:3' + }, + { + form => 'exp(-\x)', + domain => '0:10' + }, + { + form => 'pow(\x,2)', + domain => '0:3' + }, + { + form => 'exp(\x)', + domain => '-10:0' + }, +); + +for $i (0 .. $#all_plots) { + my $graph = createTikZImage(); + $graph->tikzLibraries('arrows.meta'); + $graph->BEGIN_TIKZ + \tikzset{>={Stealth[scale=1.5]}} + \filldraw[ + draw=LightBlue, + fill=white, + rounded corners=10pt, + thick,use as bounding box + ] (-4,-4) rectangle (4,4); + \draw[<->,thick] (-4,0) -- (4,0) node[above left,outer sep=3pt] {\(x\)}; + \foreach \x in {-3,...,-1,1,2,...,3} + \draw(\x,5pt) -- (\x,-5pt) node [below] {\(\x\)}; + \draw[<->,thick] (0,-4) -- (0,4) node[below right,outer sep=3pt] {\(y\)}; + \foreach \y in {-3,...,-1,1,2,...,3} + \draw (5pt,\y) -- (-5pt,\y) node[left] {\(\y\)}; + \draw[blue,ultra thick] plot[domain=$all_plots[$i]->{domain},smooth] (\x,{$all_plots[$i]->{form}}); +END_TIKZ + $all_plots[$i]->{graph} = $graph; +} + +$dropdown = DropDown(['A','B','C','D'], 'A'); + +$tab = LayoutTable( + [ + ['A', 'B'], + [ + map { + image( + $all_plots[$_]->{graph}, + width => 300, + tex_size => 400 + ) + } (0 .. 1) + ], + ['C', 'D'], + [ + map { + image( + $all_plots[$_]->{graph}, + width => 300, + tex_size => 400 + ) + } (2 .. 3) + ] + ], + align => 'cc' +); + +BEGIN_PGML +Which graph represents a function whose integral would be **Improper** in the graphs domain? [_]{$dropdown} + +[$tab]* +END_PGML + +BEGIN_PGML_SOLUTION + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-14-0-0-C/14-1-1-Ap-I/14-1-1-Ap-I-compute-improper-int-inf-AT.pg b/Contrib/UCalgary/249-14-0-0-C/14-1-1-Ap-I/14-1-1-Ap-I-compute-improper-int-inf-AT.pg new file mode 100644 index 0000000000..60b04eb8f5 --- /dev/null +++ b/Contrib/UCalgary/249-14-0-0-C/14-1-1-Ap-I/14-1-1-Ap-I-compute-improper-int-inf-AT.pg @@ -0,0 +1,48 @@ +## DESCRIPTION +## Give a value for pi +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Improper integrals) +## Level(3) +## KEYWORDS('template', 'pi') + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + 'parserSolutionFor.pl' +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(0,4,1); +$b = random(2,4,1); + +$integral = LayoutTable( + [ + [ + '\(\displaystyle \int_'.$a.'^{\infty}{\frac{dx}{x^'.$b.'}} = \)'.$SPACE.labeled_ans_rule("answer",4).$SPACE.'.' + ] + ] +); + +BEGIN_PGML +Evaluate +[$integral]* +END_PGML + +LABELED_ANS("answer",Compute((1/(1 - $b))*(-$a**(-$b + 1)))->cmp()); + +BEGIN_PGML_SOLUTION +This integral can be computed as +[```\int_{[$a]}^{\infty}{\frac{dx}{x^{[$b]}}} = \left.\frac{1}{(-[$b] + 1)x^{[$b]-1}}\right\vert_{[$a]}^{\infty} = \frac{1}{(-[$b] + 1)}\lim_{x\rightarrow \infty}{\left(\frac{1}{x^{[$b]-1}} - \frac{1}{[$a]^{[$b]-1}}\right)} = -\frac{1}{(-[$b] + 1)[$a]^{[$b]-1}}.```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-14-0-0-C/14-1-2-Ap-I/14-1-2-Ap-I-compute-improper-int-AT-PREMOD.pg b/Contrib/UCalgary/249-14-0-0-C/14-1-2-Ap-I/14-1-2-Ap-I-compute-improper-int-AT-PREMOD.pg new file mode 100644 index 0000000000..9b75c58484 --- /dev/null +++ b/Contrib/UCalgary/249-14-0-0-C/14-1-2-Ap-I/14-1-2-Ap-I-compute-improper-int-AT-PREMOD.pg @@ -0,0 +1,37 @@ +## DESCRIPTION +## Compute improper integrals over a finite interval where a function has a vertical asymptote +## ENDDESCRIPTION + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Improper integrals) +## Level(3) +## KEYWORDS() + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(1, 4, 1); +$b = random(2, 4, 1); + +BEGIN_PGML +Evaluate +[`` \int_0^{[$a]}{\frac{dx}{x^{[$b]}}} ``] = [_]{Compute("inf")}{4} +END_PGML + +BEGIN_PGML_SOLUTION +The integrand has an infinite discontinuity at [`x = 0`], +which can be computed as +[```\int_{0}^{[$a]}{\frac{dx}{x^{[$b]}}} = \left.\frac{1}{(-[$b]+1)x^{[$b]-1}}\right\vert_{0}^{[$a]} = \frac{1}{(-[$b]+1)}\left(\frac{1}{[$a]^{[$b]-1}} - \lim_{x\rightarrow 0^+}{\frac{1}{x^{[$b]-1}}}\right) = \infty.```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-14-0-0-C/14-1-2-Ap-I/14-1-2-Ap-I-compute-improper-int-AT.pg b/Contrib/UCalgary/249-14-0-0-C/14-1-2-Ap-I/14-1-2-Ap-I-compute-improper-int-AT.pg new file mode 100644 index 0000000000..9b75c58484 --- /dev/null +++ b/Contrib/UCalgary/249-14-0-0-C/14-1-2-Ap-I/14-1-2-Ap-I-compute-improper-int-AT.pg @@ -0,0 +1,37 @@ +## DESCRIPTION +## Compute improper integrals over a finite interval where a function has a vertical asymptote +## ENDDESCRIPTION + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Improper integrals) +## Level(3) +## KEYWORDS() + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(1, 4, 1); +$b = random(2, 4, 1); + +BEGIN_PGML +Evaluate +[`` \int_0^{[$a]}{\frac{dx}{x^{[$b]}}} ``] = [_]{Compute("inf")}{4} +END_PGML + +BEGIN_PGML_SOLUTION +The integrand has an infinite discontinuity at [`x = 0`], +which can be computed as +[```\int_{0}^{[$a]}{\frac{dx}{x^{[$b]}}} = \left.\frac{1}{(-[$b]+1)x^{[$b]-1}}\right\vert_{0}^{[$a]} = \frac{1}{(-[$b]+1)}\left(\frac{1}{[$a]^{[$b]-1}} - \lim_{x\rightarrow 0^+}{\frac{1}{x^{[$b]-1}}}\right) = \infty.```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-14-0-0-C/14-2-1-R-I/14-2-1-R-I-comparison-test-def-AT.pg b/Contrib/UCalgary/249-14-0-0-C/14-2-1-R-I/14-2-1-R-I-comparison-test-def-AT.pg new file mode 100644 index 0000000000..e9b3983dd3 --- /dev/null +++ b/Contrib/UCalgary/249-14-0-0-C/14-2-1-R-I/14-2-1-R-I-comparison-test-def-AT.pg @@ -0,0 +1,65 @@ +## DESCRIPTION +## State the Comparison Test for improper integrals +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Improper integrals) +## Level(1) +## KEYWORDS() + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl", +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# TODO: +# - Write a solution? +# - Might be a little too simple. + +$converge = DropDown( + [ + 'converges', + 'diverges', + ], + 'converges' +); + +$diverge = DropDown( + [ + 'converges', + 'diverges', + ], + 'diverges' +); + +BEGIN_PGML +Let [`f`] and [`g`] be functions such that [`0 \leq g(x) \leq f(x)`] on the interval [`[a,\infty)`]. + +The **Comparison Test for Improper Integrals** states that: + +1. If [`\displaystyle\int_a^{\infty}{f(x)dx}`] [_]{$converge}, then so does [`\displaystyle\int_a^{\infty}{g(x)dx}`]. + +2. If [`\displaystyle\int_a^{\infty}{g(x)dx}`] [_]{$diverge}, then so does [`\displaystyle\int_a^{\infty}{f(x)dx}`]. +END_PGML + +BEGIN_PGML_SOLUTION +The solutions are: + +1. If [`\displaystyle\int_a^{\infty}{f(x)dx}`] *converges*, then so does [`\displaystyle\int_a^{\infty}{g(x)dx}`]. + +2. If [`\displaystyle\int_a^{\infty}{g(x)dx}`] *diverges*, then so does [`\displaystyle\int_a^{\infty}{f(x)dx}`]. + +Informally, 1. implies that if the area under the graph of the larger function is finite, then the area under the graph of the smaller function should also be finite, and 2. implies that if the area under the graph of the smaller function is infinite, then the area under the graph of the larger function should also be infinite. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-14-0-0-C/14-2-2-Ap-A/14-2-2-Ap-A-use-comparison-test-AT.pg b/Contrib/UCalgary/249-14-0-0-C/14-2-2-Ap-A/14-2-2-Ap-A-use-comparison-test-AT.pg new file mode 100644 index 0000000000..9bb49af2be --- /dev/null +++ b/Contrib/UCalgary/249-14-0-0-C/14-2-2-Ap-A/14-2-2-Ap-A-use-comparison-test-AT.pg @@ -0,0 +1,52 @@ +## DESCRIPTION +## Use the Comparison Test to evaluate the convergence/divergence of explicit improper integrals +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Improper integrals) +## Level(3) +## KEYWORDS() + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + 'parserRadioButtons.pl', + 'parserPopUp.pl' +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$radio = RadioButtons( + [ "True", "False" ], + "False", # correct answer +); +$true = DropDown([ 'True', 'False'], 'True'); +$false = DropDown([ 'True', 'False'], 'False'); + +BEGIN_PGML +Consider the improper integral +[```\int_{1}^{\infty}{\frac{1}{1+ x^2}dx}.```] + +**True** or **False**, the above integral diverges. [_]{$false} +END_PGML + +BEGIN_PGML_HINT +Use the **Comparison Test**. +END_PGML_HINT + +BEGIN_PGML_SOLUTION +The statement is False. If we compare the function [`f(x) = \frac{1}{1+x^2}`] to [`g(x) = \frac{1}{x^2}`] for [`x \geq 1`], then we find that [`0 \leq f(x) \leq g(x)`], implying that +[```\int_{1}^{A}{\frac{1}{1+x^2}dx} = \int_{1}^{A}{f(x)dx} \leq \int_{1}^{A}{g(x)} = \int_{1}^{A}{\frac{1}{x^2}dx},```] +where we know that the improper integral +[```\lim_{A\rightarrow \infty}\int_{1}^{A}{g(x)dx} = \lim_{A \rightarrow\infty}{\int_{1}^{A}\frac{1}{x^2}dx}```] +converges. So, by the Comparison Test, the above integral must also converge. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-14-0-0-C/14-2-3-Ap-I/14-2-3-Ap-I-abstract-comparison-test-AT.pg b/Contrib/UCalgary/249-14-0-0-C/14-2-3-Ap-I/14-2-3-Ap-I-abstract-comparison-test-AT.pg new file mode 100644 index 0000000000..5adcc60ad7 --- /dev/null +++ b/Contrib/UCalgary/249-14-0-0-C/14-2-3-Ap-I/14-2-3-Ap-I-abstract-comparison-test-AT.pg @@ -0,0 +1,47 @@ +## DESCRIPTION +## Use the Comparison Test to evaluate the convergence/divergence of abstract improper integrals +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Improper integrals) +## Level(6) +## KEYWORDS() + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + 'parserPopUp.pl' +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$true = DropDown([ 'True', 'False'], 'True'); +$false = DropDown([ 'True', 'False'], 'False'); + +BEGIN_PGML +Let [`f`] and [`g`] be functions such that [`0\leq g(x) \leq f(x)`] on the interval [`[a,\infty)`]. + +Determine if the following statements are **True** or **False**. + +1. If [`\displaystyle\int_{a}^{\infty}{f(x)dx} = 1`], then [`\displaystyle\int_a^{\infty}{g(x)dx}`] converges. [_]{$true} + +2. If [`\displaystyle\int_a^{\infty}{f(x)dx} = \infty`], then [`\displaystyle\int_a^{\infty}{g(x)dx} = \infty`]. [_]{$false} + +END_PGML + +BEGIN_PGML_SOLUTION +The solutions are: + +1. *True*, because the *Comparison Test* for improper integrals tells us that if the improper integral of the larger function converges, then the improper integral of the smaller function also converges. + +2. *False*. Consider when [`f(x) = \frac{1}{x}`], [`g(x) = \frac{1}{x^2}`], and [`a = 1`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-1-0-Ap-C/2-1-0-Ap-C-factor-blanks-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-1-0-Ap-C/2-1-0-Ap-C-factor-blanks-jms.pg new file mode 100644 index 0000000000..a20a9b22a3 --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-1-0-Ap-C/2-1-0-Ap-C-factor-blanks-jms.pg @@ -0,0 +1,54 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Quadratic equations and functions) +## DBsection(Completing the square) +## Date(19 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = non_zero_random(-9, 9, 1); +$b = non_zero_random(-9, 9, 1); +$c = random(2,3,1); #2 or 3 +## need $a and $c relatively prime +if($a % $c == 0) +{$a = random(-1,1,2)*random(5,7,2);} + +$apcb = $a+$c*$b; #linear coefficient +$ab = $a*$b; #constant coefficient + +$f = Formula("$c*x^2 + $apcb*x + $ab")->reduce(); + +BEGIN_PGML +Factor the polynomial [``f(x) = [$f]``] by filling in the blanks below. + +[`f(x) = (x+`][_]{$b}{2}[`)`][`(`][_]{$c}{2}[`x+`][_]{$a}{2}[`)`]. + +END_PGML + +BEGIN_PGML_SOLUTION +You can expand the righthand side to check that: +[``f(x) = [$f] = (x+[$b])([$c]x+[$a])``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-1-0-Ap-C/2-1-0-Ap-C-factor-blanks-v2-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-1-0-Ap-C/2-1-0-Ap-C-factor-blanks-v2-jms.pg new file mode 100644 index 0000000000..2bef06884e --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-1-0-Ap-C/2-1-0-Ap-C-factor-blanks-v2-jms.pg @@ -0,0 +1,58 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Factoring) +## DBsection(Factoring trinomials) +## Date(19 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = non_zero_random(-6, 6, 1); +$b = non_zero_random(-6, 6, 1); +$c = random(2,3,1); #2 or 3 + +$apcb = $a+$c*$b; #linear coefficient +$ab = $a*$b; #constant coefficient +$fac = Compute("x"); #common factor of x + +if($a % $c == 0) #avoid common numerical factor of $c +{ $a = abs($a)+1; #redfine a + $apcb = $a+$c*$b; #redfine linear coefficient + $ab = $a*$b; #redfine constant coefficient +} + +$f = Formula("$c*x^3 + $apcb*x^2 + $ab*x")->reduce(); + +BEGIN_PGML +Factor the polynomial [``f(x) = [$f]``] by filling in the blanks below with either numbers or the variable [`x`]. + +[`f(x) =`] [_]{$fac}{2}[`(x+`][_]{$b}{2}[`)`][`(`][_]{$c}{2}[`x+`][_]{$a}{2}[`)`]. + +END_PGML + +BEGIN_PGML_SOLUTION +You can expand the righthand side to check that: +[``f(x) = [$f] = x(x+[$b])([$c]x+[$a])``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-1-0-Ap-C/2-1-0-Ap-C-factor-root-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-1-0-Ap-C/2-1-0-Ap-C-factor-root-jms.pg new file mode 100644 index 0000000000..e764f34872 --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-1-0-Ap-C/2-1-0-Ap-C-factor-root-jms.pg @@ -0,0 +1,60 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Quadratic equations and functions) +## DBsection(Solve by factoring) +## Date(19 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = non_zero_random(-9, 9, 2); #guarantees distinct roots +$b = non_zero_random(-9, 9, 1); + +$aptb = $a+2*$b; #linear coefficient +$ab = $a*$b; #constant coefficient +$aneg = -$a; +$halfaneg = -$a/2; +$bneg = -$b; + +$f = Formula("2x^2 + $aptb*x + $ab")->reduce(); + +$ans = List("$halfaneg","$bneg"); + +BEGIN_PGML +Consider the polynomial [``f(x) = [$f]``]. + +Recall that a "root" of [`f`] is a solution to the equation [``f(x) = 0``]. + +Factor the polynomial [`f`] in order to find the roots of [`f`] and enter the roots below as a list separated by commas. + +The roots of [`f`] are: [_]{$ans}{6} +END_PGML + +BEGIN_PGML_SOLUTION +First we factor +[``f(x) = [$f] = (2x+[$a])(x+[$b])``], +so the roots of [`f`] are +[`\frac{[$aneg]}{2}=[$halfaneg]`] and [`[$bneg]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-1-0-Ap-C/2-1-0-Ap-C-factor-root-v2-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-1-0-Ap-C/2-1-0-Ap-C-factor-root-v2-jms.pg new file mode 100644 index 0000000000..e9f6f79f9a --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-1-0-Ap-C/2-1-0-Ap-C-factor-root-v2-jms.pg @@ -0,0 +1,64 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Factoring) +## DBsection(Factoring: common factors) +## Date(19 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = non_zero_random(-9, 9, 1); +$b = non_zero_random(-9, 9, 1); + +if ($a - $b == 0) { + $b = abs($b) + 1; +}#guarantee distinct roots + +$apb = $a+$b; #linear coefficient +$ab = $a*$b; #constant coefficient +$aneg = -$a; +$bneg = -$b; + +$f = Formula("(x^3+$apb*x^2+$ab*x)")->reduce(); + +#$ans = List("0, $aneg","$bneg"); +$ans = List("0", "$aneg","$bneg"); # Fixed missing quote marks here. - Aiden + +BEGIN_PGML +Consider the polynomial [``f(x) = [$f]``]. + +Recall that a "root" of [`f`] is a solution to the equation [``f(x) = 0``]. + +Factor the polynomial [`f`] in order to find the roots of [`f`] and enter the roots below as a list separated by commas. + +The roots of [`f`] are: [_]{$ans}{10} +END_PGML + +BEGIN_PGML_SOLUTION +First we factor +[``f(x) = [$f] = x(x^2 + [$apb]x+[$ab]) = x(x+[$a])(x+[$b])``], +so the roots of [`f`] are [`0`], +[`[$aneg]`] and [`[$bneg]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-2-0-Ap-C/2-2-0-Ap-C-abs-quad-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-2-0-Ap-C/2-2-0-Ap-C-abs-quad-jms.pg new file mode 100644 index 0000000000..ce4fec36b4 --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-2-0-Ap-C/2-2-0-Ap-C-abs-quad-jms.pg @@ -0,0 +1,60 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Exponential and logarithmic expressions and functions) +## DBsection(Exponential functions) +## Date(20 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = non_zero_random(-7, 7, 1); +if($a == 1) +{$a = non_zero_random(-7,7,2);} +$am1 = $a - 1; +$am1neg = -$am1; +$b = $a*$am1; + +$ans1 = Compute("$a"); +$ans2 = Compute("$am1neg"); + +$f = Formula("|x-x^2|")->reduce(); # +$ans = List("$ans1","$ans2"); + +BEGIN_PGML +Find all real number solutions to the equation [``[$f] = [$b]``]. + +Enter the exact values of the solutions as a list separated by commas. If a solution occurs twice, enter it twice. If there are no solutions enter [|None|]*. + +The solutions to the equation are: [_]{$ans}{6} +END_PGML + +BEGIN_PGML_SOLUTION +Recall that [`|x| = x`] if [`x \geq 0`] and [`|x| = -x`] if [`x<0`]. + +There are two cases to consider. Either [`x-x^2 = -[$b]`] or [`x-x^2=[$b]`]. +First consider [`x-x^2=-[$b]`] and rearrnge to get [`0=x^2-x-[$b]=(x-[$a])(x-[$am1neg])`] so we get [`x=[$a]`] or [`x=[$am1neg]`]. + +In the other case, we can rearrange [`x-x^2=[$b]`] to get [`0=x^2-x+[$b]`], and using the quadratic formula we can see that there are no real number solutions to this equation. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-2-0-Ap-C/2-2-0-Ap-C-quad-log-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-2-0-Ap-C/2-2-0-Ap-C-quad-log-jms.pg new file mode 100644 index 0000000000..824355d28c --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-2-0-Ap-C/2-2-0-Ap-C-quad-log-jms.pg @@ -0,0 +1,62 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Exponential and logarithmic expressions and functions) +## DBsection(Logarithmic functions) +## Date(20 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = non_zero_random(-4, 4, 1); +$b = non_zero_random(-4, 4, 1); + +$apb = -$a-$b; #linear coefficient +$ab = $a*$b; #constant coefficient +$abneg = -$a*$b; #negative constant coefficient +$ans1 = Compute("e^($a)"); +$ans2 = Compute("e^($b)"); + +$f = Formula("(ln(x))^2 + $apb*ln(x)")->reduce(); #without constant term +$fcon = Formula("(ln(x))^2 + $apb*ln(x)+$ab")->reduce(); #rearranged + +$ans = List("$ans1","$ans2"); + +BEGIN_PGML +Find all solutions to the equation [``[$f] = [$abneg]``]. + +Here WeBWork is using the convention that [``\ln^2(x) = (\ln(x))^2``]. + +Enter the exact values of the solutions as a list separated by commas. If a solution occurs twice, enter it twice. If there are no solutions enter [|None|]*. + +The solutions to the equation are: [_]{$ans}{6} +END_PGML + +BEGIN_PGML_SOLUTION +Rearrange the equation [``[$f] = [$abneg]``] to be [``[$fcon]=0``]. +Then we can factor [``0 = (\ln(x) - [$a])(\ln(x) - [$b])``]. +So we get [``\ln(x) = [$a]``] or [``\ln(x) = [$b]``]. +Applying the exponential function to isolate for [`x`] we get the two solutions +[``x = e^{[$a]}``] or [``x = e^{[$b]}``]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-2-1-Ap-C/2-2-1-Ap-C-poly-int-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-2-1-Ap-C/2-2-1-Ap-C-poly-int-jms.pg new file mode 100644 index 0000000000..9c0895fec3 --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-2-1-Ap-C/2-2-1-Ap-C-poly-int-jms.pg @@ -0,0 +1,108 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Polynomial equations and functions) +## DBsection(Graphs of polynomials) +## Date(20 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$c = non_zero_random(-2,5,1); #keep -2reduce; +$g = Formula("$aplusb*x + $d")->reduce; + +if($c < 0) +{$ans = List("None");}#no solution when c is negative +else +{ +$x1 = Compute("($a+$b - sqrt(-$a^2+2*$a*$b-$b^2+2*$c))/2"); +$y1 = Compute("$aplusb*$x1+$d"); +$x2 = Compute("($a+$b + sqrt(-$a^2+2*$a*$b-$b^2+2*$c))/2"); +$y2 = Compute("$aplusb*$x2+$d"); +$ans = List("($x1,$y1)","($x2,$y2)"); +} + +BEGIN_PGML +Let [`f(x) = [$f]`] and let [`g(x) = [$g]`], where [`x\in\mathbb{R}`]. + +Find all points where the graphs of the functions [`y=f(x)`] and [`y=g(x)`] intersect. + +Enter the solutions as a list of points "[`(x,y)`]" separated by commas. If there are no points of intersection enter [|None|]*. + +The points of intersection are: [_]{$ans}{10} +END_PGML +if($c==3) +{ +BEGIN_PGML_SOLUTION +To find the intersection points we must solve the equation [`[$f] = [$g]`]. + +We can rearrange this equation use the quadratic formula to find that [`x=5-\dfrac{1}{\sqrt{2}}\approx[$x1]`] or [`x=5+\dfrac{1}{\sqrt{2}}\approx[$x2]`]. + +We find the [`y`]-coordinates by evaluating [`g(x)`] at [`x=5-\frac{1}{\sqrt{2}}`] and [`x=5+\frac{1}{\sqrt{2}}`] to get the intersection points [`(5-\frac{1}{\sqrt{2}},1-5\sqrt{2})\approx([$x1],[$y1])`] and [`(5+\frac{1}{\sqrt{2}},1+5\sqrt{2})\approx([$x2],[$y2])`]. +END_PGML_SOLUTION +} +elsif($c>0) +{ +BEGIN_PGML_SOLUTION +To find the intersection points we must solve the equation [`[$f] = [$g]`]. + +We can rearrange this equation and factor or use the quadratic formula to find that [`x=[$x1]`] or [`x=[$x2]`]. + +We find the [`y`]-coordinates by evaluating [`g(x)`] at [`x=[$x1]`] and [`x=[$x2]`] to get the intersection points [`([$x1],[$y1])`] and [`([$x2],[$y2])`]. +END_PGML_SOLUTION +} +else +{ +BEGIN_PGML_SOLUTION +To find the intersection points we must solve the equation [`[$f] = [$g]`]. + +We can rearrange this equation use the quadratic formula to find that there are no real solutions. Therefore, there are no points of intersection. +END_PGML_SOLUTION +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-2-1-Ap-C/2-2-1-Ap-C-poly-int-v2-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-2-1-Ap-C/2-2-1-Ap-C-poly-int-v2-jms.pg new file mode 100644 index 0000000000..b858653603 --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-2-1-Ap-C/2-2-1-Ap-C-poly-int-v2-jms.pg @@ -0,0 +1,86 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Quadratic equations and functions) +## DBsection(Solving equations) +## Date(21 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# problem will result in solving (1/4)x^2 + bx + c = 0 with discriminant $dsq when $d > 0, no sol when $d < 0 +$d = non_zero_random(-2,9,1); #square root of discriminant when positive +$dsq = $d**2; #nonzero discriminant guarantees distinct roots when $d > 0 +$b = non_zero_random(-5,5,1); #linear coefficient +$bsq = $b**2; +$a = non_zero_random(-6,6,2); #even +$am1q = $a-(1/4); +if($d < 0) +{ +$c = ($bsq-$d); +$ans = List("None");}#no solution when d is negative +else +{ +$c = Compute("($bsq-$dsq)"); +$x1 = Compute("(-$b - sqrt($dsq))*2"); #a = 1/4, discriminant $dsq +$y1 = Compute("4*$am1q*($x1)^2-4*$c"); +$x2 = Compute("(-$b + sqrt($dsq))*2"); #a = 1/4, discriminant $dsq +$y2 = Compute("4*$am1q*($x2)^2-4*$c"); +$ans = List("($x1,$y1)","($x2,$y2)"); +} + +#build functions $f and $g +$f = Formula("(4*$a*x^2+4*$b*x)")->reduce; +$g = Formula("(4*$am1q*x^2-4*$c)")->reduce; +#$eq = Compute("(1/4)*x^2+$b*x + $c")->reduce; +$eq4 = Formula("x^2+4*$b*x + 4*$c")->reduce; #cleared out rational coefficients, changes y-coordinates too + +BEGIN_PGML +Let [`f(x) = [$f]`] and let [`g(x) = [$g]`], where [`x\in\mathbb{R}`]. + +Find all points where the graphs of the functions [`y=f(x)`] and [`y=g(x)`] intersect. + +Enter the solutions as a list of points "[`(x,y)`]" separated by commas. If there are no points of intersection enter [|None|]*. + +The points of intersection are: [_]{$ans}{10} +END_PGML + +if($d>0) +{ +BEGIN_PGML_SOLUTION +To find the intersection points we must solve the equation [`[$f] = [$g]`]. + +We can rearrange this equation to become [``[$eq4]=0``], and now we can factor or use the quadratic formula to find that [`x=[$x1]`] or [`x=[$x2]`]. + +We find the [`y`]-coordinates by evaluating [`g(x)`] at [`x=[$x1]`] and [`x=[$x2]`] to get the intersection points [`([$x1],[$y1])`] and [`([$x2],[$y2])`]. +END_PGML_SOLUTION +} +else +{ +BEGIN_PGML_SOLUTION +To find the intersection points we must solve the equation [`[$f] = [$g]`]. + +We can rearrange this equation to become [``[$eq4]=0``], and use the quadratic formula to find that there are no real solutions. Therefore, there are no points of intersection. +END_PGML_SOLUTION +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-2-1-Ap-C/2-2-1-Ap-C-quad-lin-int-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-2-1-Ap-C/2-2-1-Ap-C-quad-lin-int-jms.pg new file mode 100644 index 0000000000..1216fe4b1e --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-2-1-Ap-C/2-2-1-Ap-C-quad-lin-int-jms.pg @@ -0,0 +1,84 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Quadratic equations and functions) +## DBsection(Solving equations) +## Date(21 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# problem will result in solving (1/4)x^2 + bx + c = 0 with discriminant $dsq when $d > 0, no sol when $d < 0 +$d = non_zero_random(-2,7,1); #square root of discriminant when positive +$dsq = $d**2; #nonzero discriminant guarantees distinct roots when $d > 0 +$b = non_zero_random(-5,5,1); #linear coefficient +$bsq = $b**2; +if($d < 0) +{ +$c = ($bsq-$d); +$ans = List("None");}#no solution when d is negative +else +{ +$c = Compute("($bsq-$dsq)"); +$x1 = Compute("(-$b - sqrt($dsq))*2"); #a = 1/4, discriminant $dsq +$y1 = Compute("(-4*$b*$x1-2*$c)"); +$x2 = Compute("(-$b + sqrt($dsq))*2"); #a = 1/4, discriminant $dsq +$y2 = Compute("(-4*$b*$x2-2*$c)"); +$ans = List("($x1,$y1)","($x2,$y2)"); +} + +#build functions $f and $g +$f = Formula("(x^2+2*$c)")->reduce; +$g = Formula("(-4*$b*x-2*$c)")->reduce; +#$eq = Formula("(1/4)*x^2+$b*x + $c")->reduce; +$eq4 = Formula("x^2+4*$b*x + 4*$c")->reduce; #cleared out rational coefficients, changes y-coordinates too + +BEGIN_PGML +Let [`f(x) = [$f]`] and let [`g(x) = [$g]`], where [`x\in\mathbb{R}`]. + +Find all points where the graphs of the functions [`y=f(x)`] and [`y=g(x)`] intersect. + +Enter the solutions as a list of points "[`(x,y)`]" separated by commas. If there are no points of intersection enter [|None|]*. + +The points of intersection are: [_]{$ans}{10} +END_PGML + +if($d>0) +{ +BEGIN_PGML_SOLUTION +To find the intersection points we must solve the equation [`[$f] = [$g]`]. + +We can rearrange this equation to become [``[$eq4]=0``], and now we can factor or use the quadratic formula to find that [`x=[$x1]`] or [`x=[$x2]`]. + +We find the [`y`]-coordinates by evaluating [`g(x)`] at [`x=[$x1]`] and [`x=[$x2]`] to get the intersection points [`([$x1],[$y1])`] and [`([$x2],[$y2])`]. +END_PGML_SOLUTION +} +else +{ +BEGIN_PGML_SOLUTION +To find the intersection points we must solve the equation [`[$f] = [$g]`]. + +We can rearrange this equation to become [``[$eq4]=0``], and use the quadratic formula to find that there are no real solutions. Therefore, there are no points of intersection. +END_PGML_SOLUTION +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-2-2-Ap-C/2-2-2-Ap-C-exp-log-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-2-2-Ap-C/2-2-2-Ap-C-exp-log-jms.pg new file mode 100644 index 0000000000..ac3d26d54b --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-2-2-Ap-C/2-2-2-Ap-C-exp-log-jms.pg @@ -0,0 +1,57 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Exponential and logarithmic expressions and functions) +## DBsection(Exponential and logarithmic equations) +## Date(20 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 6, 1); +$ans = List("None"); + +BEGIN_PGML +Find all real number solutions to the equation [``\ln(x) = e^{[$a]x}``]. + +Enter the exact values of the solutions as a list separated by commas. If a solution occurs twice, enter it twice. If there are no solutions enter [|None|]*. + +The solutions to the equation are: [_]{$ans}{6} +END_PGML + +BEGIN_PGML_HINT +Plot the graphs of the functions [`y=\ln(x)`] and [`y=e^{[$a]x}`]. +END_PGML_HINT + +BEGIN_PGML_SOLUTION +The domain of [`\ln(x)`] is the set of all real numbers with [`x>0`], so we should only consider [`x>0`]. + +First recall that [`e^{[$a]x} > 0`] for all [`x`], and [`\ln(x) < 0`] for [`0 [$a]x > x`]. In particular, [`e^x>x`] and since [`\ln(x)`] is an increasing funciton, we get [`x > \ln(x)`] for all [`x>0`]. + +Putting this all together, we see that [`e^{[$a]x} > x > \ln(x)`] for all [`x>0`], so there are no solution to the equation [``\ln(x) = e^{[$a]x}``]. + +Note that we will be able to use calculus to argue that [`e^{x} > x`] more carefully later in the course. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-2-2-Ap-C/2-2-2-Ap-C-lin-log-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-2-2-Ap-C/2-2-2-Ap-C-lin-log-jms.pg new file mode 100644 index 0000000000..93f9352909 --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-2-2-Ap-C/2-2-2-Ap-C-lin-log-jms.pg @@ -0,0 +1,56 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Exponential and logarithmic expressions and functions) +## DBsection(Logarithmic functions) +## Date(20 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 8, 1); +$b = Compute("-1/($a)"); + +$ans1 = Compute("e^(-1/($a))"); + +$f = Formula("$a*x*ln(x) + x")->reduce(); # +$ans = List("$ans1"); #to use different answer type, currently using numeric so exact value is printed + +BEGIN_PGML +Consider the function [`f(x) = [$f]`]. + +Find all real number solutions to the equation [``f(x) = 0``]. + +Enter the exact value(s) of the solution(s) as a list separated by commas. If there are no solutions enter [|None|]*. + +The solution(s) to the equation is/are: [_]{$ans1}{6} +END_PGML + +BEGIN_PGML_HINT +Make sure that all of the solutions are in the domain of the function [`f(x) = [$f]`]. +END_PGML_HINT + +BEGIN_PGML_SOLUTION +We can factor [```0=f(x)=[$f] = x([$a]\ln(x) +1) ```] and we note that [`x\neq 0`] since [`0`] is not in the domain of [`f`]. Therefore, we must have [`[$a]\ln(x) +1=0`], so [`\ln(x) = -\frac{1}{[$a]}=[$b]`]. Now we can apply the exponential function to get [`x = e^{-1/[$a]} = e^{[$b]}\approx[$ans1]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-2-2-Ap-C/2-2-2-Ap-C-quad-log-dist-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-2-2-Ap-C/2-2-2-Ap-C-quad-log-dist-jms.pg new file mode 100644 index 0000000000..6348da8917 --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-2-2-Ap-C/2-2-2-Ap-C-quad-log-dist-jms.pg @@ -0,0 +1,68 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Exponential and logarithmic expressions and functions) +## DBsection(Exponential and logarithmic equations) +## Date(20 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(1, 6, 1); #positive +$c = random(1,10,1); #step size +$b = $a - $c; #smaller +if($a+$b==0) +{$b = $b-2;}#avoid difference of squares + +$apb = -$a-$b; #linear coefficient +$ab = $a*$b; #constant coefficient +$abneg = -$a*$b; #negative constant coefficient +$ans1 = Compute("e^($a)"); #large solution +$ans2 = Compute("e^($b)"); #small solution + +$f = Formula("(ln(x))^2 + $apb*ln(x)")->reduce(); #without constant term +$fcon = Formula("(ln(x))^2 + $apb*ln(x)+$ab")->reduce(); #rearranged + + +BEGIN_PGML +Find all solutions to the equation [``[$f] = [$abneg]``]. + +Here WeBWork is using the convention that [``\ln^2(x) = (\ln(x))^2``]. + +Enter the exact values of the solutions below. + +The larger solution is [_]{$ans1}{3}. + +The smaller solution is [_]{$ans2}{3}. +END_PGML + +BEGIN_PGML_SOLUTION +Rearrange the equation [``[$f] = [$abneg]``] to be [``[$fcon]=0``]. +Then we can factor [``0 = (\ln(x) - [$a])(\ln(x) - [$b])``]. +So we get [``\ln(x) = [$a]``] or [``\ln(x) = [$b]``]. +Applying the exponential function to isolate for [`x`] we get the two solutions +[``x = e^{[$a]}``] or [``x = e^{[$b]}``]. + +Now, [``x = e^{[$a]}``] is the larger solution and [``x = e^{[$b]}``] is the smaller solution. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-2-3-Ap-C/2-2-3-Ap-C-cos-eq-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-2-3-Ap-C/2-2-3-Ap-C-cos-eq-jms.pg new file mode 100644 index 0000000000..4cb797d1db --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-2-3-Ap-C/2-2-3-Ap-C-cos-eq-jms.pg @@ -0,0 +1,52 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Trigonometry) +## DBchapter(Trigonometric functions) +## DBsection(Sine & cosine functions - definitions, graphs, & properties) +## Date(21 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 3, 1); #coefficient of 2 or 3 only +if($a==2) +{ +$ans = Compute("2*pi/3"); +} +else +{ +$ans = Compute("pi/2"); +} + +BEGIN_PGML +Find all real number solutions to the equation [``\cos(x) = \cos([$a]x)``] where [`x`] is in the open interval [`(0,\pi)`]. + +Enter the exact value(s) of the solution(s) as a list separated by commas. If there are no solutions enter [|None|]*. + +The solution(s) to the equation is/are: [_]{$ans}{6} +END_PGML + +BEGIN_PGML_HINT +Try graphing the functions [`y=\cos(x)`] and [`y=\cos([$a]x)`], or "guessing and testing" with the known special values of [`\cos(x)`]. +END_PGML_HINT + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-2-3-Ap-C/2-2-3-Ap-C-sin-eq-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-2-3-Ap-C/2-2-3-Ap-C-sin-eq-jms.pg new file mode 100644 index 0000000000..4517f69bb2 --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-2-3-Ap-C/2-2-3-Ap-C-sin-eq-jms.pg @@ -0,0 +1,54 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Trigonometry) +## DBchapter(Trigonometric functions) +## DBsection(Sine & cosine functions - definitions, graphs, & properties) +## Date(21 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 3, 1); #coefficient of 2 or 3 only +if($a==2) +{ +$ans = Compute("pi/3"); +} +else +{ +$ans1 = Compute("pi/4"); +$ans2 = Compute("3*pi/4"); +$ans = List("$ans1,$ans2"); +} + +BEGIN_PGML +Find all real number solutions to the equation [``\sin(x) = \sin([$a]x)``] where [`x`] is in the open interval [`(0,\pi)`]. + +Enter the exact value(s) of the solution(s) as a list separated by commas. If there are no solutions enter [|None|]*. + +The solution(s) to the equation is/are: [_]{$ans}{6} +END_PGML + +BEGIN_PGML_HINT +Try graphing the functions [`y=\sin(x)`] and [`y=\sin([$a]x)`], or "guessing and testing" with the known special values of [`\sin(x)`]. +END_PGML_HINT + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-2-3-Ap-C/2-2-3-Ap-C-trig-x-jms.pg b/Contrib/UCalgary/249-2-0-0-C/2-2-3-Ap-C/2-2-3-Ap-C-trig-x-jms.pg new file mode 100644 index 0000000000..4aa7a410bd --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-2-3-Ap-C/2-2-3-Ap-C-trig-x-jms.pg @@ -0,0 +1,69 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Trigonometry) +## DBchapter(Trigonometric functions) +## DBsection(Sine & cosine functions - definitions, graphs, & properties) +## Date(21 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-1, 1, 1); #coefficient of -1 or 1 only to choose sine or cosine +if($a==-1) +{ +$f = Compute("x+sin(2*x)")->reduce; +$ans = Compute("pi/2"); +} +else +{ +$f = Compute("x+cos(2*x)")->reduce; +$ans1 = Compute("pi/4"); +$ans2 = Compute("3*pi/4"); +$ans = List("$ans1","$ans2"); +} + +BEGIN_PGML +Find all real number solutions to the equation [``[$f] = x``] where [`x`] is in the open interval [`(0,\pi)`]. + +Enter the exact value(s) of the solution(s) as a list separated by commas. If there are no solutions enter [|None|]*. + +The solution(s) to the equation is/are: [_]{$ans}{6} +END_PGML + +if($a==-1) +{ +BEGIN_PGML_SOLUTION +Try graphing the functions [`y=x+\sin(2x)`] and [`y=x`], or looking for solutions to [`\sin(2x)=0`] in the correct interval. + +You will find one solution [`x = \dfrac{\pi}{2}`]. +END_PGML_SOLUTION +} +else +{ +BEGIN_PGML_SOLUTION +Try graphing the functions [`y=x+\cos(2x)`] and [`y=x`], or looking for solutions to [`\cos(2x)=0`] in the correct interval. + +You will find twos solution [`x = \dfrac{\pi}{4}`] or [`x = \dfrac{3\pi}{4}`]. +END_PGML_SOLUTION +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-3-0-An-C/2-3-0-An-C-tnslt-eqtn-cmm.pg b/Contrib/UCalgary/249-2-0-0-C/2-3-0-An-C/2-3-0-An-C-tnslt-eqtn-cmm.pg new file mode 100644 index 0000000000..371e88643f --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-3-0-An-C/2-3-0-An-C-tnslt-eqtn-cmm.pg @@ -0,0 +1,77 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Algebra of real numbers and simplifying expressions) +## DBsection(Evaluating expressions) +## Date(21 April 2025) +## Institution(University of Calgary) +## Author(Claudia Mahler) +## Level(4) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserRadioButtons.pl", +); + + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(3, 4, 1); +$b = random(2, 4, 1); +$c = random(2, 8, 1); + +if($a==3) +{ +$rt = "cube"; +} +else +{ +$rt = "fourth"; +} + +if($b==2) +{ +$pwr = "squared"; +} +elsif ($b==3) +{ +$pwr = "cubed"; +} +else +{ +$pwr = "to the fourth power"; +} + +$radio1 = RadioButtons( + [ [ "The $rt root of \(x\) is at most $c times \(y\) $pwr", "The $rt root of \(x\) is less than $c times \(y\) $pwr", "The square root of \(x\) is at most $c times \(y\) $pwr", "The square root of \(x\) is less than $c times \(y\) $pwr", "The $rt root of \(x\) is at least $c times \(y\) $pwr", "The square root of \(x\) is at least $c times \(y\) $pwr", ], 'None of these' ], + "The $rt root of \(x\) is at most $c times \(y\) $pwr" # correct answer +); + +BEGIN_PGML +Which of the following is a correct translation of the following equation: + +[`\sqrt[[$a]]{x} \leq [$c]y^[$b]`] + + +[_]{$radio1} +END_PGML + +BEGIN_PGML_SOLUTION +The inequality "[``A \leq B``]" can be translated as "[``A``] is less than or equal to [``B``]" or as "[``A``] is at most [``B``]." So this equation is stating that the [$rt] root of [``x``] is at most [$c] times [``y``] [$pwr]. + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-2-0-0-C/2-3-0-An-C/2-3-0-An-C-tnslt-ineq-cmm.pg b/Contrib/UCalgary/249-2-0-0-C/2-3-0-An-C/2-3-0-An-C-tnslt-ineq-cmm.pg new file mode 100644 index 0000000000..c56c84d982 --- /dev/null +++ b/Contrib/UCalgary/249-2-0-0-C/2-3-0-An-C/2-3-0-An-C-tnslt-ineq-cmm.pg @@ -0,0 +1,52 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Algebra) +## DBchapter(Algebra of real numbers and simplifying expressions) +## DBsection(Evaluating expressions) +## Date(21 April 2025) +## Institution(University of Calgary) +## Author(Claudia Mahler) +## Level(4) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserRadioButtons.pl", +); + + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 10, 1); + +$radio1 = RadioButtons( + [ [ "\(\sqrt{x} \geq $a y\)", "\($a \sqrt{x} \geq y\)", "\(\sqrt{x} > $a y\)", "\($a \sqrt{x} > y\)", ], 'None of these' ], + "\(\sqrt{x} \geq $a y\)" # correct answer +); + +BEGIN_PGML +Which of the following is a correct translation of the phrase *"the square root of [`x`] is at least [$a] times the value of [`y`]"*? + + +[_]{$radio1} +END_PGML + +BEGIN_PGML_SOLUTION + +The statement "'[``A``]' is at least '[``B``]'" can be translated to the inequality "[``A \geq B``]" and "[$a] times the value of [``y``]" can be translated as [``[$a]y``]. So this phrase is stating that [``\sqrt{x} \geq [$a]y``]. + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-3-0-0-C/3-1-0-Ap-I/3-1-0-Ap-I-approx-funct-jms.pg b/Contrib/UCalgary/249-3-0-0-C/3-1-0-Ap-I/3-1-0-Ap-I-approx-funct-jms.pg new file mode 100644 index 0000000000..7d9656d226 --- /dev/null +++ b/Contrib/UCalgary/249-3-0-0-C/3-1-0-Ap-I/3-1-0-Ap-I-approx-funct-jms.pg @@ -0,0 +1,77 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Linear approximation and differentials) +## Date(25 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(5) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" #Dropdown questions +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2,5,1); +$aa = $a**2; #a squared +$b = random(1,3,1); #shift +$aam1 = $aa - $b; #centre +$err = random(1,9,1)/100; #error +$c = $aa + $err; #value to approx +$aam1err = $aam1 + $err; #centre plus error + +$ans = Compute("sqrt(x+$b)"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +$ans->{limits} = [1,3]; + +$popup = DropDown( + [ + 'a Rate(s) of Change Problem', + 'an Approximation Problem', + 'an Optimization Problem', + 'an Integration Problem' + ], + 'an Approximation Problem' +); + +BEGIN_PGML + + +Find a function [`f(x)`] of one variable [`x`] that you could use to estimate the value of [`{\sqrt{[$c]}}`] by computing the Taylor Polynomial of [`f`] centred at [`x=[$aam1]`]. Make this choice so that all numerical evaluations can be done "by hand". + +[`f(x)=\, `][_]{$ans}{20} + + ++ What type of calculus problem is this? + +[_]{$popup} + +END_PGML + +BEGIN_PGML_SOLUTION +This is an Approximation Problem. + +Note that [`{\sqrt{[$c]}} = \sqrt{[$aam1err]+[$b]}`], and [`[$aam1err]`] is close to [`[$aam1]`], so we can choose [`f(x) = [$ans]`]. + +This choice of [`f`] also keeps the numerical computations simple since [`f([$aam1])=\sqrt{[$aam1]+[$b]} = \sqrt{[$aa]} = [$a]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); \ No newline at end of file diff --git a/Contrib/UCalgary/249-3-0-0-C/3-1-0-Ap-I/3-1-0-Ap-I-opt-funct-jms.pg b/Contrib/UCalgary/249-3-0-0-C/3-1-0-Ap-I/3-1-0-Ap-I-opt-funct-jms.pg new file mode 100644 index 0000000000..4540d6fa63 --- /dev/null +++ b/Contrib/UCalgary/249-3-0-0-C/3-1-0-Ap-I/3-1-0-Ap-I-opt-funct-jms.pg @@ -0,0 +1,80 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Motivational applications (estimation)) +## Date(25 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(5) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" #Dropdown questions +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2,5,1); #scale +$vol = random(1000,2000,25); #volume +$voldiva = $vol/$a; #volume / a +$vol2diva = (2*$vol)/$a; #twice volume / a +$aa = $a*2; #twice a +$volvol = $vol*2; #twice vol +$b = $vol2diva + $volvol; + +$ans = Compute("$aa*x^2 + $b*x^(-1)"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +$ans->{limits} = [1,3]; + +$popup = DropDown( + [ + 'a Rate(s) of Change Problem', + 'an Approximation Problem', + 'an Optimization Problem', + 'an Integration Problem' + ], + 'an Optimization Problem' +); + +BEGIN_PGML +A closed box with volume equal to [`[$vol]\, \rm{cm}^3`] is to be made so that the length of the rectangular base is [`[$a]`] times with the width of the base. + +Let [`x`] be the width of the base of the box measured in [`\rm{cm}`]. + ++ Find a function [`f(x)`] that equals the surface area of the box, in terms of one variable [`x`], and that you could use to minimize the surface area. + +[`f(x)=\, `][_]{$ans}{20} + + ++ What type of calculus problem is this? + +[_]{$popup} + +END_PGML + +BEGIN_PGML_SOLUTION +This is an Optimization Problem. + +Let [`y`] be the height of the box. The width of the base is [`x`] and the length of the base is [`[$a]x`]. Then the volume of the box is [```[$vol] = x \times [$a]x \times y = [$a]x^2y.```] +So, we can isolate [`y`] as [``y = \dfrac{[$vol]}{[$a]x^2} = \frac{[$voldiva]}{x^2}``]. + +The surface area of the box is [`2(x\times [$a]x) + 2(x \times y) + 2 ([$a]x \times y)`], which we can write in terms of [`x`], by substituting [``y = \frac{[$voldiva]}{x^2}``], as [```f(x) = [$aa] x^2 + [$vol2diva] \frac{x}{x^2} + [$volvol] \frac{x}{x^2} = [$ans].```] +END_PGML_SOLUTION + +ENDDOCUMENT(); \ No newline at end of file diff --git a/Contrib/UCalgary/249-3-0-0-C/3-4-0-E-I/3-4-0-E-I-approx-choice-jms.pg b/Contrib/UCalgary/249-3-0-0-C/3-4-0-E-I/3-4-0-E-I-approx-choice-jms.pg new file mode 100644 index 0000000000..1cd3c9655a --- /dev/null +++ b/Contrib/UCalgary/249-3-0-0-C/3-4-0-E-I/3-4-0-E-I-approx-choice-jms.pg @@ -0,0 +1,148 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Linear approximation and differentials) +## Date(24 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$d = random(1,3,1); #randomly choose one of the three statements below + +if($d==1) +{ +$TP = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Linear or Taylor Polynomial Approximation' +); +$DA = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Differential Approximation' +); + +$a = random(2,9,1); +$aa = $a**2; +$err = random(2,9,1)/100; +$val = Compute("$aa +$err"); +$pow = random(2,4,1); +$per = random(10,70,10); + +BEGIN_PGML +Consider the following two approximation problems. + ++ Approximate the value of [`\sqrt{[$val]}`]. + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$TP} + + ++ Suppose that a [`S = {[$a]} x^{[$pow]}`]. If [`S`] is increased by [`[$per]\%`], then what is the approximate percentage increase in [`x`]? + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$DA} + +END_PGML +} +elsif($d==2) +{ +$NM = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Newton`s Method' +); +$TP = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Linear or Taylor Polynomial Approximation' +); +$a = random(2,9,1); +$b = random(3,9,1); +$pow = random(3,5,1); +$err = random(2,9,1)/100; +$val = $b + $err; +BEGIN_PGML +Consider the following two approximation problems. + ++ Approximate the solution to the equation [`[$a]xe^x - 1 = 0 `], where [`x\in[0,1]`]. + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$NM} + ++ Approximate the value of [`([$val])^{[$pow]}`]. + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$TP} + +END_PGML +} +else +{ +$DA = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Differential Approximation' +); +$NM = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Newton`s Method' +); +$a = random(2,9,1); +$pow = random(2,4,1); +$per = random(10,70,10); +$c = random(1,7,2); #odd +BEGIN_PGML +Consider the following two approximation problems. + ++ Suppose that a [`A = \dfrac{\pi}{[$a]} r^{[$pow]}`]. If [`A`] is decreased by [`[$per]\%`], then what is the approximate percentage decrease in [`r`]? + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$DA} + ++ Approximate the real number solution to the equation [`x^3 + x + [$c] = 0 `], where [`x \in [-2,0]`]. + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$NM} + +END_PGML +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-3-0-0-C/3-4-0-E-I/3-4-0-E-I-approx-choice-jmsW2026.pg b/Contrib/UCalgary/249-3-0-0-C/3-4-0-E-I/3-4-0-E-I-approx-choice-jmsW2026.pg new file mode 100644 index 0000000000..6a05bc63f7 --- /dev/null +++ b/Contrib/UCalgary/249-3-0-0-C/3-4-0-E-I/3-4-0-E-I-approx-choice-jmsW2026.pg @@ -0,0 +1,62 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Linear approximation and differentials) +## Date(24 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + + + + +$NM = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + ], + 'Newton`s Method' +); +$TP = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + ], + 'Linear or Taylor Polynomial Approximation' +); +$a = random(2,9,1); +$b = random(3,9,1); +$pow = random(3,5,1); +$err = random(2,9,1)/100; +$val = $b + $err; +BEGIN_PGML +Consider the following two approximation problems. + ++ Approximate the solution to the equation [`[$a]xe^x - 1 = 0 `], where [`x\in[0,1]`]. + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$NM} + ++ Approximate the value of [`([$val])^{[$pow]}`]. + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$TP} + +END_PGML + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-3-0-0-C/3-4-0-E-I/3-4-0-E-I-approx-choice-v2-jms.pg b/Contrib/UCalgary/249-3-0-0-C/3-4-0-E-I/3-4-0-E-I-approx-choice-v2-jms.pg new file mode 100644 index 0000000000..e0ec0a2854 --- /dev/null +++ b/Contrib/UCalgary/249-3-0-0-C/3-4-0-E-I/3-4-0-E-I-approx-choice-v2-jms.pg @@ -0,0 +1,177 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Linear approximation and differentials) +## Date(25 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$d = random(1,3,1); #randomly choose one of the three statements below + +if($d==1) +{ +$TP = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Linear or Taylor Polynomial Approximation' +); +$DA = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Differential Approximation' +); +$NM = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Newton`s Method' +); + +$a = random(2,9,1); +$err = random(2,9,1)/100; +$val = Compute("1+$a +$err"); +$pow = random(2,4,1); +$per = random(10,70,10); +$c = random(2,5,2); #odd +$lt = Compute("-1-$c"); +$rt = Compute("$c+1"); + +BEGIN_PGML +Consider the following two approximation problems. + ++ Suppose that [`y = {[$a]} \sqrt{1+x^{[$pow]}}`]. If [`y`] is increased by [`[$per]\%`], then what is the approximate percentage change in [`x`]? + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$DA} + + ++ Approximate the real number solutions to the equation [`e^x+ - x - [$c] = 0 `], where [`x \in [[$lt],[$rt]]`]. + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$NM} + + + +END_PGML +} +elsif($d==2) +{ +$TP = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Linear or Taylor Polynomial Approximation' +); +$DA = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Differential Approximation' +); +$NM = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Newton`s Method' +); +$a = random(2,9,1); +$err = random(2,9,1)/10; +BEGIN_PGML +Consider the following two approximation problems. + ++ Approximate the solution to the equation [`x\ln(x) - [$a] = 0 `], where [`x\in[1,10]`]. + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$NM} + ++ Approximate the value of [`\sin([$err])`]. + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$TP} + +END_PGML +} +else +{ +$TP = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Linear or Taylor Polynomial Approximation' +); +$DA = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Differential Approximation' +); +$NM = DropDown( + [ + 'Linear or Taylor Polynomial Approximation', + 'Newton`s Method', + 'Differential Approximation' + ], + 'Newton`s Method' +); +$b = random(2,9,1); +$err = random(2,9,1)/100; +$val = Compute("1+$b +$err"); +$a = random(2,9,1); +$pow = random(2,3,1); +$per = random(10,70,10); +Context()->variables->add(r=>"Real"); +$form = Compute("r^([$pow])*sqrt(pi-r)"); +BEGIN_PGML +Consider the following two approximation problems. + ++ Using the fucntion [`f(x) = \ln(x+1)`], approximate the value of [`\ln([$val])`]. + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$TP} + ++ Suppose that a [`V = \dfrac{\pi}{[$a]} [$form]`]. If [`V`] is decreased by [`[$per]\%`], then what is the approximate percentage change in [`r`]? + +Which of the following techniques would be most helpful in solving the given problem? + +[_]{$DA} + +END_PGML +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-3-0-0-C/3-5-1-Ap-I/3-5-1-Ap-I-first-der-test-jms.pg b/Contrib/UCalgary/249-3-0-0-C/3-5-1-Ap-I/3-5-1-Ap-I-first-der-test-jms.pg new file mode 100644 index 0000000000..3ab71ca4ed --- /dev/null +++ b/Contrib/UCalgary/249-3-0-0-C/3-5-1-Ap-I/3-5-1-Ap-I-first-der-test-jms.pg @@ -0,0 +1,127 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Higher-order derivatives) +## Date(25 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + + +# First Derivative Test +$a = random(1,4,1); #left end point +$b = random(8,11,1); #right end point +$d = random(2,3,1); #step +$c = $a+$d; #critical point +$val = random(-50,50,10); #extreme + +$lnum = random(-1,1,2); +if($lnum==-1) +{$lsign = '<';} +else +{$lsign = '>';} + +$rnum = random(-1,1,2); +if($rnum==-1) +{$rsign = '<';} +else +{$rsign = '>';} + +if($lnum==$rnum) +{ +$ans_test = 'First Derivative Test'; +$ans_extreme = 'none of the above'; +} +else +{$ans_test = 'Global/General Interval Method'; +if($lnum < $rnum) +{ +$ans_extreme = 'global (absolute) minimum'; +} +else +{ +$ans_extreme = 'global (absolute) maximum'; +} +} + + +$test = DropDown( + [ + 'First Derivative Test', + 'Second Derivative Test', + 'Closed Interval Method', + 'Global/General Interval Method' + ], + $ans_test +); + + +$extrema = DropDown( + [ + 'local maximum', + 'global (absolute) maximum', + 'local minimum', + 'global (absolute) minimum', + 'none of the above' + ], + $ans_extreme +); +BEGIN_PGML +Let [`f`] be a twice-differentiable function defined on the interval [`[[$a],[$b]]`] and suppose that we know the following information about [`f`] and its derivatives. + ++ [`f([$c]) = [$val]`] and [`f'([$c]) = 0`] ++ [`f'(x) [$lsign] 0`] for all [`x`] so that [`[$a]< x < [$c]`] ++ [`f'(x) [$rsign] 0`] for all [`x`] so that [`[$c]0`] and [`x-y = [$a]`]. How small can we make the quantity [`x^2+[$b]y^2`]? + +Is the Closed Interval Method (based on the Extreme Value Theorem and Fermat's Theorem) an appropriate method to solve this problem? + +[_]{$no} +END_PGML + + +BEGIN_PGML_HINT +Set up the problem and carefully consider the domain of the objective function (the function to be optimized) given the constraints in the problem. +END_PGML_HINT + + +BEGIN_PGML_SOLUTION +We have that [`y = x-[$a]`] and we want to minimize [`f(x) = x^2 + [$b](x-[$a])^2`] subject to the condition that [`x>0`]. So the domain of [`f`] is the open interval [`(0,\infty)`] and the Closed Interval Method does not apply. +END_PGML_SOLUTION +} +elsif($d==2) +{ +$no = DropDown( + [ + 'yes', + 'no', + ], + 'no' +); +$yes = DropDown( + [ + 'yes', + 'no', + ], + 'yes' +); + + +$vol = random(1000,2000,10); + +BEGIN_PGML +Consider the following optimization problem. + ++ Using a [`3D`] printer and a liquid starting material, you want to make a box with a square base and an open top that has a volume of [`[$vol]\, \rm{cm}^2`]. Find the dimensions of the box with the smallest possible surface area that will minimize that amount of material used. + +Is the Closed Interval Method (based on the Extreme Value Theorem and Fermat's Theorem) an appropriate method to solve this problem? + +[_]{$no} +END_PGML + +BEGIN_PGML_HINT +Set up the problem and carefully consider the domain of the objective function (the function to be optimized) given the constraints in the problem. +END_PGML_HINT + +$vol4 = 4*$vol; + +BEGIN_PGML_SOLUTION +Let [`x`] be the side length of the base and let [`y`] be the height of the box. Both [`x`] and [`y`] must be postive (greater than [`0`]) for the volume of the box to be positive, and the volume of the box is [`[$vol] = x^2y`] so [``y = \frac{[$vol]}{x^2}``] where [`x>0`]. We want to minimize the surface area [``f(x) = x^2 + 4xy = x^2 + \frac{[$vol4]}{x}``] where [`x>0`]. Thus, the domain of [`f`] is the open interval [`(0,\infty)`] and the Closed Interval Method does not apply. +END_PGML_SOLUTION +} +elsif($d==3) +{ +$no = DropDown( + [ + 'yes', + 'no', + ], + 'no' +); +$yes = DropDown( + [ + 'yes', + 'no', + ], + 'yes' +); + +$area = random(1000,2000,10); + +BEGIN_PGML +Consider the following optimization problem. + ++ You have enough liquid starting material to create an object with a surface area of [`[$area]\, \rm{cm}^2`] by using a [`3D`] printer. You want to make a box with a square base and an open top. Find the largest possible volume of the box that you can make. + +Is the Closed Interval Method (based on the Extreme Value Theorem and Fermat's Theorem) an appropriate method to solve this problem? + +[_]{$yes} +END_PGML + +BEGIN_PGML_HINT +Set up the problem and carefully consider the domain of the objective function (the function to be optimized) given the constraints in the problem. +END_PGML_HINT + +BEGIN_PGML_SOLUTION +Let [`x`] be the side length of the base and let [`y`] be the height of the box. The surface area of the box is [`[$area] = x^2 + 4xy`], so [``y = \frac{[$area]-x^2}{4x}``]. We want to maximize the volume of the box [```v(x) = x^2y = x^2\frac{[$area]-x^2}{4x} = \frac{x([$area]-x^2)}{4}.```] The smallest that [`x`] could be is [`0`], in which case the volume of the box is [`0`], and the largest that [`x`] could be is [`\sqrt{[$area]}`], which occurs when [`y=0`]. So we can work with [`v(x)`] with domain [`[0,\sqrt{[$area]}]`] and the Closed Interval Method can be used for this problem. + +**Note that [`y`] is undefined when [`x=0`]; however, the objective function [`v(x)`] is defined at [`x=0`] so we can consider the domain to be a closed interval.** +END_PGML_SOLUTION +} +else +{ +$no = DropDown( + [ + 'yes', + 'no', + ], + 'no' +); +$yes = DropDown( + [ + 'yes', + 'no', + ], + 'yes' +); + +$a = random(-5,-3,1); +$b = random(1,3,1); + +BEGIN_PGML +Consider the following optimzation problem. + ++ Let [`f(x) = xe^{x/2}`]. If possible, find the global (absolute) maximum and minimum values of [`f`] under the condition that [`[$a]\leq x \leq [$b]`]. + +Is the Closed Interval Method (based on the Extreme Value Theorem and Fermat's Theorem) an appropriate method to solve this problem? + +[_]{$yes} +END_PGML + +BEGIN_PGML_HINT +Set up the problem and carefully consider the domain of the objective function (the function to be optimized) given the constraints in the problem. +END_PGML_HINT + +BEGIN_PGML_SOLUTION +We want to find the global (absolute) extrema of [`f`] where [`x`] is in the closed interval [`[[$a], [$b]] = \{x\in \mathbb{R} : [$a]\leq x \leq [$b]\}`], so we can use the Closed Interval Method. +END_PGML_SOLUTION +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-3-0-0-C/3-5-1-Ap-I/3-5-1-Ap-I-second-der-test-jms.pg b/Contrib/UCalgary/249-3-0-0-C/3-5-1-Ap-I/3-5-1-Ap-I-second-der-test-jms.pg new file mode 100644 index 0000000000..0900d4dfd5 --- /dev/null +++ b/Contrib/UCalgary/249-3-0-0-C/3-5-1-Ap-I/3-5-1-Ap-I-second-der-test-jms.pg @@ -0,0 +1,72 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Higher-order derivatives) +## Date(25 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + + +# Second Derivative Test +$a = random(1,9,1); #critical point +$d = random(2,5,1); #step +$c = $a + $d; +$b = non_zero_random(-20,20,1); #second der value +$val = random(-50,50,1); +$val2 = abs($val)+$c+$d; +$ans_test = 'Second Derivative Test'; +if($b>0) +{ +$ans_extreme = 'local minimum'; +} +else +{ +$ans_extreme = 'local maximum'; +} +$test = DropDown( + [ + 'Closed Interval Method', + 'First Derivative Test', + 'Second Derivative Test' + ], + $ans_test +); + + +$extrema = DropDown( + [ + 'local maximum', + 'global (absolute) maximum', + 'local minimum', + 'global (absolute) minimum' + ], + $ans_extreme +); +BEGIN_PGML +Let [`f`] be a twice-differentiable function and suppose that we know the following information about [`f`] and its derivatives. + ++ [`f([$a]) = [$val]`] and [`f([$c]) = [$val2]`] ++ [`f'([$a]) = 0`] and [`f'([$c]) = 0`] ++ [`f''([$a]) = [$b]`] and [`f''([$c]) = 0`] + +Fill-in the blanks to make the correct conclusion about [`f`]. + +By using the [_]{$test}, we can conclude that [`f`] has a [_]{$extrema} at [`x = \, `][_]{$a}{2} and the corresponding extreme value of [`f`] is [_]{$val}{3}. + +END_PGML + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-3-0-0-C/3-6-0-Ap-I/3-6-0-Ap-I-drop-down-detail-jms.pg b/Contrib/UCalgary/249-3-0-0-C/3-6-0-Ap-I/3-6-0-Ap-I-drop-down-detail-jms.pg new file mode 100644 index 0000000000..f09c562c43 --- /dev/null +++ b/Contrib/UCalgary/249-3-0-0-C/3-6-0-Ap-I/3-6-0-Ap-I-drop-down-detail-jms.pg @@ -0,0 +1,88 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Integrals) +## DBsection(Conceptual understanding of integration) +## Date(24 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$popupDer = DropDown( + [ + 'Derivative(s)', + 'Definite Integral(s)', + 'Indefinite Integral(s)', + ], + 'Derivative(s)' +); + +$popupDefn = DropDown( + [ + 'Derivative(s)', + 'Definite Integral(s)', + 'Indefinite Integral(s)', + ], + 'Definite Integral(s)' +); + +$popupInd = DropDown( + [ + 'Derivative(s)', + 'Definite Integral(s)', + 'Indefinite Integral(s)', + ], + 'Indefinite Integral(s)' +); + + + +$d = random(-1,1,2); #switch between two versions of the problem +if($d==-1) +{ +$a = random(2,5,1); +$b = random(2,6,1); +if($a==$b) +{$b = $a+2;} #distinct constants +$c = random(1500,2000,25); +$d = random(25,100,5); +BEGIN_PGML +For each of the following problems indicate if the solution will require calculating "Derivative(s)", "Definite Integrals(s)" or "Indefinite Integral(s)" to solve the given problem. + +**Note: remember that an "Antiderivative" is an "Indefinite Integral".** + ++ [_]{$popupDer} Suppose that [`x`] and [`y`] are two numbers such that [`x\geq 0`] and [`x-y = [$a]`]. How small can we make the quantity [`x^2+[$b]y^2`]? ++ [_]{$popupInd} An object is moving with with velocity given by [`v(t) = \sin([$a]t) - \cos([$b]t) + t`], assuming that the initial position is [`s(0) = 0`], find the position function [`s(t)`] for the object. ++ [_]{$popupInd} After making an initial investment of [`\$ 1000`], the amount of money in your investing account at time [`t`] measured in years is growing at a rate of [`[$c] e^{t/[$d]}`]. Find a function that gives the value of your investing account at time [`t`]. +END_PGML +} +else +{ +$a = random(2,5,1); +$b = random(2,6,1); +if($a==$b) +{$b = $a+2;} #distinct constants +BEGIN_PGML +For each of the following problems indicate if the solution will require calculating "Derivative(s)", "Definite Integrals(s)" or "Indefinite Integral(s)" to solve the given problem. + +**Note: remember that an "Antiderivative" is an "Indefinite Integral".** + ++ [_]{$popupInd} Given [``f(x) = [$a]x^2 + \frac{[$b]}{x^2+1}``] find a function [`g(x)`] so that [`g'(x)=f(x)`] and [`g(1) = 0`]. ++ [_]{$popupDer} You have a square piece of cardboard with an area of [`1200 \, \rm{cm}^2`] to make a box with an open top by cutting smaller squares out of the corners and folding the edges up. Find the largest possible volume of the box that you can make. ++ [_]{$popupDefn} The rate at which water flows into the Glenmore Reservoir is given by a function [`f(t)`] measured in kilolitres ([`m^3`]) per day, were [`t`] is time measured in days. On January 1, 2025 (time [`t=0`]) the reservoir contained [`23`] million kilolitres of water. Find the amount of water in the reservoir on January 31, 2025. + +END_PGML +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-3-0-0-C/3-6-0-Ap-I/3-6-0-Ap-I-drop-down-jms.pg b/Contrib/UCalgary/249-3-0-0-C/3-6-0-Ap-I/3-6-0-Ap-I-drop-down-jms.pg new file mode 100644 index 0000000000..2ddac14bed --- /dev/null +++ b/Contrib/UCalgary/249-3-0-0-C/3-6-0-Ap-I/3-6-0-Ap-I-drop-down-jms.pg @@ -0,0 +1,77 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Conceptual understanding of derivatives) +## Date(24 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$popupDer = DropDown( + [ + 'Derivative(s)', + 'Integral(s)', + 'Calculus is not needed' + ], + 'Derivative(s)' +); + +$popupInt = DropDown( + [ + 'Derivative(s)', + 'Integral(s)', + 'Calculus is not needed' + ], + 'Integral(s)' +); + +$popupNA = DropDown( + [ + 'Derivative(s)', + 'Integral(s)', + 'Calculus is not needed' + ], + 'Calculus is not needed' +); + +$d = random(-1,1,2); #switch between two versions of the problem +if($d==-1) +{ +BEGIN_PGML +For each of the following types of problems indicate if the solution will require the use of "Derivative(s)", "Integrals(s)" or if "Calculus is not needed" to solve the given problem. + +**Important Note: For this problem we will regard "Antiderivatives" as "Integrals(s)."** + ++ [_]{$popupDer} Given a function that describes the position of a moving object, find the acceleration of the object. ++ [_]{$popupNA} Given two functions, find all points of intersections of their graphs within a given closed interval. ++ [_]{$popupInt} Given the rate at which a function is changing, find the net change in the value of the function over a given closed interval. ++ [_]{$popupDer} Approximate the value(s) of a function near a given point. +END_PGML +} +else +{ +BEGIN_PGML +For each of the following types of problems indicate if the solution will require the use of "Derivative(s)", "Integrals(s)" or if "Calculus is not needed" to solve the given problem. + +**Important Note: For this problem we will regard "Antiderivatives" as "Integrals(s)."** + ++ [_]{$popupInt} Given a function that describes the acceleration of a moving object, find the displacement (net distance travelled) of the object over a given time interval. ++ [_]{$popupDer} Given a function that describes the area of a region, find the rate at which the area of the region is changing. ++ [_]{$popupNA} Determine how the graph of a function [`y=f(x)`] changes after substituting [`x-2`] in place of [`x`]. ++ [_]{$popupInt} Find the total area between a given function and the [`x`]-axis over a closed interval. +END_PGML +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-3-0-0-C/3-7-0-Ap-I/3-7-0-Ap-I-drop-down-jms.pg b/Contrib/UCalgary/249-3-0-0-C/3-7-0-Ap-I/3-7-0-Ap-I-drop-down-jms.pg new file mode 100644 index 0000000000..22299cbc25 --- /dev/null +++ b/Contrib/UCalgary/249-3-0-0-C/3-7-0-Ap-I/3-7-0-Ap-I-drop-down-jms.pg @@ -0,0 +1,62 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Continuity - intermediate value theorem) +## Date(24 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$EVT = DropDown( + [ + 'Extreme Value Theorem', + 'Intermediate Value Theorem', + 'Mean Value Theorem' + ], + 'Extreme Value Theorem' +); + +$IVT = DropDown( + [ + 'Extreme Value Theorem', + 'Intermediate Value Theorem', + 'Mean Value Theorem' + ], + 'Intermediate Value Theorem' +); + +$MVT = DropDown( + [ + 'Extreme Value Theorem', + 'Intermediate Value Theorem', + 'Mean Value Theorem' + ], + 'Mean Value Theorem' +); +BEGIN_PGML +Let [`a,b`] be real numbers and assume that [`aflags->set(tolerance => 0.00001, tolType => 'absolute'); + +$a = random(0, 2, 1); +$err = random(1,99,1)/100; +$val = $a+$err; + +$f = Formula("ln(x)")->reduce(); +$fder = Formula("1/x")->reduce(); + +$fone= Compute("ln(1)"); +$fderone = Compute("1/1"); +$lin = Compute("$fone + $fderone(x-1)")->reduce; + +$ans = Compute("$fone + $fderone*($val-1)"); + +BEGIN_PGML +Use a linear approximation to estimate the value of [`\ln([$val])`]. Note: You should be able to choose the function and the point at which to do the approximation so that you can compute all necessary values “by hand”. + +[``\ln([$val]) \approx``][_]{$ans}{5} +END_PGML + +BEGIN_PGML_HINT +You should be able to choose the function and the point at which to do the approximation so that you can compute all necessary values "by hand". +END_PGML_HINT + +BEGIN_PGML_SOLUTION +In general, the linear approximation to [`f`] at [`x=a`] is given by [`L(x) = f(a) + f'(a)(x-a)`]. + +In this case, [``f(x) = [$f]``] and [``f'(x) = [$fder]``]. + +At [`x=1`], we have [`f(1) = \ln(1) = [$fone]`] and [``f'(1) = [$fderone]``], so we will do the linear approximation at [`x=1`]. +We have that [```L(x) = [$fone] + [$fderone](x-1) = [$lin],```] +and [```\ln([$val]) = f([$val]) \approx L([$val]) = ([$val]-1) = [$ans] ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-1-1-Ap-C/4-1-1-Ap-C-log-jmsW2026.pg b/Contrib/UCalgary/249-4-0-0-I/4-1-1-Ap-C/4-1-1-Ap-C-log-jmsW2026.pg new file mode 100644 index 0000000000..8a5b3c721b --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-1-1-Ap-C/4-1-1-Ap-C-log-jmsW2026.pg @@ -0,0 +1,60 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Linear approximation and differentials) +## Date(26 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances + Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$a = random(0, 2, 1); +$err = random(1,99,1)/100; +$val = $a+$err; + +$f = Formula("ln(x)")->reduce(); +$fder = Formula("1/x")->reduce(); + +$fone= Compute("ln(1)"); +$fderone = Compute("1/1"); +$lin = Compute("$fone + $fderone(x-1)")->reduce; + +$ans = Compute("$fone + $fderone*($val-1)"); + +BEGIN_PGML +Use a linear approximation to estimate the value of [`\ln([$val])`] using [`a=1`]. + +[``\ln([$val]) \approx``][_]{$ans}{5} +END_PGML + + +BEGIN_PGML_SOLUTION +In general, the linear approximation to [`f`] at [`x=a`] is given by [`L(x) = f(a) + f'(a)(x-a)`]. + +In this case, [``f(x) = [$f]``] and [``f'(x) = [$fder]``]. + +At [`x=1`], we have [`f(1) = \ln(1) = [$fone]`] and [``f'(1) = [$fderone]``], so we will do the linear approximation at [`x=1`]. +We have that [```L(x) = [$fone] + [$fderone](x-1) = [$lin],```] +and [```\ln([$val]) = f([$val]) \approx L([$val]) = ([$val]-1) = [$ans] ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-1-1-Ap-C/4-1-1-Ap-C-power-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-1-1-Ap-C/4-1-1-Ap-C-power-jms.pg new file mode 100644 index 0000000000..bb020aee72 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-1-1-Ap-C/4-1-1-Ap-C-power-jms.pg @@ -0,0 +1,63 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Linear approximation and differentials) +## Date(26 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances + Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$a = random(1, 5, 1); +$err = random(1,9,1)/100; +$val = $a+$err; +$pow = random(3,5,1); +$powm1 = $pow-1; + +$f = Formula("x^($pow)")->reduce(); +$fder = Formula("$pow*x^($powm1)")->reduce(); + +$fa= Compute("($a)^($pow)"); +$fdera = Compute("$pow*($a)^($powm1)"); + +$ans = Compute("$fa + $fdera*$err"); + +BEGIN_PGML +Use a linear approximation to estimate the value of [`([$val])^{[$pow]}`]. Note: You should be able to choose the function and the point at which to do the approximation so that you can compute all necessary values “by hand”. + +[``([$val])^{[$pow]} \approx``][_]{$ans}{5} +END_PGML + +BEGIN_PGML_HINT +You should be able to choose the function and the point at which to do the approximation so that you can compute all necessary values "by hand". +END_PGML_HINT + +BEGIN_PGML_SOLUTION +In general, the linear approximation to [`f`] at [`x=a`] is given by [`L(x) = f(a) + f'(a)(x-a)`]. + +In this case, [``f'(x) = [$fder]``], so at [`x=[$a]`], we have [`f([$a]) = [$fa]`] and [``f'([$a]) = [$fdera]``]. + +Therefore, at [`x=[$a]`], [```L(x) = [$fa] + [$fdera](x-[$a]),```] +and [```([$val])^{[$pow]} = f([$val]) \approx L([$val]) = [$fa] + [$fdera]([$val]-[$a]) = [$fa] + [$fdera]([$err]) = [$ans] ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-1-1-Ap-C/4-1-1-Ap-C-power-jmsW2026.pg b/Contrib/UCalgary/249-4-0-0-I/4-1-1-Ap-C/4-1-1-Ap-C-power-jmsW2026.pg new file mode 100644 index 0000000000..ca0d175119 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-1-1-Ap-C/4-1-1-Ap-C-power-jmsW2026.pg @@ -0,0 +1,64 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Linear approximation and differentials) +## Date(26 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances + Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$a = random(1, 5, 1); +#$a = 1; +$err = random(1,9,1)/100; +$val = $a+$err; +$pow = random(3,5,1); +$powm1 = $pow-1; + +$f = Formula("x^($pow)")->reduce(); +$fder = Formula("$pow*x^($powm1)")->reduce(); + +$fa= Compute("($a)^($pow)"); +$fdera = Compute("$pow*($a)^($powm1)"); + +$ans = Compute("$fa + $fdera*$err"); + +BEGIN_PGML +Use a linear approximation to estimate the value of [`([$val])^{[$pow]}`] at [`a=[$a]`]. + +[``([$val])^{[$pow]} \approx``][_]{$ans}{5} +END_PGML + +BEGIN_PGML_HINT +You should be able to choose the function and the point at which to do the approximation so that you can compute all necessary values "by hand". +END_PGML_HINT + +BEGIN_PGML_SOLUTION +In general, the linear approximation to [`f`] at [`x=a`] is given by [`L(x) = f(a) + f'(a)(x-a)`]. + +In this case, [``f'(x) = [$fder]``], so at [`x=[$a]`], we have [`f([$a]) = [$fa]`] and [``f'([$a]) = [$fdera]``]. + +Therefore, at [`x=[$a]`], [```L(x) = [$fa] + [$fdera](x-[$a]),```] +and [```([$val])^{[$pow]} = f([$val]) \approx L([$val]) = [$fa] + [$fdera]([$val]-[$a]) = [$fa] + [$fdera]([$err]) = [$ans] ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-1-1-Ap-C/4-1-1-Ap-C-root-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-1-1-Ap-C/4-1-1-Ap-C-root-jms.pg new file mode 100644 index 0000000000..bde1df1751 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-1-1-Ap-C/4-1-1-Ap-C-root-jms.pg @@ -0,0 +1,60 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Linear approximation and differentials) +## Date(26 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances + Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$a = random(2, 6, 1); +$aa = $a**2; # a squared +$err = random(1,9,1)/10; +$step = random(1,3,1); +$val = $aa+$err; +$eval = $aa + $err + $step; +$aaplusstep = $aa + $step; + +$f = Formula("sqrt(x-$step)")->reduce(); +$fder = Formula("1/(2*sqrt(x-$step))")->reduce(); + +$atwo = Compute("2*$a"); + +$ans = Compute("$a + (1/$atwo)*$err"); + +BEGIN_PGML +Using a linear approximation to the function [`f(x) = [$f]`] at [`x=[$aaplusstep]`], find an approximation of [`\sqrt{[$val]}`]. + +[``\sqrt{[$val]} \approx``][_]{$ans}{5} +END_PGML + +BEGIN_PGML_SOLUTION +In general, the linear approximation to [`f`] at [`x=a`] is given by [`L(x) = f(a) + f'(a)(x-a)`]. + +In this case, [``f'(x) = [$fder]``], so at [`x=[$aaplusstep]`], we have [`f([$aaplusstep]) = [$a]`] and [``f'([$aaplusstep]) = \frac{1}{2([$a])} = \frac{1}{[$atwo]}``]. + +Therefore, at [`x=[$aaplusstep]`], [```L(x) = [$a] + \frac{1}{[$atwo]}(x-[$aaplusstep]),```] +and [```\sqrt{[$val]} = f([$eval]) \approx L([$eval]) = [$a] + \frac{1}{[$atwo]}([$eval] - [$aaplusstep]) = [$a] + \frac{1}{[$atwo]}([$err]) = [$ans] ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-1-2-E-I/4-1-2-E-I-abstract-over-under-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-1-2-E-I/4-1-2-E-I-abstract-over-under-jms.pg new file mode 100644 index 0000000000..e7d7b0dde7 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-1-2-E-I/4-1-2-E-I-abstract-over-under-jms.pg @@ -0,0 +1,80 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Concavity and points of inflection) +## Date(26 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = non_zero_random(-7, 7, 1); #point +$step = random(3,5,1); +$lend = $a-$step; #left end point +$rend = $a+$step; #right end point +$err = random(1,9,1)/10; +$val = $a+$err; +#function values +$fa = random(-10,10,1); +$fdera = random(-1,1,2); +$fder2a = random(-1,1,2); +if($fdera == -1) +{$fdera_sign = '<';} +else +{$fdera_sign = '>';} +if($fder2a == -1) +{$fder2a_sign = '<';} +else +{$fder2a_sign = '>';} + +if ($fder2a < 0) { + $overunder = 'an over-estimate'; + $concave = 'concave down'; + $location = 'above'; +} else { + $overunder = 'an under-estimate'; + $concave = 'concave up'; + $location = 'below'; +} + +$popup = DropDown( + [ + 'an over-estimate', + 'an under-estimate', + 'the exact value' + ], + $overunder +); + +BEGIN_PGML +Suppose that [`f`] is a twice-differentiable function and that [`f''`] is continuous. Further suppose that we know the following information about the values of [`f`] and its derivatives: + +[# + [. [`f([$a]) = [$fa]`], .]* + [. [`f'(x) [$fdera_sign] 0`] on the interval [`([$lend],[$rend])`], and .]* + [. [`f''(x) [$fder2a_sign] 0`] on the interval [`([$lend],[$rend])`] .]* +#] + +If a linear approximation of [`f`] at [`x=[$a]`] is used to estimate [`f([$val])`], then the resulting approximation is [_]{$popup} of [`f([$val])`]. +END_PGML + +BEGIN_PGML_HINT +Use information about its second derivative to think about the graph of [`y=f(x)`]. +END_PGML_HINT + +BEGIN_PGML_SOLUTION +The second derivative is a continuous function, and [`f''(x) [$fder2a_sign] 0`] on the interval [`([$lend],[$rend])`], so [`f`] is [$concave] near [`x=[$a]`] and [`x=[$val]`]. Therefore, the tangent line to [`y=f(x)`] at [`x=[$a]`] is [$location] the graph of [`f`] near [`x=[$a]`] and [`x=[$val]`], and the linear approximation of [`f([$val])`] will be an [$overunder]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-1-2-E-I/4-1-2-E-I-graph-overunder-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-1-2-E-I/4-1-2-E-I-graph-overunder-jms.pg new file mode 100644 index 0000000000..d5aeaed501 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-1-2-E-I/4-1-2-E-I-graph-overunder-jms.pg @@ -0,0 +1,89 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Linear approximation and differentials) +## Date(27 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserRadioButtons.pl","parserPopUp.pl"); +$a = non_zero_random(-2,2,1)/10; #leading coefficient +$a2 = 2*$a; #twice a +if($a < 0) # y-int +{$b = random(1,3,1);} +else +{$b = random(-3,-1,1);} +$c = non_zero_random(-1,1,1); +$pt = random(-3,3,1); #point not c +if($pt == $c) +{$pt = abs($c)+1;} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-5) -- (0,5) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-5) grid (5,5); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-4,-2,2,4} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick] plot[domain={-4.5}:{4.5}] (\x,{$a*pow(\x-$c,2)+$b}); +\draw[red] (4,{$a*pow(4-$c,2)+$b}) node [below right]{\(y=f(x)\)}; +END_TIKZ + +$f = Formula("$a*(x-$c)^2+$b")->reduce(); +$fder = Formula("$a2*(x-$c)")->reduce(); +$fpt = Compute("$a*($pt-$c)^2+$b"); +$fderpt = Compute("$a2*($pt-$c)"); +$lin = Formula("$fpt + $fderpt*(x-$pt)")->reduce(); + +if ($a < 0) { + $overunder = 'an over-estimate'; + $tan_loc = 'above'; +} else { + $overunder = 'an under-estimate'; + $tan_loc = 'below'; +} + +$radio1 = RadioButtons( + [ "\(L(x)=$a2(x-$c)\)", "\(L(x)=$a2(x-$c) + $b\)", "\(L(x) = $fpt + $fderpt(x-$pt)\)", "\(L(x) = $fderpt(x-$pt)\)", "\(L(x) = $fderpt + $fpt(x-$pt)\)" ], + "\(L(x) = $fpt + $fderpt(x-$pt)\)" # correct answer +); + +$popup = DropDown( + [ + 'an over-estimate', + 'an under-estimate', + 'the exact value' + ], + $overunder +); + +BEGIN_PGML +Consider the following graph of the function [`f(x)=[$f]`]. + +[@ image($graph_image, width => 600, tex_size => 1000) @]* + ++ Which of the following is equal to the linear approximation to [`f`] at [`x=[$pt]`]? + +[_]{$radio1} + ++ For values of [`x`] near [`x=[$pt]`] the linear approximation of [`f`] will give [_]{$popup} of the values of the function [`f`]. + +END_PGML + +BEGIN_PGML_SOLUTION ++ First, [`f(x) = [$f]`] and [`f'(x) = [$fder]`]. ++ So, [`f([$pt]) = [$fpt]`] and [`f'([$pt]) = [$fderpt]`]. ++ Now, [`L(x) = f([$pt]) + f'([$pt])(x-[$pt]) = [$lin]`] ++ Based on the graph of [`y=f(x)`] given above, we can see that the graph of the tangent line [`y=L(x)`] at [`x=[$pt]`] will be [$tan_loc] the graph of [`f`], therefore, the linear approximation will [$overunder] the values of [`f`] near [`x=[$pt]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-1-2-E-I/4-1-2-E-I-poly-over-under-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-1-2-E-I/4-1-2-E-I-poly-over-under-jms.pg new file mode 100644 index 0000000000..bd8d3239cf --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-1-2-E-I/4-1-2-E-I-poly-over-under-jms.pg @@ -0,0 +1,64 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Higher-order derivatives) +## Date(26 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = non_zero_random(-7, 7, 1); #point +$b = random(3,9,1);#coefficient +$err = random(1,9,1)/10; +$val = $a+$err; +$pow = random(3, 7, 2); # odd +$f = Formula("$b*x^($pow)")->reduce(); +$fder2 = Formula("$b*$pow*($pow-1)x^($pow-2)")->reduce(); +if ($a < 0) { + $overunder = 'an over-estimate'; + $sign = 'negative'; + $concave = 'concave down'; +} else { + $overunder = 'an under-estimate'; + $sign = 'positive'; + $concave = 'concave up'; +} + +$popup = DropDown( + [ + 'an over-estimate', + 'an under-estimate', + 'the exact value' + ], + $overunder +); + +BEGIN_PGML +If a linear approximation of [`f(x)=[$f]`] at [`x=[$a]`] is used to estimate [`f([$val])`], then the resulting approximation is [_]{$popup} of [`f([$val])`]. +END_PGML + +BEGIN_PGML_HINT +Consider the graph of [`f(x) = [$f]`] or use information about its second derivative. +END_PGML_HINT + +BEGIN_PGML_SOLUTION +The second derivative of [`f(x) = [$f]`] is equal to [`f''(x) = [$fder2]`], which is a continuous function. + +The second derivative [`f''(x) = [$fder2]`] is [$sign] near [`x=[$a]`], so [`f(x) = [$f]`] is [$concave] near [`x=[$a]`]. + +Therefore, the linear approximation of [`f([$val])`] will be [$overunder]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-2-1-Ap-C/4-2-1-Ap-C-taylor-poly-approx-AT.pg b/Contrib/UCalgary/249-4-0-0-I/4-2-1-Ap-C/4-2-1-Ap-C-taylor-poly-approx-AT.pg new file mode 100644 index 0000000000..c07505c8b1 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-2-1-Ap-C/4-2-1-Ap-C-taylor-poly-approx-AT.pg @@ -0,0 +1,40 @@ +## DESCRIPTION +## Implement Taylor Polynomial approximation to approximate numerical values of a function +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Infinite sequences and series) +## DBsection(Applications of Taylor polynomials) +## Level(3) +## KEYWORDS() + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(1,2,.25); +$expr = "\(\displaystyle \ln ($a) \approx \)".labeled_ans_rule("ans",10)."."; + +BEGIN_PGML +Use the *fourth Taylor polynomial* for [`f(x) = \ln{(x)}`] centred at [`c = 1`] +to approximate +[$expr]* +END_PGML + +# What relative tolerance is 4 significant digits? +LABELED_ANS("ans",Compute("ln($a)")->cmp(tolType => 'relative',tolerance => .01,)); + +BEGIN_PGML_SOLUTION + +END_PGML_SOLUTION + +ENDDOCUMENT(); \ No newline at end of file diff --git a/Contrib/UCalgary/249-4-0-0-I/4-2-2-Ap-I/4-2-2-Ap-I-taylor-remainder-approx-AT.pg b/Contrib/UCalgary/249-4-0-0-I/4-2-2-Ap-I/4-2-2-Ap-I-taylor-remainder-approx-AT.pg new file mode 100644 index 0000000000..fdf0474b82 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-2-2-Ap-I/4-2-2-Ap-I-taylor-remainder-approx-AT.pg @@ -0,0 +1,45 @@ +## DESCRIPTION +## Use Taylor's Remainder theorem to estimate the error in a Taylor Polynomial approximation +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Infinite sequences and series) +## DBsection(Applications of Taylor polynomials) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(1,4,1); +$expr = LayoutTable( + [ + [ + '\(\text{Error} \approx \)'.$SPACE.labeled_ans_rule("ans",10) + ] + ] +); + +BEGIN_PGML +Estimate the error if [`P_2(x) = 1 - \frac{x^2}{2}`] is used to estimate [`\cos{(x)}`] +at [`x = [$a]`]. +[$expr]* +END_PGML + +# What relative tolerance is 4 significant digits? +LABELED_ANS("ans",Compute("($a^3)/6")->cmp(tolType => 'relative',tolerance => .001,)); + +BEGIN_PGML_SOLUTION + +END_PGML_SOLUTION + +ENDDOCUMENT(); \ No newline at end of file diff --git a/Contrib/UCalgary/249-4-0-0-I/4-2-3-Ap-I/4-2-3-Ap-I-taylor-poly-degree-AT.pg b/Contrib/UCalgary/249-4-0-0-I/4-2-3-Ap-I/4-2-3-Ap-I-taylor-poly-degree-AT.pg new file mode 100644 index 0000000000..75461979bd --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-2-3-Ap-I/4-2-3-Ap-I-taylor-poly-degree-AT.pg @@ -0,0 +1,50 @@ +## DESCRIPTION +## Use Taylor's Remainder theorem to identify the degree of Taylor Polynomial approximation required to reach a given error threshold +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Infinite sequences and series) +## DBsection(Applications of Taylor polynomials) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + 'parserSolutionFor.pl' +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(1.1,1.4,.1); + +$n = 0; +while (($n+1)*((1/($a-1))**($n+1)) <= 100) { + $n++; +} + +$expr = LayoutTable( + [ + [ + '\(\displaystyle n = \)'.$SPACE.labeled_ans_rule("answer",10) + ] + ] +); + +BEGIN_PGML +For [`1 \leq x \leq 2`], determine the degree of the Taylor polynomial [`P_n(x)`] expanded about [`c = 1`] that +should be used to approximate [`\ln{([$a])}`] so that the error is less than 0.01. +[$expr]* +END_PGML + +LABELED_ANS("answer",Compute($n)->cmp()); + +BEGIN_PGML_SOLUTION +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-3-1-Ap-I/4-3-1-Ap-I-demand-change-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-3-1-Ap-I/4-3-1-Ap-I-demand-change-jms.pg new file mode 100644 index 0000000000..1fc789d282 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-3-1-Ap-I/4-3-1-Ap-I-demand-change-jms.pg @@ -0,0 +1,69 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Rates of change - business and economics) +## Date(27 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +Context()->flags->set(tolerance => 0.01, tolType => 'absolute'); + +$a = random(2,8,1); +$c = random(350,700,10); +$p = Formula("$c - x^2/$a")->reduce(); +$units = random(10,25,1); +$price_units = $c - ($units)**2/$a; +if(100*$price_units - floor(100*$price_units) < 0.5) #round the price to two decimals +{$price_units_round = floor(100*$price_units)/100;} +else +{$price_units_round = ceil(100*$price_units)/100;} +$pder = Formula("-2*x/$a")->reduce(); +$abs_delta_p = random(10,30,1); +$delta_p = -1*$abs_delta_p; +$delta_x = Compute("$a*$abs_delta_p/(2*$units)"); +if($delta_x - floor($delta_x) < 0.5) #round the answer +{$delta_x_round = floor($delta_x);} +else +{$delta_x_round = ceil($delta_x);} + +BEGIN_PGML +Let [``p(x) = [$p]``] be the demand function for a product that your company manufactures, where [`x`] is the number of units sold in a given month. The value of the demand function [`p(x)`] is the price in dollars of a single unit of the product when [`x`] units are sold. + +Last month, [`[$units]`] units of the product were sold. What was the price per unit last month? + ++ The price per unit last month was $[_]{$price_units_round}{2}. (Round your answer to two decimal places.) + +Use **differential approximation** to estimate the number of additional units that will be sold in the next month if the price is **lowered** by [`\$ [$abs_delta_p]`] per unit. + ++ Approximately [_]{$delta_x_round}{2} more units will be sold. (Round your answer to the nearest whole number.) +END_PGML + + +BEGIN_PGML_SOLUTION ++ The price per unit last month was [``p([$units]) = [$c] - \frac{([$units])^2}{[$a]} \approx \$ [$price_units_round]. ``] + ++ We are given that the change in price is [`\Delta p = [$delta_p]`] and using differential approximation, we know that [```\Delta p \approx dp = p'(x)dx = [$pder]dx \approx [$pder] \Delta x.```] +Therefore, the change in the number of units sold is approximately [```\Delta x \approx -\frac{[$a]\Delta p}{2x}, ```] and when [`x=[$units]`] we have [```\Delta x \approx -\frac{[$a]([$delta_p])}{2([$units])} = [$delta_x].```] +Therefore, approximately [$delta_x_round] more units of product will be sold in the next month if the price is decreased by $[$abs_delta_p] per unit. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-3-1-Ap-I/4-3-1-Ap-I-fcn-change-2-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-3-1-Ap-I/4-3-1-Ap-I-fcn-change-2-jms.pg new file mode 100644 index 0000000000..349509e0f6 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-3-1-Ap-I/4-3-1-Ap-I-fcn-change-2-jms.pg @@ -0,0 +1,64 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Derivatives of exponential functions) +## Date(27 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +#Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$a = non_zero_random(-5,5,1); +$pow = random(2,4,1); +$apow = $a*$pow; +$powm1 = $pow-1; +$b = non_zero_random(-9,9,1); +$b2 = 2*$b; +$c = random(1,20,1); +$f = Formula("$a x^{$pow} + $b x^2 - $c")->reduce(); +$fder = Formula("$apow x^{$powm1} + $b2 x")->reduce(); +$pt1 = random(1,5,1); +$delta_x = random(-1,1,2)*random(1,4,1)/10; +$pt2 = $pt1 + $delta_x; +$fderpt = Compute("$apow*($pt1**$powm1) + $b2*$pt1"); +$df = Compute("($apow*($pt1**$powm1) + $b2*$pt1)*$delta_x"); +$fpt1 = Compute("$a*($pt1**$pow) + $b*($pt1**2) - $c"); +$fpt2 = Compute("$a*($pt2**$pow) + $b*($pt2**2) - $c"); +$delta_f = Compute("$fpt2-$fpt1"); +BEGIN_PGML +Let [`f(x)=[$f]`]. + ++ The differential of [`f`] is [`df = \, `] [_]{$fder}{10} [`dx`]. ++ If [`x`] starts at [`x=[$pt1]`]and the change in [`x`] is [`\Delta x = [$delta_x]\,`], then by using differential approximation the corresponding **approximate change** in [`f`] is [_]{$df}{5}. ++ Under the same assumptions, the corresponding **actual change** in [`f`] is [_]{$delta_f}{5} + +**Note**: You may need a calculator to complete the last part of this problem! +END_PGML + + +BEGIN_PGML_SOLUTION ++ [`df = f'(x) dx = ([$fder]) dx `] ++ If [`x=[$pt1]`] and [`\Delta x = [$delta_x]`], then the approximate change in [`f`] is [`df = f'([$pt1])\Delta x = f'([$pt1])([$delta_x]) = [$fderpt]([$delta_x])= [$df]`]. ++ The second [`x`] value taken is [`x = [$pt1] + ([$delta_x]) = [$pt2]`], therefore, the actual change in [`f`] is [`\Delta f = f([$pt2]) - f([$pt1]) = [$fpt2] - ([$fpt1]) = [$delta_f]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-3-1-Ap-I/4-3-1-Ap-I-fcn-change-3-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-3-1-Ap-I/4-3-1-Ap-I-fcn-change-3-jms.pg new file mode 100644 index 0000000000..8aa1040770 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-3-1-Ap-I/4-3-1-Ap-I-fcn-change-3-jms.pg @@ -0,0 +1,61 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Derivatives of exponential functions) +## Date(27 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +#Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$a = non_zero_random(-5,5,1); +$aa = $a**2; +$c = random(1,7,1); #shift +$f = Formula("sqrt(x-$c)")->reduce(); +$fder = Formula("1/(2*sqrt(x-$c))")->reduce(); +$pt1 = $aa+$c; #shift from square +$delta_x = random(-1,1,2)*random(1,4,1)/10; +$pt2 = $pt1 + $delta_x; +$delta_x_ans = Compute("$pt2 - $pt1"); +$fderpt = Compute("1/(2*sqrt($pt1-$c))"); +$df = Compute("(1/(2*sqrt($pt1-$c)))*$delta_x"); +$fpt1 = Compute("sqrt($pt1-$c)"); +$fpt2 = Compute("sqrt($pt2-$c)"); +$delta_f = Compute("$fpt2-$fpt1"); +BEGIN_PGML +Let [`f(x)=[$f]`]. + ++ The differential of [`f`] is [`df = \, `] [_]{$fder}{10} [`dx`]. ++ If [`x`] changes from [`x=[$pt1]`] to [`x=[$pt2]`], then the change in [`x`] is [`dx = \Delta x = \,`] [_]{$delta_x_ans}{3} and the corresponding **approximate change** in [`f`] obtained by **differential approximation** is [_]{$df}{5}. ++ If [`x`] changes from [`x=[$pt1]`] to [`x=[$pt2]`], then the corresponding **actual change** in [`f`] is [_]{$delta_f}{5} + +**Reflection prompt**: What do you notice about your last two answers? which of these is easier to find? +END_PGML + + +BEGIN_PGML_SOLUTION ++ [``df = f'(x) dx = [$fder] dx ``] ++ If [`x=[$pt1]`] and [`dx = \Delta x = [$pt2]-[$pt1] = [$delta_x]`], then the approximate change in [`f`] is [`df = f'([$pt1])\Delta x = f'([$pt1])([$delta_x]) = [$fderpt]([$delta_x])= [$df]`]. ++ The actual change in [`f`] is [`\Delta f = f([$pt2]) - f([$pt1]) = [$fpt2] - ([$fpt1]) = [$delta_f]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-3-1-Ap-I/4-3-1-Ap-I-fcn-change1-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-3-1-Ap-I/4-3-1-Ap-I-fcn-change1-jms.pg new file mode 100644 index 0000000000..67f406f5c0 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-3-1-Ap-I/4-3-1-Ap-I-fcn-change1-jms.pg @@ -0,0 +1,66 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Derivatives of polynomials and power functions) +## Date(27 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +#Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$a = non_zero_random(-5,5,1); +$pow = random(2,4,1); +$apow = $a*$pow; +$powm1 = $pow-1; +$b = non_zero_random(-9,9,1); +$c = random(1,9,1); +$f = Formula("$a x^{$pow} + $b x + $c")->reduce(); +$fder = Formula("$apow x^{$powm1} + $b")->reduce(); +$pt1 = random(1,5,1); +$delta_x = random(-1,1,2)*random(1,4,1)/10; +$pt2 = $pt1 + $delta_x; +$delta_x_ans = Compute("$pt2 - $pt1"); +$fderpt = Compute("$apow*($pt1**$powm1) + $b"); +$df = Compute("($apow*($pt1**$powm1) + $b)*$delta_x"); +$fpt1 = Compute("$a*($pt1**$pow) + $b*$pt1 + $c"); +$fpt2 = Compute("$a*($pt2**$pow) + $b*$pt2 + $c"); +$delta_f = Compute("$fpt2-$fpt1"); +BEGIN_PGML +Let [`f(x)=[$f]`]. + ++ The differential of [`f`] is [`df = \, `] [_]{$fder}{10} [`dx`]. ++ If [`x`] changes from [`x=[$pt1]`] to [`x=[$pt2]`], then the change in [`x`] is [`dx = \Delta x = \,`] [_]{$delta_x_ans}{3} and the corresponding **approximate change** in [`f`] is [`d f = \,`] [_]{$df}{5}. ++ If [`x`] changes from [`x=[$pt1]`] to [`x=[$pt2]`], then the corresponding **actual change** in [`f`] is [`\Delta f = \,`] [_]{$delta_f}{5} + +**Note**: you may need a calculator to complete the last part of this problem! + +**Reflection prompt**: What do you notice about the last two values of [`df`] and [`\Delta f`]? +END_PGML + + +BEGIN_PGML_SOLUTION ++ [`df = f'(x) dx = ([$fder]) dx `] ++ If [`x=[$pt1]`] and [`dx = \Delta x = [$pt2]-[$pt1] = [$delta_x]`], then the approximate change in [`f`] is [`df = f'([$pt1])\Delta x = f'([$pt1])([$delta_x]) = [$fderpt]([$delta_x])= [$df]`]. ++ The actual change in [`f`] is [`\Delta f = f([$pt2]) - f([$pt1]) = [$fpt2] - ([$fpt1]) = [$delta_f]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-3-2-Ap-I/4-3-2-Ap-I-percent-change-2-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-3-2-Ap-I/4-3-2-Ap-I-percent-change-2-jms.pg new file mode 100644 index 0000000000..4eaf806fb6 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-3-2-Ap-I/4-3-2-Ap-I-percent-change-2-jms.pg @@ -0,0 +1,59 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Linear approximation and differentials) +## Date(27 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$delta_x = random(2,9,1); #percent cahange in variable x +$pow = random(-1,1,2)*non_zero_random(2,5,1); #power avoid +/- 1 +$powm1 = $pow-1; +$denom = random(3,7,1); #denominator +$sign = random(-1,1,2); +if($sign == -1) +{$incdec = 'decreases'; + $sign_name = 'negative';} +else +{$incdec = 'increases'; + $sign_name = 'positive';} +$delta_x_signed = $sign*$delta_x; +$delta_y = $pow*$delta_x_signed; + +BEGIN_PGML +Suppose that [``y = \frac{\pi^2}{\ln([$denom])}x^{[$pow]}``] is a function of the independent variable [`x`]. + +If the independent variable [`x`] [$incdec] by [`[$delta_x] \%`], then the corresponding approximate percentage change in [`y`] is [_]{$delta_y}{2} %. +END_PGML + +BEGIN_PGML_SOLUTION +We are given that [``\frac{\Delta x}{x} =[$delta_x_signed] \%``] and we want to approximate [``\frac{\Delta y}{y}``]. + +Using differential approximation, we know that [``\Delta y \approx dy = \frac{dy}{dx} \Delta x``] and [``\frac{dy}{dx} = \frac{[$pow] \pi^2}{\ln([$denom])} x^{[$powm1]} ``]. + +Therefore, [```\frac{\Delta y}{y} \approx \frac{\dfrac{dy}{dx} \Delta x}{y} = \frac{\dfrac{[$pow] \pi^2}{\ln([$denom])} x^{[$powm1]} \Delta x}{\dfrac{\pi^2}{\ln([$denom])}x^{[$pow]}} = [$pow]\frac{\Delta x}{x} = [$pow]([$delta_x_signed]\%) = [$delta_y] \%```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-3-2-Ap-I/4-3-2-Ap-I-percent-change-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-3-2-Ap-I/4-3-2-Ap-I-percent-change-jms.pg new file mode 100644 index 0000000000..ca30b7a396 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-3-2-Ap-I/4-3-2-Ap-I-percent-change-jms.pg @@ -0,0 +1,73 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Linear approximation and differentials) +## Date(27 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$delta_x = random(2,9,1); #percent cahange in variable x +$pow = random(-1,1,2)*non_zero_random(2,5,1); #power avoid +/- 1 +$powm1 = $pow-1; +$denom = random(3,7,1); #denominator +$sign = random(-1,1,2); +if($sign == -1) +{$incdec = 'decreases'; + $sign_name = 'negative';} +else +{$incdec = 'increases'; + $sign_name = 'positive';} +$delta_x_signed = $sign*$delta_x; +$delta_A = $pow*$delta_x_signed; +if($delta_A<0) +{$ans_sign = 'decreases';} +else +{$ans_sign = 'increases';} +$abs_delta_A = abs($delta_A); +$popup = DropDown( + [ + 'increases', + 'decreases', + ], + $ans_sign +); + +BEGIN_PGML +The quantity [`A`] depends on a variable [`x`] under the relationship [``A = \frac{\pi}{[$denom]}x^{[$pow]}``]. + +If the variable [`x`] [$incdec] by [`[$delta_x]`] percent, then [`A`] [_]{$popup} by approximately [_]{$abs_delta_A}{2} percent. +END_PGML + +BEGIN_PGML_SOLUTION +We are given that [``\frac{\Delta x}{x} =[$delta_x_signed] \%``] and we want to approximate [``\frac{\Delta A}{A}``]. + +Using differential approximation, we know that [``\Delta A \approx dA = \frac{dA}{dx} \Delta x``] and [``\frac{dA}{dx} = \frac{[$pow] \pi}{[$denom]} x^{[$powm1]} ``]. + +Therefore, [```\frac{\Delta A}{A} \approx \frac{\dfrac{dA}{dx} \Delta x}{A} = \frac{\dfrac{[$pow] \pi}{[$denom]} x^{[$powm1]} \Delta x}{\dfrac{\pi}{[$denom]}x^{[$pow]}} = [$pow]\frac{\Delta x}{x} = [$pow]([$delta_x_signed]\%) = [$delta_A] \%```] + +Therfore, if [`x`] [$incdec] by [`[$delta_x]`] percent, then [`A`] [$ans_sign] by approximately [`[$abs_delta_A]`] percent. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-3-2-Ap-I/4-3-2-Ap-I-percent-sphere-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-3-2-Ap-I/4-3-2-Ap-I-percent-sphere-jms.pg new file mode 100644 index 0000000000..493b1cc11b --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-3-2-Ap-I/4-3-2-Ap-I-percent-sphere-jms.pg @@ -0,0 +1,67 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Rates of change - engineering and physics) +## Date(27 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$delta_S = random(2,25,1); #percent cahange in surface area +$sign = random(-1,1,2); +if($sign == -1) +{$incdec = 'decreased'; + $sign_name = 'negative';} +else +{$incdec = 'increased'; + $sign_name = 'positive';} +$delta_S_signed = $sign*$delta_S; +$delta_R = $sign*$delta_S/2; #percent cahange in radius, incorporate sign here +$delta_V = 3*$delta_R; #percent cahange in volume + +BEGIN_PGML +Based on observations made with a ground-based telescope, you have determined that the **surface area** of a nearby star has [$incdec] by [$delta_S] percent. + +Use differential approximation to determine the corresponding: + ++ approximate percentage change in the **radius** of the star: [_]{$delta_R}{2} % ++ approximate percentage change in the **volume** of the star: [_]{$delta_V}{2} % + +Due to its immense gravity, you can assume that the star is a perfect **sphere**. +END_PGML + +BEGIN_PGML_HINT +The volume of a sphere of radius [`r`] is [``V = \frac{4}{3}\pi r^3``] and its surface area is [``S = 4\pi r^2``]. +END_PGML_HINT + +BEGIN_PGML_SOLUTION +We are given that the actual percentage change in the surface area is [``\frac{\Delta S}{S} = [$delta_S_signed] \%``]. + +Using differential approximation we know that [``\Delta S \approx dS = \frac{dS}{dr} dr ``], so in terms of percentage change we have that [```\frac{\Delta S}{S} \approx \frac{dS}{S} = \frac{\frac{dS}{dr} dr}{S} = \frac{8\pi r dr}{4\pi r^2} = \frac{2 dr}{r} \approx \frac{2\Delta r}{r},```] +so the approximate percentage change in the radius of the sphere is [```\frac{\Delta r}{r} \approx \frac{1}{2} \frac{\Delta S}{S} = \frac{1}{2}([$delta_S_signed] \%) = [$delta_R] \%.```] + +Similarly, [``\Delta V \approx dV = \frac{dV}{dr}dr``], so the approximate percentage change in the volume is +[``` \frac{\Delta V}{V} \approx \frac{dV}{V} = \frac{\frac{dV}{dr}dr}{V} = \frac{4\pi r^2 dr}{\frac{4}{3} \pi r^3} = 3\frac{dr}{r} \approx 3 \frac{\Delta r}{r} \approx 3([$delta_R] \%) = [$delta_V] \%.```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-3-3-Ap-I/4-3-3-Ap-I-ivt-mc-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-3-3-Ap-I/4-3-3-Ap-I-ivt-mc-jms.pg new file mode 100644 index 0000000000..325f5e9111 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-3-3-Ap-I/4-3-3-Ap-I-ivt-mc-jms.pg @@ -0,0 +1,72 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Mean value theorem) +## Date(28 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(-9, -3, 1); #left +$step = random(10,15,1); +$step1 = random(1,3,1); +$step2 = $step1 + random(1,2,1); +$c1 = $a + $step1; +$c2 = $a + $step1 + $step2; +$b = $c2+$step2 +random(1,2,1); #right + +$fa = random(-9,-1,1); #neg +$fc1 = random(-9,-1,1); #neg +$fc2 = random(1,9,1); #pos +$fb = random(-9,-1,1); #neg + +$ans = "\(($c1,$c2)\)"; +$dist = "\(($a,$c1)\)"; + +$radio1 = RadioButtons( + [ [ "\(($a,$c2)\)", "$dist", "$ans", "\(($c2,$b)\)", "\(($a,$b)\)"], 'None of the above' ], + "$ans" # correct answer +); + +BEGIN_PGML +Suppose that [`f`] is a continuous function on the interval [`[[$a],[$b]]`]. + +Further suppose that + +[# +[.[`f([$a]) = [$fa],`].] +[.[`f([$c1]) = [$fc1],`].] +[.[`f([$c2]) = [$fc2],`] and.] +[.[`f([$b]) = [$fb]`].] +#] + +Which of the following is the smallest (that is, shortest length) interval on which the Intermediate Value Theorem guarantees that there is a solution to the equation [`0 = f(x)`]? + +[_]{$radio1} +END_PGML + +BEGIN_PGML_SOLUTION +We can apply the Intermediate Value Theorem (IVT) because [`f`] is a continuous function on the interval [`[[$a],[$b]]`]. +- Since [`f([$a]) = [$fa]<0`] and [`f([$c2]) = [$fc2]>0`], by the IVT the equation [`0 = f(x)`] has a solution in [`([$a],[$c2])`]. +- Since [`f([$c1]) = [$fc1]<0`] and [`f([$c2]) = [$fc2]>0`], by the IVT the equation [`0 = f(x)`] has a solution in [`([$c1],[$c2])`]. +- Since [`f([$c2]) = [$fc2]>0`] and [`f([$b]) = [$fb]<0`], by the IVT the equation [`0 = f(x)`] has a solution in [`([$c2],[$b])`]. +- Notice that since the intervals [`([$c1],[$c2])`] and [`([$c2],[$b])`] do not intersect (overlap), we can conclude that there are at least two solutions to [`0=f(x)`] in the interval [`([$a],[$b])`]. + +The smallest (shortest) of these intervals is [`([$c1],[$c2])`]. + +Note that even though the interval [`([$a],[$c1])`] is smaller (shorter) than [`([$c1],[$c2])`] we do not know if there is a solution to [`0 = f(x)`] in [`([$a],[$c1])`] because [`f([$a]) = [$fa] < 0`] and [`f([$c1]) = [$fc1] < 0`] and we cannot apply the Intermediate Value Theorem to make conclusions about the equation [`0=f(x)`] because [`0`] is not between [`f([$a])`] and [`f([$c1])`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-3-3-Ap-I/4-3-3-Ap-I-ivt-mc-no-sol-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-3-3-Ap-I/4-3-3-Ap-I-ivt-mc-no-sol-jms.pg new file mode 100644 index 0000000000..9bd5a2a5ca --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-3-3-Ap-I/4-3-3-Ap-I-ivt-mc-no-sol-jms.pg @@ -0,0 +1,66 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Mean value theorem) +## Date(28 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(-9, -3, 1); #left +$step = random(10,15,1); +$b = $a + $step; #right +$step1 = random(1,3,1); +$step2 = $step1 + random(1,2,1); +$c1 = $a + $step1; +$c2 = $a + $step1 + $step2; + +$sign = random(-1,1,2); +if($sign == -1) +{$sign_name = 'negative';} +else +{$sign_name = 'positive';} +$fa = $sign*random(1,9,1); +$fc1 = $sign*random(1,9,1); +$fc2 = $sign*random(1,9,1); +$fb = $sign*random(1,9,1); + +$radio1 = RadioButtons( + [ [ "\(($a,$c1)\)", "\(($c1,$c2)\)", "\(($a,$c2)\)", "\(($c1,$b)\)", "\(($a,$b)\)"], 'None of the above' ], + 'None of the above' # correct answer +); + +BEGIN_PGML +Suppose that [`f`] is a continuous function on the interval [`[[$a],[$b]]`]. + +Further suppose that + +[# +[.[`f([$a]) = [$fa],`].] +[.[`f([$c1]) = [$fc1],`].] +[.[`f([$c2]) = [$fc2],`] and.] +[.[`f([$b]) = [$fb]`].] +#] + +Which of the following is the smallest (that is, shortest length) interval on which the Intermediate Value Theorem guarantees that there is a solution to the equation [`0 = f(x)`]? + +[_]{$radio1} +END_PGML + +BEGIN_PGML_SOLUTION +Since all given values of [`f`] are [$sign_name], we cannot apply the Intermediate Value Theorem with the known information to make any conlusions about solutions to the equation [`0=f(x)`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-cubic-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-cubic-jms.pg new file mode 100644 index 0000000000..cb083c8186 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-cubic-jms.pg @@ -0,0 +1,79 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Newton's method) +## Date(28 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$a = random(1,7,2); #odd coeffient since you can factor when $a=2 +$f = Formula("x^3+x+$a")->reduce(); +$fder = Formula("3x^2 + 1")->reduce(); +$x0=-1; #start at same point for all versions + +#Newton's Method +$fx0 = Compute("$x0**3+$x0+$a"); +$fderx0 = Compute("3*($x0)**2 + 1"); +$x1 = Compute("$x0 - $fx0/$fderx0"); +$fx1 = Compute("$x1**3+$x1+$a"); +$fderx1 = Compute("3*($x1)**2 + 1"); +$x2 = Compute("$x1 - $fx1/$fderx1"); +$fx2 = Compute("$x2**3+$x2+$a"); +$fderx2 = Compute("3*($x2)**2 + 1"); +$x3 = Compute("$x2 - $fx2/$fderx2"); +$fx3 = Compute("$x3**3+$x3+$a"); +$fderx3 = Compute("3*($x3)**2 + 1"); +$x4 = Compute("$x3 - $fx3/$fderx3"); + +BEGIN_PGML +First, use the Intermediate Value Theorem to justify to yourself that there is a solution to the equation [`[$f]=0`] in the interval [`[-2,0]`]. + +Use Newton's Method to approximate the solution to the equation [`[$f]=0`] starting with an initial guess [`x_0 = [$x0]`]. + ++ [`x_1 = \, `] [_]{$x1}{5} ++ [`x_2 = \, `] [_]{$x2}{5} ++ [`x_3 = \, `] [_]{$x3}{5} ++ [`x_4 = \, `] [_]{$x4}{5} + +Enter either exact values or use at least 6 decimal places for your answers, but **do not** use rounded answers for intermediate calculations. +END_PGML + +BEGIN_PGML_SOLUTION +Recall that in Newton's Method each successive approximation is given by [``x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}``], [`n\geq 0`]. + +Here we have [`f(x) = [$f]`] and [`f'(x) = [$fder]`]. So starting with [`x_0 = [$x0]`] we get + ++ [``x_1 = x_0 - \frac{f(x_0)}{f'(x_0)} = [$x0] - \frac{[$fx0]}{[$fderx0]} = [$x1]``] ++ [``x_2 = x_1 - \frac{f(x_1)}{f'(x_1)} = [$x1] - \frac{[$fx1]}{[$fderx1]} = [$x2]``] ++ [``x_3 = x_2 - \frac{f(x_2)}{f'(x_2)} = [$x2] - \frac{[$fx2]}{[$fderx2]} = [$x3]``] + +If we do one more iteration we get that: + ++ [``x_4 = x_3 - \frac{f(x_3)}{f'(x_3)} = [$x3] - \frac{[$fx3]}{[$fderx3]} = [$x4]``] + +**Ask yourself:** How many decimal places is our approximation of the solution accurate to after four iterations of Newton's Method? +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-cubic-jmsW2026.pg b/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-cubic-jmsW2026.pg new file mode 100644 index 0000000000..b4a5633ae7 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-cubic-jmsW2026.pg @@ -0,0 +1,77 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Newton's method) +## Date(28 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$a = random(1,7,2); #odd coeffient since you can factor when $a=2 +$f = Formula("x^3+x+$a")->reduce(); +$fder = Formula("3x^2 + 1")->reduce(); +$x0=-1; #start at same point for all versions + +#Newton's Method +$fx0 = Compute("$x0**3+$x0+$a"); +$fderx0 = Compute("3*($x0)**2 + 1"); +$x1 = Compute("$x0 - $fx0/$fderx0"); +$fx1 = Compute("$x1**3+$x1+$a"); +$fderx1 = Compute("3*($x1)**2 + 1"); +$x2 = Compute("$x1 - $fx1/$fderx1"); +$fx2 = Compute("$x2**3+$x2+$a"); +$fderx2 = Compute("3*($x2)**2 + 1"); +$x3 = Compute("$x2 - $fx2/$fderx2"); +$fx3 = Compute("$x3**3+$x3+$a"); +$fderx3 = Compute("3*($x3)**2 + 1"); +$x4 = Compute("$x3 - $fx3/$fderx3"); + +BEGIN_PGML +Use Newton's Method to approximate the solution to the equation [`[$f]=0`] starting with an initial guess [`x_0 = [$x0]`]. + ++ [`x_1 = \, `] [_]{$x1}{5} ++ [`x_2 = \, `] [_]{$x2}{5} ++ [`x_3 = \, `] [_]{$x3}{5} ++ [`x_4 = \, `] [_]{$x4}{5} + +Enter either exact values or use at least 6 decimal places for your answers, but **do not** use rounded answers for intermediate calculations. +END_PGML + +BEGIN_PGML_SOLUTION +Recall that in Newton's Method each successive approximation is given by [``x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}``], [`n\geq 0`]. + +Here we have [`f(x) = [$f]`] and [`f'(x) = [$fder]`]. So starting with [`x_0 = [$x0]`] we get + ++ [``x_1 = x_0 - \frac{f(x_0)}{f'(x_0)} = [$x0] - \frac{[$fx0]}{[$fderx0]} = [$x1]``] ++ [``x_2 = x_1 - \frac{f(x_1)}{f'(x_1)} = [$x1] - \frac{[$fx1]}{[$fderx1]} = [$x2]``] ++ [``x_3 = x_2 - \frac{f(x_2)}{f'(x_2)} = [$x2] - \frac{[$fx2]}{[$fderx2]} = [$x3]``] + +If we do one more iteration we get that: + ++ [``x_4 = x_3 - \frac{f(x_3)}{f'(x_3)} = [$x3] - \frac{[$fx3]}{[$fderx3]} = [$x4]``] + +**Ask yourself:** How many decimal places is our approximation of the solution accurate to after four iterations of Newton's Method? +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-exp-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-exp-jms.pg new file mode 100644 index 0000000000..5a8f1d09b2 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-exp-jms.pg @@ -0,0 +1,76 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Mean value theorem) +## Date(28 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$a = random(2,9,1); +$b = $a+random(2,5,1); +$f = Formula("$a*x*e^x - $b")->reduce(); +$fder = Formula("$a*e^x + $a*x*e^x")->reduce(); +if(abs($a-$b)>3) +{$x0 = 1;} +else +{$x0 = 0;} +if(abs($a-$b)>4) +{$right = 2;} +else +{$right = 1;} + +#Newton's Method +$fx0 = Compute("$a*$x0*e^$x0 - $b"); +$fderx0 = Compute("$a*e^$x0 + $a*$x0*e^$x0"); +$x1 = Compute("$x0 - $fx0/$fderx0"); +$fx1 = Compute("$a*$x1*e^$x1 - $b"); +$fderx1 = Compute("$a*e^$x1 + $a*$x1*e^$x1"); +$x2 = Compute("$x1 - $fx1/$fderx1"); +$fx2 = Compute("$a*$x2*e^$x2 - $b"); +$fderx2 = Compute("$a*e^$x2 + $a*$x2*e^$x2"); +$x3 = Compute("$x2 - $fx2/$fderx2"); + +BEGIN_PGML +First, use the Intermediate Value Theorem to justify to yourself that there is a solution to the equation [`[$f]=0`] in the interval [`[0,[$right]]`]. + +Use Newton's Method to approximate the solution to the equation [`[$f]=0`] starting with an initial guess [`x_0 = [$x0]`]. + ++ [`x_1 = \, `] [_]{$x1}{5} ++ [`x_2 = \, `] [_]{$x2}{5} ++ [`x_3 = \, `] [_]{$x3}{5} + +Enter either exact values or use at least 6 decimal places for your answers, but **do not** use rounded answers for intermediate calculations. +END_PGML + +BEGIN_PGML_SOLUTION +Recall that in Newton's Method each successive approximation is given by [``x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}``], [`n\geq 0`]. + +Here we have [`f(x) = [$f]`] and [`f'(x) = [$fder]`]. So starting with [`x_0 = [$x0]`] we get ++ [``x_1 = x_0 - \frac{f(x_0)}{f'(x_0)} = [$x0] - \frac{[$fx0]}{[$fderx0]} = [$x1]``] ++ [``x_2 = x_1 - \frac{f(x_1)}{f'(x_1)} = [$x1] - \frac{[$fx1]}{[$fderx1]} = [$x2]``] ++ [``x_3 = x_2 - \frac{f(x_2)}{f'(x_2)} = [$x2] - \frac{[$fx2]}{[$fderx2]} = [$x3]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-log-jms.pg b/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-log-jms.pg new file mode 100644 index 0000000000..a5546b724d --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-log-jms.pg @@ -0,0 +1,81 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Newton's method) +## Date(28 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$a = random(2,9,1); +$f = Formula("$a*x*ln(x)-1")->reduce(); +$eq = Formula("$a*x*ln(x)")->reduce(); +$fder = Formula("$a*ln(x)+$a")->reduce(); +$x0=1; #start at same point for all versions + +#Newton's Method +$fx0 = Compute("$a*$x0*ln($x0)-1"); +$fderx0 = Compute("$a*ln($x0)+$a"); +$x1 = Compute("$x0 - $fx0/$fderx0"); +$fx1 = Compute("$a*$x1*ln($x1)-1"); +$fderx1 = Compute("$a*ln($x1)+$a"); +$x2 = Compute("$x1 - $fx1/$fderx1"); +$fx2 = Compute("$a*$x2*ln($x2)-1"); +$fderx2 = Compute("$a*ln($x2)+$a"); +$x3 = Compute("$x2 - $fx2/$fderx2"); +$fx3 = Compute("$a*$x3*ln($x3)-1"); +$fderx3 = Compute("$a*ln($x3)+$a"); +$x4 = Compute("$x3 - $fx3/$fderx3"); + +BEGIN_PGML +First, use the Intermediate Value Theorem to justify to yourself that there is a solution to the equation [`[$eq]=1`] in the interval [`[1,2]`]. + +Use Newton's Method to approximate the solution to the equation [`[$eq]=1`] starting with an initial guess [`x_0 = [$x0]`]. + ++ [`x_1 = \, `] [_]{$x1}{5} ++ [`x_2 = \, `] [_]{$x2}{5} ++ [`x_3 = \, `] [_]{$x3}{5} + +Enter either exact values or use at least 6 decimal places for your answers, but **do not** use rounded answers for intermediate calculations. +END_PGML + +BEGIN_PGML_SOLUTION +Here we want to solve [`[$eq]=1`] so we can rearrange this to [`[$f]=0`] and use the function [`f(x) = [$f]`]. + +Recall that in Newton's Method each successive approximation is given by [``x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}``], [`n\geq 0`]. + +Now [`f'(x) = [$fder]`], so starting with [`x_0 = [$x0]`] we get + ++ [``x_1 = x_0 - \frac{f(x_0)}{f'(x_0)} = [$x0] - \frac{[$fx0]}{[$fderx0]} = [$x1]``] ++ [``x_2 = x_1 - \frac{f(x_1)}{f'(x_1)} = [$x1] - \frac{[$fx1]}{[$fderx1]} = [$x2]``] ++ [``x_3 = x_2 - \frac{f(x_2)}{f'(x_2)} = [$x2] - \frac{[$fx2]}{[$fderx2]} = [$x3]``] + +If we do one more iteration we get that + ++ [``x_4 = x_3 - \frac{f(x_3)}{f'(x_3)} = [$x3] - \frac{[$fx3]}{[$fderx3]} = [$x4]``] + +so our approximation of the solution is accurate to 5 decimal places after just 4 iterations of Newton's Method! +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-log-jmsW2026.pg b/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-log-jmsW2026.pg new file mode 100644 index 0000000000..30b2e3c995 --- /dev/null +++ b/Contrib/UCalgary/249-4-0-0-I/4-4-0-Ap-C/4-4-0-Ap-C-nm-log-jmsW2026.pg @@ -0,0 +1,79 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Newton's method) +## Date(28 February 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +Context()->flags->set(tolerance => 0.00001, tolType => 'absolute'); + +$a = random(2,9,1); +$f = Formula("$a*x*ln(x)-1")->reduce(); +$eq = Formula("$a*x*ln(x)")->reduce(); +$fder = Formula("$a*ln(x)+$a")->reduce(); +$x0=1; #start at same point for all versions + +#Newton's Method +$fx0 = Compute("$a*$x0*ln($x0)-1"); +$fderx0 = Compute("$a*ln($x0)+$a"); +$x1 = Compute("$x0 - $fx0/$fderx0"); +$fx1 = Compute("$a*$x1*ln($x1)-1"); +$fderx1 = Compute("$a*ln($x1)+$a"); +$x2 = Compute("$x1 - $fx1/$fderx1"); +$fx2 = Compute("$a*$x2*ln($x2)-1"); +$fderx2 = Compute("$a*ln($x2)+$a"); +$x3 = Compute("$x2 - $fx2/$fderx2"); +$fx3 = Compute("$a*$x3*ln($x3)-1"); +$fderx3 = Compute("$a*ln($x3)+$a"); +$x4 = Compute("$x3 - $fx3/$fderx3"); + +BEGIN_PGML +Use Newton's Method to approximate the solution to the equation [`[$eq]=1`] starting with an initial guess [`x_0 = [$x0]`]. + ++ [`x_1 = \, `] [_]{$x1}{5} ++ [`x_2 = \, `] [_]{$x2}{5} ++ [`x_3 = \, `] [_]{$x3}{5} + +Enter either exact values or use at least 6 decimal places for your answers, but **do not** use rounded answers for intermediate calculations. +END_PGML + +BEGIN_PGML_SOLUTION +Here we want to solve [`[$eq]=1`] so we can rearrange this to [`[$f]=0`] and use the function [`f(x) = [$f]`]. + +Recall that in Newton's Method each successive approximation is given by [``x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}``], [`n\geq 0`]. + +Now [`f'(x) = [$fder]`], so starting with [`x_0 = [$x0]`] we get + ++ [``x_1 = x_0 - \frac{f(x_0)}{f'(x_0)} = [$x0] - \frac{[$fx0]}{[$fderx0]} = [$x1]``] ++ [``x_2 = x_1 - \frac{f(x_1)}{f'(x_1)} = [$x1] - \frac{[$fx1]}{[$fderx1]} = [$x2]``] ++ [``x_3 = x_2 - \frac{f(x_2)}{f'(x_2)} = [$x2] - \frac{[$fx2]}{[$fderx2]} = [$x3]``] + +If we do one more iteration we get that + ++ [``x_4 = x_3 - \frac{f(x_3)}{f'(x_3)} = [$x3] - \frac{[$fx3]}{[$fderx3]} = [$x4]``] + +so our approximation of the solution is accurate to 5 decimal places after just 4 iterations of Newton's Method! +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-1-1-R-C/5-1-1-R-C-defn-inf-lim-mc-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-1-1-R-C/5-1-1-R-C-defn-inf-lim-mc-jms.pg new file mode 100644 index 0000000000..8e8569e418 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-1-1-R-C/5-1-1-R-C-defn-inf-lim-mc-jms.pg @@ -0,0 +1,40 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Limits at infinity, horizontal and oblique asymptotes) +## Date(3 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = non_zero_random(-7,7,1); + +$radio1 = RadioButtons( + [ [ "if the values of \(f(x)\) can be made arbitrarily large as \(x\) is made sufficiently close to \($a\).", "if the values of \(f(x)\) are arbitrary as \(x\) gets infinitley close to \($a\).", "if \(f($a) = \dfrac{1}{0}\).", "if \(y=f(x)\) has a horizontal asymptote at \(x=$a\)."], 'None of the above.' ], + "if the values of \(f(x)\) can be made arbitrarily large as \(x\) is made sufficiently close to \($a\)." # correct answer +); + +BEGIN_PGML +Let [`f`] be a function of one real variable [`x`]. + +Which of the following statements correctly completes the definition of what it means for [``\lim_{x \to [$a]}f(x)``] to equal [`\infty`]? + +"We say that [`` \lim_{x \to [$a]}f(x)``] is equal to [`\infty`] ... + +[_]{$radio1} +END_PGML + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-1-1-R-C/5-1-1-R-C-defn-mc-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-1-1-R-C/5-1-1-R-C-defn-mc-jms.pg new file mode 100644 index 0000000000..18f5e3d064 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-1-1-R-C/5-1-1-R-C-defn-mc-jms.pg @@ -0,0 +1,41 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Limits at infinity, horizontal and oblique asymptotes) +## Date(3 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserRadioButtons.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2, 9, 1); +$b = random(15,25,1); + +$radio1 = RadioButtons( + [ [ "if the values of \(f(x)\) approach \($b\) as \(x\) approaches the number \($a\) from both the left and right.", "if and only if the values of \(f(x)\) approach \(f($a)=$b\) as \(x\) gets close to \($a\).", "if \($a\) is in the domain of the function \(f\) and \(f($a) = $b\).", "if the values of \(f(x)\) can be made arbitrarily close to \($b\) as \(x\) is made arbitrary."], 'None of the above.' ], + "if the values of \(f(x)\) approach \($b\) as \(x\) approaches the number \($a\) from both the left and right." # correct answer +); + +BEGIN_PGML +Let [`f`] be a function of one real variable [`x`]. + +Which of the following statements correctly completes the definition of what it means for [``\lim_{x \to [$a]}f(x)``] to exist and equal [`[$b]`]? + +"We say that [`` \lim_{x \to [$a]}f(x)``] exists and is equal to [`[$b]`] ... + +[_]{$radio1} +END_PGML + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-2-2-An-C/5-2-2-An-C-compute-limits-1-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-2-2-An-C/5-2-2-An-C-compute-limits-1-jms.pg new file mode 100644 index 0000000000..1df38b2d12 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-2-2-An-C/5-2-2-An-C-compute-limits-1-jms.pg @@ -0,0 +1,82 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Evaluating limits - rational expressions) +## Date(4 March 2025) +## Institution(University of Calgary) +## Author(Danny Glin, Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# first limit +$a = random(2, 6, 1); +$b = non_zero_random(-5, 5, 1); + +if ($a + $b == 0) { + $b = abs($b) + 1; +} + +$f = Formula("(x+$b)/(sqrt(x^2+1))")->reduce(); + +$aplusb = $a + $b; +$c = $a**2 + 1; + +$ans1 = Compute("($aplusb)/sqrt($c)"); + +#second limit +$sign = random(-1,1,2); +if($sign == -1) +{$side = '-';} +else +{$side = '+';} +$d = non_zero_random(-7,7,1); +$e = random(2,5,1); +$etimesd = $e*$d; +$g = Formula("|x-$d|/($e*x-$etimesd)")->reduce(); +if($sign == -1) +{$ans2 = Compute("(-1)/($e)");} +else +{$ans2 = Compute("1/($e)");} + +BEGIN_PGML +Evaluate the following limits. + + +a) [``\lim_{x\to [$a]}[$f]=\,``][_]{$ans1}{5} + +b) [``\lim_{x\to [$d]^{[$side]}}[$g]=\,``][_]{$ans2}{5} + + +If a limit does not exist and does not equal [`\pm\infty`], then enter [|DNE|]*. + +**Remark:** Note that saying that a limit is "equal to" [|Does not exist|]* or [|DNE|]* does not make sense and we would not normally do this when communicating mathematics; however, this is more convenient in WeBWork. +END_PGML + +BEGIN_PGML_SOLUTION +a) This limit can be solved by direct substitution: [``\lim_{x\to [$a]}[$f]=\frac{[$a]+[$b]}{\sqrt{([$a])^2+1}} = \frac{[$aplusb]}{\sqrt{[$c]}}``]. +b) Recall that [``|x-[$d]| = \begin{cases} x-[$d] & x \geq [$d] \\ -(x-[$d]) & x < [$d] \end{cases},``] so +[``` \lim_{x\to [$d]^{+}}[$g]= \lim_{x\to [$d]^{+}}\frac{x-[$d]}{[$e](x-[$d])} = \frac{1}{[$e]} ```] +while +[``` \lim_{x\to [$d]^{-}}[$g]= \lim_{x\to [$d]^{-}}\frac{-(x-[$d])}{[$e](x-[$d])} = -\frac{1}{[$e]}. ```] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-2-2-An-C/5-2-2-An-C-compute-limits-2-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-2-2-An-C/5-2-2-An-C-compute-limits-2-jms.pg new file mode 100644 index 0000000000..a06dfc8d89 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-2-2-An-C/5-2-2-An-C-compute-limits-2-jms.pg @@ -0,0 +1,87 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Evaluating limits - rational expressions) +## Date(4 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# first limit +$a = random(2, 6, 1); +$b = non_zero_random(-5, 5, 1); + +if ($a - $b == 0) { + $b = abs($b) + 1; +} +$twicea = 2*$a; +$asq = $a**2; +$atimesb = $a*$b; +$twiceaplusb = 2*($a + $b); +$aminusb = Compute("$a-$b"); + +$f = Formula("(x^2 -$twicea*x + $asq)/(x^2-$twiceaplusb*x +$atimesb)")->reduce(); + +$ans1 = Compute("0"); + +#second limit +$sign = random(-1,1,2); +if($sign == -1) +{$side = '-';} +else +{$side = '+';} +$d = non_zero_random(-7,7,1); +$e = random(2,5,1); +$h = random(6,9,1); +$etimesd = $e*$d; +$htimesd = $h*$d; +$g = Formula("($e*x-$etimesd)/(|$h*x-$htimesd|)")->reduce(); +$ans2 = 'DNE'; + +BEGIN_PGML +Evaluate the following limits. + + +a) [``\lim_{x\to [$a]}[$f]=\,``][_]{$ans1}{5} + +b) [``\lim_{x\to [$d]}[$g]=\,``][_]{$ans2}{5} + + +If a limit does not exist and does not equal [`\pm\infty`], then enter [|DNE|]*. + +**Remark:** Note that saying that a limit is "equal to" [|Does not exist|]* or [|DNE|]* does not make sense and we would not normally do this when communicating mathematics; however, this is more convenient in WeBWork. +END_PGML + +BEGIN_PGML_SOLUTION +a) This limit can be solved by direct substitution: [``\lim_{x\to [$a]}[$f]=\lim_{x\to [$a]}\frac{(x-[$a])^2}{(x-[$a])(x-[$b])} = \lim_{x\to [$a]}\frac{x-[$a]}{x-[$b]} = \frac{0}{[$aminusb]} = [$ans1]``]. + +b) First, recall that since [`[$h]>0`] we have that [``|[$h]x-[$htimesd]| = \begin{cases} [$h](x-[$d]) & x \geq [$d] \\ -[$h](x-[$d]) & x < [$d] \end{cases}``] + +We will consider one-sided limits +[``` \lim_{x\to [$d]^{+}}[$g]= \lim_{x\to [$d]^{+}}\frac{[$e](x-[$d])}{[$h]|x-[$d]|}= \lim_{x\to [$d]^{+}}\frac{[$e](x-[$d])}{[$h](x-[$d])} = \frac{[$e]}{[$h]} ```] +while +[``` \lim_{x\to [$d]^{-}}[$g]= \lim_{x\to [$d]^{-}}\frac{[$e](x-[$d])}{-[$h](x-[$d])} = -\frac{[$e]}{[$h]}. ```] +Therefore, since the two one-sided limits are not equal, [``\lim_{x\to [$d]}[$g]``] does not exist. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-2-2-An-C/5-2-2-An-C-compute-limits-3-inf-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-2-2-An-C/5-2-2-An-C-compute-limits-3-inf-jms.pg new file mode 100644 index 0000000000..99fe96cf23 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-2-2-An-C/5-2-2-An-C-compute-limits-3-inf-jms.pg @@ -0,0 +1,79 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Evaluating limits - rational expressions) +## Date(4 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# first limit +$a = non_zero_random(-6, 6, 1); +$aa = $a**2; +$twicea = 2*$a; + +$f = Formula("1/($aa-x^2)")->reduce(); + +if($a > 0) +{ +$ans1 = '-inf'; +$ans1_tex = '-\infty'; +$ans2 = 'inf'; +$ans2_tex = '\infty'; +} +else +{ +$ans1 = 'inf'; +$ans1_tex = '\infty'; +$ans2 = '-inf'; +$ans2_tex = '-\infty'; +} +$ans3 = Compute("DNE"); + +BEGIN_PGML +Evaluate the following limits. + + +a) [``\lim_{x\to [$a]^+}[$f]=\,``][_]{$ans1}{5} + +b) [``\lim_{x\to [$a]^-}[$f]=\,``][_]{$ans2}{5} + +c) [``\lim_{x\to [$a]}[$f]=\,``][_]{$ans3}{5} + + +If a limit does not exist and does not equal [`\pm\infty`], then enter [|DNE|]*. + +**Remark:** Note that saying that a limit is "equal to" [|Does not exist|]* or [|DNE|]* does not make sense and we would not normally do this when communicating mathematics; however, this is more convenient in WeBWork. +END_PGML + +BEGIN_PGML_SOLUTION +In this solution, we will write [`0^+`] to represent a number that is approaching [`0`] and is positive, and [`0^-`] to represent a number that is approaching [`0`] and is negative. This is nonstandard notation, so we will not write that a limit is "equal" to such an expression. + +a) [``\lim_{x\to [$a]^+}[$f] = \lim_{x\to [$a]^+}\frac{1}{([$a]-x)([$a]+x)} \approx \frac{1}{0^-([$twicea])}``] so [``\lim_{x\to [$a]^+}[$f] =[$ans1_tex]``] + +b) [``\lim_{x\to [$a]^-}[$f] = \lim_{x\to [$a]^+}\frac{1}{([$a]-x)([$a]+x)} \approx \frac{1}{0^+([$twicea])}``] so [``\lim_{x\to [$a]^-}[$f] =[$ans2_tex]``] + +c) Since the one-sided limits in part (a) and (b) are not equal, we conclude that [``\lim_{x\to [$a]}[$f]``] does not exist. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-2-3-An-C/5-2-3-An-C-pw-limit-1-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-2-3-An-C/5-2-3-An-C-pw-limit-1-jms.pg new file mode 100644 index 0000000000..7cc53d8522 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-2-3-An-C/5-2-3-An-C-pw-limit-1-jms.pg @@ -0,0 +1,107 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(One-sided limits - concept of) +## Date(4 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# interval +$a = random(-4, -1, 1); +$b = random(1,4,1); +if($a+$b == 0) +{$b = $b+1;} #keep endpoints of different in absolute value +#function coefficients +$c = non_zero_random(-6,6,1); +$d = non_zero_random(-5,5,1); +$e = non_zero_random(-5,5,1); + +#functions +$f = Formula("x^2+$c*x")->reduce(); +$g = Formula("sqrt(|x+$d|)")->reduce(); +$h = Formula("(x^2+x+$e)")->reduce(); + +#function values +$fa = Compute("($a)**2+($c)*($a)"); +$ga = Compute("sqrt(abs($a+$d))"); +$absaplusd = Compute("abs($a+$d)"); +$gb = Compute("sqrt(abs($b+$d))"); +$hb = Compute("($b)**2 + ($b) + ($e)"); + +#side +$side = random(-1,1,2); +if($side == -1) +{ +$aside = '-'; +$bside = '+'; +$ans1 = $fa; +$ans2 = $hb; +} +else +{ +$aside = '+'; +$bside = '+'; +$ans1 = $ga; +$ans2 = $hb; +} + + +BEGIN_PGML +Consider the following piecewise defined function. + +[``` f(x) = \begin{cases} [$f] & x \leq [$a] \\ + [$g] & [$a] < x \leq [$b] \\ + [$h] & x > [$b] \end{cases}```] + +Evaluate the following limits. + + +a) [``\lim_{x\to [$a]^{[$aside]}}f(x)=\,``][_]{$ans1}{5} + +b) [``\lim_{x\to [$b]^{[$bside]}}f(x)=\,``][_]{$ans2}{5} + +If a limit does not exist and does not equal [`\pm\infty`], then enter [|DNE|]*. + +**Remark:** Note that saying that a limit is "equal to" [|Does not exist|]* or [|DNE|]* does not make sense and we would not normally do this when communicating mathematics; however, this is more convenient in WeBWork. +END_PGML + +if($side == -1) +{ +BEGIN_PGML_SOLUTION + +a) When [`x\to[$a]^{[$aside]}`] we have [`x <[$a]`], so [``\lim_{x\to [$a]^{[$aside]}} f(x)= \lim_{x\to [$a]^{[$aside]}}[$f] = ([$a])^2+[$c]([$a])= [$fa]``] +b) When [`x\to[$b]^{[$bside]}`] we have [`x >[$b]`], so[``\lim_{x\to [$b]^{[$bside]}} f(x)= \lim_{x\to [$b]^{[$bside]}} [$h] = [$b]^2 + [$b] + [$e] =[$hb]``] + +END_PGML_SOLUTION +} +else{ +BEGIN_PGML_SOLUTION + +a) When [`x\to[$a]^{[$aside]}`] we have [`x >[$a]`], so [``\lim_{x\to [$a]^{[$aside]}} f(x)= \lim_{x\to [$a]^{[$aside]}}[$g] = \sqrt{|[$a]+[$d]|} = \sqrt{[$absaplusd]}``] +b) When [`x\to[$b]^{[$bside]}`] we have [`x >[$b]`], so [``\lim_{x\to [$b]^{[$bside]}} f(x)= \lim_{x\to [$b]^{[$bside]}} [$h] = [$b]^2 + [$b] + [$e] = [$hb]``] + +END_PGML_SOLUTION +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-2-3-An-C/5-2-3-An-C-pw-limit-2-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-2-3-An-C/5-2-3-An-C-pw-limit-2-jms.pg new file mode 100644 index 0000000000..2d12aa51de --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-2-3-An-C/5-2-3-An-C-pw-limit-2-jms.pg @@ -0,0 +1,108 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(One-sided limits - concept of) +## Date(4 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# interval +$a = random(-3, -2, 1); +$b = random(1, 4, 1); + +#function coefficients +$c = non_zero_random(1, 2, 1); +$d = non_zero_random(-2, -1, 1); +$e = non_zero_random(2,5,1); + +#functions +$f = Formula("x^2+$c*x-1")->reduce(); +$g = Formula("sqrt(|x+$d|)")->reduce(); +$h = Formula("(ln(x)+$e)")->reduce(); + +#function values +$fa = Compute("($a)**2+($c)*($a)-1"); +$ga = Compute("sqrt(abs($a+$d))"); +$absaplusd = Compute("abs($a+$d)"); +$gb = Compute("sqrt(abs($b+$d))"); +$hb = Compute("ln($b) + ($e)"); + +#two sided +if($fa == $ga) +{ +$ans3 = $fa; +} +else +{ +$ans3 = 'DNE'; +} + + +BEGIN_PGML +Consider the following piecewise defined function. + +[``` f(x) = \begin{cases} [$f] & x < [$a] \\ + [$g] & [$a] \leq x < [$b] \\ + [$h] & x \geq [$b] \end{cases}```] + +Evaluate the following limits. + + +a) [``\lim_{x\to [$a]^{+}}f(x)=\,``][_]{$ga}{5} + +b) [``\lim_{x\to [$a]^{-}}f(x)=\,``][_]{$fa}{5} + +c) [``\lim_{x\to [$a]}f(x)=\,``][_]{$ans3}{5} + +If a limit does not exist and does not equal [`\pm\infty`], then enter [|DNE|]*. + +**Remark:** Note that saying that a limit is "equal to" [|Does not exist|]* or [|DNE|]* does not make sense and we would not normally do this when communicating mathematics; however, this is more convenient in WeBWork. +END_PGML + +if($fa == $ga) +{ +BEGIN_PGML_SOLUTION + +a) When [`x\to[$a]^{+}`] we have [`x >[$a]`], so [``\lim_{x\to [$a]^{+}} f(x)= \lim_{x\to [$a]^{+}}[$g] = \sqrt{|[$a]+[$d]|} = \sqrt{[$absaplusd]}``] + +b) When [`x\to[$a]^{-}`] we have [`x <[$a]`], so [``\lim_{x\to [$a]^{-}} f(x)= \lim_{x\to [$a]^{-}}[$f] = ([$a])^2+[$c]([$a])-1= [$fa]``] + +c) Since the two one-sided limits are equal, we conclude that [``\lim_{x\to[$a]}f(x) = [$fa]``] +END_PGML_SOLUTION +} +else +{ +BEGIN_PGML_SOLUTION + +a) When [`x\to[$a]^{+}`] we have [`x >[$a]`], so [``\lim_{x\to [$a]^{+}} f(x)= \lim_{x\to [$a]^{+}}[$g] = \sqrt{|[$a]+[$d]|} = \sqrt{[$absaplusd]}``] + +b) When [`x\to[$a]^{-}`] we have [`x <[$a]`], so [``\lim_{x\to [$a]^{-}} f(x)= \lim_{x\to [$a]^{-}}[$f] = ([$a])^2+[$c]([$a])-1= [$fa]``] + + +c) Since the two one-sided limits are not equal, [``\lim_{x\to[$a]}f(x)``] does not exist. + +END_PGML_SOLUTION +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-2-3-An-C/5-2-3-An-C-pw-limit-3-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-2-3-An-C/5-2-3-An-C-pw-limit-3-jms.pg new file mode 100644 index 0000000000..b074a536bd --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-2-3-An-C/5-2-3-An-C-pw-limit-3-jms.pg @@ -0,0 +1,132 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(One-sided limits - concept of) +## Date(4 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# interval +$left = random(-3,-1,1); #not important +$a = random(1, 3, 1); #first limit exists only when a=1; so 33% of cases +$b = random(4, 6, 1); + +#function coefficients +$c = $b+$a; +$d = $a*$b-random(1,3,2); #second limit exists when d=1; so 50% of cases +$twicea = 2*$a; + +#functions +$f = Formula("x+$a")->reduce(); +$g = Formula("x^2 + $twicea*x-1")->reduce(); +$h = Formula("$c*x+$d")->reduce(); + +#function values +$fa = Compute("($a)+$a"); +$ga = Compute("($a)**2+$twicea*($a)-1"); +$gb = Compute("($b)**2+$twicea*($b)-1"); +$hb = Compute("$c*($b)+$d"); + +if($fa == $ga && $gb == $hb) +{ +$ans1 = $fa; +$ans2 = $gb; +} +elsif($fa == $ga) +{ +$ans1 = $fa; +$ans2 = 'DNE'; +} +elsif($gb == $hb) +{ +$ans1 = 'DNE'; +$ans2 = $gb; +} +else +{ +$ans1 = 'DNE'; +$ans2 = 'DNE'; +} + +BEGIN_PGML +Consider the following piecewise defined function. + +[``` f(x) = \begin{cases} [$f] & [$left] < x \leq [$a] \\ + [$g] & [$a] < x < [$b] \\ + [$h] & x \geq [$b] \end{cases}```] + +Evaluate the following limits. + + +a) [``\lim_{x\to [$a]}f(x)=\,``][_]{$ans1}{5} + +b) [``\lim_{x\to [$b]}f(x)=\,``][_]{$ans2}{5} + +If a limit does not exist and does not equal [`\pm\infty`], then enter [|DNE|]*. + +**Remark:** Note that saying that a limit is "equal to" [|Does not exist|]* or [|DNE|]* does not make sense and we would not normally do this when communicating mathematics; however, this is more convenient in WeBWork. +END_PGML + +if($fa == $ga && $gb == $hb) +{ +BEGIN_PGML_SOLUTION + +a) [``\lim_{x\to [$a]^-} f(x) = \lim_{x\to [$a]^-}[$f] = [$a]+[$a] = [$fa] ``] and [``\lim_{x\to [$a]^+} f(x) = \lim_{x\to [$a]^-}[$g] = ([$a])^2+[$twicea]([$a])-1 = [$ga] ``] so [``\lim_{x\to [$a]}f(x) = [$ans1]``]. + +b) [``\lim_{x\to [$b]^-} f(x) = \lim_{x\to [$b]^-}[$g] = ([$b])^2+[$twicea]([$b])-1 =[$gb] ``] and [``\lim_{x\to [$b]^+} f(x) = \lim_{x\to [$b]^+}[$h] = [$c]([$b])+[$d]=[$hb] ``] so [``\lim_{x\to [$b]}f(x) = [$ans2]``]. + +END_PGML_SOLUTION +} +elsif($fa == $ga) +{ +BEGIN_PGML_SOLUTION + +a) [``\lim_{x\to [$a]^-} f(x) = \lim_{x\to [$a]^-}[$f] = [$a]+[$a] = [$fa] ``] and [``\lim_{x\to [$a]^+} f(x) = \lim_{x\to [$a]^-}[$g] = ([$a])^2+[$twicea]([$a])-1 = [$ga] ``] so [``\lim_{x\to [$a]}f(x) = [$ans1]``]. + +b) [``\lim_{x\to [$b]^-} f(x) = \lim_{x\to [$b]^-}[$g] = ([$b])^2+[$twicea]([$b])-1 =[$gb] ``] and [``\lim_{x\to [$b]^+} f(x) = \lim_{x\to [$b]^+}[$h] = [$c]([$b])+[$d]=[$hb] ``] so [``\lim_{x\to [$b]}f(x) ``] does not exist. + +END_PGML_SOLUTION +} +elsif($gb == $hb) +{ +BEGIN_PGML_SOLUTION + +a) [``\lim_{x\to [$a]^-} f(x) = \lim_{x\to [$a]^-}[$f]= [$a]+[$a] = [$fa] ``] and [``\lim_{x\to [$a]^+} f(x) = \lim_{x\to [$a]^-}[$g] = ([$a])^2+[$twicea]([$a])-1 =[$ga] ``] so [``\lim_{x\to [$a]}f(x) ``] does not exist. + +b) [``\lim_{x\to [$b]^-} f(x) = \lim_{x\to [$b]^-}[$g] = ([$b])^2+[$twicea]([$b])-1 =[$gb] ``] and [``\lim_{x\to [$b]^+} f(x) = \lim_{x\to [$b]^+}[$h] = [$c]([$b])+[$d]=[$hb] ``] so [``\lim_{x\to [$b]}f(x) = [$ans2]``]. + +END_PGML_SOLUTION +} +else +{ +BEGIN_PGML_SOLUTION + +a) [``\lim_{x\to [$a]^-} f(x) = \lim_{x\to [$a]^-}[$f]= [$a]+[$a] = [$fa] ``] and [``\lim_{x\to [$a]^+} f(x) = \lim_{x\to [$a]^-}[$g] = ([$a])^2+[$twicea]([$a])-1 =[$ga] ``] so [``\lim_{x\to [$a]}f(x) ``] does not exist. + +b) [``\lim_{x\to [$b]^-} f(x) = \lim_{x\to [$b]^-}[$g] = ([$b])^2+[$twicea]([$b])-1 =[$gb] ``] and [``\lim_{x\to [$b]^+} f(x) = \lim_{x\to [$b]^+}[$h] = [$c]([$b])+[$d]=[$hb] ``] so [``\lim_{x\to [$b]}f(x) ``] does not exist. + +END_PGML_SOLUTION +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-3-2-Ap-C/5-3-2-Ap-C-compute-lhop-1-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-3-2-Ap-C/5-3-2-Ap-C-compute-lhop-1-jms.pg new file mode 100644 index 0000000000..1c300ef03b --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-3-2-Ap-C/5-3-2-Ap-C-compute-lhop-1-jms.pg @@ -0,0 +1,73 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Evaluating limits - trigonometric) +## Date(5 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# first limit +$a = random(2,7,1); +$b = non_zero_random(-6,6,1); +if($a+$b == 0) +{$b = -abs($b)-1;} +$f = Formula("(sin($a*x))/(sin($b*x))")->reduce(); +$flhop = Formula("($a*cos($a*x))/($b*cos($b*x))")->reduce(); + +$ans1 = Compute("($a*cos($a*pi))/($b*cos($b*pi))"); + +#second limit +$c = random(2,9,1); +$d = random(2,9,1); +$e = non_zero_random(-6,6,1); +$g = Formula("(ln($c x))/(x^2 +$d*x +$e)")->reduce(); +$glhop = Formula("($c/ ($c x))/(2*x + $d)")->reduce(); + +$ans2 = 0; + +BEGIN_PGML +Evaluate the following limits. + + +a) [``\lim_{x\to \pi}[$f]=\,``][_]{$ans1}{5} + +b) [``\lim_{x\to \infty}[$g]=\,``][_]{$ans2}{5} + + +If a limit does not exist and does not equal [`\pm\infty`], then enter [|DNE|]*. + +**Remark:** Note that saying that a limit is "equal to" [|Does not exist|]* or [|DNE|]* does not make sense and we would not normally do this when communicating mathematics; however, this is more convenient in WeBWork. +END_PGML + +BEGIN_PGML_SOLUTION +a) As [`x`] approaches [`\pi`], [`\sin([$a]x)`] and [`\sin([$b]x)`] both approach [`0`] so we can use L'Hôpital's Rule +[```\lim_{x\to \pi}[$f]=\lim_{x\to \pi}[$flhop] = \frac{[$a]\cos([$a]\pi)}{[$b]\cos([$b]\pi)} = [$ans1].```] + +Remember to enter an exact value and not a decimal approximation of your answer! + +b) As [`x`] approaches [`\infty`], [`\ln([$c]x)`] and [`x^2 +[$d]*x +[$e]`] both approach [`\infty`] so we can use L'Hôpital's Rule [```\lim_{x\to \infty}[$g] = \lim_{x\to \infty}[$glhop] = \lim_{x\to \infty} \frac{1}{2x^2+[$d]x}= 0 ```] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-3-2-Ap-C/5-3-2-Ap-C-compute-lhop-2-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-3-2-Ap-C/5-3-2-Ap-C-compute-lhop-2-jms.pg new file mode 100644 index 0000000000..85ce683ba6 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-3-2-Ap-C/5-3-2-Ap-C-compute-lhop-2-jms.pg @@ -0,0 +1,71 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Evaluating limits - trigonometric) +## Date(5 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# first limit +$a = random(2,7,1); +$b = non_zero_random(-6,6,1); +if($a+$b == 0) +{$b = -abs($b)-1;} +$f = Formula("(ln(1+$a*x))/($b*x)")->reduce(); +$flhop = Formula("($a/(1+$a*x))/($b)")->reduce(); +$ans1 = Compute("($a)/($b)"); + +#second limit +$c = random(5,9,2); +$d = $c - random(2,4,2); +$twiced = 2*$d; +$g = Formula("($c*e^x-$c*x-$c)/($d*x^2)")->reduce(); +$glhop1 = Formula("($c*e^x-$c)/($twiced*x)")->reduce(); +$glhop2 = Formula("($c*e^x)/($twiced)")->reduce(); +$ans2 = Compute("$c/$twiced"); + +BEGIN_PGML +Evaluate the following limits. + + +a) [``\lim_{x\to 0}[$f]=\,``][_]{$ans1}{5} + +b) [``\lim_{x\to 0^+}[$g]=\,``][_]{$ans2}{5} + + +If a limit does not exist and does not equal [`\pm\infty`], then enter [|DNE|]*. + +**Remark:** Note that saying that a limit is "equal to" [|Does not exist|]* or [|DNE|]* does not make sense and we would not normally do this when communicating mathematics; however, this is more convenient in WeBWork. +END_PGML + +BEGIN_PGML_SOLUTION +a) As [`x`] approaches [`0`], [`\ln(1+[$a]x)`] and [`[$b]x`] both approach [`0`] so we can use L'Hôpital's Rule +[```\lim_{x\to 0}[$f]=\lim_{x\to 0}[$flhop] = \frac{[$a]}{[$b]}.```] + +b) As [`x`] approaches [`0`] from the right, [`[$c]e^x-[$c]x-[$c]`] and [`[$d]x^2`] both approach [`0`] so we can use L'Hôpital's Rule [```\lim_{x\to 0^+}[$g] = \lim_{x\to 0^+}[$glhop1]. ```] +Again, as [`x`] approaches [`0`] from the right, [`[$c]e^x-[$c]`] and [`[$twiced]x`] both approach [`0`] so we can use L'Hôpital's Rule again [```\lim_{x\to 0^+}[$g] = \lim_{x\to 0^+}[$glhop1] = \lim_{x\to 0^+}[$glhop2] = \frac{[$c]}{[$twiced]}. ```] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-3-2-Ap-C/5-3-2-Ap-C-compute-lhop-2-jmsNOCHAIN.pg b/Contrib/UCalgary/249-5-0-0-C/5-3-2-Ap-C/5-3-2-Ap-C-compute-lhop-2-jmsNOCHAIN.pg new file mode 100644 index 0000000000..90af985e98 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-3-2-Ap-C/5-3-2-Ap-C-compute-lhop-2-jmsNOCHAIN.pg @@ -0,0 +1,67 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Evaluating limits - trigonometric) +## Date(5 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +#NOTE: This has been edited to include only the limit that doesn't require use of the Chain Rule, as we have not covered that yet. + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# first limit +#$a = random(2,7,1); +#$b = non_zero_random(-6,6,1); +#if($a+$b == 0) +#{$b = -abs($b)-1;} +#$f = Formula("(ln(1+$a*x))/($b*x)")->reduce(); +#$flhop = Formula("($a/(1+$a*x))/($b)")->reduce(); +#$ans1 = Compute("($a)/($b)"); + +#second limit +$c = random(5,9,2); +$d = $c - random(2,4,2); +$twiced = 2*$d; +$g = Formula("($c*e^x-$c*x-$c)/($d*x^2)")->reduce(); +$glhop1 = Formula("($c*e^x-$c)/($twiced*x)")->reduce(); +$glhop2 = Formula("($c*e^x)/($twiced)")->reduce(); +$ans2 = Compute("$c/$twiced"); + +BEGIN_PGML +Evaluate the following limit. + +[``\lim_{x\to 0^+}[$g]=\,``][_]{$ans2}{5} + + +If a limit does not exist and does not equal [`\pm\infty`], then enter [|DNE|]*. + +**Remark:** Note that saying that a limit is "equal to" [|Does not exist|]* or [|DNE|]* does not make sense and we would not normally do this when communicating mathematics; however, this is more convenient in WeBWork. +END_PGML + +BEGIN_PGML_SOLUTION +As [`x`] approaches [`0`] from the right, [`[$c]e^x-[$c]x-[$c]`] and [`[$d]x^2`] both approach [`0`] so we can use L'Hôpital's Rule [```\lim_{x\to 0^+}[$g] = \lim_{x\to 0^+}[$glhop1]. ```] +Again, as [`x`] approaches [`0`] from the right, [`[$c]e^x-[$c]`] and [`[$twiced]x`] both approach [`0`] so we can use L'Hôpital's Rule again [```\lim_{x\to 0^+}[$g] = \lim_{x\to 0^+}[$glhop1] = \lim_{x\to 0^+}[$glhop2] = \frac{[$c]}{[$twiced]}. ```] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-3-2-Ap-C/5-3-2-Ap-C-compute-lhop-3-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-3-2-Ap-C/5-3-2-Ap-C-compute-lhop-3-jms.pg new file mode 100644 index 0000000000..e515c284b9 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-3-2-Ap-C/5-3-2-Ap-C-compute-lhop-3-jms.pg @@ -0,0 +1,67 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Evaluating limits - trigonometric) +## Date(6 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = non_zero_random(2,7,1)*random(-1,1,2); +$b = non_zero_random(2,8,2); +$c = non_zero_random(-9,9,1); +$d = random(3,7,2); +$f = Formula("(sqrt($d*x^2+$a*x))/($b*x+$c)")->reduce(); +$ans1 = Compute("sqrt($d)/($b)"); +$ans2 = Compute("-sqrt($d)/($b)"); +BEGIN_PGML + +Evaluate the following limits. + + +a) [``\lim_{x\to \infty}[$f]=\,``][_]{$ans1}{5} + +b) [``\lim_{x\to -\infty}[$f]=\,``][_]{$ans2}{5} + + +If a limit does not exist and does not equal [`\pm\infty`], then enter [|DNE|]*. + +**Remark:** Note that saying that a limit is "equal to" [|Does not exist|]* or [|DNE|]* does not make sense and we would not normally do this when communicating mathematics; however, this is more convenient in WeBWork. +END_PGML + +BEGIN_PGML_SOLUTION +**Remark:** These limits are both Type [`\dfrac{\infty}{\infty}`] so you can use L'Hôpital's Rule; however, it may not be the best approach to solving this problem (try it and see what happens!). + +a) We will factor out the largest power of [`x`] from the numerator and denominator +[```\lim_{x\to \infty}[$f]= \lim_{x\to \infty} \frac{\sqrt{x^2\left([$d]+\dfrac{[$a]}{x}\right)}}{x\left([$b]+\dfrac{[$c]}{x}\right)} = \lim_{x\to \infty} \frac{\sqrt{x^2}\sqrt{[$d]+\dfrac{[$a]}{x}}}{x\left([$b]+\dfrac{[$c]}{x}\right)}```] +Now, recall that [``\sqrt{x^2} = |x| = \begin{cases} x & x \geq 0 \\ -x & x < 0 \end{cases}``] and since [`x\to \infty`], [`x>0`] and we have +[```\lim_{x\to \infty}[$f] = \lim_{x\to \infty} \frac{x \sqrt{[$d]+\dfrac{[$a]}{x}}}{x\left([$b]+\dfrac{[$c]}{x}\right)} = \lim_{x\to \infty} \frac{\sqrt{[$d]+\dfrac{[$a]}{x}}}{[$b]+\dfrac{[$c]}{x}} = \frac{\sqrt{[$d]+0}}{[$b]+0}=\frac{\sqrt{[$d]}}{[$b]}```] + +b) The first part of this computation is the same as above +[```\lim_{x\to \infty}[$f]= \lim_{x\to \infty} \frac{\sqrt{x^2\left([$d]+\dfrac{[$a]}{x}\right)}}{x\left([$b]+\dfrac{[$c]}{x}\right)} = \lim_{x\to \infty} \frac{\sqrt{x^2}\sqrt{[$d]+\dfrac{[$a]}{x}}}{x\left([$b]+\dfrac{[$c]}{x}\right)}```] +Now, recall that [``\sqrt{x^2} = |x| = \begin{cases} x & x \geq 0 \\ -x & x < 0 \end{cases}``] and since [`x\to -\infty`], [`x<0`] and we have +[```\lim_{x\to \infty}[$f] = \lim_{x\to \infty} \frac{(-x) \sqrt{[$d]+\dfrac{[$a]}{x}}}{x\left([$b]+\dfrac{[$c]}{x}\right)} = \lim_{x\to \infty} \frac{-\sqrt{[$d]+\dfrac{[$a]}{x}}}{[$b]+\dfrac{[$c]}{x}} = \frac{-\sqrt{[$d]+0}}{[$b]+0}=\frac{-\sqrt{[$d]}}{[$b]}```] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-4-1-U-C/5-4-1-U-C-asymp-dd-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-4-1-U-C/5-4-1-U-C-asymp-dd-jms.pg new file mode 100644 index 0000000000..9a84f2d371 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-4-1-U-C/5-4-1-U-C-asymp-dd-jms.pg @@ -0,0 +1,97 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Infinite limits and vertical asymptotes) +## Date(6 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# vertical asymptote +$a = non_zero_random(-8,8,1); +$sign = random(-1,1,2); +if($sign == - 1) +{$La = '-\infty';} +else +{$La = '\infty';} +if($sign == - 1) +{$side = '+';} +else +{$side = '-';} + +$type1 = DropDown( + [ + 'a horizontal asymptote', + 'a vertical asymptote' + ], + 'a vertical asymptote' +); + +$eq1 = DropDown( + [ + 'x', + 'y' + ], + 'x' +); + +# horizontal asymptote +$Lb = non_zero_random(-8,8,1); +$sign2 = random(-1,1,2); +if($sign2 == - 1) +{$b = '-\infty';} +else +{$b = '\infty';} + + +$type2 = DropDown( + [ + 'a horizontal asymptote', + 'a vertical asymptote' + ], + 'a horizontal asymptote' +); + +$eq2 = DropDown( + [ + 'x', + 'y' + ], + 'y' +); + +# randomize the order in which the questions appear +$ver = random(0,1,1); +if($ver == 0) +{ +BEGIN_PGML +Let [`f`] be a function of one real variable [`x`]. + ++ If [``\lim_{x \to [$a]^{[$side]}} f(x)= [$La]``], then the graph [`y=f(x)`] has [_]{$type1} with equation [_]{$eq1}[`=`][_]{$a}{2}. + ++ If [``\lim_{x\to [$b]} f(x) = [$Lb]``], then the graph [`y=f(x)`] has [_]{$type2} with equation [_]{$eq2}[`=`][_]{$Lb}{2}. +END_PGML +} +else +{ +BEGIN_PGML +Let [`f`] be a function of one real variable [`x`]. + ++ If [``\lim_{x\to [$b]} f(x) = [$Lb]``], then the graph [`y=f(x)`] has [_]{$type2} with equation [_]{$eq2}[`=`][_]{$Lb}{2}. + ++ If [``\lim_{x \to [$a]^{[$side]}} f(x)= [$La]``], then the graph [`y=f(x)`] has [_]{$type1} with equation [_]{$eq1}[`=`][_]{$a}{2}. +END_PGML +} +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-4-1-U-C/5-4-1-U-C-asymp-num-dd-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-4-1-U-C/5-4-1-U-C-asymp-num-dd-jms.pg new file mode 100644 index 0000000000..cb08063982 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-4-1-U-C/5-4-1-U-C-asymp-num-dd-jms.pg @@ -0,0 +1,98 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Limits at infinity, horizontal and oblique asymptotes) +## Date(6 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# function +$a = random(2,8,1); +$b = random(2,9,1); +$pow = random(1,3,2); +$f = Formula("$b/($a-x)^($pow)")->reduce(); + +# vertical asymptote +$sign = random(-1,1,2); +if($sign == - 1) +{$La = -inf; +$La_tex = '-\infty'; +$side = '+'; +$ineq = '>';} +else +{$La = inf; +$La_tex = '\infty'; +$side = '-'; +$ineq = '<';} + +$type1 = DropDown( + [ + 'a horizontal asymptote', + 'a vertical asymptote' + ], + 'a vertical asymptote' +); + +$eq1 = DropDown( + [ + 'x', + 'y' + ], + 'x' +); + +# horizontal asymptote +$sign2 = random(-1,1,2); +if($sign2 == - 1) +{$b = '-\infty';} +else +{$b = '\infty';} +$Lb = 0; + +$type2 = DropDown( + [ + 'a horizontal asymptote', + 'a vertical asymptote' + ], + 'a horizontal asymptote' +); + +$eq2 = DropDown( + [ + 'x', + 'y' + ], + 'y' +); + + +BEGIN_PGML +Let [``f(x) = [$f]``]. + +Evaluate the following limits and complete each statement. + ++ Since [``\lim_{x \to [$a]^{[$side]}} f(x) = \,``] [_]{$La}{2}, the graph [`y=f(x)`] has [_]{$type1} with equation [_]{$eq1}[`=`][_]{$a}{2}. + ++ Since [``\lim_{x\to [$b]} f(x) = \,``] [_]{$Lb}{2}, the graph [`y=f(x)`] has [_]{$type2} with equation [_]{$eq2}[`=`][_]{$Lb}{2}. +END_PGML + +BEGIN_PGML_SOLUTION ++ As [`x\to [$a]^{[$side]}`] we have [`x [$ineq] [$a]`], so [`0 [$ineq] [$a]-x`] and [`[$a]-x`] approaches [`0`]. Therefore, [``\lim_{x \to [$a]^{[$side]}} f(x) = \lim_{x \to [$a]^{[$side]}} [$f] = [$La_tex],``] and [`y=f(x)`] has a vertical asmyptote with equation [`x=[$a]`]. + ++ [``\lim_{x\to [$b]} f(x) = \lim_{x\to [$b]} [$f] = [$Lb]``], so [`y=f(x)`] has a horizontal asmyptote with equation [`y=[$Lb]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-4-2-Ap-C/5-4-2-Ap-C-asymp-horiz-2-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-4-2-Ap-C/5-4-2-Ap-C-asymp-horiz-2-jms.pg new file mode 100644 index 0000000000..ef0c6425df --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-4-2-Ap-C/5-4-2-Ap-C-asymp-horiz-2-jms.pg @@ -0,0 +1,43 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Limits at infinity, horizontal and oblique asymptotes) +## Date(6 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# function +$a = non_zero_random(100,2000,10); +$b = non_zero_random(-9,-1,1)/100; +$c = non_zero_random(-9,9,1); +$f = Formula("($a)/(1+$c*e^($b*x))")->reduce(); +$L = Compute("$a"); + +BEGIN_PGML +Let [``f(x) = [$f]``]. + +Complete the following statement about the **horizontal asymptote(s)** of [`f`]. + +Since the limit of [`` \lim_{x\to \infty} f(x) = \,``][_]{$L}{2}, the function [`f`] has a horizontal asymptote with equation [`y = \,`] [_]{$L}{2}. + +END_PGML + +BEGIN_PGML_SOLUTION +First, notice that since the argument of the exponential function is negative [``\lim_{x\to \infty} e^{[$b]x} = \lim_{x\to \infty} \frac{1}{e^{-[$b]x}} = 0``], therefore +[``` \lim_{x\to \infty} f(x) = \lim_{x\to \infty} [$f] = \frac{[$a]}{1+0} = [$a], ```] and [`f`] has a horizontal asymptote with equation [``y = [$a]``]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-4-2-Ap-C/5-4-2-Ap-C-asymp-horiz-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-4-2-Ap-C/5-4-2-Ap-C-asymp-horiz-jms.pg new file mode 100644 index 0000000000..e937f28b24 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-4-2-Ap-C/5-4-2-Ap-C-asymp-horiz-jms.pg @@ -0,0 +1,55 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Limits at infinity, horizontal and oblique asymptotes) +## Date(6 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# function +$a = non_zero_random(-9,9,1); +$b = non_zero_random(-9,9,1); +$c = non_zero_random(-9,9,1); +$ad = non_zero_random(-9,9,1); +$bd = non_zero_random(-9,9,1); +$cd = non_zero_random(-9,9,1); +$pow = random(2,3,1); +$powm1 = $pow-1; +$sign = random(-1,1,2); +if($sign == -1) +{$sym = '-';} +else +{$sym = '+';} +$f = Formula("($c + $b*x + $a*x^($pow))/($cd + $bd*x + $ad*x^($pow))")->reduce(); +$f_fact = Formula("($c/(x^($pow)) + $b/(x^($powm1)) + $a)/($cd/(x^($pow)) + $bd/(x^($powm1)) + $ad)")->reduce(); +$L = Compute("$a/$ad"); + +BEGIN_PGML +Let [``f(x) = [$f]``]. + +Complete the following statement about the **horizontal asymptote(s)** of [`f`]. + +Since the limit of [`f`] as [`x`] approaches [`[$sym]\infty`] is equal to [_]{$L}{2}, [`f`] has a horizontal asymptote with equation [`y = \,`] [_]{$L}{2}. + +END_PGML + +BEGIN_PGML_SOLUTION +[``` \lim_{x\to [$sym]\infty} f(x) = \lim_{x\to [$sym]\infty} [$f] = \lim_{x\to [$sym]\infty} \frac{x^{[$pow]}}{x^{[$pow]}} \left([$f_fact]\right) ```] +[``` = \lim_{x\to [$sym]\infty} [$f_fact] = \frac{0 + 0 + [$a]}{0 + 0 + [$ad]} = \frac{[$a]}{[$ad]}, ```] +so [`f`] has a horizontal asymptote with equation [``y = \frac{[$a]}{[$ad]}``]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-4-2-Ap-C/5-4-2-Ap-C-asymp-vert-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-4-2-Ap-C/5-4-2-Ap-C-asymp-vert-jms.pg new file mode 100644 index 0000000000..b783991798 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-4-2-Ap-C/5-4-2-Ap-C-asymp-vert-jms.pg @@ -0,0 +1,72 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Infinite limits and vertical asymptotes) +## Date(6 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# function +$a = non_zero_random(-5,5,1); #location of asymptote +$b = random(2,9,1); #positive coefficient +$c = non_zero_random(-5,5,1); #location of removable +if($a-$c==0) +{$a = $a + 1;} #avoid a = c +$pow = random(1,3,2); #odd power +$pow2 = random(2,3,1); +$f = Formula("($b(x-$c)^($pow2))/((x-$a)^($pow)*(x-$c)^($pow2))")->reduce(); + +# vertical asymptote +$sign = random(-1,1,2); +if($sign == - 1) +{$La = -inf; +$La_tex = '-\infty'; +$side = 'left'; +$side_sym = '-'; +$ineq = '<'; +} +else +{$La = inf; +$La_tex = '\infty'; +$side = 'right'; +$side_sym = '+'; +$ineq = '>';} + +# removable discontinuity +$Lc = Compute("$b/($c-$a)^($pow)"); + +BEGIN_PGML +Let [``f(x) = [$f]``]. + +Complete the following statements related to the **vertical asymptote(s)** of [`f`]. + ++ [`f`] has a vertical asymptote at [`x = \, `] [_]{$a}{2}, because the limit of [`f`] as [`x`] approaches [_]{$a}{2} from the **[$side] **does not exist and is equal to [_]{$La}{2}. + ++ [`f`] is undefined but **does not** have a vertical asymptote at [`x = \, `] [_]{$c}{2}, because the limit of [`f`] as [`x`] approaches [_]{$c}{2} exists and is equal to [_]{$Lc}{2}. + +END_PGML + +$cminusa = $c - $a; +$cminusapow = $cminusa**$pow; + +BEGIN_PGML_SOLUTION ++ [`` \lim_{x\to [$a]^[$side_sym]} f(x) = \lim_{x\to [$a]^{[$side_sym]}} [$f] = \lim_{x\to [$a]^{[$side_sym]}} \frac{[$b]}{(x-[$a])^{[$pow]}} = [$La_tex],``] so [`f`] has a vertical asymptote at [`x=5`] + ++ [`f`] is undefined at [`x=[$c]`]; however [`f`] does not have a vertical asymptote at [`x=[$c]`] because [`` \lim_{x\to [$c]} f(x) = \lim_{x\to [$c]} [$f] = \lim_{x\to [$c]} \frac{[$b]}{(x-[$a])^{[$pow]}} = \frac{[$b]}{([$c]-[$a])^{[$pow]}} = \frac{[$b]}{([$cminusa])^{[$pow]}} = \frac{[$b]}{[$cminusapow]}.``] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-4-5-U-C/5-4-5-U-C-t-f-asmp-1-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-4-5-U-C/5-4-5-U-C-t-f-asmp-1-jms.pg new file mode 100644 index 0000000000..f0e4a650eb --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-4-5-U-C/5-4-5-U-C-t-f-asmp-1-jms.pg @@ -0,0 +1,76 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Squeeze theorem) +## Date(7 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +$a = random(2,3,1)*random(-1,1,2); +if ($a < 0) +{$c = $a-1; +$low = Formula("($c-$a*x)/(x)")->reduce(); +$high = Formula("(-$c-$a*x)/(x)")->reduce(); +} +else +{$c = $a+1; +$low = Formula("(-$c-$a*x)/(x)")->reduce(); +$high = Formula("($c-$a*x)/(x)")->reduce(); +} +$f = Formula("($c*sin(2*x)-$a*x)/(x)")->reduce(); +$line = Formula("-$a")->reduce(); + + +$popup1 = DropDown( + [ + 'True', + 'False' + ], + 'True' +); + +$popup2 = DropDown( + [ + 'True', + 'False' + ], + 'True' +); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-1,0) -- (15,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-5) -- (0,5) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-1,-5) grid (15,5); +\foreach \x in {2,4,...,12} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-4,-2,2,4} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth,samples =250] plot[domain={-1}:{15}] (\x,{($c*sin(2*\x r))/(\x)-$a}) node[right] {\(y=f(x)\)}; +\draw[dashed ,blue, very thick] plot[domain={1}:{15}] (\x,{-$a}); +END_TIKZ + +# +BEGIN_PGML +Consider the following sketch of the graph of the function [``f(x) = [$f]``] (solid, red) and the line [``y=[$line]``] (blue, dashed). + +[@ image($graph_image, width => 700, tex_size => 800) @]* + +Determine if the following statements are **true** or **false**. + +[_]{$popup1} For [`x>0`], we have [``[$low] \leq [$f] \leq [$high]``] and we can use the Squeeze Theorem to show that [``\lim_{x\to \infty} f(x) =[$line]``] + +[_]{$popup2} The line [``y=[$line]``] is a horizontal asymptote of the function [``y=[$f]``]. + +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-4-5-U-C/5-4-5-U-C-t-f-asmp-2-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-4-5-U-C/5-4-5-U-C-t-f-asmp-2-jms.pg new file mode 100644 index 0000000000..a9aa9b3d5f --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-4-5-U-C/5-4-5-U-C-t-f-asmp-2-jms.pg @@ -0,0 +1,75 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Squeeze theorem) +## Date(7 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +$a = random(1,2,1)*random(-1,1,2); +if ($a < 0) +{$c = -3; +$low = Formula("($c-$a*x)/(x)")->reduce(); +$high = Formula("(-$c-$a*x)/(x)")->reduce(); +} +else +{$c = 3; +$low = Formula("(-$c-$a*x)/(x)")->reduce(); +$high = Formula("($c-$a*x)/(x)")->reduce(); +} +$f = Formula("($c*cos(2*x)-$a*x)/(x)")->reduce(); +$line = Formula("-$a")->reduce(); + +$popup1 = DropDown( + [ + 'True', + 'False' + ], + 'True' +); + +$popup2 = DropDown( + [ + 'True', + 'False' + ], + 'True' +); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-1,0) -- (15,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-5) -- (0,5) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-1,-5) grid (15,5); +\foreach \x in {2,4,...,12} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-4,-2,2,4} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth,samples =250] plot[domain={.5}:{15}] (\x,{($c*cos(pi*\x r))/(\x)-$a}) node[right] {\(y=f(x)\)}; +\draw[dashed ,blue, very thick] plot[domain={1}:{15}] (\x,{-$a}); +END_TIKZ + +# +BEGIN_PGML +Consider the following sketch of the graph of the function [``f(x) = [$f]``] (solid, red) and the line [``y=[$line]``] (blue, dashed). + +[@ image($graph_image, width => 700, tex_size => 800) @]* + +Determine if the following statements are **true** or **false**. + +[_]{$popup1} For [`x>0`], we have [``[$low] \leq [$f] \leq [$high]``] and we can use the Squeeze Theorem to show that [``\lim_{x\to \infty} f(x) = [$line]``] + +[_]{$popup2} The line [``y=[$line]``] is a horizontal asymptote of the function [``y=[$f]``]. + +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-5-0-R-C/5-5-0-R-C-cont-def-dd-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-5-0-R-C/5-5-0-R-C-cont-def-dd-jms.pg new file mode 100644 index 0000000000..a5c7afb569 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-5-0-R-C/5-5-0-R-C-cont-def-dd-jms.pg @@ -0,0 +1,110 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Continuity - concept of) +## Date(7 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = non_zero_random(-9,9,1); # point +$fa = random(-20,20,1); +$b = $a + random(1,5,1); +$fb = $fa + random(1,10,1); +$c = $b + random(1,5,1); +$fc = $fb + random(1,10,1); +$d = $c + random(1,5,1); +$fd = $fc + random(1,10,1); +$am = $a - random(1,5,1); +$fam = $fa - random(1,10,1); +$bm = $am - random(1,5,1); +$fbm = $fam - random(1,10,1); +$cm = $bm - random(1,5,1); +$fcm = $fbm - random(1,10,1); +$dm = $cm - random(1,5,1); +$fdm = $fcm - random(1,10,1); + +$ver=random(1,8,1); +if($ver == 1) +{$point = $a; +$fpoint = $fa;} +elsif($ver == 2) +{$point = $b; +$fpoint = $fb;} +elsif($ver == 3) +{$point = $c; +$fpoint = $fc;} +elsif($ver == 4) +{$point = $d; +$fpoint = $fd;} +elsif($ver == 5) +{$point = $am; +$fpoint = $fam;} +elsif($ver == 6) +{$point = $bm; +$fpoint = $fbm;} +elsif($ver == 7) +{$point = $cm; +$fpoint = $fcm;} +else +{$point = $dm; +$fpoint = $fdm;} + +$limit = DropDown( + [ + 'limit from the left', + 'limit', + 'limit from the right', + ], + 'limit' +); + +$exists = DropDown( + [ + 'exists', + 'does not exist', + 'is defined', + 'is not defined' + ], + 'exists' +); + +# randomize the order in which the questions appear +BEGIN_PGML + +Let [`f`] be a function of one real variable [`x`]. + +Suppose that the following values of [`f`] are known: + +[# + [. [`f([$dm]) = [$fdm]`], .] + [. [`f([$cm]) = [$fcm]`], .] + [. [`f([$bm]) = [$fbm]`], .] + [. [`f([$am]) = [$fam]`], .]* + [. [`f([$a]) = [$fa]`], .] + [. [`f([$b]) = [$fb]`], .] + [. [`f([$c]) = [$fc]`], .] + [. [`f([$d]) = [$fd]`], .]* +#] + + +Complete the following statement to give a precise definition of what it means for [`f`] to be continuous at [`x=[$point]`]. + +"The function [`f`] is continuous at [`x=[$point]`] if and only if the [_]{$limit} of [`f`] as [`x`] approaches [_]{$point}{2} [_]{$exists} and is equal to [_]{$fpoint}{2}." + +END_PGML + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-5-1-U-C/5-5-1-U-C-dicon-graph-2-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-5-1-U-C/5-5-1-U-C-dicon-graph-2-jms.pg new file mode 100644 index 0000000000..c517f6f3b4 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-5-1-U-C/5-5-1-U-C-dicon-graph-2-jms.pg @@ -0,0 +1,85 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Continuity - classifying discontinuities) +## Date(7 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); +$fm4 = non_zero_random(1,5,1); +$fm3l = random(-4,-1,1); #f at -3 from left +$fm3lnode = $fm3l+1/10; +$fm3r = $fm3l+random(2,5,1); #f at -3 from right and f(-3) +$f1l = random(4,1,1); #f at 1 from left +$f1r = $f1l - random(2,3,1); #f at 1 from right and f(1) +$f4 = non_zero_random(-2,4,1); +#two sided +$fm3 = 'DNE'; +$ansm3 = 'has a jump discontinuity'; +$f1 = 'DNE'; +$ans1 = 'has an infinite discontinuity'; +$version = random(-1,1,2); + +$typem3 = DropDown( + [ + 'is continuous', + 'has a removable discontinuity', + 'has a jump discontinuity', + 'has an infinite discontinuity' + ], + $ansm3 +); + +$type1 = DropDown( + [ + 'is continuous', + 'has a removable discontinuity', + 'has a jump discontinuity', + 'has an infinite discontinuity' + ], + $ans1 +); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-5) -- (0,5) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-5) grid (5,5); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-4,-2,2,4} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,very thick,rounded corners=8pt, red] (-4.5,$fm4) .. controls (-3.5,1) .. (-3,$fm3lnode); +\draw[red, very thick] (-3,$fm3l) circle (2.5pt); +\filldraw[red, very thick] (-3,$fm3r) circle (2.5pt); +\draw[very thick,rounded corners=8pt, red] (-3,$fm3r) .. controls (-1,1) .. (0.9,$f1l); +\draw[red, very thick] (1,$f1l) circle (2.5pt); +\filldraw[red, very thick] (1,$f1r) circle (2.5pt); +\draw[<->,very thick,rounded corners=8pt, red] (1.2,-5) .. controls (1.5,5) .. (4.5,$f4); +\draw[<-,very thick, blue, dashed] (1,-1) -- (1, -5); +\draw[red] (2,4.5) node [above right]{\(y=g(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the piecewise defined function [`y=g(x)`]. + +Assume that the dashed line [`x=1`] is a vertical asymptote of the function [`g`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +Complete the following statements about the function [`g`]. + ++ The function [`g`] [_]{$typem3} at [`x=-3`], because [``\lim_{x\to -3^-}g(x) = \, ``] [_]{$fm3l}{2} and [``\lim_{x\to -3^+}g(x) = \, ``] [_]{$fm3r}{2} both exist but are not equal. + ++ The function [`g`] [_]{$type1} at [`x=1`], because [``\lim_{x\to 1^+}g(x) = \, ``] [_]{-inf}{2}. + +END_PGML +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-5-1-U-C/5-5-1-U-C-discon-graph-1-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-5-1-U-C/5-5-1-U-C-discon-graph-1-jms.pg new file mode 100644 index 0000000000..72b2e4e1f4 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-5-1-U-C/5-5-1-U-C-discon-graph-1-jms.pg @@ -0,0 +1,92 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Continuity - classifying discontinuities) +## Date(7 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); +$fm4 = non_zero_random(-5,5,1); +$fm2l = random(-4,4,1); #f at -2 from left +$fm2r = random(-4,4,1); #f at -2 from right and f(-2) +$f2l = random(-4,4,1); #f at 2 from left and f(2) +$f2r = random(-4,4,1); #f at 2 from right +$f4 = non_zero_random(-5,5,1); + +#two sided +if($fm2l == $fm2r) +{$fm2 = $fm2r; +$ansm2 = 'is continuous';} +else +{$fm2 = 'DNE'; +$ansm2 = 'has a jump discontinuity';} + +if($f2l == $f2r) +{$f2 = $f2l; +$ans2 = 'is continuous';} +else +{$f2 = 'DNE'; +$ans2 = 'has a jump discontinuity';} + +$typem2 = DropDown( + [ + 'is continuous', + 'has a removable discontinuity', + 'has a jump discontinuity', + 'has an infinite discontinuity' + ], + $ansm2 +); + +$type2 = DropDown( + [ + 'is continuous', + 'has a removable discontinuity', + 'has a jump discontinuity', + 'has an infinite discontinuity' + ], + $ans2 +); + + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-5) -- (0,5) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-5) grid (5,5); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-4,-2,2,4} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,very thick,rounded corners=8pt, red] (-4.5,$fm4) -- (-2.1,$fm2l); +\draw[red, very thick] (-2,$fm2l) circle (2.5pt); +\filldraw[red, very thick] (-2,$fm2r) circle (2.5pt); +\draw[very thick,rounded corners=8pt, red] (-2,$fm2r) .. controls (0,1) .. (2,$f2l); +\filldraw[red, very thick] (2,$f2l) circle (2.5pt); +\draw[red, very thick] (2,$f2r) circle (2.5pt); +\draw[->,very thick,rounded corners=8pt, red] (2.1,$f2r) -- (4.5,$f4); +\draw[red] (2,4) node [above right]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the piecewise defined function [`y=f(x)`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +Complete the following two statements: + ++ The function [`f`] [_]{$typem2} at [`x=-2`]. + ++ The function [`f`] [_]{$type2} at [`x=2`]. + +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-5-1-U-C/5-5-1-U-C-discon-graph-3-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-5-1-U-C/5-5-1-U-C-discon-graph-3-jms.pg new file mode 100644 index 0000000000..ff093499a7 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-5-1-U-C/5-5-1-U-C-discon-graph-3-jms.pg @@ -0,0 +1,92 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Continuity - classifying discontinuities) +## Date(3 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); +$fm4 = non_zero_random(-3,4,1); +$fm2_val = random(-4,4,1); #f(-2) +$fm2_hole = non_zero_random(-4,4,1); #f from both sides at -2 +if($fm2_val == $fm2_hole) +{$fm2_hole = abs($fm2_hole)-1;} #keep a removable discontinuity +$ansm2 = 'has a removable discontinuity'; #keep a removable discontinuity at -2 + +$f1l = random(1,4,1); #f at 1 from left +$f1r = random(1,4,1); #f at 1 from right +$f1 = random(1,4,1); +$f4 = non_zero_random(-5,5,1); + +# continuous, removable or jump at 1 +if($f1l == $f1r && $f1l == $f1) +{$ans1 = 'is continuous';} +elsif($f1l == $f1r) +{$ans1 = 'has a removable discontinuity';} +else +{$ans1 = 'has a jump discontinuity';} + +$typem2 = DropDown( + [ + 'is continuous', + 'has a removable discontinuity', + 'has a jump discontinuity', + 'has an infinite discontinuity' + ], + $ansm2 +); + +$type1 = DropDown( + [ + 'is continuous', + 'has a removable discontinuity', + 'has a jump discontinuity', + 'has an infinite discontinuity' + ], + $ans1 +); + + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-5) -- (0,5) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-5) grid (5,5); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-4,-2,2,4} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,very thick,rounded corners=8pt, red] (-4.5,$fm4) .. controls (-3.5,1) .. (-2.1,$fm2_hole); +\draw[red, very thick] (-2,$fm2_hole) circle (2.5pt); +\filldraw[red, very thick] (-2,$fm2_val) circle (2.5pt); +\draw[very thick,rounded corners=8pt, red] (-1.9,$fm2_hole) .. controls (-1,1) .. (0.9,$f1l); +\draw[red, very thick] (1,$f1l) circle (2.5pt); +\draw[red, very thick] (1,$f1r) circle (2.5pt); +\filldraw[red, very thick] (1,$f1) circle (2.5pt); +\draw[->,very thick,rounded corners=8pt, red] (1.1,$f1r) .. controls (3,1) .. (4.5,$f4); +\draw[red] (2,4.5) node [above right]{\(y=h(x)\)}; +END_TIKZ + +{ +BEGIN_PGML +Consider the following graph of the piecewise defined function [`y=h(x)`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +Complete the following statements about the function [`h`]. + ++ The function [`h`] [_]{$typem2} at [`x=-2`]. + ++ The function [`h`] [_]{$type1} at [`x=1`]. + +END_PGML +} +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-5-2-U-C/5-5-2-U-C-pw-cont-1-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-5-2-U-C/5-5-2-U-C-pw-cont-1-jms.pg new file mode 100644 index 0000000000..309d459b96 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-5-2-U-C/5-5-2-U-C-pw-cont-1-jms.pg @@ -0,0 +1,158 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Continuity - classifying discontinuities) +## Date(10 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# interval +$left = random(-3,-1,1); #not important +$a = random(1, 3, 1); #first limit exists only when a=1; so 33% of cases +$b = random(4, 5, 1); + +#function coefficients +$c = $b+$a; +$d = $a*$b-random(1,3,2); #second limit exist wheneer d=1; so 50% of cases +$twicea = 2*$a; + +#functions +$f = Formula("x+$a")->reduce(); +$g = Formula("x^2 + $twicea*x-1")->reduce(); +$h = Formula("$c*x+$d")->reduce(); + +#function values +$fa = Compute("($a)+$a"); +$ga = Compute("($a)**2+$twicea*($a)-1"); +$gb = Compute("($b)**2+$twicea*($b)-1"); +$hb = Compute("$c*($b)+$d"); + +if($fa == $ga && $gb == $hb) +{ +$ans1 = $fa; +$ans2 = $gb; +$ans_typea = 'is continuous'; +$ans_typeb = 'is continuous'; +} +elsif($fa == $ga) +{ +$ans1 = $fa; +$ans2 = 'DNE'; +$ans_typea = 'is continuous'; +$ans_typeb = 'has a jump discontinuity'; +} +elsif($gb == $hb) +{ +$ans1 = 'DNE'; +$ans2 = $gb; +$ans_typea = 'has a jump discontinuity'; +$ans_typeb = 'is continuous'; +} +else +{ +$ans1 = 'DNE'; +$ans2 = 'DNE'; +$ans_typea = 'has a jump discontinuity'; +$ans_typeb = 'has a jump discontinuity'; +} + +$typea = DropDown( + [ + 'is continuous', + 'has a removable discontinuity', + 'has a jump discontinuity', + 'has an infinite discontinuity' + ], + $ans_typea +); + +$typeb = DropDown( + [ + 'is continuous', + 'has a removable discontinuity', + 'has a jump discontinuity', + 'has an infinite discontinuity' + ], + $ans_typeb +); + +BEGIN_PGML +Consider the following piecewise defined function. + +[``` f(x) = \begin{cases} [$f] & [$left] < x \leq [$a] \\ + [$g] & [$a] < x < [$b] \\ + [$h] & x \geq [$b] \end{cases}```] + +Complete the following statements about the function [`f`] + + +a) The function [`f`] [_]{$typea} at [`x=[$a]`]. + +b) The function [`f`] [_]{$typeb} at [`x=[$b]`]. + +END_PGML + +if($fa == $ga && $gb == $hb) +{ +BEGIN_PGML_SOLUTION +a) [``\lim_{x\to [$a]^-} f(x) = \lim_{x\to [$a]^-}[$f] = [$a]+[$a] = [$fa] = f([$a]) ``] and [``\lim_{x\to [$a]^+} f(x) = \lim_{x\to [$a]^-}[$g] = ([$a])^2+[$twicea]([$a])-1 = [$ga] ``] so [``\lim_{x\to [$a]}f(x) = [$ans1] = f([$a])``] and [`f`] is continuous at [`x=[$a]`]. + + +b) [``\lim_{x\to [$b]^-} f(x) = \lim_{x\to [$b]^-}[$g] = ([$b])^2+[$twicea]([$b])-1 =[$gb] ``] and [``\lim_{x\to [$b]^+} f(x) = \lim_{x\to [$b]^+}[$h] = [$c]([$b])+[$d]=[$hb] = f([$b]) ``] so [``\lim_{x\to [$b]}f(x) = [$ans2] = f([$b])``] and [`f`] is continuous at [`x=[$b]`]. + +END_PGML_SOLUTION +} +elsif($fa == $ga) +{ +BEGIN_PGML_SOLUTION + +a) [``\lim_{x\to [$a]^-} f(x) = \lim_{x\to [$a]^-}[$f] = [$a]+[$a] = [$fa] = f([$a]) ``] and [``\lim_{x\to [$a]^+} f(x) = \lim_{x\to [$a]^-}[$g] = ([$a])^2+[$twicea]([$a])-1 = [$ga] ``] so [``\lim_{x\to [$a]}f(x) = [$ans1] = f([$a])``] and [`f`] is continuous at [`x=[$a]`]. + +b) [``\lim_{x\to [$b]^-} f(x) = \lim_{x\to [$b]^-}[$g] = ([$b])^2+[$twicea]([$b])-1 =[$gb] ``] and [``\lim_{x\to [$b]^+} f(x) = \lim_{x\to [$b]^+}[$h] = [$c]([$b])+[$d]=[$hb] ``] so [``\lim_{x\to [$a]}f(x) ``] does not exist and [`f`] is not continuous at [`x=[$b]`]. Since both [``\lim_{x\to [$b]^-} f(x)``] and [``\lim_{x\to [$b]^+} f(x)``] exist but are not equal, [`f`] has a jump discontinuity at [`x=[$b]`]. + +END_PGML_SOLUTION +} +elsif($gb == $hb) +{ +BEGIN_PGML_SOLUTION + +a) [``\lim_{x\to [$a]^-} f(x) = \lim_{x\to [$a]^-}[$f]= [$a]+[$a] = [$fa] ``] and [``\lim_{x\to [$a]^+} f(x) = \lim_{x\to [$a]^-}[$g] = ([$a])^2+[$twicea]([$a])-1 =[$ga] ``] so [``\lim_{x\to [$a]}f(x) ``] does not exist and [`f`] is not continuous at [`x=[$a]`]. Since both [``\lim_{x\to [$a]^-} f(x)``] and [``\lim_{x\to [$a]^+} f(x)``] exist but are not equal, [`f`] has a jump discontinuity at [`x=[$a]`]. + +b) [``\lim_{x\to [$b]^-} f(x) = \lim_{x\to [$b]^-}[$g] = ([$b])^2+[$twicea]([$b])-1 =[$gb] ``] and [``\lim_{x\to [$b]^+} f(x) = \lim_{x\to [$b]^+}[$h] = [$c]([$b])+[$d]=[$hb] = f([$b]) ``] so [``\lim_{x\to [$b]}f(x) = [$ans2] = f([$b])``] and [`f`] is continuous at [`x=[$b]`]. + +END_PGML_SOLUTION +} +else +{ +BEGIN_PGML_SOLUTION + +a) [``\lim_{x\to [$a]^-} f(x) = \lim_{x\to [$a]^-}[$f]= [$a]+[$a] = [$fa] ``] and [``\lim_{x\to [$a]^+} f(x) = \lim_{x\to [$a]^-}[$g] = ([$a])^2+[$twicea]([$a])-1 =[$ga] ``] so [``\lim_{x\to [$a]}f(x) ``] does not exist and [`f`] is not continuous at [`x=[$a]`]. Since both [``\lim_{x\to [$a]^-} f(x)``] and [``\lim_{x\to [$a]^+} f(x)``] exist but are not equal, [`f`] has a jump discontinuity at [`x=[$a]`]. + +b) [``\lim_{x\to [$b]^-} f(x) = \lim_{x\to [$b]^-}[$g] = ([$b])^2+[$twicea]([$b])-1 =[$gb] ``] and [``\lim_{x\to [$b]^+} f(x) = \lim_{x\to [$b]^+}[$h] = [$c]([$b])+[$d]=[$hb] ``] so [``\lim_{x\to [$a]}f(x) ``] does not exist and [`f`] is not continuous at [`x=[$b]`]. Since both [``\lim_{x\to [$b]^-} f(x)``] and [``\lim_{x\to [$b]^+} f(x)``] exist but are not equal, [`f`] has a jump discontinuity at [`x=[$b]`]. + +END_PGML_SOLUTION +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-5-2-U-C/5-5-2-U-C-pw-cont-2-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-5-2-U-C/5-5-2-U-C-pw-cont-2-jms.pg new file mode 100644 index 0000000000..d116f6fd04 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-5-2-U-C/5-5-2-U-C-pw-cont-2-jms.pg @@ -0,0 +1,118 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Continuity - classifying discontinuities) +## Date(7 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGcourse.pl","parserPopUp.pl"); + +$left = random(-1,1,1); +$a = random(2,3,1); +$b = random(5,6,1); +$c = random(10,20,1)*random(-1,1,2); +$d = random(10,20,1)*random(-1,1,2); +$pow = random(2,3,1); +$right = random(7,9,1); +$ver = random(0,1,1); + +if($ver == 0) +{ +$f=Formula("$c/(x-$a)^($pow)")->reduce(); +$g=Formula("(x-$b)^($pow)/($d*(x-$b))")->reduce(); +if($c < 0) +{ +$La = '-inf'; +} +else +{ +$La = 'inf'; +} +$ans_typea = 'has an infinite discontinuity'; +$Lb = 0; +$ans_typeb = 'has a removable discontinuity'; +} +else +{ +$f=Formula("(x-$a)^($pow)/($d*(x-$a))")->reduce(); +$g=Formula("$c/(x-$b)^($pow)")->reduce(); +$La = 0; +$ans_typea = 'has a removable discontinuity'; +if($c < 0) +{ +$Lb = '-inf'; +} +else +{ +$Lb = 'inf'; +} +$ans_typeb = 'has an infinite discontinuity'; +} + +$typea = DropDown( + [ + 'is continuous', + 'has a removable discontinuity', + 'has a jump discontinuity', + 'has an infinite discontinuity' + ], + $ans_typea +); + +$typeb = DropDown( + [ + 'is continuous', + 'has a removable discontinuity', + 'has a jump discontinuity', + 'has an infinite discontinuity' + ], + $ans_typeb +); + +$function = DropDown( + [ + 'is defined', + 'is undefined', + ], + 'is undefined' +); + +if($ver == 0) +{ +BEGIN_PGML +Consider the following piecewise defined function [`y=f(x)`]. + +[```f(x) = \begin{cases} \displaystyle [$f] & [$left] < x \leq 4, x \neq [$a] \\ \displaystyle [$g] & 4 < x < [$right], x \neq [$b] \end{cases}```] + +Complete the following statements about the function [`g`]. + ++ The function [`f`] [_]{$typea} at [`x=[$a]`] because [``\lim_{x\to [$a]^+}f(x) = \,``] [_]{$La}{2}. + ++ The function [`f`] [_]{$typeb} at [`x=[$b]`] because [``\lim_{x\to [$b]}f(x) = \, ``] [_]{$Lb}{2} and [`f([$b])`] [_]{$function}. + +END_PGML +} +else +{ +BEGIN_PGML +Consider the following piecewise defined function [`y=f(x)`]. + +[```f(x) = \begin{cases} \displaystyle [$f] & [$left] < x \leq 4, x \neq [$a] \\ \displaystyle [$g] & 4 < x < [$right], x \neq [$b] \end{cases}```] + +Complete the following statements about the function [`f`]. + ++ The function [`f`] [_]{$typea} at [`x=[$a]`] because [``\lim_{x\to [$a]}f(x) = \, ``] [_]{$La}{2} and [`f([$a])`] [_]{$function}. + ++ The function [`f`] [_]{$typeb} at [`x=[$b]`] because [``\lim_{x\to [$b]^+}f(x) = \,``] [_]{$Lb}{2}. + +END_PGML +} +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-5-3-R-I/5-5-3-R-I-discon-defn-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-5-3-R-I/5-5-3-R-I-discon-defn-jms.pg new file mode 100644 index 0000000000..366b2d4d83 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-5-3-R-I/5-5-3-R-I-discon-defn-jms.pg @@ -0,0 +1,68 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + +## KEYWORDS() + +## DBsubject('') +## DBchapter('') +## DBsection('') +## Date('12 March 2025') +## Author('Jerrod Smith') +## Institution('University of Calgary') + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(-9,9,1); +$b = random(-9,9,1); +$c = random(-9,9,1); + +$popup_rem = DropDown( + [ + 'Removable discontinuity', + 'Jump discontinuity', + 'Infinite discontinuity' + ], + 'Removable discontinuity' +); + +$popup_jump = DropDown( + [ + 'Removable discontinuity', + 'Jump discontinuity', + 'Infinite discontinuity' + ], + 'Jump discontinuity' +); + +$popup_inf = DropDown( + [ + 'Removable discontinuity', + 'Jump discontinuity', + 'Infinite discontinuity' + ], + 'Infinite discontinuity' +); + + +BEGIN_PGML +Let [`f`] be a function of a single variable [`x`]. + +Match the type of discontinuity to the correct definition. + +[_]{$popup_inf} at [`x=[$a]`]: At least one of the limits [``\lim_{x\to [$a]^-} f(x)``], [``\lim_{x\to [$a]^+} f(x)``], [``\lim_{x\to [$a]} f(x)``] is equal to [`\pm \infty`]. + +[_]{$popup_rem} at [`x=[$b]`]: The limit [``\lim_{x\to [$b]} f(x)``] exists and is not equal to [``f([$b])``]. + +[_]{$popup_jump} at at [`x=[$c]`]: The limits [``\lim_{x\to [$c]^-} f(x)``] and [``\lim_{x\to [$c]^+} f(x)``] both exist, but are not equal to each other. + +END_PGML + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-5-4-Ap-C/5-5-4-Ap-C-cont-int-1-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-5-4-Ap-C/5-5-4-Ap-C-cont-int-1-jms.pg new file mode 100644 index 0000000000..d53cc44a9f --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-5-4-Ap-C/5-5-4-Ap-C-cont-int-1-jms.pg @@ -0,0 +1,78 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + +## KEYWORDS() + +## DBsubject('') +## DBchapter('') +## DBsection('') +## Date('11 March 2025') +## Author('Jerrod Smith') +## Institution('University of Calgary') + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context("Interval"); + +$a = random(-3, 1, 1); +$b = random(2,6,1); +$c = non_zero_random(-3,3,1); +$m = random(2,6,1); + +$f1 = Formula("$b/(x-$a)")->reduce(); +$f2 = Formula("x^2 + $c*x")->reduce(); + +$f1m = Compute("$b/($m-$a)"); +$mlessa = $m-$a; +$f2m = Compute("($m)**2 + $c*$m"); +if($f1m == $f2m) +{$domain = Compute("(-inf,$a)U($a,inf)");} +else +{$domain = Compute("(-inf,$a)U($a,$m)U($m,inf)");} + +BEGIN_PGML +Consider the piecewise defined function [``f(x)=\begin{cases} \displaystyle [$f1] & x < [$m], x \neq [$a] \\ [$f2] & x \geq [$m] \end{cases}``]. + +Find the interval(s) on which [`f`] is continuous. Write your answer as a union of intervals using the union symbol: [`\cup`]. + +The function [`f`] is continuous on [_]{$domain}{20}. [@helpLink('intervals')@]* +END_PGML + +if($f1m == $f2m) +{ +BEGIN_PGML_SOLUTION +First notice that [`f`] is undefined at [`x = [$a]`] so [`f`] is discontinuous at [`x=[$a]`]; moreover, by computing [``\lim_{x\to[$a]}f(x)``] you can check that [`f`] has an infinite discontinutiy at [`x=[$a]`]. Since the function [`[$f1]`] is a rational function and continuous on its domain, [`f`] is continuous at all other points with [`x<[$m]`]. + +The function [`[$f2]`] is a polynomial, so it is continuous everywhere. So, [`f`] is continuous for [`x>[$m]`] and we just need to check continuity at [`x=[$m]`]. We will do so by considering one-sided limits. + +First, [``\lim_{x\to[$m]^+} f(x) = \lim_{x\to[$m]^+} [$f2] = [$f2m] = f([$m])``] and [``\lim_{x\to[$m]^-} f(x) = \lim_{x\to[$m]^+} [$f1] = \frac{[$b]}{[$mlessa]} = [$f1m]``]. Since these two limits are equal to each other and equal to the value of [`f`] at [`x=[$m]`] we get that [``\lim_{x\to[$m]}f(x)= f([$m])``] and [`f`] is continuous at [`x=[$m]`]. + +Therefore, [`f`] is continuous on [`[$domain]`]. +END_PGML_SOLUTION +} +else +{ +BEGIN_PGML_SOLUTION +First notice that [`f`] is undefined at [`x = [$a]`] so [`f`] is discontinuous at [`x=[$a]`]; moreover, by computing [``\lim_{x\to[$a]}f(x)``] you can check that [`f`] has an infinite discontinuity at [`x=[$a]`]. Since the function [`[$f1]`] is a rational function and continuous on its domain, [`f`] is continuous at all other points with [`x<[$m]`]. + +The function [`[$f2]`] is a polynomial, so it is continuous everywhere. So, [`f`] is continuous for [`x>[$m]`] and we just need to check continuity at [`x=[$m]`]. We will do so by considering one-sided limits. + +First, [``\lim_{x\to[$m]^+} f(x) = \lim_{x\to[$m]^+} [$f2] = [$f2m] = f([$m])``] and [``\lim_{x\to[$m]^-} f(x) = \lim_{x\to[$m]^+} [$f1] = \frac{[$b]}{[$mlessa]} = [$f1m]``]. Since these two limits exist but are not equal, we see that [`f`] has a jump discontinuity at [`x=[$m]`]. + +Therefore, [`f`] is continuous on [`[$domain]`]. +END_PGML_SOLUTION +} + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-5-4-Ap-C/5-5-4-Ap-C-cont-int-2-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-5-4-Ap-C/5-5-4-Ap-C-cont-int-2-jms.pg new file mode 100644 index 0000000000..8d1b52724d --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-5-4-Ap-C/5-5-4-Ap-C-cont-int-2-jms.pg @@ -0,0 +1,96 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + +## KEYWORDS() + +## DBsubject('') +## DBchapter('') +## DBsection('') +## Date('11 March 2025') +## Author('Jerrod Smith') +## Institution('University of Calgary') + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context("Interval"); + +$a = random(2,3,1); +$c = random(1,2,1); +$b = random(1,2,1); +$m = random(-2,-1,1); +$alessm = $a-$m; +$negam = -$a*$m; + + +$f1 = Formula("(x^2+$alessm*x + $negam)/(x-$m)")->reduce(); +$f2 = Formula("$c")->reduce(); +$f3 = Formula("$b/(x^2)")->reduce(); + +$f1m = Compute("($m+$a)"); +$f2m = Compute("$c"); +$f3m = Compute("$b/($m)**2"); + +if($f1m == $f2m && $f2m == $f3m) +{$domain = Compute("(-inf,0)U(0,inf)");} +else +{$domain = Compute("(-inf,$m)U($m,0)U(0,inf)");} + +BEGIN_PGML +Consider the piecewise defined function [``f(x)=\begin{cases} \displaystyle [$f1] & x < [$m] \\ [$f2] & x = [$m] \\ \displaystyle [$f3] & x > [$m], x \neq 0 \end{cases}``]. + +Find the interval(s) on which [`f`] is continuous. Write your answer as a union of intervals using the union symbol: [`\cup`]. + +The function [`f`] is continuous on [_]{$domain}{20}. [@helpLink('intervals')@]* +END_PGML + +if($f1m == $f2m && $f2m == $f3m) +{ +BEGIN_PGML_SOLUTION +The rational function [``[$f1]``] is continuous for all [`x\neq [$m]`] and the rational function [``[$f3]``] is continuous for all [`x\neq 0`]. + +Since [``\lim_{x\to 0}f(x) = \lim_{x\to 0}[$f3] = \infty``], [`f`] has an infinite discontinuity at [`x=0`]. + +Considering the definition of [`f`], the only additional place where [`f`] could have a discontinuity is at [`x=[$m]`], so we will look there. + +First, by definition [`f([$m]) = [$c]`]. Now let's look at the one-sided limits of [`f`] as [`x`] approaches [`[$m]`]. +[```\lim_{x\to [$m]^-}f(x) = \lim_{x\to [$m]^-}[$f1] = \lim_{x\to [$m]^-} \dfrac{(x+[$a])(x-[$m])}{(x-[$m])} = \lim_{x\to [$m]^-} (x+[$a]) = [$f1m],```] +and +[```\lim_{x\to [$m]^+}f(x) = \lim_{x\to [$m]^+}[$f3] = \dfrac{[$b]}{([$m])^2} = [$f1m].```] +Since [``\lim_{x\to [$m]^-}f(x) = \lim_{x\to [$m]^+}f(x) = f([$m])``], [`f`] is continuous at [`x=[$m]`]. + +Therefore, [`f`] is continuous on [`[$domain]`]. +END_PGML_SOLUTION +} +else +{ +BEGIN_PGML_SOLUTION +The rational function [``[$f1]``] is continuous for all [`x\neq [$m]`] and the rational function [``[$f3]``] is continuous for all [`x\neq 0`]. + +Since [``\lim_{x\to 0}f(x) = \lim_{x\to 0}[$f3] = \infty``], [`f`] has an infinite discontinuity at [`x=0`]. + +Considering the definition of [`f`], the only additional place where [`f`] could have a discontinuity is at [`x=[$m]`], so we will look there. + +First, by definition [`f([$m]) = [$c]`]. Now let's look at the one-sided limits of [`f`] as [`x`] approaches [`[$m]`]. +[```\lim_{x\to [$m]^-}f(x) = \lim_{x\to [$m]^-}[$f1] = \lim_{x\to [$m]^-} \dfrac{(x+[$a])(x-[$m])}{(x-[$m])} = \lim_{x\to [$m]^-} (x+[$a]) = [$f1m],```] +and +[```\lim_{x\to [$m]^+}f(x) = \lim_{x\to [$m]^+}[$f3] = \dfrac{[$b]}{([$m])^2} = [$f3m].```] + +Since [``\lim_{x\to [$m]^-}f(x)``], [``\lim_{x\to [$m]^+}f(x)``] and [``f([$m])``] are not all equal, [`f`] is also not continuous at [`x=[$m]`]. + +Therefore, [`f`] is continuous on [`[$domain]`]. +END_PGML_SOLUTION +} + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-5-5-Ap-I/5-5-5-Ap-I-const-cont-1-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-5-5-Ap-I/5-5-5-Ap-I-const-cont-1-jms.pg new file mode 100644 index 0000000000..2fec1b8fe1 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-5-5-Ap-I/5-5-5-Ap-I-const-cont-1-jms.pg @@ -0,0 +1,68 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + +## KEYWORDS() + +## DBsubject('') +## DBchapter('') +## DBsection('') +## Date('11 March 2025') +## Author('Jerrod Smith') +## Institution('University of Calgary') + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2,4,1)*random(-1,1,2); #first root +$b = $a + random(1,3,1); #second root, distinct +$aplusb = $a+$b; +$ab = $a*$b; +$c = non_zero_random(-5,5,1); +$ablessc = $ab - $c; +$alessc = $a-$c; +$bplusc = $b+$c; +Context()->variables->add(m=>"Real"); +$f1 = Formula("x^2*m*$alessc + x*$ablessc")->reduce(); +$f2 = Formula("x*m*$bplusc+m^2+$c")->reduce(); + +$ans = List($a,$b); + +BEGIN_PGML +Let [`m`] be an unknown constant. + +Consider the piecewise defined function [``f(x) = \begin{cases} [$f1] & x \geq -1 \\ [$f2] & x < -1 \end{cases} ``] + +Find all values of the constant [`m`] that make [`f`] continuous on [`(-\infty,\infty)`]. + +Enter your answer as a list of values of [`m`] separated by commas: [_]{$ans}{10} +END_PGML + +$f1m1 = Formula("(-1)^2*m*$alessc + (-1)*$ablessc")->reduce(); +$f2m1= Formula("(-1)*m*$bplusc+m^2+$c")->reduce(); + +BEGIN_PGML_SOLUTION +Both [`[$f1]`] and [`[$f2]`] are polynomials in [`x`] and are continuous for all values of [`x`]. So, we need to find all values of [`m`] that will guarantee that [`f`] is continuous at [`x=-1`]. That is, we need to ensure that [``\lim_{x\to -1^-}f(x) = \lim_{x\to -1^+}f(x) = f(-1)``]. + +First, [`` \lim_{x\to -1^+}f(x) = \lim_{x\to -1^+}[$f1] = [$f1m1] = f(-1)``], +and [`` \lim_{x\to -1^-}f(x) = \lim_{x\to -1^-}[$f2] = [$f2m1]``]. + +So, to make [`f`] continuous, we need to solve the equation [`` [$f1m1] = [$f2m1] ``] for [`m`]. + +Rearranging, we get [``0 = m^2-[$aplusb]m + [$ab] = (m-[$a])(m-[$b]) ``] which has two solutions [`m=[$a]`] or [`m=[$b]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-5-5-Ap-I/5-5-5-Ap-I-const-cont-2-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-5-5-Ap-I/5-5-5-Ap-I-const-cont-2-jms.pg new file mode 100644 index 0000000000..f924271db7 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-5-5-Ap-I/5-5-5-Ap-I-const-cont-2-jms.pg @@ -0,0 +1,73 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + +## KEYWORDS() + +## DBsubject('') +## DBchapter('') +## DBsection('') +## Date('11 March 2025') +## Author('Jerrod Smith') +## Institution('University of Calgary') + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = non_zero_random(-5,5,1); #first root +$b = non_zero_random(-5,5,1); #second root +$c = random(2,5,1); +if($a - $b == 0) +{$b = abs($b)-1;} +$aplusb = $a+$b; +$ab = $a*$b; +Context()->variables->add(m=>"Real"); +$f1 = Formula("x^2+x*m*$aplusb")->reduce(); +$f2 = Formula("x^2+x*m^2+$ab*x")->reduce(); + +if($a==$b) +{$ans = $a;} +else +{$ans = List($a,$b);} + +BEGIN_PGML +Let [`m`] be an unknown constant. + +Consider the piecewise defined function [``f(x) = \begin{cases} [$f1] & x < [$c] \\ [$f2] & x \geq [$c] \end{cases} ``] + +Find all value(s) of the constant [`m`] that make [`f`] continuous on [`(-\infty,\infty)`]. + +Enter a number or, if needed, enter your answer as a list of value(s) of [`m`] separated by commas: [_]{$ans}{10} +END_PGML + +$f1c = Formula("($c)^2+($c)*m*$aplusb")->reduce(); +$f2c = Formula("($c)^2+($c)*m^2+$ab*($c)")->reduce(); +$eq = Formula("($c)*(m^2-m*$aplusb + $ab)")->reduce(); + +BEGIN_PGML_SOLUTION +Both [`[$f1]`] and [`[$f2]`] are polynomials in [`x`] and are continuous for all values of [`x`]. So, we need to find all values of [`m`] that will guarantee that [`f`] is continuous at [`x=[$c]`]. That is, we need to ensure that [``\lim_{x\to [$c]^-}f(x) = \lim_{x\to [$c]^+}f(x) = f([$c])``]. + +First, [`` \lim_{x\to [$c]^+}f(x) = \lim_{x\to [$c]^+}[$f2] = [$f2c] = f([$c])``], +and [`` \lim_{x\to [$c]^-}f(x) = \lim_{x\to [$c]^-}[$f1] = [$f1c]``]. + +So, to make [`f`] continuous, we need to solve the equation [`` [$f2c] = [$f1c]``] for [`m`]. + +Rearranging, we get [``0 = [$eq] = [$c](m-[$a])(m-[$b])``] which has solution(s): [`m=[$a]`] or [`m=[$b]`] + +**Note**: Only enter a repeated root once in this problem!. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-5-0-0-C/5-5-5-Ap-I/5-5-5-Ap-I-const-cont-3-jms.pg b/Contrib/UCalgary/249-5-0-0-C/5-5-5-Ap-I/5-5-5-Ap-I-const-cont-3-jms.pg new file mode 100644 index 0000000000..7a73cb87d5 --- /dev/null +++ b/Contrib/UCalgary/249-5-0-0-C/5-5-5-Ap-I/5-5-5-Ap-I-const-cont-3-jms.pg @@ -0,0 +1,81 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + +## KEYWORDS() + +## DBsubject('') +## DBchapter('') +## DBsection('') +## Date('11 March 2025') +## Author('Jerrod Smith') +## Institution('University of Calgary') + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = non_zero_random(-3,3,1); #first root +$b = $a + random(1,3,1); #second root, distinct +$c = random(2,3,1); +if($a+$b == 0) #avoid $b = -$a so we only have one solution +{$b = abs($b)-1;} +$aplusb = $a+$b; +$ab = $a*$b; +$abplus1 = $ab+1; +$aaplusab = $a**2 + $ab; +Context()->variables->add(m=>"Real"); +$f0 = Formula("x+$aaplusab")->reduce(); +$f1 = Formula("x^2+x*m^2+$ab*x")->reduce(); +$f2 = Formula("x^2+x*m*$aplusb")->reduce(); + +$ans = $a; + +BEGIN_PGML +Let [`m`] be an unknown constant. + +Consider the piecewise defined function [``f(x) = \begin{cases} [$f0] & x \leq 1 \\ [$f1] & 1 < x \leq [$c] \\ [$f2] & x >[$c] \end{cases} ``] + +Find all value(s) of the constant [`m`] that make [`f`] continuous on [`(-\infty,\infty)`]. + +Enter your answer as a list of value(s) of [`m`] separated by commas: [_]{$ans}{6} +END_PGML + +$f1c = Formula("($c)^2+($c)*m^2+$ab*($c)")->reduce(); +$f2c = Formula("($c)^2+($c)*m*$aplusb")->reduce(); +$eqc = Formula("($c)*(m^2-m*$aplusb + $ab)")->reduce(); + +$f01 = Formula("1+$aaplusab")->reduce(); +$f11 = Formula("m^2+$abplus1")->reduce(); +$eq1const = $abplus1 -1 - $aaplusab; +$eq1 = Formula("m^2+$eq1const")->reduce(); +$eq1pos = Compute("sqrt(abs($eq1const))"); # $a +$eq1neg = Compute("-sqrt(abs($eq1const))"); # -$a + +BEGIN_PGML_SOLUTION +The functions [`[$f0]`], [`[$f1]`] and [`[$f2]`] are polynomials in [`x`] and are continuous for all values of [`x`]. + +We need to find all values of [`m`] that will guarantee that [`f`] is continuous at [`x=1`] and at [`x=[$c]`]. That is, we need to find values of [`m`] that ensure that [```\lim_{x\to 1^-}f(x) = \lim_{x\to 1^+}f(x) = f(1)```] and [```\lim_{x\to [$c]^-}f(x) = \lim_{x\to [$c]^+}f(x) = f([$c]).```] + +We will start with [`x=[$c]`] and compute [`` \lim_{x\to [$c]^+}f(x) = \lim_{x\to [$c]^+}[$f2] = [$f2c] = f([$c])``], +and [`` \lim_{x\to [$c]^-}f(x) = \lim_{x\to [$c]^-}[$f1] = [$f1c]``]. Now, we will solve the equation [`` [$f2c] = [$f1c]``] for [`m`]. Rearranging, we get [``0 = [$eqc] = [$c](m-[$a])(m-[$b])``] which has solutions: [`m=[$a]`] or [`m=[$b]`]. + +Next, we will consider [`x=1`] and compute [`` \lim_{x\to 1^+}f(x) = \lim_{x\to 1^+}[$f1] = [$f11]``], +and [`` \lim_{x\to 1^-}f(x) = \lim_{x\to 1^-}[$f0] = [$f01]``]. Again, we will solve the equation [`` [$f11] = [$f01]``] for [`m`]. Rearranging we get [``0 = [$eq1] = (m-[$a])(m+[$a])``] which has roots [`m=[$eq1pos]`] and [`m=[$eq1neg]`]. + +The only common solution to the two equations is [`m=[$a]`], so this is the only value of [`m`] that makes [`f`] continuous everwhere. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-1-0-U-C/6-1-0-U-C-cost-dd-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-1-0-U-C/6-1-0-U-C-cost-dd-jms.pg new file mode 100644 index 0000000000..9c4689ac47 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-1-0-U-C/6-1-0-U-C-cost-dd-jms.pg @@ -0,0 +1,89 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Rates of change - business and economics) +## Date(12 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; +$a = random(10,20,1); #coeficient +$twicea = $a*2; +$c = random(100,200,5); +$x1 = random(2,4,1)**2; +$x2 = random(5,7,1)**2; +$x1p1 = $x1+1; + +$f = Formula("$a*sqrt(x)ln(x)+$c")->reduce(); +$fder = Formula("($a*ln(x)+$twicea)/(2*sqrt(x))")->reduce(); + +$change = Compute("$a*sqrt($x2)ln($x2)+$c - ($a*sqrt($x1)ln($x1)+$c)"); + +$onemore = Compute("$a*sqrt($x1p1)ln($x1p1)+$c - ($a*sqrt($x1)ln($x1)+$c)"); + +$marginal = Compute("($a*ln($x1)+$twicea)/(2*sqrt($x1))"); + +$popup1 = DropDown( + [ + 'magnitude', + 'limit', + 'average rate of change', + 'instantaneous rate of change', + ], + 'instantaneous rate of change' +); +$popup2 = DropDown( + [ + 'cost of producing x units', + 'cost of producing x+1 units', + 'cost of producing one more unit than x', + 'average change in cost', + ], + 'cost of producing one more unit than x' +); + +BEGIN_PGML +Let [``C(x) = [$f]``] be the total cost (in dollars) required for a local business to produce [`x`] units of a retail product. + +Fill in the blanks to complete the following statements. + ++ The **change in cost** or the **additional cost** if production is increased from [`[$x1]`] units to [`[$x2]`] units is equal to [_]{$change}{10}. (Enter an exact numerical value). + ++ The **derivative** of [`C(x)`] with respect to [`x`] is called the **marginal cost** and it is equal to the [_]{$popup1} of [`C(x)`] with respect to [`x.`] + ++ Assuming that [`x`] takes integer (whole number) values, the **marginal cost** is approximately equal to the difference of [`C(x+1)`] and [`C(x)`], that is [``C'(x) \approx C(x+1)-C(x).``] We can interpret this last equation by saying that: "The **marginal cost at [`x`]** is approximately equal to the [_]{$popup2}." + +Let's consider this last point in an example. Enter exact numerical values below. + ++ Given that [``C'(x) = [$fder]``], we have [`C'([$x1]) = \,`] [_]{$marginal}{5}. + ++ [`C([$x1p1]) - C([$x1]) = \, `] [_]{$onemore}{10}. + +**Ask yourself**: Are these last two numbers close to each other? + +END_PGML + +Context()->{format}{number} = "%.2f"; +BEGIN_PGML_SOLUTION ++ The **change in cost** or the **additional cost** if production is increased from [`[$x1]`] units to [`[$x2]`] units is equal to [`C([$x2])-C([$x1]) = [$a]\sqrt{[$x2]}\ln([$x2])+[$c] - ([$a]\sqrt{[$x1]}\ln([$x1])+[$c])`]. + ++ The **derivative** of [`C(x)`] with respect to [`x`] is called the **marginal cost** and it is equal to the **instantaneous rate of change** of [`C(x)`] with respect to [`x.`] + ++ Since [``C'(x) \approx C(x+1)-C(x),``] this means that [`C'(x)`] is approximately equal to the difference in cost between producing [`x+1`] units and [`x`] units, that is the cost required to produce the [`(x+1)`]-st unit. + ++ In the example, the marginal cost of [`C'([$x1]) = \$ [$marginal]`] per unit is approximately equal to [`C([$x1p1]) - C([$x1]) = \$ [$onemore]`], which is the cost to produce the [`[$x1p1]`]-th unit. + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-1-0-U-C/6-1-0-U-C-pop-dd-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-1-0-U-C/6-1-0-U-C-pop-dd-jms.pg new file mode 100644 index 0000000000..fd881b18f1 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-1-0-U-C/6-1-0-U-C-pop-dd-jms.pg @@ -0,0 +1,103 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Rates of change - natural and social sciences) +## Date(13 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; +$a = random(1000,2000,10); #coeficient +$c = random(2,9,1); +$r = random(-9,-1,1)/100; +$cr = $c*$r; +$arc = $a*$cr; +Context()->variables->add(t=>"Real"); + +$f = Formula("$a/(1+$c*e^($r*t))")->reduce(); +$fder = Formula("(-$arc*e^($r*t))/((1+$c*e^($r*t))^2)")->reduce(); + +$popup1 = DropDown( + [ + 'magnitude', + 'limit', + 'average rate of change', + 'instantaneous rate of change', + ], + 'instantaneous rate of change' +); + + +$popup2 = DropDown( + [ + 'individuals', + 'weeks', + 'individuals per week', + 'weeks per individual', + ], + 'individuals per week' +); + +$popup3 = DropDown( + [ + 'area', + 'average', + 'limit', + 'slope', + ], + 'slope' +); + + +$popup4 = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'fluctuating up and down', + ], + 'increasing' +); + + +BEGIN_PGML +The population of an animal species (numer of individuals) in Banff National Park is given by [``p(t) = [$f]``], where [`t`] is time measured in weeks from time [`t=0`] when the species was reintroduced to the park. + +Fill in the blanks to complete the following statements. + ++ The **derivative** of [`p(t)`] with respect to [`t`] is the [_]{$popup1} of the population with respect to time. + ++ The correct **units** for the **derivative** of [`p(t)`] are [_]{$popup2}. + ++ If we were to **graph** the population function then the value of the **derivative** [`p'(t_1)`] at time [`t_1`] represents the [_]{$popup3} of the graph [`y=p(t)`] at time [`t_1`]. + ++ Given that [``p'(t) = [$fder]``], which of the following can conclude about the population of this animal in Banff National Park? + + The population is [_]{$popup4} over time. + +END_PGML + +BEGIN_PGML_SOLUTION ++ The **derivative** of [`p(t)`] with respect to [`t`] is the **instantaneous rate of change** of the population with respect to time. + ++ The correct **units** for the **derivative** of [`p(t)`] are **individuals per week**. + ++ If we were to **graph** the population function then the value of the **derivative** [`p'(t_1)`] at time [`t_1`] represents the **slope** of the graph [`y=p(t)`] at time [`t_1`]. + ++ Given that [``p'(t) = [$fder]``], which of the following can conclude about the population of this animal in Banff National Park? + + The population is **increasing** over time. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-1-0-U-C/6-1-0-U-C-reaction-dd-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-1-0-U-C/6-1-0-U-C-reaction-dd-jms.pg new file mode 100644 index 0000000000..0af65c5310 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-1-0-U-C/6-1-0-U-C-reaction-dd-jms.pg @@ -0,0 +1,92 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Rates of change - natural and social sciences) +## Date(12 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context()->variables->add(t=>"Real"); +$a = random(2,7,1); #root +$am1 = $a - 1; +$c = non_zero_random(-3,20,1); + +$f = Formula("te^t-e^t*$am1+$c")->reduce(); +$fder = Formula("t*e^t-$a*e^t")->reduce(); +$fder_fac = Formula("e^t(t-$a)")->reduce(); + +$popup1 = DropDown( + [ + 'magnitude', + 'limit', + 'average rate of change', + 'instantaneous rate of change', + ], + 'instantaneous rate of change' +); + +$popup2 = DropDown( + [ + 'concentration', + 'average reaction rate', + 'instantaneous reaction rate' + ], + 'instantaneous reaction rate' +); + +$popup_pos = DropDown( + [ + 'positive', + 'negative', + ], + 'positive' +); + +$popup_neg = DropDown( + [ + 'positive', + 'negative', + ], + 'negative' +); + +Context(Interval); + +$inc = Compute("([$a],inf)"); +$dec = Compute("(0,[$a])"); + +BEGIN_PGML +Suppose that the concentration of a single chemical product [`A`] in a reversible chemical reaction [``X + Y \rightleftharpoons A``] is given by the function [``[A] = f(t) = [$f]``], where [`t\geq 0`] is time measured in seconds and the concentration of [`A`] is measured in moles per litre. + +Fill in the blanks to complete the following statements. + ++ The **derivative** of [`[A]`] with respect respect to [`t`] is the [_]{$popup1} of [`f`] with respect to [`t`], and this quantity represents the [_]{$popup2} of the reaction [``X + Y \rightleftharpoons A``]. + ++ The concentration of [`A`] is **increasing** when the derivative [``\dfrac{d[A]}{dt} = f'(t)``] is [_]{$popup_pos}, and the concentration of [`A`] is **decreasing** when the derivative [``\dfrac{d[A]}{dt} = f'(t)``] is [_]{$popup_neg}. + ++ Given that [``\dfrac{d[A]}{dt} = f'(t) = [$fder]``], the concentration of [`A`] is **increasing** on the open interval [_]{$inc}{5} and the concentration of [`A`] is **decreasing** on the open interval [_]{$dec}{5}. [@helpLink('intervals')@]* + +END_PGML + +BEGIN_PGML_SOLUTION ++ The derivative of [`[A]`] with respect respect to [`t`] is the **instantantaneous rate of change** of [`f`] with respect to [`t`], and this quantity represents the **instantaneous reaction rate** of the reaction [``X + Y \rightleftharpoons A``]. + ++ The concentration of [`A`] is **increasing** when the derivative [``\dfrac{d[A]}{dt} = f'(t)``] is **positive**, and the concentration of [`A`] is **decreasing** when the derivative [``\dfrac{d[A]}{dt} = f'(t)``] is **negative**. + ++ Given that [``\dfrac{d[A]}{dt} = f'(t) = [$fder] = [$fder_fac]``] and [`t\geq 0`], the concentration of [`A`] is **increasing** on the open interval [`[$inc]`] and the concentration of [`A`] is **decreasing** on the open interval [`[$dec].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-1-0-U-C/6-1-0-U-C-vel-acc-dd-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-1-0-U-C/6-1-0-U-C-vel-acc-dd-jms.pg new file mode 100644 index 0000000000..a077a7b709 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-1-0-U-C/6-1-0-U-C-vel-acc-dd-jms.pg @@ -0,0 +1,79 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Rates of change - general) +## Date(12 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context()->variables->add(t=>"Real"); +$a = random(1,4,1); +$b = $a + random(1,3,1); #distinct roots +$aplusb = $a+$b; +$ab = $a*$b; +$aplusb3 = 3*$aplusb; +$absix = 6*$ab; + +$f = Formula("2t^3 - t^2*$aplusb3 + t*$absix")->reduce(); +$fder = Formula("6*(t^2-t*$aplusb + $ab)")->reduce(); +$fderder = Formula("6*(2*t - $aplusb)")->reduce(); + +$popup1 = DropDown( + [ + 'average', + 'limit', + 'derivative', + 'value' + ], + 'derivative' +); + +$popup2 = DropDown( + [ + 'acceleration', + 'distance travelled', + 'position', + 'velocity' + + ], + 'velocity' +); + +$rest = List($a,$b); + +BEGIN_PGML +Suppose that the position of a spacecraft is given by a function [``s = f(t) = [$f]``], where [`t\geq 0`] is time measured in seconds and the position is measured in kilometers. + +Fill in the blanks to complete the following statements. + ++ The **instantaneous rate of change** of [`s`] with respect to [`t`] is the [_]{$popup1} of [`f`] with respect to [`t`], and this quantity represents the [_]{$popup2} of the spacecraft as a function of [`t`]. + ++ The spacecraft is **at rest** (that is, **not moving**) when the [_]{$popup2} of the spacecraft is equal to [`0\, \mathrm{km/s}`], and this occurs when [`t`] is equal to [_]{$rest}{5} seconds (enter the value(s) of [`t`] as a list separated by commas). + ++ The **acceleration** of the spacecraft as a function of [`t`] is given by [`a(t) = \,`] [_]{$fderder}{10}. + +END_PGML + +BEGIN_PGML_SOLUTION ++ The **instantaneous rate of change** of [`s`] with respect to [`t`] is the derivative of [`f`] with respect to [`t`], and this quantity represents the velocity of the spacecraft as a function of [`t`]. + ++ The spacecraft is **at rest** (that is, **not moving**) when the velocity of the spacecraft is equal to [`0\, \mathrm{km/s}`], so we need to solve the equation [```0 = v(t) = f'(t) = [$fder] = 6(x-[$a])(x-[$b]),```] and so we have that the spacecraft is **at rest** when [`t`] is equal to [`[$rest]`] seconds. + ++ The **acceleration** of the spacecraft as a function of [`t`] is given by [`a(t) = v'(t) = f''(t) = [$fderder].`] +END_PGML_SOLUTION + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-1-1-R-C/6-1-1-R-C-defn-pt-1-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-1-1-R-C/6-1-1-R-C-defn-pt-1-jms.pg new file mode 100644 index 0000000000..d694c6c18d --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-1-1-R-C/6-1-1-R-C-defn-pt-1-jms.pg @@ -0,0 +1,79 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Definition of the derivative) +## Date(13 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 9, 1)*random(-1,1,2); +$b = non_zero_random(-2, 2, 1); +$c = non_zero_random(-9,9,1); +$pt = random(2,5,1)**2; #sqaure + +$f = Formula("$a*x^($b)+$c*sqrt(x)")->reduce(); +Context()->variables->add(h=>"Real"); + +$fpt = Compute("$a*$pt^($b)+$c*sqrt($pt)"); + +$fpth= Formula("$a*($pt+h)^($b)+$c*sqrt($pt +h)")->reduce(); + +$fprimepth = Formula("(($a*($pt+h)^($b)+$c*sqrt($pt +h))-($a*$pt^($b)+$c*sqrt($pt)))/h")->reduce(); +$fprimepth->{limits} = [1,3]; + +$fprimeptx = Formula("(($a*(x)^($b)+$c*sqrt(x))-($a*$pt^($b)+$c*sqrt($pt)))/(x-$pt)")->reduce(); +$fprimeptx->{limits} = [1,3]; + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$f]``]. + +Evaluate the following expressions where [`h`] is a variable. + ++ [`f([$pt])=\,`][_]{$fpt}{10} + ++ [`f([$pt]+h)=\,`][_]{$fpth}{20} + +Using the explicit function given above, **set up, but do not evaluate**, the following limits that could be used to find the derivative [`f'([$pt])`]. + ++ [``f'([$pt]) = \lim_{h\to 0} ``] [_]{$fprimepth}{30} + ++ [``f'([$pt]) = \lim_{x\to [$pt]} ``] [_]{$fprimeptx}{30} +END_PGML + +BEGIN_PGML_SOLUTION ++ [`f([$pt])=[$a]([$pt]^{[$b]})+[$c]\sqrt{[$pt]}`] + ++ [`f([$pt]+h)= [$a]([$pt]+h)^{[$b]}+[$c]\sqrt{[$pt] +h} = [$fpth]`] + ++ [``f'([$pt]) = \lim_{h\to 0} \frac{f([$pt]+h)-f([$pt])}{h} = \lim_{h\to 0} \frac{[$fpth]-([$a]([$pt]^{[$b]})+[$c]\sqrt{[$pt]})}{h}``] + ++ [``f'([$pt]) = \lim_{x\to [$pt]} \frac{f(x)-f([$pt])}{x-[$pt]} = \lim_{x\to 0} \frac{[$f]-([$a]([$pt]^{[$b]})+[$c]\sqrt{[$pt]})}{x-[$pt]}``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-1-2-R-C/6-1-2-R-C-defn-fcn-1-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-1-2-R-C/6-1-2-R-C-defn-fcn-1-jms.pg new file mode 100644 index 0000000000..2230fef850 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-1-2-R-C/6-1-2-R-C-defn-fcn-1-jms.pg @@ -0,0 +1,71 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Definition of the derivative) +## Date(13 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 9, 1); +$b = non_zero_random(2, 4, 1); +$c = non_zero_random(-9,9,1); + +$f = Formula("$a*sin($b*x)+$c*ln(x)")->reduce(); +Context()->variables->add(h=>"Real"); + + +$fxplush= Formula("$a*sin($b*(x+h))+$c*ln(x+h)")->reduce(); +$fxplush->{limits} = [1,3]; + +$fprime = Formula("($fxplush - $f)/h")->reduce(); +$fprime->{limits} = [1,3]; + + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$f]``]. + +Evaluate the following expression where [`x`] and [`h`] are variables. + ++ [`f(x+h)=\,`][_]{$fxplush}{25} + +Using the explicit function given above, **set up, but do not evaluate**, the following limit that could be used to find the derivative [`f'(x)`]. + ++ [``f'(x) = \lim_{h\to 0} ``] [_]{$fprime}{40} + +END_PGML + +BEGIN_PGML_SOLUTION + ++ [`f(x+h)=[$fxplush]`] + ++ [``f'(x) = \lim_{h\to 0} \frac{f(x+h)-f(x)}{h} = \lim_{h\to 0} \frac{[$fxplush]-[$f]}{h}``] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-1-2-R-C/6-1-2-R-C-defn-fcn-2-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-1-2-R-C/6-1-2-R-C-defn-fcn-2-jms.pg new file mode 100644 index 0000000000..c63897204a --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-1-2-R-C/6-1-2-R-C-defn-fcn-2-jms.pg @@ -0,0 +1,71 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Definition of the derivative) +## Date(13 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(-9, -2, 1); +$b = non_zero_random(2, 5, 1); +$c = random(2,9,1); + +$f = Formula("$a*cos(x)+$c*ln($b*x)")->reduce(); +Context()->variables->add(h=>"Real"); + + +$fxplush= Formula("$a*cos(x+h)+$c*ln($b*(x+h))")->reduce(); +$fxplush->{limits} = [1,3]; + +$fprime = Formula("($fxplush - $f)/h")->reduce(); +$fprime->{limits} = [1,3]; + + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$f]``]. + +Evaluate the following expression where [`x`] and [`h`] are variables. + ++ [`f(x+h)=\,`][_]{$fxplush}{25} + +Using the explicit function given above, **set up, but do not evaluate**, the following limit that could be used to find the derivative [`f'(x)`]. + ++ [``f'(x) = \lim_{h\to 0} ``] [_]{$fprime}{40} + +END_PGML + +BEGIN_PGML_SOLUTION + ++ [`f(x+h)=[$fxplush]`] + ++ [``f'(x) = \lim_{h\to 0} \frac{f(x+h)-f(x)}{h} = \lim_{h\to 0} \frac{[$fxplush]-[$f]}{h}``] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-10-1-Ap-C/6-10-1-Ap-C-inv-der-from-graph-1-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-10-1-Ap-C/6-10-1-Ap-C-inv-der-from-graph-1-jms.pg new file mode 100644 index 0000000000..26257b9bdb --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-10-1-Ap-C/6-10-1-Ap-C-inv-der-from-graph-1-jms.pg @@ -0,0 +1,96 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Derivatives of inverse functions) +## Date(17 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +$fm5 = random(3,5,1); #f at -5 +$fm2 = random(-2,1,1); #f at -2 +$f5 = random(-5,-4,1); #f at 5 + +# right line +$slope2 = Compute("($f5-$fm2)/(5+2)"); +$slope2_rec = Compute("(5+2)/($f5-$fm2)"); +$Lr = Formula("$slope2(x-5)+$f5")->reduce(); +$Lr_inv = Formula("$slope2_rec(x-$f5)+5")->reduce(); +$finvm3 = Compute("$slope2_rec(-3-$f5)+5"); + +#left line +$slopem3 = Compute("($fm2-$fm5)/(-2+5)"); +$slopem3_rec = Compute("(-2+5)/($fm2-$fm5)"); +$Ll = Formula("$slopem3(x+5)+$fm5")->reduce(); +$Ll_inv = Formula("$slopem3_rec(x-$fm5)-5")->reduce(); +$finv2 = Compute("$slopem3_rec(2-$fm5)-5"); + +$ver=random(0,1,1); +if($ver == 0) +{$pt = -3; +$slopept = $slopem3; +$slopeinvpt = $slope2_rec; +} +else +{$pt = 2; +$slopept = $slope2; +$slopeinvpt = $slopem3_rec; +} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-5) -- (0,5) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-5) grid (5,5); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-4,-2,2,4} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[very thick,rounded corners=8pt, red] (-5,$fm5) -- (-2,$fm2); +\draw[very thick,rounded corners=8pt, red] (-2,$fm2) -- (5,$f5); +\filldraw[red, very thick] (-2,$fm2) circle (2.5pt) node [above right]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the invertible piecewise defined function [`y=f(x)`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +Find the following values of the derivatives of [`f`] and [`f^{-1}`]. + +[`f'([$pt]) = \, `][_]{$slopept}{2} + +[`(f^{-1})'([$pt]) = \, `][_]{$slopeinvpt}{2} + +END_PGML + +BEGIN_PGML_HINT +Use that [``(f^{-1})'([$pt]) = \frac{1}{f'(f^{-1}([$pt]))}``] +END_PGML_HINT + +if($ver == 0) +{ +Context()->{format}{number} = "%.1f"; +BEGIN_PGML_SOLUTION +When [`x=[$pt]`] we can use the line the line segment joining [`(-5,[$fm5])`] to [`(-2,[$fm2])`] to find that [``f'([$pt]) = \frac{[$fm2]-[$fm5]}{-2+5}.``] + +On the other hand, since [``(f^{-1})'([$pt]) = \frac{1}{f'(f^{-1}([$pt]))}``] and [`f^{-1}([$pt]) \approx [$finvm3]`], we have that [``(f^{-1})'([$pt])``] is the reciprocal of the slope of the line segment joining [`(-2,[$fm2])`] to [`(5,[$f5])`]. That is, [``(f^{-1})'([$pt]) = \frac{5+2}{[$f5]-[$fm2]}.``] +END_PGML_SOLUTION +} +else +{ +Context()->{format}{number} = "%.1f"; +BEGIN_PGML_SOLUTION +When [`x=[$pt]`] we can use the line the line segment joining [`(-2,[$fm2])`] to [`(5,[$f5])`] to find that [``f'([$pt]) = \frac{[$f5]-[$fm2]}{5+2}.``] + +On the other hand, since [``(f^{-1})'([$pt]) = \frac{1}{f'(f^{-1}([$pt]))}``] and [`f^{-1}([$pt]) \approx [$finv2]`], we have that [``(f^{-1})'([$pt])``] is the reciprocal of the slope of the line segment joining [`(-5,[$fm5])`] to [`(-2,[$fm2])`]. That is, [``(f^{-1})'([$pt]) = \frac{-2+5}{[$fm2]-[$fm5]}.``] +END_PGML_SOLUTION +} +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-10-1-Ap-C/6-10-1-Ap-C-inv-table-1-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-10-1-Ap-C/6-10-1-Ap-C-inv-table-1-jms.pg new file mode 100644 index 0000000000..c659ac03bb --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-10-1-Ap-C/6-10-1-Ap-C-inv-table-1-jms.pg @@ -0,0 +1,127 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Derivatives of inverse functions) +## Date(17 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +#6-10-1-Ap-C calculate values and derivatives of the inverse of a function (abstractly) + +$a = non_zero_random(-9,9,1); # input_1 +$b = $a + random(1,9,1); # input_2 +$c = $b + random(1,9,1); # input_3 +$d = $c + random(1,9,1); # output_4 + +$fa = non_zero_random(-9,9,1); # output_1 +$fb = $fa + random(1,9,1); # output_2 +$fc = $fb + random(1,9,1); # output_3 +$fd = $fc + random(1,9,1); # output_4 + +$fdera = non_zero_random(-9,9,1); # der_output_1 +$fderb = $fdera + random(1,9,1); # der_output_2 +$fderc = $fderb + random(1,9,1); # der_output_3 +$fderd = $fderc + random(1,9,1); # der_output_4 + +#avoid derivatives that are 0 +if($fderb == 0) +{ +$fderb = random(1,9,1); # der_output_2 +$fderc = $fderb + random(1,9,1); # der_output_3 +$fderd = $fderc + random(1,9,1); # der_output_4 +} + +if($fderc == 0) +{ +$fderc = random(1,9,1); # der_output_3 +$fderd = $fderc + random(1,9,1); # der_output_4 +} + +if($fderd == 0) +{ +$fderd = random(1,9,1); # der_output_4 +} + +# version question to pick one of the four points for the given data +$ver=random(0,3,1); +if($ver == 0) +{ +$pt = $a; +$fpt = $fa; +$fderpt = $fdera; +} +elsif($ver == 1) +{ +$pt = $b; +$fpt = $fb; +$fderpt = $fderb; +} +elsif($ver == 2) +{ +$pt = $c; +$fpt = $fc; +$fderpt = $fderc; +} +else +{ +$pt = $d; +$fpt = $fd; +$fderpt = $fderd; +} + +$finv = $pt; +$finvder = Compute("1/$fderpt"); + +BEGIN_PGML +Let [`f`] be an invertible function and suppose that the following information is known about [`f`]. + +[# + [. [`f([$a]) = [$fa],`] .] + [. [`f([$b]) = [$fb],`] .] + [. [`f([$c]) = [$fc],`] .] + [. [`f([$d]) = [$fd],`] .]* + [. [`f'([$a]) = [$fdera],`] .] + [. [`f'([$b]) = [$fderb],`] .] + [. [`f'([$c]) = [$fderc],`] .] + [. [`f'([$d]) = [$fderd],`] .]* +#] + + +If possible, find the values of [`f^{-1}([$fpt])`] and [`(f^{-1})'([$fpt])`]. If it is not possible to find one of the values enter [|DNE|]*. + +[`f^{-1}([$fpt]) = \,`] [_]{$finv}{5} + +[`(f^{-1})'([$fpt]) = \,`][_]{$finvder}{5} + +END_PGML + +BEGIN_PGML_SOLUTION +Since [``f([$pt]) = [$fpt]``] it must be that [``f^{-1}([$fpt]) = [$pt].``] + +Now, we will use the formula [``(f^{-1})'(x) = \frac{1}{f'(f^{-1}(x))}.``] + +[``(f^{-1})'([$fpt]) = \frac{1}{f'(f^{-1}([$fpt]))} = \frac{1}{f'([$pt])} = \frac{1}{[$fderpt]}.``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-10-1-Ap-C/6-10-1-Ap-C-inv-table-2-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-10-1-Ap-C/6-10-1-Ap-C-inv-table-2-jms.pg new file mode 100644 index 0000000000..46393e63e2 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-10-1-Ap-C/6-10-1-Ap-C-inv-table-2-jms.pg @@ -0,0 +1,131 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Derivatives of inverse functions) +## Date(17 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +#6-10-1-Ap-C calculate values and derivatives of the inverse of a function (abstractly) + +$a = non_zero_random(-9,-1,1); # input_1 -9 < a < -1 +$b = $a + random(1,5,1); # input_2 -8 < b < 4 +$c = $b + random(1,5,1); # input_3 -7 < c < 9 +$d = $c + random(1,5,1); # output_4 -6 < d < 14 + +$fa = random(15,20,1); # output_1 15 < fa < 20 +$fb = $fa + random(1,5,1); # output_2 16 < fb < 25 +$fc = $fb + random(1,5,1); # output_3 26 < fc < 30 +$fd = $fc + random(1,5,1); # output_4 27 < fd < 35 + +$ffa = random(-20,-10,1); # output_1 -20 < f(fa) < -10 +$ffb = $ffa + random(1,5,1); # output_2 -15 < f(fb) < -5 + +$fdera = non_zero_random(-9,9,1); # der_output_1 +$fderb = $fdera + random(1,9,1); # der_output_2 +$fderc = $fderb + random(1,9,1); # der_output_3 +$fderd = $fderc + random(1,9,1); # der_output_4 + +$finvderfb = Compute("1/$fderb"); +$finvderfc = Compute("1/$fderc"); + +$finvderd = non_zero_random(-9,9,1); +$fderfc = Compute("1/$finvderd"); + +#values that are not needed for filling out the table +$fderfa = non_zero_random(-9,9,1); +$fderfb = non_zero_random(-9,9,1); +$finvderb = non_zero_random(-9,9,1); + +#avoid derivatives that are 0 +if($fderb == 0) +{ +$fderb = random(1,9,1); # der_output_2 +$fderc = $fderb + random(1,9,1); # der_output_3 +$fderd = $fderc + random(1,9,1); # der_output_4 +} + +if($fderc == 0) +{ +$fderc = random(1,9,1); # der_output_3 +$fderd = $fderc + random(1,9,1); # der_output_4 +} + +if($fderd == 0) +{ +$fderd = random(1,9,1); # der_output_4 +} + + +BEGIN_PGML +Let [`f`] be an invertible function. Fill in the following table of values where it is possible. If it is not possible to find one of the values enter [|DNE|]*. + +[# + [. [`x`] .] + [. [`f(x)`] .] + [. [`f^{-1}(x)`] .] + [. [`f'(x)`] .] + [. [`(f^{-1})'(x)`] .]* {headerrow => 1} + [. [`[$b]`] .] + [. [`[$fb]`] .] + [. [`[$a]`] .] + [. [_]{$fderb}{2} .] + [. [`[$finvderb]`] .]* + [. [`[$c]`] .] + [. [`[$fc]`] .] + [. [_]{'DNE'}{2} .] + [. [`[$fderc]`] .] + [. [`[$fdera]`] .]* + [. [`[$d]`] .] + [. [`[$fd]`] .] + [. [`[$fc]`] .] + [. [`[$fderd]`] .] + [. [`[$finvderd]`] .]* + [. [`[$fa]`] .] + [. [`[$ffa]`] .] + [. [_]{'DNE'}{2} .] + [. [`[$fderfa]`] .] + [. [_]{'DNE'}{2} .]* + [. [`[$fb]`] .] + [. [`[$ffb]`] .] + [. [_]{$b}{2} .] + [. [`[$fderfb]`] .] + [. [`\frac{1}{[$fderb]}`] .]* + [. [`[$fc]`] .] + [. [_]{$d}{2} .] + [. [_]{$c}{2} .] + [. [_]{$fderfc}{2} .] + [. [_]{$finvderfc}{2} .]* +#] + + +END_PGML + +BEGIN_PGML_SOLUTION +Recall that if [``f(a) = b``] it must be that [``f^{-1}(b) = a.``] + +You can also use the formula [``(f^{-1})'(x) = \frac{1}{f'(f^{-1}(x))}``] which also gives [``f'(x) = \frac{1}{(f^{-1})'(f(x))},``] if we interchange the roles of [`f`] and [`f^{-1}`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-10-2-Ap-C/6-10-2-Ap-C-inv-trig-1-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-10-2-Ap-C/6-10-2-Ap-C-inv-trig-1-jms.pg new file mode 100644 index 0000000000..842115c5a5 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-10-2-Ap-C/6-10-2-Ap-C-inv-trig-1-jms.pg @@ -0,0 +1,82 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Derivatives of inverse trigonometric functions) +## Date(17 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "specialTrigValues.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +#disable trig and inverse trig functions +Context()->functions->disable('All'); +Context()->functions->enable('sqrt'); + + + +#arcsin +$x = list_random(sqrt(3)/2, sqrt(2)/2, 1/2); + +if($x == sqrt(3)/2) +{$x_print = '\frac{\sqrt{3}}{2}'; +$ans1 = specialAngle(pi/3); +} +elsif($x == sqrt(2)/2) +{$x_print = '\frac{\sqrt{2}}{2}'; +$ans1 = specialAngle(pi/4);} +else +{$x_print = '\frac{1}{2}'; +$ans1 = specialAngle(pi/6);} + +$xx = $x**2; +$ans2 = Compute("1/sqrt(1-($xx))"); + +#arccos +$d = random(3,11,4); +$ans3 = specialAngle(pi); + +BEGIN_PGML +Find the exact value of the following inverse trigonometric functions and their derivatives. + +You will **not** be able to use trigonometric nor inverse trigonometric functions in your answers. + ++ [``\sin^{-1}\left([$x_print]\right) = \,``] [_]{$ans1}{5} + + ++ If [``f(x) = \sin^{-1}(x)``], then [``f'\left([$x_print]\right) = \, ``] [_]{$ans2}{10} + ++ [``\cos^{-1}\left(\sin\left(\frac{[$d]\pi}{2}\right)\right) = \,``][_]{$ans3}{5} + +END_PGML + +BEGIN_PGML_SOLUTION +Recall that the range of [``\sin^{-1}``] is [``\left[-\frac{\pi}{2}, \frac{\pi}{2}\right]``] and the range of [``\cos^{-1}``] is [``\left[0, {\pi}\right]``]. + ++ [``\sin\left([$ans1]\right) = [$x_print]``] so [``\sin^{-1}\left([$x_print]\right) = [$ans1]``]. + ++ [``\frac{d}{dx} \sin^{-1}(x) = \frac{1}{\sqrt{1-x^2}}``] so [``f'\left([$x_print]\right) = \frac{1}{\sqrt{1-([$x_print])^2}}``] + ++ [``\cos^{-1}\left(\sin\left(\frac{[$d]\pi}{2}\right)\right) = \cos^{-1}(-1)=\pi``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-10-2-Ap-C/6-10-2-Ap-C-inv-trig-2-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-10-2-Ap-C/6-10-2-Ap-C-inv-trig-2-jms.pg new file mode 100644 index 0000000000..39096abebd --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-10-2-Ap-C/6-10-2-Ap-C-inv-trig-2-jms.pg @@ -0,0 +1,71 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Derivatives of inverse trigonometric functions) +## Date(17 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "specialTrigValues.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +#disable trig and inverse trig functions +Context()->functions->disable('All'); +Context()->functions->enable('sqrt'); + + + +#arcsin +$x = list_random(sqrt(3)/2, sqrt(2)/2, 1/2); + +if($x == sqrt(3)/2) +{$x_print = '\frac{\sqrt{3}}{2}';} +elsif($x == sqrt(2)/2) +{$x_print = '\frac{\sqrt{2}}{2}';} +else +{$x_print = '\frac{1}{2}';} + +$xx = $x**2; +$ans1 = Compute("-1/sqrt(1-($xx))"); +$ans2 = Compute("1/(1+($xx))"); + + +BEGIN_PGML +Find the exact value of the following derivatives of inverse trigonometric functions. + +You will **not** be able to use trigonometric nor inverse trigonometric functions in your answers. + +If [``f(x) = \cos^{-1}(x)``], then [``f'\left([$x_print]\right) = \, ``] [_]{$ans1}{10} + + +If [``g(x) = \tan^{-1}(x)``], then [``g'\left([$x_print]\right) = \, ``] [_]{$ans2}{10} + +END_PGML + +BEGIN_PGML_SOLUTION + ++ [``\frac{d}{dx} \cos^{-1}(x) = \frac{-1}{\sqrt{1-x^2}}``] so [``f'\left([$x_print]\right) = \frac{-1}{\sqrt{1-([$x_print])^2}}``] + ++ [``\frac{d}{dx} \tan^{-1}(x) = \frac{1}{1+x^2}``] so [``g'\left([$x_print]\right) = \frac{1}{1+([$x_print])^2}``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-2-1-Ap-I/6-2-1-Ap-I-trkylmt-deriv-1-cmm.pg b/Contrib/UCalgary/249-6-0-0-C/6-2-1-Ap-I/6-2-1-Ap-I-trkylmt-deriv-1-cmm.pg new file mode 100644 index 0000000000..e31a51948d --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-2-1-Ap-I/6-2-1-Ap-I-trkylmt-deriv-1-cmm.pg @@ -0,0 +1,65 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Definition of the derivative) +## Date(23 April 2025) +## Institution(University of Calgary) +## Author(Claudia Mahler) +## Level(2) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 6, 1); + +$ans = Compute("($a*cos($a*sqrt(x)))/(2*sqrt(x))"); + + +BEGIN_PGML +Evaluate the following limit. + +[``\lim_{h\to 0}\frac{\sin{([$a]\sqrt{x+h})-\sin{([$a]\sqrt{x})}}}{h}=\,``][_]{$ans}{10} + +If the limit does not exist and does not equal [`\pm\infty`], then enter [|DNE|]*. + +**Remark:** Note that saying that a limit is "equal to" [|Does not exist|]* or [|DNE|]* does not make sense and we would not normally do this when communicating mathematics; however, this is more convenient in WeBWork. +END_PGML + +BEGIN_PGML_SOLUTION +One way to approach this limit calculation is to note that the limit has the structure of the limit definition of the derivative. Specifically, + +[``f'(x)=\lim_{h\to 0} \frac{f(x+h)-f(x)}{h}\,``] + +Recognizing this structure, we can identify the function [``f(x)=\sin([$a]\sqrt{x})``] as the function of interest in this limit. Thus, we can compute + +[``\lim_{h\to 0}\frac{\sin{([$a]\sqrt{x+h})-\sin{([$a]\sqrt{x})}}}{h}\,``] + +by finding [``f'(x)``], where [``f(x)=\sin([$a]\sqrt{x})``]. + +Using derivative rules: + +[``f'(x)=(\sin([$a]\sqrt{x}))' = (\sin([$a]x^{\frac{1}{2}}))' = \cos([$a]x^{\frac{1}{2}})\frac{[$a]}{2}x^{-\frac{1}{2}} = \frac{[$a]\cos([$a]\sqrt{x})}{2\sqrt{x}}``] + + + + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-2-1-Ap-I/6-2-1-Ap-I-trkylmt-deriv-2-cmm.pg b/Contrib/UCalgary/249-6-0-0-C/6-2-1-Ap-I/6-2-1-Ap-I-trkylmt-deriv-2-cmm.pg new file mode 100644 index 0000000000..73a6f2fca1 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-2-1-Ap-I/6-2-1-Ap-I-trkylmt-deriv-2-cmm.pg @@ -0,0 +1,64 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Definition of the derivative) +## Date(23 April 2025) +## Institution(University of Calgary) +## Author(Claudia Mahler) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# first limit +$a = random(2, 5, 1); +$amin = $a-1; + +$ans = Compute("($a*x**($a-1))*(e**(x**$a))"); + + +BEGIN_PGML +Evaluate the following limit. + +[``\lim_{h\to 0}\frac{e^{(x+h)^[$a]}-e^{x^[$a]}}{h}=\,``][_]{$ans}{10} + +If the limit does not exist and does not equal [`\pm\infty`], then enter [|DNE|]*. + +**Remark:** Note that saying that a limit is "equal to" [|Does not exist|]* or [|DNE|]* does not make sense and we would not normally do this when communicating mathematics; however, this is more convenient in WeBWork. +END_PGML + +BEGIN_PGML_SOLUTION +One way to approach this limit calculation is to note that the limit has the structure of the limit definition of the derivative. Specifically, + +[``f'(x)=\lim_{h\to 0} \frac{f(x+h)-f(x)}{h}\,``] + +Recognizing this structure, we can identify the function [``f(x)=e^{x^[$a]}``] as the function of interest in this limit. Thus, we can compute + +[``\lim_{h\to 0}\frac{e^{(x+h)^[$a]}-e^{x^[$a]}}{h}\,``] + +by finding [``f'(x)``], where [``f(x)=e^{x^[$a]}``]. + +Using derivative rules: + +[``f'(x)=(e^{x^[$a]})' = e^{x^[$a]}(x^[$a])' = e^{x^[$a]}[$a]x^[$amin]``] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-2-1-Ap-I/6-2-1-Ap-I-trkylmt-deriv-3-cmm.pg b/Contrib/UCalgary/249-6-0-0-C/6-2-1-Ap-I/6-2-1-Ap-I-trkylmt-deriv-3-cmm.pg new file mode 100644 index 0000000000..1c5dfc0358 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-2-1-Ap-I/6-2-1-Ap-I-trkylmt-deriv-3-cmm.pg @@ -0,0 +1,63 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Definition of the derivative) +## Date(27 April 2025) +## Institution(University of Calgary) +## Author(Claudia Mahler) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# first limit +$a = random(2, 8, 1); + +$ans = Compute("$a/x"); + + +BEGIN_PGML +Evaluate the following limit. + +[``\lim_{h\to 0}\frac{[$a]\ln(x+h)-[$a]\ln(x)}{h}=\,``][_]{$ans}{10} + +If the limit does not exist and does not equal [`\pm\infty`], then enter [|DNE|]*. + +**Remark:** Note that saying that a limit is "equal to" [|Does not exist|]* or [|DNE|]* does not make sense and we would not normally do this when communicating mathematics; however, this is more convenient in WeBWork. +END_PGML + +BEGIN_PGML_SOLUTION +One way to approach this limit calculation is to note that the limit has the structure of the limit definition of the derivative. Specifically, + +[``f'(x)=\lim_{h\to 0} \frac{f(x+h)-f(x)}{h}\,``] + +Recognizing this structure, we can identify the function [``f(x)=[$a]\ln(x)``] as the function of interest in this limit. Thus, we can compute + +[``\lim_{h\to 0}\frac{[$a]\ln(x+h)-[$a]\ln(x)}{h}\,``] + +by finding [``f'(x)``], where [``f(x)=[$a]\ln(x)``]. + +Using derivative rules: + +[``f'(x)=([$a]\ln(x))' = [$a](\ln(x))' = [$a]\frac{1}{x} = \frac{[$a]}{x} ``] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-3-1-Ap-C/6-3-1-Ap-C-fcn-to-line-1-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-3-1-Ap-C/6-3-1-Ap-C-fcn-to-line-1-jms.pg new file mode 100644 index 0000000000..51f976f3e3 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-3-1-Ap-C/6-3-1-Ap-C-fcn-to-line-1-jms.pg @@ -0,0 +1,74 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Applications - tangent lines and slopes) +## Date(13 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# 6-3-1-Ap-C compute the equation of the tangent line to the graph of a function at a given point + +$a = random(-5,5,1); # point +$pow = random(3,4,1); #power +$powm1 = $pow-1; +$c = non_zero_random(-9,9,1); +$d = non_zero_random(-9,9,1); +$f = Formula("x^($pow)+$c*x+$d")->reduce(); +$fa = Compute("($a)^($pow)+$c*($a)+$d"); +$fder = Formula("($pow)*x^($powm1) + $c")->reduce(); +$fdera = Compute("($pow)*($a)^($powm1) + $c"); +$L = Formula("$fdera*(x-$a) + $fa"); + +BEGIN_PGML +Let [`f(x) = [$f]`]. + +a) Find the derivative of [`f`]. + + [`f'(x) = \,`][_]{$fder}{20} + +b) Find the **slope** [`m`] of the tangent line to [`y=f(x)`] at [`x=[$a]`]. + + [`m = \,`][_]{$fdera}{5} + +c) Find the **equation** of the tangent line to [`y=f(x)`] at [`x=[$a]`]. + + [`y = \,`][_]{$L}{20} + +d) Find the **point** on the graph of [`y=f(x)`] at which the line you found is tangent. + + [`(x,y) = \left(\right.`] [_]{$a}{2}, [_]{$fa}{2}[`\left.\right)`]. +END_PGML + +BEGIN_PGML_SOLUTION +a) Using the power rule [`f'(x) = [$fder].`] + +b) The slope of the tangent line to [`y=f(x)`] at [`x=[$a]`] is [`m = f'([$a]) = [$fdera].`] + +c) The equation of the tangent line to [`y=f(x)`] at [`x=[$a]`] is [`y = f'([$a])(x-[$a])+f([$a]) = [$L].`] + +d) The point on the graph [`y=f(x)`] at which the above line is tangent is [`([$a],f([$a])) = ([$a],[$fa])`]. + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-3-1-Ap-C/6-3-1-Ap-C-fcn-to-line-2-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-3-1-Ap-C/6-3-1-Ap-C-fcn-to-line-2-jms.pg new file mode 100644 index 0000000000..99d2f0ce33 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-3-1-Ap-C/6-3-1-Ap-C-fcn-to-line-2-jms.pg @@ -0,0 +1,69 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Applications - tangent lines and slopes) +## Date(14 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# 6-3-1-Ap-C compute the equation of the tangent line to the graph of a function at a given point + +$a = random(-5,5,1); # point +$c = non_zero_random(-9,9,1); +$d = non_zero_random(-9,9,1); +$f = Formula("$c*sin(pi*x) + $d*cos(pi*x)")->reduce(); +$fa = Compute("$c*sin(pi*$a) + $d*cos(pi*$a)"); +$fder = Formula("pi*$c*cos(pi*x) - pi*$d*sin(pi*x)")->reduce(); +$fdera = Compute("pi*$c*cos(pi*$a) - pi*$d*sin(pi*$a)"); +$fdera_overpi = Compute("$c*cos(pi*$a) - $d*sin(pi*$a)"); +$m = Compute("pi*$fdera_overpi"); +$L = Formula("$m*(x-$a) + $fa"); + +BEGIN_PGML +Let [`f(x) = [$f]`]. Then [`f'(x) = [$fder]`]. + +a) Find the **point** on the graph of [`y=f(x)`] corresponding to [`x=[$a]`]. + + [`(x,y) = \left(\right.`] [_]{$a}{2}, [_]{$fa}{2}[`\left.\right)`]. + +b) Find the **slope** [`m`] of the tangent line to [`y=f(x)`] at [`x=[$a]`]. + + [`m = \,`][_]{$fdera}{5} + +c) Find the **equation** of the tangent line to [`y=f(x)`] at [`x=[$a]`]. + + [`y = \,`][_]{$L}{20} + +END_PGML + +BEGIN_PGML_SOLUTION +a) The point on the graph [`y=f(x)`] corresponding to [`x=[$a]`] is [`([$a],f([$a])) = ([$a],[$fa])`]. + +b) The slope of the tangent line to [`y=f(x)`] at [`x=[$a]`] is [`m = f'([$a]) = \pi([$c])\cos([$a]\pi) - \pi([$d])\sin([$a]\pi).`] + +c) The equation of the tangent line to [`y=f(x)`] at [`x=[$a]`] is [`y = f'([$a])(x-[$a])+f([$a]) = [$fdera_overpi]\pi(x-[$a]) + ([$fa]).`] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-3-1-Ap-C/6-3-1-Ap-C-slope-1-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-3-1-Ap-C/6-3-1-Ap-C-slope-1-jms.pg new file mode 100644 index 0000000000..8147be9270 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-3-1-Ap-C/6-3-1-Ap-C-slope-1-jms.pg @@ -0,0 +1,69 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Applications - tangent lines and slopes) +## Date(13 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# 6-3-1-Ap-C compute the equation of the tangent line to the graph of a function at a given point + +$a = random(-5,5,1); # point_1 +$b = $a + random(1,5,1); #point_2 +$pow = random(2,3,1); #power +$powm1 = $pow-1; +$c = non_zero_random(-9,9,1); +$f = Formula("x^($pow)+$c*x")->reduce(); +$fa = Compute("($a)^($pow)+$c*($a)"); +$fb = Compute("($b)^($pow)+$c*($b)"); +$fder = Formula("($pow)*x^($powm1) + $c")->reduce(); +$fdera = Compute("($pow)*($a)^($powm1) + $c"); +$m_sec = Compute("($fb-$fa)/($b-$a)"); +$secant = Formula("$m_sec*(x-$a) + $fa"); +$tangent = Formula("$fdera*(x-$a) + $fa"); + +BEGIN_PGML +Let [`f(x) = [$f]`]. + ++ The slope of the **secant line** joining the points on the graph of [`y=f(x)`] corresponding to [`x=[$a]`] and [`x = [$b]`] is equal to [_]{$m_sec}{10}. + ++ The equation of the **secant line** joining the points on the graph of [`y=f(x)`] corresponding to [`x=[$a]`] and [`x = [$b]`] is [`y = \, `][_]{$secant}{20}. + ++ The slope of the **tangent line** to the graph of [`y=f(x)`] at [`x=[$a]`] is equal to [_]{$fdera}{10}. + ++ The equation of the **tangent line** to the graph of [`y=f(x)`] at [`x=[$a]`] is equal to [`y = \,`][_]{$tangent}{20}. + +END_PGML + +BEGIN_PGML_SOLUTION ++ The slope of the secant line joining [`([$a],f([$a])) = ([$a],[$fa])`] and [`([$b],f([$b])) = ([$b],[$fb])`] is equal to [``\frac{[$fb] - ([$fa])}{[$b]-([$a])} = [$m_sec].``] + ++ The equation of the secant line joining [`([$a],f([$a])) = ([$a],[$fa])`] and [`([$b],f([$b])) = ([$b],[$fb])`] is equal to [`y = [$m_sec](x-[$a]) + [$fa]`] or [`y = [$m_sec](x-[$b])+[$fb]`]. + ++ The slope of the tangent line to the graph of [`y=f(x)`] at [`x=[$a]`] is equal to [`f'([$a]) = [$fdera].`] + ++ The equation of the tangent line to the graph of [`y=f(x)`] at [`x=[$a]`] is equal to [`y = [$tangent].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-9-1-U-C/6-9-1-U-C-line-to-fcn-1-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-9-1-U-C/6-9-1-U-C-line-to-fcn-1-jms.pg new file mode 100644 index 0000000000..217e5e8f0a --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-9-1-U-C/6-9-1-U-C-line-to-fcn-1-jms.pg @@ -0,0 +1,55 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Applications - tangent lines and slopes) +## Date(13 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = non_zero_random(-9,9,1); #point +$m = non_zero_random(-20,20,1); #slope +$b = non_zero_random(-20,20,1); #int +$L = Formula("$m*x+$b")->reduce(); +$La = Compute("$m*$a+$b"); + +BEGIN_PGML +Let [`f`] be a differentiable function of one variable [`x`]. + +Suppose that the equation of the tangent line to [`y=f(x)`] at [`x=[$a]`] has equation [`y = [$L].`] + +Then + ++ [`f([$a]) = \,`][_]{$La}{5} + ++ [`f'([$a]) = \,`][_]{$m}{5} + +END_PGML + +BEGIN_PGML_SOLUTION ++ Since the line [`L(x) = [$L]`] is tangent to [`y=f(x)`] at [`x=[$a]`], the point [`([$a],L([$a]))`] on the line must also be on the graph of the function [`y=f(x)`]. Therefore, [`f([$a]) = L([$a]) = [$La].`] + ++ The derivative of a function at a point is the slope of the tangent line, so [`f'([$a]) = [$m]`], which is the slope of the line [`y = [$L].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-9-1-U-C/6-9-1-U-C-line-to-fcn-2-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-9-1-U-C/6-9-1-U-C-line-to-fcn-2-jms.pg new file mode 100644 index 0000000000..56f63aea0c --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-9-1-U-C/6-9-1-U-C-line-to-fcn-2-jms.pg @@ -0,0 +1,56 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Applications - tangent lines and slopes) +## Date(14 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = non_zero_random(-9,9,1); #point +$m = non_zero_random(-20,20,1); #slope integer +$slope = Compute("$m*pi"); +$b = non_zero_random(-20,20,1); #int +$L = Formula("$m*pi*x+$b")->reduce(); +$La = Compute("$m*pi*$a+$b"); + +BEGIN_PGML +Let [`g`] be a differentiable function of one variable [`x`]. + +Suppose that the equation of the tangent line to [`y=g(x)`] at [`x=[$a]`] has equation [`y = [$L].`] + +Then + ++ [`g([$a]) = \,`][_]{$La}{5} + ++ [`g'([$a]) = \,`][_]{$slope}{5} + +END_PGML + +BEGIN_PGML_SOLUTION ++ Since the line [`L(x) = [$L]`] is tangent to [`y=g(x)`] at [`x=[$a]`], the point [`([$a],L([$a]))`] on the line must also be on the graph of the function [`y=g(x).`] Therefore, [`g([$a]) = L([$a]) = [$m]\pi([$a])+[$b].`] + ++ The derivative of a function at a point is the slope of the tangent line, so [`g'([$a]) = [$m]\pi`], which is the slope of the line [`y = [$L].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-9-2-U-C/6-9-2-U-C-der-dne-graph-1-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-9-2-U-C/6-9-2-U-C-der-dne-graph-1-jms.pg new file mode 100644 index 0000000000..620c893c85 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-9-2-U-C/6-9-2-U-C-der-dne-graph-1-jms.pg @@ -0,0 +1,161 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Applications - tangent lines and slopes) +## Date(14 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#points and function values +$b = random(-3,0,1); +$c = $b + random(1,3,1); +$fm5 = non_zero_random(-5,5,1); #f at -5 +$fb = random(-4,4,1); #f at b +$fc = random(-4,4,1); #f at c +$f5 = non_zero_random(-5,5,1); #f at 5 +#slopes and lines +$m1 = ($fb-$fm5)/($b+5); +$m2 = ($fc - $fb)/($c-$b); +$m3 = ($f5 - $fc)/(5-$c); +$L1 = Formula("$m1*(x-$b)+$fb")->reduce(); +$L2 = Formula("$m2*(x-$b)+$fb")->reduce(); +$L3 = Formula("$m3*(x-$c)+$fc")->reduce(); +#additional points to plot +# on L1 +$fm4 = $m1*(-4-$b)+$fb; +$bm2 = $b-2; +$fbm2 = $m1*(-2)+$fb; +$bm1 = $b-1; +$fbm1 = $m1*(-1)+$fb; +# on L2 +$bp1 = $b+1; +$fbp1 = $m2*(1)+$fb; +$cm1 = $c-1; +$fcm1 = $m2*(-1)+$fc; +# on L3 +$cp1 = $c+1; +$fcp1 = $m3*(1)+$fc; +$cp2 = $c+2; +$fcp2 = $m3*(2)+$fc; +$f4 = $m3*(4-$c)+$fc; + +if($m1 == $m2 && $m2 == $m3) +{$ans = 'None';} +elsif($m1 == $m2) +{$ans = $c;} +elsif($m2 == $m3) +{$ans = $b;} +else +{$ans = List($b,$c);} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-5) -- (0,5) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-5) grid (5,5); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-4,-2,2,4} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[very thick, red] (-5,$fm5) -- ($b,$fb); +\draw[very thick, red] ($b,$fb) -- ($c,$fc); +\draw[very thick, red] ($c,$fc) -- (5,$f5); +\filldraw[red, very thick] (-5,$fm5) circle (2.5pt); +\filldraw[red, very thick] (-4,$fm4) circle (2.5pt); +\filldraw[red, very thick] ($bm2,$fbm2) circle (2.5pt); +\filldraw[red, very thick] ($bm1,$fbm1) circle (2.5pt); +\filldraw[red, very thick] ($b,$fb) circle (2.5pt); +\filldraw[red, very thick] ($bp1,$fbp1) circle (2.5pt); +\filldraw[red, very thick] ($c,$fc) circle (2.5pt); +\filldraw[red, very thick] ($cp1,$fcp1) circle (2.5pt); +\filldraw[red, very thick] ($cp2,$fcp2) circle (2.5pt); +\filldraw[red, very thick] (4,$f4) circle (2.5pt); +\filldraw[red, very thick] (5,$f5) circle (2.5pt) node [right]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the piecewise defined function [`y=f(x)`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +At which value(s) of [`x`] in the open interval [`(-5,5)`] does the derivative [`y=f'(x)`] **not exist**? + +The derivative [`f'(x)`] does not exist for [`x=\,`][_]{$ans}{10} + +Enter the values you find as a list separated by commas, if there are no such values enter [|None|]*. +END_PGML + +BEGIN_PGML_HINT +The derivative of [`f`] at [`x=a`] does not exist if the limit [``f'(a) = \lim_{x\to a}\frac{f(x) - f(a)}{x-a}``] does not exist. Try considering one-sided limits and thinking about the slopes of each line segment. + +Depending on the graph that you have, you will need to **very carefully** consider the slopes of the line segments that you see, so look for integer points that you can analyze! + +Remember [`-5`] and [`5`] are not valid answers because they are not the in open interval [`(-5,5)`]. +END_PGML_HINT + +if($m1 == $m2 && $m2 == $m3) +{ +BEGIN_PGML_SOLUTION +We will consider the three line segments joining the points [`(-5,[$fm5])`] to [`([$b],[$fb])`], [`([$b],[$fb])`] to [`([$c],[$fc])`], and [`([$c],[$fc])`] to [`(5,[$f5])`]. + ++ The segment joining [`(-5,[$fm5])`] to [`([$b],[$fb])`] has slope [``\frac{[$fb]-[$fm5]}{[$b]+5} = [$m1]``] + ++ The segment joining [`([$b],[$fb])`] to [`([$c],[$fc])`] has slope [``\frac{[$fc]-[$fb]}{[$c]-[$b]} = [$m2]``] + ++ The segment joining [`([$c],[$fc])`] to [`(5,[$f5])`] has slope [``\frac{[$f5]-[$fc]}{5-[$c]} = [$m3]``] + +Therefore, by considering one-sided limits, we can conclude that the derivative of [`f`] exists at all points in the interval [`(-5,5)`]. +END_PGML_SOLUTION +} +elsif($m1 == $m2) +{ +BEGIN_PGML_SOLUTION +We will consider the three line segments joining the points [`(-5,[$fm5])`] to [`([$b],[$fb])`], [`([$b],[$fb])`] to [`([$c],[$fc])`], and [`([$c],[$fc])`] to [`(5,[$f5])`]. + ++ The segment joining [`(-5,[$fm5])`] to [`([$b],[$fb])`] has slope [``\frac{[$fb]-[$fm5]}{[$b]+5} = [$m1]``] + ++ The segment joining [`([$b],[$fb])`] to [`([$c],[$fc])`] has slope [``\frac{[$fc]-[$fb]}{[$c][$b]} = [$m2]``] + ++ The segment joining [`([$c],[$fc])`] to [`(5,[$f5])`] has slope [``\frac{[$f5]-[$fc]}{5-[$c]} = [$m3]``] + +Therefore, by considering one-sided limits, we can conclude that the derivative of [`f`] does not exist at [`x=[$c]`], but [`f'(x)`] exists at all other points in the interval [`(-5,5)`]. +END_PGML_SOLUTION +} +elsif($m2 == $m3) +{ +BEGIN_PGML_SOLUTION +We will consider the three line segments joining the points [`(-5,[$fm5])`] to [`([$b],[$fb])`], [`([$b],[$fb])`] to [`([$c],[$fc])`], and [`([$c],[$fc])`] to [`(5,[$f5])`]. + ++ The segment joining [`(-5,[$fm5])`] to [`([$b],[$fb])`] has slope [``\frac{[$fb]-[$fm5]}{[$b]+5} = [$m1]``] + ++ The segment joining [`([$b],[$fb])`] to [`([$c],[$fc])`] has slope [``\frac{[$fc]-[$fb]}{[$c][$b]} = [$m2]``] + ++ The segment joining [`([$c],[$fc])`] to [`(5,[$f5])`] has slope [``\frac{[$f5]-[$fc]}{5-[$c]} = [$m3]``] + +Therefore, by considering one-sided limits, we can conclude that the derivative of [`f`] does not exist at [`x=[$b]`], but [`f'(x)`] exists at all other points in the interval [`(-5,5)`]. +END_PGML_SOLUTION +} +else +{ +BEGIN_PGML_SOLUTION +We will consider the three line segments joining the points [`(-5,[$fm5])`] to [`([$b],[$fb])`], [`([$b],[$fb])`] to [`([$c],[$fc])`], and [`([$c],[$fc])`] to [`(5,[$f5])`]. + ++ The segment joining [`(-5,[$fm5])`] to [`([$b],[$fb])`] has slope [``\frac{[$fb]-[$fm5]}{[$b]+5} = [$m1]``] + ++ The segment joining [`([$b],[$fb])`] to [`([$c],[$fc])`] has slope [``\frac{[$fc]-[$fb]}{[$c][$b]} = [$m2]``] + ++ The segment joining [`([$c],[$fc])`] to [`(5,[$f5])`] has slope [``\frac{[$f5]-[$fc]}{5-[$c]} = [$m3]``] + +Therefore, by considering one-sided limits, we can conclude that the derivative of [`f`] does not exist at [`x=[$b]`] and [`x=[$c]`], but [`f'(x)`] exists at all other points in the interval [`(-5,5)`]. +END_PGML_SOLUTION +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-9-2-U-C/6-9-2-U-C-der-from-graph-1-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-9-2-U-C/6-9-2-U-C-der-from-graph-1-jms.pg new file mode 100644 index 0000000000..f9c190deec --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-9-2-U-C/6-9-2-U-C-der-from-graph-1-jms.pg @@ -0,0 +1,64 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Applications - tangent lines and slopes) +## Date(14 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +$fm5 = non_zero_random(-5,5,1); #f at -5 +$fm2 = random(-4,4,1); #f at -2 +$f2 = random(-4,4,1); #f at 2 +$f5 = non_zero_random(-5,5,1); #f at 5 + +$pt = random(-3,3,2); +if($pt == -3) +{$m = Compute("($fm2-$fm5)/(-2-(-5))"); +$L = Formula("$m(x-(-2))+$fm2")->reduce();} +elsif($pt == -1 || $pt == 1) +{$m = Compute("($f2-$fm2)/(2-(-2))"); +$L = Formula("$m(x-2)+$f2")->reduce();} +elsif($pt == 3) +{$m = Compute("($f5 - $f2)/(5-2)"); +$L = Formula("$m(x-2)+$f2")->reduce();} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-5) -- (0,5) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-5) grid (5,5); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-4,-2,2,4} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[very thick,rounded corners=8pt, red] (-5,$fm5) -- (-2,$fm2); +\draw[very thick,rounded corners=8pt, red] (-2,$fm2) -- (2,$f2); +\draw[very thick,rounded corners=8pt, red] (2,$f2) -- (5,$f5); +\filldraw[red, very thick] (-2,$fm2) circle (2.5pt); +\filldraw[red, very thick] (2,$f2) circle (2.5pt); +\draw[red] (2,4.5) node [above]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the piecewise defined function [`y=f(x)`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +The slope of the tangent line to [`y=f(x)`] at [`x=[$pt]`] is equal to [_]{$m}{5}. + +The equation of the tangent line to [`y=f(x)`] at [`x=[$pt]`] is [`y = \,`][_]{$L}{10}. +END_PGML + +BEGIN_PGML_SOLUTION +Each of the pieces of the function [`f`] is a line segment, so we need to find the slope and the equation of the line segment on which the point [`([$pt],f([$pt]))`] lies. To find the slope [`m = [$m]`] we can compute the "rise/run" using the endpoints of the corresponding segment, and then to find the equation of the line we can use the point slope formula for the tangent line: [`y = [$m](x-a) + f(a)`], where we can take [`a = [$pt]`] or either of the endpoints of the corresponding segment if the exact value of [`f([$pt])`] is not easily read from the graph. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-9-2-U-C/6-9-2-U-C-der-zero-graph-1-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-9-2-U-C/6-9-2-U-C-der-zero-graph-1-jms.pg new file mode 100644 index 0000000000..01d95a54e6 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-9-2-U-C/6-9-2-U-C-der-zero-graph-1-jms.pg @@ -0,0 +1,59 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Applications - tangent lines and slopes) +## Date(14 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#roots +$a = random(-3,-2,1); +$b = $a + random(3,4,1); +$ab = $a*$b; +$k = random(-1,1,2); +if($a == -3 && $k==1) +{$c = random(-6,-4,1);} +elsif($a == -3 && $k== -1) +{$c = random(4,6,1);} +else +{$c = random(1,2,1);} +$ans = List($a,$b); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-7) grid (5,7); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth] plot[domain={-4.5}:{4.5}] (\x,{$k*((\x*\x*\x)/18 - ($a/12)*(\x*\x) - ($b/12)*(\x*\x) + ($ab/6)*\x)+$c}); +\draw[red] (2,{$k*((8)/18 - ($a/12)*(4) - ($b/12)*(4) + ($ab/6)*2)+$c}) node [above right]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the function [`y=f(x)`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +At which value(s) of [`x`] in the open interval [`(-5,5)`] is the derivative of [`f`] equal to [`0`]? + ++ [`f'(x)=0`] for [`x=\,`][_]{$ans}{10} + +Enter the value(s) you find as a list separated by commas, if there are no such values enter [|None|]*. +END_PGML + +BEGIN_PGML_SOLUTION +[`f'(x)=0`] where the tangent line to graph of [`y=f(x)`] is horizontal (that is, has slope equal to [`0`]). For the graph shown above this occurs for [`x=[$a]`] and [`x=[$b]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-6-0-0-C/6-9-2-U-C/6-9-2-U-C-der-zero-graph-2-jms.pg b/Contrib/UCalgary/249-6-0-0-C/6-9-2-U-C/6-9-2-U-C-der-zero-graph-2-jms.pg new file mode 100644 index 0000000000..bd67cd91e1 --- /dev/null +++ b/Contrib/UCalgary/249-6-0-0-C/6-9-2-U-C/6-9-2-U-C-der-zero-graph-2-jms.pg @@ -0,0 +1,79 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Limits and continuity) +## DBsection(Applications - tangent lines and slopes) +## Date(14 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#roots +$a = random(-2,2,1); +$k = random(-1,1,2); +# coefficients to ensure the graph appears reasonable +if(abs($a)==2) +{ +$d = 30; +if ($k == 1 && $a == 2) +{$c = random(2,5,1);} +elsif ($k == -1 && $a == -2) +{$c = random(2,5,1);} +else +{$c = random(-5,-2,1);} +} +elsif(abs($a)==1) +{ +$d = 20; +if ($a==1 && $k == -1) +{$c = random(-3,-2,1);} +elsif ($a==-1 && $k == -1) +{$c = random(2,3,1);} +elsif ($a==-1 && $k == 1) +{$c = random(-3,-2,1);} +else +{$c = random(2,3,1);} +} +else +{ +$d = 20; +$c = non_zero_random(-3,3,2)/2; +} +$ans = $a; + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-7) grid (5,7); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick] plot[domain={-4.5}:{4.5}] (\x,{$k*pow(\x-$a,3)/$d + $c}); +\draw[red] (4.5,{$k*pow(4.5-$a,3)/$d + $c}) node [above right]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the function [`y=f(x)`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +At which value(s) of [`x`] in the open interval [`(-5,5)`] is the derivative of [`f`] equal to [`0`]? + ++ [`f'(x)=0`] for [`x=\,`][_]{$ans}{10} + +Enter the value(s) you find as a list separated by commas, if there are no such values enter [|None|]*. +END_PGML + +BEGIN_PGML_SOLUTION +[`f'(x)=0`] where the tangent line to graph of [`y=f(x)`] is horizontal (that is, has slope equal to [`0`]). For the graph shown above this occurs for [`x=[$a]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-1-Ap-C/7-2-1-Ap-C-mark1.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-1-Ap-C/7-2-1-Ap-C-mark1.pg new file mode 100644 index 0000000000..4337c78396 --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-1-Ap-C/7-2-1-Ap-C-mark1.pg @@ -0,0 +1,52 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Derivatives of polynomials and power functions) +## Institution(University of Calgary) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 9, 1)*random(-1,1,2); +$b = random(3, 8, 1); +$c = non_zero_random(-9,9,1); +$ab = $a*$b; +$bm1 = $b-1; + +$f = Formula("$a*x^($b)+$c")->reduce(); + +$ans = Compute("$ab*x^($bm1)"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$f]``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +[``f'(x)=[$a]\left([$b]x^{[$bm1]}\right)+0=[$ans]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-1-Ap-C/7-2-1-Ap-C-prod-mlb.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-1-Ap-C/7-2-1-Ap-C-prod-mlb.pg new file mode 100644 index 0000000000..b734c74d9f --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-1-Ap-C/7-2-1-Ap-C-prod-mlb.pg @@ -0,0 +1,65 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Product rule (with trigonometric functions)) +## Institution(University of Calgary) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$af = random(2, 9, 1); +$bf = random(3, 8, 1); +$cf = non_zero_random(-9,9,1); +$abf = $af*$bf; +$bfm1 = $bf-1; + +$ag = random(2, 9, 1); +$bg = random(3, 8, 1); +$cg = non_zero_random(-9,9,1); +$abg = $ag*$bg; +$bgm1 = $bg-1; + +$f = Formula("$af*x^($bf)+$cf*e^x")->reduce(); +$fp = Formula("$af*$bf*x^($bfm1)+$cf*e^x")->reduce(); + +$g = Formula("$cg*sin(x)+$ag*x^($bg)")->reduce(); +$gp = Formula("$cg*cos(x)+$ag*$bg*x^($bgm1)")->reduce(); + +$ans = Formula("[$f]*([$gp])+[$fp]*([$g])")->reduce(); + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$f*$g]``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +[``\begin{aligned}f'(x)&=([$f])'*[$g] + ([$f])*([$g])' \\ +&=([$a]\left([$b]x^{[$bm1]}\right)+0)*[$g] +([$f])*[$gp]\\ +&=[$ans] \end{aligned}``] +END_PGML_SOLUTION + +ENDDOCUMENT(); \ No newline at end of file diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-1-Ap-C/7-2-1-Ap-C-simple-prod1-mlb.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-1-Ap-C/7-2-1-Ap-C-simple-prod1-mlb.pg new file mode 100644 index 0000000000..ac99471c3e --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-1-Ap-C/7-2-1-Ap-C-simple-prod1-mlb.pg @@ -0,0 +1,65 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Product rule (without trigonometric functions)) +## Institution(University of Calgary) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 9, 1); +$b = random(3, 8, 1); +$c = non_zero_random(-9,9,1); +$ab = $a*$b; +$bm1 = $b-1; + +$d = random(2, 9, 1); +$e = random(3, 7, 1); +$h = non_zero_random(-9,9,1); +$i = $e+random(1, 3, 1); +$de = $d*$e; +$hi = $h*$i; +$em1 = $e-1; +$im1 = $i-1; + +$f = Formula("$a*x^($b)+$c")->reduce(); +$fp = Formula("$ab*x^($bm1)")->reduce(); +$g = Formula("$d*x^($e)+$h*x^($i)")->reduce(); +$gp = Formula("$de*x^($em1)+$hi*x^($im1)")->reduce(); + +$ans = Compute("[$fp]*[$g]+[$f]*[$gp]"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$f*$g]``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +[``\begin{aligned}f'(x) &=([$f])'*([$g]) + ([$f])*([$g])' \\ +&=[$ans]\end{aligned}``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-1-Ap-C/7-2-1-Ap-C-simple-prod2-mlb.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-1-Ap-C/7-2-1-Ap-C-simple-prod2-mlb.pg new file mode 100644 index 0000000000..05d54a4f4f --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-1-Ap-C/7-2-1-Ap-C-simple-prod2-mlb.pg @@ -0,0 +1,56 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Product rule (with trigonometric functions)) +## Institution(University of Calgary) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 9, 1); +$b = random(3, 8, 1); +$c = non_zero_random(-9,9,1); +$ab = $a*$b; +$bm1 = $b-1; + +$f = Formula("$a*x^($b)+$c")->reduce(); +$g = Formula("cos(x)")->reduce(); +$gp = Formula("-sin(x)")->reduce(); + +$ans = Compute("$ab*x^($bm1)*$g-($f)*sin(x)"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$f*$g]``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +[``\begin{aligned}f'(x) &=([$f])'*[$g] + ([$f])*([$g])' \\ &=([$a]\left([$b]x^{[$bm1]}\right)+0)*[$g] +([$f])*[$gp] \\ +&=[$ans] +\end{aligned}``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-2-Ap-C/7-2-2-Ap-C-quo2-mlb.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-2-Ap-C/7-2-2-Ap-C-quo2-mlb.pg new file mode 100644 index 0000000000..47af430b4e --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-2-Ap-C/7-2-2-Ap-C-quo2-mlb.pg @@ -0,0 +1,65 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + +## KEYWORDS() + +## DBsubject('') +## DBchapter('') +## DBsection('') +## Date('') +## Author('') +## Institution('University of Calgary') + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$af = random(2, 9, 1); +$bf = random(3, 8, 1); +$cf = non_zero_random(-9,9,1); +$abf = $af*$bf; +$bfm1 = $bf-1; + +$ag = random(2, 9, 1); +$bg = random(3, 8, 1); +$cg = non_zero_random(-9,9,1); +$abg = $ag*$bg; +$bgm1 = $bg-1; + +$f = Formula("$af*x^($bf)+$cf*e^x")->reduce(); +$fp = Formula("$af*$bf*x^($bfm1)+$cf*e^x")->reduce(); + +$g = Formula("$cg*sin(x)+$ag*x^($bg)")->reduce(); +$gp = Formula("$cg*cos(x)+$ag*$bg*x^($bgm1)")->reduce(); + +$ans = Formula("([$fp]*([$g])-[$f]*([$gp]))/([$g])^2")->reduce(); + +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$f/$g]``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +[``f'(x)=(( [$f])'*[$g]- ([$f])*([$g])')/([$g])^2 =(([$fp])*[$g] -([$f])*[$gp])/([$g])^2``] [``=[$ans]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); \ No newline at end of file diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-2-Ap-C/7-2-2-Ap-C-simple-quo-mlb.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-2-Ap-C/7-2-2-Ap-C-simple-quo-mlb.pg new file mode 100644 index 0000000000..8d2fbb7ce3 --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-2-Ap-C/7-2-2-Ap-C-simple-quo-mlb.pg @@ -0,0 +1,57 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + +## KEYWORDS() + +## DBsubject('') +## DBchapter('') +## DBsection('') +## Date('') +## Author('') +## Institution('University of Calgary') + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 9, 1); +$b = random(3, 8, 1); +$c = non_zero_random(-9,9,1); +$ab = $a*$b; +$bm1 = $b-1; + +$f = Formula("$a*x^($b)+$c")->reduce(); +$fp = Formula("$ab*x^($bm1)")->reduce(); +$g = Formula("cos(x)")->reduce(); +$gp = Formula("-sin(x)")->reduce(); + +$ans = Compute("([$fp]*[$g]-[$f]*[$gp])/(([$g])^2)"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$f/$g]``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +[``f'(x)=\frac{(([$f])'*[$g] - ([$f])*([$g])')}{([$g])^2} =[$ans]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); \ No newline at end of file diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-2-Ap-C/7-2-2-Ap-C-simple-quo1-mlb.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-2-Ap-C/7-2-2-Ap-C-simple-quo1-mlb.pg new file mode 100644 index 0000000000..cbaa7ac6ae --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-2-Ap-C/7-2-2-Ap-C-simple-quo1-mlb.pg @@ -0,0 +1,64 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Quotient rule (without trigonometric functions)) +## Institution(University of Calgary) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 9, 1); +$b = random(3, 8, 1); +$c = non_zero_random(-9,9,1); +$ab = $a*$b; +$bm1 = $b-1; + +$d = random(2, 9, 1); +$e = random(3, 7, 1); +$h = non_zero_random(-9,9,1); +$i = $e+random(1, 3, 1); +$de = $d*$e; +$hi = $h*$i; +$em1 = $e-1; +$im1 = $i-1; + +$f = Formula("$a*x^($b)+$c")->reduce(); +$fp = Formula("$ab*x^($bm1)")->reduce(); +$g = Formula("$d*x^($e)+$h*x^($i)")->reduce(); +$gp = Formula("$de*x^($em1)+$hi*x^($im1)")->reduce(); + +$ans = Compute("([$fp]*[$g]-[$f]*[$gp])/(([$g])^2)"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$f/$g]``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +[``f'(x)=\frac{(([$f])'*([$g]) - ([$f])*([$g])')}{([$g])^2} =[$ans]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); \ No newline at end of file diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-2-Ap-C/7-2-2-Ap-C-simple-quo2-mlb.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-2-Ap-C/7-2-2-Ap-C-simple-quo2-mlb.pg new file mode 100644 index 0000000000..dc7e7b6bf3 --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-2-Ap-C/7-2-2-Ap-C-simple-quo2-mlb.pg @@ -0,0 +1,55 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Quotient rule (with trigonometric functions)) +## Institution(University of Calgary) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 9, 1); +$b = random(3, 8, 1); +$c = non_zero_random(-9,9,1); +$ab = $a*$b; +$bm1 = $b-1; + +$f = Formula("$a*x^($b)+$c")->reduce(); +$fp = Formula("$ab*x^($bm1)")->reduce(); +$g = Formula("cos(x)")->reduce(); +$gp = Formula("-sin(x)")->reduce(); + +$ans = Compute("([$fp]*[$g]-[$f]*[$gp])/(([$g])^2)"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$f/$g]``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +[``f'(x)=\frac{(([$f])'*[$g] - ([$f])*([$g])')}{([$g])^2} =[$ans]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); \ No newline at end of file diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-3-Ap-C/7-2-3-Ap-C-simple-chain1-mlb.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-3-Ap-C/7-2-3-Ap-C-simple-chain1-mlb.pg new file mode 100644 index 0000000000..27674edb7a --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-3-Ap-C/7-2-3-Ap-C-simple-chain1-mlb.pg @@ -0,0 +1,59 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Chain rule (without trigonometric functions)) +## Institution(University of Calgary) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 9, 1); +$b = random(3, 8, 1); +$c = non_zero_random(-9,9,1); +$d = $b+random(1,3,1); +$cd = $c*$d; +$ab = $a*$b; +$bm1 = $b-1; +$dm1 = $d-1; +$e = random(2,9,1); +$em1 = $e-1; + +$f = Formula("$a*x^($b)+$c*x^($d)")->reduce(); +$fp = Formula("$ab*x^($bm1)+$cd*x^($dm1)")->reduce(); + + +$ans = Compute("$e*(([$f])^$em1) * [$fp]"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=([$f])^[$e]``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +[``f'(x)=[$e]*([$f])^{[$e]-1} *([$f])' =[$ans]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-3-Ap-C/7-2-3-Ap-C-simple-chain2-mlb.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-3-Ap-C/7-2-3-Ap-C-simple-chain2-mlb.pg new file mode 100644 index 0000000000..27674edb7a --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-3-Ap-C/7-2-3-Ap-C-simple-chain2-mlb.pg @@ -0,0 +1,59 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Chain rule (without trigonometric functions)) +## Institution(University of Calgary) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(2, 9, 1); +$b = random(3, 8, 1); +$c = non_zero_random(-9,9,1); +$d = $b+random(1,3,1); +$cd = $c*$d; +$ab = $a*$b; +$bm1 = $b-1; +$dm1 = $d-1; +$e = random(2,9,1); +$em1 = $e-1; + +$f = Formula("$a*x^($b)+$c*x^($d)")->reduce(); +$fp = Formula("$ab*x^($bm1)+$cd*x^($dm1)")->reduce(); + + +$ans = Compute("$e*(([$f])^$em1) * [$fp]"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=([$f])^[$e]``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +[``f'(x)=[$e]*([$f])^{[$e]-1} *([$f])' =[$ans]``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-4-Ap-I/7-2-4-Ap-I-mtpl-prod-1-cmm.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-4-Ap-I/7-2-4-Ap-I-mtpl-prod-1-cmm.pg new file mode 100644 index 0000000000..9c8167728b --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-4-Ap-I/7-2-4-Ap-I-mtpl-prod-1-cmm.pg @@ -0,0 +1,73 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Product rule (with trigonometric functions)) +## Date(30 April 2025) +## Institution(University of Calgary) +## Author(Claudia Mahler) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$A = random(2, 6, 1); +$B = random(2, 6, 1); +$C = random(2, 5, 1); +$D = $C+2; +$F = random(2, 6, 1); + +$Cplus = $C+1; +$Dplus = $D+1; +$AB = $A*$B; +$ABC = $A*$B*$Cplus; +$AD = $A*$Dplus; + + +$firstsum = Formula("((($A)*($B)*x^($Cplus))-(($A)*x^($Dplus)))*((-1)*($F)*sin(x))")->reduce(); + +$secondsum = Formula("((($Cplus)*($A)*($B)*x^($C))-(($Dplus)*($A)*x^($D)))*(($F)*cos(x))")->reduce(); + + +$ans = Compute("[$firstsum] + [$secondsum]"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=[$A]x([$B]x^[$C]-x^[$D])([$F]\cos(x))``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + + +BEGIN_PGML_SOLUTION +This is a product of three functions. To make computing the derivative easier, multiply the [``[$A]x``] through the second function: + +[``f(x)=[$A]x([$B]x^[$C]-x^[$D])([$F]\cos(x)) = ([$AB]x^[$Cplus]-[$A]x^[$Dplus])([$F]\cos(x))``] + +Now we can more easily use the product rule, which states [``(g(x)h(x))'=g(x)h'(x)+ g'(x)h(x)``]. + + +[``f'(x)=(([$AB]x^[$Cplus]-[$A]x^[$Dplus])([$F]\cos(x)))' = ([$AB]x^[$Cplus]-[$A]x^[$Dplus])(-[$F]\sin(x)) + ([$ABC]x^[$C]-[$AD]x^[$D])([$F]\cos(x)))``] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-4-Ap-I/7-2-4-Ap-I-mtpl-prod-2-cmm.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-4-Ap-I/7-2-4-Ap-I-mtpl-prod-2-cmm.pg new file mode 100644 index 0000000000..1175339ee4 --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-4-Ap-I/7-2-4-Ap-I-mtpl-prod-2-cmm.pg @@ -0,0 +1,72 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Product rule (without trigonometric functions)) +## Date(30 April 2025) +## Institution(University of Calgary) +## Author(Claudia Mahler) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$A = random(2, 5, 1); +$B = random(3, 10, 1); +$C = random(2, 5, 1); +$D = random(2, 5, 1); +$F = random(3, 10, 1); + +$Dplus = $D+1; +$Dmin = $D-1; +$AC = $A*$C; +$AF= $A*$F; +$ACD = $A*$C*$D; +$CDplus = $C*$Dplus; + +$firstsum = Formula("((($A)*($C)*x^($D))+(($A)*($F))-(($C)*x^($Dplus))-(($F)*x))*(e^x)")->reduce(); + +$secondsum = Formula("((($A)*($C)*($D)*x^($Dmin))-(($C)*($Dplus)*x^($D))-($F))*((e^x)+($B))")->reduce(); + + +$ans = Compute("[$firstsum] + [$secondsum]"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=([$A]-x)(e^x+[$B])([$C]x^[$D]+[$F])``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +This is a product of three functions. To make computing the derivative easier, multiply [``([$A]-x)``] and [``([$C]x^[$D]+[$F])``]: + +[``f(x)=([$A]-x)(e^x+[$B])([$C]x^[$D]+[$F]) = ([$AC]x^[$D] + [$AF] - [$C]x^[$Dplus]-[$F]x)(e^x+[$B])``] + +Now we can more easily use the product rule, which states [``(g(x)h(x))'=g(x)h'(x)+ g'(x)h(x)``]. + + +[``\begin{aligned}f'(x)&=(([$AC]x^[$D] + [$AF] - [$C]x^[$Dplus]-[$F]x)(e^x+[$B]))' \\ &= ([$AC]x^[$D] + [$AF] - [$C]x^[$Dplus]-[$F]x)(e^x) + ([$ACD]x^[$Dmin]-[$CDplus]x^[$D]-[$F])(e^x+[$B])\end{aligned}``] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-4-Ap-I/7-2-4-Ap-I-mtpl-prod-3-cmm.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-4-Ap-I/7-2-4-Ap-I-mtpl-prod-3-cmm.pg new file mode 100644 index 0000000000..a449a54464 --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-4-Ap-I/7-2-4-Ap-I-mtpl-prod-3-cmm.pg @@ -0,0 +1,63 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Product rule (without trigonometric functions)) +## Date(2 May 2025) +## Institution(University of Calgary) +## Author(Claudia Mahler) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$A = random(2, 5, 1); +$B = random(3, 7, 1); +$C = $B+1; +$D = random(2, 5, 1); + +$xval = random(1, 5, 1); +$Amin = $A-1; +$Aplus = $A+1; +$Aplusplus = $A+2; +$BC = $B*$C; +$CD = $C*$D; +$BD = $B*$D; +$BCD = $B*$C*$D; +$BBDD = 2*$B*$D; + +$firstsum = Formula("(($xval^$A)+$B)*((2*$D*$xval)-($C*$D))")->reduce(); + +$secondsum = Formula("($A*($xval^$Amin))*(($D*($xval^2))-($C*$D*$xval))")->reduce(); + +$ans = Compute("[$firstsum] + [$secondsum]"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=(x^[$A]+[$B])(x-[$C])([$D]x)``]. Find [`f'([$xval])`]. + +[`f'([$xval])=`][_]{$ans}{20} +END_PGML + + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-5-Ap-I/7-2-5-Ap-I-mtpl-chain-1-cmm.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-5-Ap-I/7-2-5-Ap-I-mtpl-chain-1-cmm.pg new file mode 100644 index 0000000000..bb7713db47 --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-5-Ap-I/7-2-5-Ap-I-mtpl-chain-1-cmm.pg @@ -0,0 +1,75 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Derivatives involving multiple rules (all rules)) +## Date(27 April 2025) +## Institution(University of Calgary) +## Author(Claudia Mahler) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$A = random(3, 6, 1); +$B = random(1, 10, 1); +$C = random(3, 6, 1); +$D = random(2, 9, 1); +$F = random(3, 5, 1); + +$Amin = $A-1; +$Cmin = $C-1; +$Fmin = $F-1; +$DF = $D*$F; + + +$ab = $a*$b; +$bm1 = $b-1; +$dm1 = $d-1; +$e = random(2,9,1); +$em1 = $e-1; + +$firstsum = Formula("$C*$A*x^($Amin)*(((x^($A)-$B))**$Cmin)")->reduce(); +$secondsum = Formula("($D*$F*x^($Fmin))*exp($D*x^($F))")->reduce(); + + +$ans = Compute("[$firstsum] + [$secondsum]"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=(x^[$A]-[$B])^[$C] + e^{[$D]*x^[$F]}``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +Each piece of this sum involves the use of the chain rule to find [``f'(x)``]. + +[``\begin{aligned}f'(x) &=((x^[$A]-[$B])^[$C])' + (e^{[$D]*x^[$F]})' \\ +&= [$C] (x^[$A]-[$B])^{[$C]-1} \cdot [$A] \cdot x^{[$A]-1} + e^{[$D]x^[$F]} \cdot [$F] \cdot [$D] \cdot x^{[$F]-1} \\ +&= [$C*$A] x^[$Amin] (x^[$A]-[$B])^[$Cmin] + [$F*$D] x^[$Fmin] e^{[$D]x^[$F]} \end{aligned} ``]. + + + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-5-Ap-I/7-2-5-Ap-I-mtpl-chain-2-cmm.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-5-Ap-I/7-2-5-Ap-I-mtpl-chain-2-cmm.pg new file mode 100644 index 0000000000..26047f7ca3 --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-5-Ap-I/7-2-5-Ap-I-mtpl-chain-2-cmm.pg @@ -0,0 +1,62 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Chain rule (without trigonometric functions)) +## Date(2 May 2025) +## Institution(University of Calgary) +## Author(Claudia Mahler) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$A = random(2, 4, 1); +$B = random(2, 3, 1); +$C = 2; +$D = random(2, 3, 1); + +$Bmin = $B-1; +$Dmin = $D-1; + +$valx = random(0, 3, 1); +$funcx = random(1, 3, 1); +$funcxderiv = $funcx+1; + + +$firstsum = Formula("($B*(($funcx+($A*$valx))^$Bmin))*($funcxderiv+$A)")->reduce(); + +$secondsum = Formula("($D*(($C*$funcx)^$Dmin))*($C*$funcxderiv)")->reduce(); + + +$ans = Compute("[$firstsum] - [$secondsum]"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Find [`g'(x)`] at [`x=[$valx]`] if [`g(x)=(f(x)+[$A]x)^[$B]-([$C]f(x))^[$D]`], [`f([$valx])=[$funcx]`], and [`f'([$valx])=[$funcxderiv]`]. + +[`g'([$valx])=`][_]{$ans}{20} +END_PGML + + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-chain-1-cmm.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-chain-1-cmm.pg new file mode 100644 index 0000000000..f3be24374f --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-chain-1-cmm.pg @@ -0,0 +1,68 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + +## KEYWORDS() + +## DBsubject('') +## DBchapter('') +## DBsection('') +## Date('27 April 2025') +## Author('Claudia Mahler') +## Institution('University of Calgary') + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$A = random(2, 6, 1); +$B = random(1, 10, 1); +$C = random(2, 6, 1); +$D = random(2, 9, 1); +$F = random(2, 5, 1); + +$Amin = $A-1; +$Cmin = $C-1; +$Fmin = $F-1; +$DF = $D*$F; + + +$ab = $a*$b; +$bm1 = $b-1; +$dm1 = $d-1; +$e = random(2,9,1); +$em1 = $e-1; + +$firstsum = Formula("$C*$A*x^($Amin)*(((x^($A)-$B))**$Cmin)")->reduce(); +$secondsum = Formula("($D*$F*x^($Fmin))*exp($D*x^($F))")->reduce(); + + +$ans = Compute("[$firstsum] + [$secondsum]"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=(x^[$A]-[$B])^[$C] + e^{[$D]*x^[$F]}``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +NOT DONE YET +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-prod-chain-1-cmm.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-prod-chain-1-cmm.pg new file mode 100644 index 0000000000..53ece0744c --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-prod-chain-1-cmm.pg @@ -0,0 +1,77 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Derivatives involving multiple rules (all rules)) +## Date(27 April 2025) +## Institution(University of Calgary) +## Author(Claudia Mahler) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$A = random(1, 6, 1); +$B = random(2, 9, 1); +$C = random(3, 6, 1); +$D = random(3, 6, 1); +$F = random(2, 5, 1); + +$Cmin = $C-1; +$Dmin = $D-1; +$Fmin = $F-1; + +$firstnum = Formula("$B*$C*(($C+x^($D))^($F))*(($A+($B*x))^($Cmin))")->reduce(); +$secondnum = Formula("$F*$D*(x^($Dmin))*(($A+($B*x))^($C))*(($C+(x^($D)))^($Fmin))")->reduce(); +$denom = Formula("($C+x^($D))^(2*$F)")->reduce(); + + +$ans = Compute("([$firstnum] - [$secondnum])/[$denom]"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=\frac{([$A]+[$B]*x)^[$C]}{([$C]+x^[$D])^[$F]}``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +To find this derivative, we need to use a combination of the quotient rule and a few applications of the chain rule. Recall that the quotient rule tells us that if we have a function + +[``j(x)=\frac{g(x)}{h(x)}``] + +then + +[``j'(x)=\frac{h(x)g'(x) - g(x)h'(x)}{(h(x))^2}``] + +So: + +[``f'(x)=\frac{(([$C]+x^[$D])^[$F]) \cdot (([$A]+[$B]*x)^[$C])'-(([$A]+[$B]*x)^[$C]) \cdot (([$C]+x^[$D])^[$F])'}{(([$C]+x^[$D])^[$F])^2}``] + +[``= \frac{(([$C]+x^[$D])^[$F])([$C*$B]([$A]+[$B]*x)^{[$C]-1})-(([$A]+[$B]*x)^[$C])([$F*$D]x^{[$D]-1}([$C]+x^[$D])^{[$F]-1})}{([$C]+x^[$D])^[$F*2]} ``] + +[``= \frac{(([$C]+x^[$D])^[$F])([$C*$B]([$A]+[$B]*x)^[$Cmin])-(([$A]+[$B]*x)^[$C])([$F*$D]x^{[$Dmin]}([$C]+x^[$D])^[$Fmin])}{([$C]+x^[$D])^[$F*2]}``] + + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-prod-chain-2-cmm.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-prod-chain-2-cmm.pg new file mode 100644 index 0000000000..91b8f4768f --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-prod-chain-2-cmm.pg @@ -0,0 +1,76 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Chain rule (with trigonometric functions)) +## Date(30 April 2025) +## Institution(University of Calgary) +## Author(Claudia Mahler) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$A = random(2, 4, 1); +$B = random(2, 4, 1); +$C = random(3, 10, 1); +$D = random(3, 10, 1); +$F = random(2, 4, 1); + +$Bmin = $B-1; + + +$firstsum = Formula("((e^($A*x))-cos(x^$B))*($C+(1/x)-(4*$F*x^3))")->reduce(); +$secondsum = Formula("(($A*e^($A*x))+(($B*x^$Bmin)*sin(x^$B)))*(($C*x)+(ln($D*x))-($F*x^4))")->reduce(); + + +$ans = Compute("[$firstsum] + [$secondsum]"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=(e^{[$A]x}-\cos(x^[$B]))([$C]x+\ln([$D]x)-[$F]x^4)``]. Find [`f'(x)`]. + +[`f'(x)=`][_]{$ans}{20} +END_PGML + +BEGIN_PGML_SOLUTION +To find this derivative, we need to use a combination of the product rule and a few applications of the chain rule. Recall that the product rule tells us that if we have a function + +[``j(x)=g(x) \cdot h(x)``] + +then + +[``j'(x)=g(x) \cdot h'(x) + g'(x) \cdot h(x)``] + +So: + +[``f'(x)=(e^{[$A]x}-\cos(x^[$B]))([$C]x+\ln([$D]x)-[$F]x^4)' + (e^{[$A]x}-\cos(x^[$B]))'([$C]x+\ln([$D]x)-[$F]x^4)``] + +[`` = (e^{[$A]x}-\cos(x^[$B]))([$C]+[$D]\frac{1}{[$D]x}-[$F*4]x^{4-1}) + ([$A]e^{[$A]x}+[$B]x^{[$B]-1}\sin(x^[$B]))([$C]x+\ln([$D]x)-[$F]x^4)``] + +[`` = (e^{[$A]x}-\cos(x^[$B]))([$C]+\frac{1}{x}-[$F*4]x^3) + ([$A]e^{[$A]x}+[$B]x^[$Bmin]\sin(x^[$B]))([$C]x+\ln([$D]x)-[$F]x^4)``] + + + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-prod-chain-3-cmm.pg b/Contrib/UCalgary/249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-prod-chain-3-cmm.pg new file mode 100644 index 0000000000..64046fb11e --- /dev/null +++ b/Contrib/UCalgary/249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-prod-chain-3-cmm.pg @@ -0,0 +1,61 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Differentiation) +## DBsection(Derivatives involving multiple rules (all rules)) +## Date(2 May 2025) +## Institution(University of Calgary) +## Author(Claudia Mahler) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$A = random(2, 4, 1); +$B = random(3, 4, 1); +$C = $A+1; +$D = random(3, 4, 1); +$F = random(3, 4, 1); + +$xval = random(1, 3, 1); +$Bmin = $B-1; +$Dmin = $D-1; +$Fmin = $F-1; + + +$firstsum = Formula("($xval^$F)*$D*((($A*($xval^$B))-($C*$xval))^$Dmin)*(($B*$A*($xval^$Bmin))-$C)")->reduce(); +$secondsum = Formula("((($A*($xval^$B))-($C*$xval))^$D)*$F*($xval^$Fmin)")->reduce(); +$denom = Formula("$xval^($F*2)")->reduce(); + + +$ans = Compute("([$firstsum] - [$secondsum])/[$denom]"); +# If necessary restrict the domain of evaluation of the function to +# values where it is defined, and where the magnitude of the outputs +# doesn't get too large or too close to 0. +#$ans->{limits} = [1,3]; + +BEGIN_PGML +Let [``f(x)=\frac{([$A]x^[$B]-[$C]x)^[$D]}{x^[$F]}``]. Find [`f'([$xval])`]. + +[`f'([$xval])=`][_]{$ans}{20} +END_PGML + + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-1-0-R-I/8-1-0-R-I-defn-inc-dec-2-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-1-0-R-I/8-1-0-R-I-defn-inc-dec-2-jms.pg new file mode 100644 index 0000000000..def78dce29 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-1-0-R-I/8-1-0-R-I-defn-inc-dec-2-jms.pg @@ -0,0 +1,56 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(20 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGcourse.pl","parserPopUp.pl"); + + +$increasing = DropDown( + [ + 'constant', + 'increasing', + 'decreasing', + 'concave upward', + 'concave downward' + ], + 'increasing' +); + +$decreasing = DropDown( + [ + 'constant', + 'increasing', + 'decreasing', + 'concave upward', + 'concave downward' + ], + 'decreasing' +); + + + +BEGIN_PGML + +Fill in the blanks to identify the following concepts + +Let [`f`] be a function defined on an interval [`I`]. + ++ [`f`] is [_]{$decreasing} on the interval [`I`] if for all [`a,b\in I`], if [`a f(b)`]. + ++ [`f`] is [_]{$increasing} on the interval [`I`] if for all [`a,b\in I`], if [`a', + '<', + '=' + ], + '<' +); + +$more = DropDown( + [ + '>', + '<', + '=' + ], + '>' +); + + +BEGIN_PGML + +Fill in the blanks to complete the following definitions of **increasing** and **decreasing** functions, respectively. + +Let [`f`] be a function defined on an interval [`I`]. + ++ [`f`] is **increasing** on the interval [`I`] if [_]{$quant} [`a,b\in I`], if [`a0`] [_]{$popup_quant} [`x\in I`], then [`g`] is [_]{$popup_inc} on the interval [`I`]. + +END_PGML + +BEGIN_PGML_SOLUTION ++ if [`g'(x)<0`] for all [`x\in I`], then [`g`] is decreasing on the interval [`I`]. + ++ if [`g'(x)>0`] for all [`x\in I`], then [`g`] is increasing on the interval [`I`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-1-1-R-C/8-1-1-R-C-state-der-inc-dec-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-1-1-R-C/8-1-1-R-C-state-der-inc-dec-jms.pg new file mode 100644 index 0000000000..8b531edf1e --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-1-1-R-C/8-1-1-R-C-state-der-inc-dec-jms.pg @@ -0,0 +1,65 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(20 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGcourse.pl", "parserPopUp.pl"); + + +$popup_pos = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + 'positive' +); + +$popup_neg = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + 'negative' +); + +$popup_quant = DropDown( + [ + 'for all', + 'for some' + ], + 'for all' +); + + +BEGIN_PGML +Let [`f`] be a differentiable function defined on an open interval [`I`]. + +Complete the following statements to make them **true** for any such function [`f`]. + ++ if [`f'(x)`] is [_]{$popup_pos} [_]{$popup_quant} [`x\in I`], then [`f`] is increasing on the interval [`I`]. + ++ if [`f'(x)`] is [_]{$popup_neg} [_]{$popup_quant} [`x\in I`], then [`f`] is decreasing on the interval [`I`]. + +END_PGML + +BEGIN_PGML_SOLUTION ++ if [`f'(x)>0`] for all [`x\in I`], then [`f`] is increasing on the interval [`I`]. + ++ if [`f'(x)<0`] for all [`x\in I`], then [`f`] is decreasing on the interval [`I`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-1-2-U-C/8-1-2-U-C-cubic-inc-dec-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-1-2-U-C/8-1-2-U-C-cubic-inc-dec-jms.pg new file mode 100644 index 0000000000..9039e98d38 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-1-2-U-C/8-1-2-U-C-cubic-inc-dec-jms.pg @@ -0,0 +1,80 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(19 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#roots +$a = random(-3,-2,1); +$b = $a + random(3,4,1); +$ab = $a*$b; +$k = random(-1,1,2); +# fix some problematic cases for the graph overflowing the grid +if($a == -3 && $k==1) +{$c = -6;} +elsif($a == -3 && $k== -1) +{$c = 6;} +elsif($a == -2 && $k== 1) +{$c = random(-3,-2,1);} +elsif($a == -2 && $k== -1) +{$c = random(2,3,1);} +else +{$c = random(1,2,1);} + +Context("Interval"); + +if($k < 0) +{ +$inc = "($a,$b)"; +$dec = List("(-5,$a)","($b,5)"); +} +else +{ +$dec = "($a,$b)"; +$inc = List("(-5,$a)","($b,5)"); +} + + + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-7) grid (5,7); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth] plot[domain={-5}:{5}] (\x,{$k*((\x*\x*\x)/18 - ($a/12)*(\x*\x) - ($b/12)*(\x*\x) + ($ab/6)*\x)+$c}); +\draw[red] (2,{$k*((8)/18 - ($a/12)*(4) - ($b/12)*(4) + ($ab/6)*2)+$c}) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the function [`y=f(x)`] on the interval [`(-5,5)`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +Determine the open subintervals of [`(-5,5)`] on which [`f`] is increasing or decreasing. + +Enter the intervals that you find as a **list separated by commas**, if there are no such values enter [|None|]*. + +[`f`] is increasing on the interval(s): [_]{$inc}{20} + +[`f`] is decreasing on the interval(s): [_]{$dec}{20} + +[@helpLink('intervals')@]* + +END_PGML + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-1-2-U-C/8-1-2-U-C-pw-inc-dec-1-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-1-2-U-C/8-1-2-U-C-pw-inc-dec-1-jms.pg new file mode 100644 index 0000000000..303e59b184 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-1-2-U-C/8-1-2-U-C-pw-inc-dec-1-jms.pg @@ -0,0 +1,236 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(19 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +$a = random(-8,-4,1); +$b = $a + random(2,4,1); +$c = $b + random(2,4,1); +$d = $c + random(2,4,1); + +$fm10 = random(-7,7,1); +$fa = random(-6,6,1); +$fb = random(-6,6,1); +$fc = random(-6,6,1); +$fd = random(-6,6,1); +$f10 = random(-7,7,1); + +# determine behaviour on small intervals; always inc/dec/constant +if($fm10 > $fa) +{$tentoa = 'decreasing';} +elsif($fm10 < $fa) +{$tentoa = 'increasing';} +else +{$tentoa = 'constant';} + +if($fa > $fb) +{$atob = 'decreasing';} +elsif($fa < $fb) +{$atob = 'increasing';} +else +{$atob = 'constant';} + +if($fb > $fc) +{$btoc = 'decreasing';} +elsif($fb < $fc) +{$btoc = 'increasing';} +else +{$btoc = 'constant';} + +if($fc > $fd) +{$ctod = 'decreasing';} +elsif($fc < $fd) +{$ctod = 'increasing';} +else +{$ctod = 'constant';} + +if($fd > $f10) +{$dtoten = 'decreasing';} +elsif($fd < $f10) +{$dtoten = 'increasing';} +else +{$dtoten = 'constant';} + +# determine behavior on some concatenated intervals sometimes "neither" bevahiour +# use eq for string comparison == does not behave correctly for this comparison +if($tentoa eq $atob) +{$tentob = $tentoa;} +else +{$tentob = 'nonconstant and neither increasing nor decreasing';} + +if($atob eq $btoc) +{$atoc = $atob;} +else +{$atoc = 'nonconstant and neither increasing nor decreasing';} + +if($btoc eq $ctod) +{$btod = $btoc;} +else +{$btod = 'nonconstant and neither increasing nor decreasing';} + +#produce popups for each of the eight intervals above +$popup_tentoa = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'nonconstant and neither increasing nor decreasing' + ], + $tentoa +); + +$popup_tentob = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'nonconstant and neither increasing nor decreasing' + ], + $tentob +); + +$popup_atob = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'nonconstant and neither increasing nor decreasing' + ], + $atob +); + +$popup_atoc = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'nonconstant and neither increasing nor decreasing' + ], + $atoc +); + +$popup_btoc = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'nonconstant and neither increasing nor decreasing' + ], + $btoc +); + +$popup_ctod = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'nonconstant and neither increasing nor decreasing' + ], + $ctod +); + +$popup_btod = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'nonconstant and neither increasing nor decreasing' + ], + $btod +); + +$popup_dtoten = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'nonconstant and neither increasing nor decreasing' + ], + $dtoten +); + +# choose random subsets of intervals, paired with popup, to ask below +# use eq for string comparison == does not behave correctly for this comparison + +# one end -10 to a or d to 10 +$I1 = list_random("(-10,$a)","($d,10)"); + +if($I1 eq "(-10,$a)") +{$popup1 = $popup_tentoa;} +else +{$popup1 = $popup_dtoten;} + +# one interior a to b, b to c, or c to d +$I2 = list_random("($a,$b)","($b,$c)", "($c,$d)"); + +if($I2 eq "($a,$b)") +{$popup2 = $popup_atob;} +elsif($I2 eq "($b,$c)") +{$popup2 = $popup_btoc;} +else +{$popup2 = $popup_ctod;} + +# one concatenated -10 to b, a to c, or b to d +$I3 = list_random("(-10,$b)","($a,$c)", "($b,$d)"); + +if($I3 eq "(-10,$b)") +{$popup3 = $popup_tentob;} +elsif($I3 eq "($a,$c)") +{$popup3 = $popup_atoc;} +else +{$popup3 = $popup_btod;} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) -- ($d,$fd); +\draw[->,red, very thick] ($d,$fd) -- (10,$f10); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +\Context("Interval"); + +BEGIN_PGML +Recall the following definitions: + ++ a function [`f`] is **increasing** on an interval [`I`] if for all [`a,b\in I`], if [`a f(b)`]. ++ a function [`f`] is **constant** on an interval [`I`] if for all [`a,b\in I`], [`f(a) = f(b)`]. + +Note, our definition of **increasing** may be called **strictly increasing** elsewhere; similarly for our definition of **decreasing**. + +Consider the graph of the piecewise function [`y=f(x)`] given below. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +a) On the interval [`[$I1]`] the function [`f`] is [_]{$popup1} + +a) On the interval [`[$I2]`] the function [`f`] is [_]{$popup2} + +a) On the interval [`[$I3]`] the function [`f`] is [_]{$popup3} + +END_PGML + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-1-2-U-C/8-1-2-U-C-quart-inc-dec-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-1-2-U-C/8-1-2-U-C-quart-inc-dec-jms.pg new file mode 100644 index 0000000000..5c1be0b9d9 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-1-2-U-C/8-1-2-U-C-quart-inc-dec-jms.pg @@ -0,0 +1,99 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(19 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#roots +$a = random(-5,-4,1); +$b = $a + random(5,6,1); +$c = $b + random(3,4,1); +$ab = $a*$b; +$ac = $a*$c; +$bc = $b*$c; +$abc = $a*$b*$c; +$sum = $a+$b+$c; +$quad = $ab/2 + $ac/2 + $bc/2; +$k = random(-2,-1,1); + +# fix graph in "bad cases" +if($k > 0 && $c < 4) +{$d = random(-3,-2,1); +$c=4; +$ac = $a*$c; +$bc = $b*$c; +$abc = $a*$b*$c; +$sum = $a+$b+$c; +$quad = $ab/2 + $ac/2 + $bc/2;} +elsif($k < 0 && $c < 4) +{$d = random(2,3,1); +$c=4; +$ac = $a*$c; +$bc = $b*$c; +$abc = $a*$b*$c; +$sum = $a+$b+$c; +$quad = $ab/2 + $ac/2 + $bc/2;} +elsif($k > 0 && abs($b) < 2) +{$d = 0;} +elsif($k < 0 && abs($b) < 2) +{$d = 0;} +elsif($k > 0) +{$d = random(2,3,1);} +elsif($k < 0) +{$d = random(-3,-2,1);} + +Context("Interval"); + +if($k < 0) +{ +$inc = List("(-7,$a)","($b,$c)"); +$dec = List("($a,$b)","($c,7)"); +} +else +{ +$dec = List("(-7,$a)","($b,$c)"); +$inc = List("($a,$b)","($c,7)"); +} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-7,0) -- (7,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-10) -- (0,10) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-7,-10) grid (7,10); +\foreach \x in {-6,-4,-2,2,4,6} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-8, -6,-4,-2,2,4,6,8} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth] plot[domain={-7}:{7}] (\x,{$k*((-$abc/50)*\x + ($quad/50)*(\x*\x) - ($sum/150)*(\x*\x*\x) + (\x*\x*\x*\x)/200)+$d}); +\draw[red] ($b,1) node[above right, outer sep=2pt]{\(y=g(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the function [`y=g(x)`] on the interval [`(-7,7)`]. + +[@ image($graph_image, width => 600, tex_size => 600) @]* + +Determine the open subintervals of [`(-7,7)`] on which [`g`] is increasing or decreasing. + +Enter the intervals that you find as a **list separated by commas**, if there are no such values enter [|None|]*. + +[`g`] is increasing on the interval(s): [_]{$inc}{20} + +[`g`] is decreasing on the interval(s): [_]{$dec}{20} + +[@helpLink('intervals')@]* + +END_PGML + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-1-3-U-C/8-1-3-U-C-der-cubic-inc-dec-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-1-3-U-C/8-1-3-U-C-der-cubic-inc-dec-jms.pg new file mode 100644 index 0000000000..2ea68a6e3c --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-1-3-U-C/8-1-3-U-C-der-cubic-inc-dec-jms.pg @@ -0,0 +1,80 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(20 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#roots +$a = random(-4,-3,1); +$b = $a + random(3,4,1); +$c = $b + random(2,3,1); +$k = random(-1,1,2); + +Context("Interval"); + +if($k < 0) +{ +$inc = List("(-5,$a)","($b,$c)"); +$dec = List("($a,$b)","($c,5)"); +} +else +{ +$dec = List("(-5,$a)","($b,$c)"); +$inc = List("($a,$b)","($c,5)"); +} + +$critical = List("$a","$b","$c"); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-7) grid (5,7); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth] plot[domain={-5}:{5}] (\x,{$k*(\x-$a)*(\x-$b)*(\x-$c)/20}); +\draw[red] ($b,1) node[above right, outer sep=2pt]{\(y=f^\prime(x)\)}; +END_TIKZ + +BEGIN_PGML +Suppose that [`f`] is a differentiable function. + +Consider the following **graph of the derivative** [`y=f'(x)`] on the interval [`(-5,5)`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +Determine the open subintervals of [`(-5,5)`] on which the function [`f`] is increasing or decreasing. + + Enter the intervals that you find as a **list separated by commas**, if there are no such intervals enter [|None|]*. + + [`f`] is increasing on the interval(s): [_]{$inc}{20} + + [`f`] is decreasing on the interval(s): [_]{$dec}{20} + +[@helpLink('intervals')@]* + +END_PGML + +BEGIN_PGML_SOLUTION +[`f`] is increasing on intervals where [`f'(x)>0`] and [`f`] is decreasing on intervals where [`f'(x)<0`]. + +[`f`] is increasing on the intervals [`[$inc]`] + +[`f`] is decreasing on the intervals [`[$dec]`] + +[`f`] has critical points at [`x = [$critical]`] because [`f'([$a])=0, f'([$b])=0`] and [`f'([$c])=0`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-1-3-U-C/8-1-3-U-C-der-quart-inc-dec-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-1-3-U-C/8-1-3-U-C-der-quart-inc-dec-jms.pg new file mode 100644 index 0000000000..91b22e7a9a --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-1-3-U-C/8-1-3-U-C-der-quart-inc-dec-jms.pg @@ -0,0 +1,97 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(20 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#roots +$a = random(-6,-5,1); +$b = $a + random(4,5,1); +$c = $b + random(4,5,1); + +# fix scale by additional spacing to roots if needed +if( ($b-$a) == ($c-$b) && ($c<6) && ($c-$b)<5 ) +{$c = $c+1;} + + +$k = random(-1,1,2); + +if($k > 0) +{$low = -3; +$lowp1 = -2; +$high = 9; +$highm1=8;} +else +{$high = 3; +$highm1 = 2; +$low = -9; +$lowp1=-8;} + +Context("Interval"); + +if($k > 0) +{ +$inc = List("(-7,$a)","($b,$c)","($c,7)"); +$dec = List("($a,$b)"); +} +else +{ +$dec = List("(-7,$a)","($b,$c)","($c,7)"); +$inc = List("($a,$b)"); +} + +$critical = List("$a", "$b", "$c"); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-7,0) -- (7,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,$low) -- (0,$high) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-7,$low) grid (7,$high); +\foreach \x in {-6,-4,-2,2,4,6} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {$lowp1,...,$highm1} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth] plot[domain={-6.8}:{6.8}] (\x,{$k*(\x-$a)*(\x-$b)*(\x-$c)*(\x-$c)/200)}); +\draw[red] ($c,1) node[above right, outer sep=2pt]{\(y=g^\prime(x)\)}; +END_TIKZ + +BEGIN_PGML +Let [`g`] be a differentiable function. + +Consider the following **graph of the derivative** [`y=g'(x)`] on the interval [`(-7,7)`]. + +[@ image($graph_image, width => 600, tex_size => 600) @]* + +Determine the open subintervals of [`(-7,7)`] on which the function [`g`] is increasing or decreasing. + + Enter the intervals that you find as a **list separated by commas**, if there are no such intervals enter [|None|]*. + + [`g`] is increasing on the interval(s): [_]{$inc}{20} + + [`g`] is decreasing on the interval(s): [_]{$dec}{20} + +[@helpLink('intervals')@]* + +END_PGML + +BEGIN_PGML_SOLUTION +[`g`] is increasing on intervals where [`g'(x)>0`] and [`g`] is decreasing on intervals where [`g'(x)<0`]. + +[`g`] is increasing on the intervals [`[$inc]`] + +[`g`] is decreasing on the intervals [`[$dec]`] + +[`g`] has critical points at [`x = [$critical]`] because [`g'([$a])=0, g'([$b])=0`] and [`g'([$c])=0`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-1-3-U-C/8-1-3-U-C-pw-der-inc-dec-1-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-1-3-U-C/8-1-3-U-C-pw-der-inc-dec-1-jms.pg new file mode 100644 index 0000000000..632dd54a97 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-1-3-U-C/8-1-3-U-C-pw-der-inc-dec-1-jms.pg @@ -0,0 +1,209 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(19 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +#intervals +# (-10,$a), ($a,$c), ($c,$e), and ($e,10) + +$a = random(-8,-4,1); +$b = $a + random(2,3,1); +$c = $b + random(2,3,1); +$d = $c + random(2,3,1); +$e = $d + random(2,3,1); + +#funciton values + +$fm10 = random(2,7,1)*random(-1,1,2); +$fa = 0; +$fb = non_zero_random(-6,6,1); +$fc = 0; +$fd = non_zero_random(-6,6,1); +$fe = 0; +$f10 = random(2,7,1)*random(-1,1,2); + +#determine intervals of increase/decrease + +if($fm10 < 0) +{$tentoa = 'decreasing'; +$tentoa_sign = 'negative';} +else +{$tentoa = 'increasing'; +$tentoa_sign = 'positive';} + +if($fb < 0) +{$atoc = 'decreasing'; +$atoc_sign = 'negative';} +else +{$atoc = 'increasing'; +$atoc_sign = 'positive';} + +if($fd < 0) +{$ctoe = 'decreasing'; +$ctoe_sign = 'negative';} +else +{$ctoe = 'increasing'; +$ctoe_sign = 'positive';} + +if($f10 < 0) +{$etoten = 'decreasing'; +$etoten_sign = 'negative';} +else +{$etoten = 'increasing'; +$etoten_sign = 'positive';} + +#produce popups +#produce increasing/decreasing popups for each of the four intervals above +$popup_tentoa = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'neither increasing nor decreasing' + ], + $tentoa +); + +$popup_atoc = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'neither increasing nor decreasing' + ], + $atoc +); + +$popup_ctoe = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'neither increasing nor decreasing' + ], + $ctoe +); + +$popup_etoten = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'neither increasing nor decreasing' + ], + $etoten +); + +#produce popups +#produce positive/negative popups for each of the four intervals above +$popup_tentoa_sign = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + $tentoa_sign +); + +$popup_atoc_sign = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + $atoc_sign +); + +$popup_ctoe_sign = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + $ctoe_sign +); + +$popup_etoten_sign = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + $etoten_sign +); + + + +# select random two intervals +# one of left two intervals +$I1 = list_random("(-10,$a)","($a,$c)"); + +if($I1 eq "(-10,$a)") +{$popup1 = $popup_tentoa; +$posneg1 = $popup_tentoa_sign;} +else +{$popup1 = $popup_atoc; +$posneg1 = $popup_atoc_sign;} + +# one of right two intervals +$I2 = list_random("($c,$e)","($e,10)"); + +if($I2 eq "($c,$e)") +{$popup2 = $popup_ctoe; +$posneg2 = $popup_ctoe_sign;} +else +{$popup2 = $popup_etoten; +$posneg2 = $popup_etoten_sign;} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) -- ($d,$fd); +\draw[red, very thick] ($d,$fd) -- ($e,$fe); +\draw[->,red, very thick] ($e,$fe) -- (10,$f10); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f^\prime(x)\)}; +END_TIKZ + +BEGIN_PGML +Let [`f`] be a differentiable function. + +Consider the following **graph of the derivative** [`y=f'(x)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +a) The function [`f`] is [_]{$popup1} on the interval [`[$I1]`] because [`f'(x)`] is [_]{$posneg1} for all [`x\in[$I1].`] + +a) The function [`f`] is [_]{$popup2} on the interval [`[$I2]`] because [`f'(x)`] is [_]{$posneg2} for all [`x\in[$I2].`] + +END_PGML + +BEGIN_PGML_SOLUTION +[`f`] is increasing on intervals where [`f'(x)>0`] and [`f`] is decreasing on intervals where [`f'(x)<0`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-1-3-U-C/8-1-3-U-C-pw-der-inc-dec-2-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-1-3-U-C/8-1-3-U-C-pw-der-inc-dec-2-jms.pg new file mode 100644 index 0000000000..1afefb89f2 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-1-3-U-C/8-1-3-U-C-pw-der-inc-dec-2-jms.pg @@ -0,0 +1,209 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(19 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +#intervals +# (-10,$a), ($a,$c), ($c,$e), and ($e,10) + +$a = random(-8,-6,1); +$b = $a + random(2,3,1); +$c = $b + random(2,4,1); +$d = $c + random(2,3,1); +$e = $d + random(2,4,1); + +#funciton values + +$fm10 = random(2,7,1)*random(-1,1,2); +$fa = 0; +$fb = random(2,7,1)*random(-1,1,2); +$fc = 0; +$fd = random(2,7,1)*random(-1,1,2); +$fe = 0; +$f10 = random(2,7,1)*random(-1,1,2); + +#determine intervals of increase/decrease + +if($fm10 < 0) +{$tentoa = 'decreasing'; +$tentoa_sign = 'negative';} +else +{$tentoa = 'increasing'; +$tentoa_sign = 'positive';} + +if($fb < 0) +{$atoc = 'decreasing'; +$atoc_sign = 'negative';} +else +{$atoc = 'increasing'; +$atoc_sign = 'positive';} + +if($fd < 0) +{$ctoe = 'decreasing'; +$ctoe_sign = 'negative';} +else +{$ctoe = 'increasing'; +$ctoe_sign = 'positive';} + +if($f10 < 0) +{$etoten = 'decreasing'; +$etoten_sign = 'negative';} +else +{$etoten = 'increasing'; +$etoten_sign = 'positive';} + +#produce popups +#produce increasing/decreasing popups for each of the four intervals above +$popup_tentoa = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'neither increasing nor decreasing' + ], + $tentoa +); + +$popup_atoc = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'neither increasing nor decreasing' + ], + $atoc +); + +$popup_ctoe = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'neither increasing nor decreasing' + ], + $ctoe +); + +$popup_etoten = DropDown( + [ + 'increasing', + 'decreasing', + 'constant', + 'neither increasing nor decreasing' + ], + $etoten +); + +#produce popups +#produce positive/negative popups for each of the four intervals above +$popup_tentoa_sign = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + $tentoa_sign +); + +$popup_atoc_sign = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + $atoc_sign +); + +$popup_ctoe_sign = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + $ctoe_sign +); + +$popup_etoten_sign = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + $etoten_sign +); + + + +# select random two intervals +# one of two end intervals +$I1 = list_random("(-10,$a)","($e,10)"); + +if($I1 eq "(-10,$a)") +{$popup1 = $popup_tentoa; +$posneg1 = $popup_tentoa_sign;} +else +{$popup1 = $popup_etoten; +$posneg1 = $popup_etoten_sign;} + + +# one of right two intervals +$I2 = list_random("($a,$c)","($c,$e)"); + +if($I2 eq "($a,$c)") +{$popup2 = $popup_atoc; +$posneg2 = $popup_atoc_sign;} +else +{$popup2 = $popup_ctoe; +$posneg2 = $popup_ctoe_sign;} + + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) .. controls ($b,$fb) .. ($c,$fc); +\draw[red, very thick] ($c,$fc) .. controls ($d,$fd) .. ($e,$fe); +\draw[->,red, very thick] ($e,$fe) -- (10,$f10); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=h^\prime(x)\)}; +END_TIKZ + +BEGIN_PGML +Let [`h`] be a differentiable function. + +Consider the following **graph of the derivative** [`y=h'(x)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +a) The function [`h`] is [_]{$popup1} on the interval [`[$I1]`] becasue [`h'(x)`] is [_]{$posneg1} for all [`x\in[$I1].`] + +a) The function [`h`] is [_]{$popup2} on the interval [`[$I2]`] becasue [`h'(x)`] is [_]{$posneg2} for all [`x\in[$I2].`] + +END_PGML + +BEGIN_PGML_SOLUTION +[`h`] is increasing on intervals where [`h'(x)>0`] and [`h`] is decreasing on intervals where [`h'(x)<0`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-1-4-Ap-C/8-1-4-Ap-C-abstract-1-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-1-4-Ap-C/8-1-4-Ap-C-abstract-1-jms.pg new file mode 100644 index 0000000000..5dd67dedf0 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-1-4-Ap-C/8-1-4-Ap-C-abstract-1-jms.pg @@ -0,0 +1,69 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(24 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context("Interval"); + +$a = random(2, 9, 1); +$gsign = random(-1,1,2); +if($gsign == -1) +{$gsymb = '<'; +$finc = List("(0,$a)"); +$fdec = List("(-inf,0)", "($a,inf)"); +} +else +{$gsymb = '>'; +$finc = List("(-inf,0)", "($a,inf)"); +$fdec = List("(0,$a)"); +} + + +BEGIN_PGML + +Suppose that [`f`] is a differentiable function, defined for all [`x \in \mathbb{R}`]. + +Further suppose that [``f'(x)=x^2 g(x) - [$a] x g(x),``] where [`g`] is a continuous function with the property that [`g(x) [$gsymb] 0,`] for all [`x \in \mathbb{R}.`] + +Determine the maximal open intervals on which the function [`f`] is increasing and decreasing. + +Enter your answer as a **list of intervals separated by commas.** If there are no such intervals, type [|None|]*. + +a) [`f`] is increasing on the interval(s) [_]{$finc}{20} + +b) [`f`] is decreasing on the interval(s) [_]{$fdec}{20} +END_PGML + +BEGIN_PGML_SOLUTION +First factor [``f'(x)=x^2 g(x) - [$a] x g(x) = x(x-[$a])g(x)``], and we can see that [`f`] has critical points [`x=0`] and [`x=[$a]`]. + +We know that [`g(x) [$gsymb] 0,`] for all [`x \in \mathbb{R}.`] + +Now can make a table of values to determine that: + +a) [`f'(x) > 0`] on [`[$finc]`], so [`f`] is increasing on [`[$finc].`] + +b) [`f'(x) < 0`] on [`[$fdec]`], so [`f`] is decreasing on [`[$fdec].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-1-4-Ap-C/8-1-4-Ap-C-danny-1.pg b/Contrib/UCalgary/249-8-0-0-C/8-1-4-Ap-C/8-1-4-Ap-C-danny-1.pg new file mode 100644 index 0000000000..ab10bee98f --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-1-4-Ap-C/8-1-4-Ap-C-danny-1.pg @@ -0,0 +1,69 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(January 2025) +## Institution(University of Calgary) +## Author(Danny Glin) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context("Interval"); + +$a = random(2, 5, 1)*random(-1,1,2); +$sgn = random(-1,1,2); +$g = Formula("($sgn*1)/(x-$a)")->reduce(); +$gder = Formula("(-$sgn*1)/((x-$a)^2)")->reduce(); +if($sgn == 1) +{ +$ginc = List("None"); +$gdec = List("(-inf,$a)", "($a,inf)"); +} +else +{ +$ginc = List("(-inf,$a)", "($a,inf)"); +$gdec = List("None"); +} + +BEGIN_PGML + +Suppose that [``g(x)=[$g]``], which is defined for all [`x\in\mathbb{R}, x\neq [$a].`] + +Determine the maximal open intervals on which [`g`] is increasing and decreasing. + +Enter your answer as a list of **intervals separated by commas.** If there are no such intervals, type [|None|]*. + +a. [`g`] is increasing on the interval(s) [_]{$ginc}{20} + +b. [`g`] is decreasing on the interval(s) [_]{$gdec}{20} +END_PGML + +if($sgn == 1) +{ +BEGIN_PGML_SOLUTION +[``g'(x)=\frac{-1}{(x-[$a])^2}``], which is negative for all [`x`] except [`[$a]`], so the function is decreasing on the intervals [`(-\infty,[$a])`] and [`([$a],\infty)`], and it is never increasing. +END_PGML_SOLUTION +} +else +{ +BEGIN_PGML_SOLUTION +[``g'(x)=\frac{1}{(x-[$a])^2}``], which is positive for all [`x`] except [`[$a]`], so the function is increasing on the intervals [`(-\infty,[$a])`] and [`([$a],\infty)`], and it is never decreasing. +END_PGML_SOLUTION +} + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-1-4-Ap-C/8-1-4-Ap-C-log-2-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-1-4-Ap-C/8-1-4-Ap-C-log-2-jms.pg new file mode 100644 index 0000000000..449854784f --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-1-4-Ap-C/8-1-4-Ap-C-log-2-jms.pg @@ -0,0 +1,58 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(24 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context("Interval"); + +$a = random(2, 5, 1); +$am1 = $a-1; +$g = Formula("x^$a ln(x)")->reduce(); +$gder = Formula("$a x^$am1 ln(x) + x^$am1")->reduce(); +$ginc = "(e**(-1/$a),inf)"; +$gdec = "(0,e**(-1/$a))"; + + + +BEGIN_PGML + +Suppose that [`g(x) = [$g]`], where [`x>0`]. Note that [`g'(x) = [$gder]`]. + +Determine the maximal open intervals on which the function [`g`] is increasing and decreasing. + +Enter your answer as a **list of intervals separated by commas.** If there are no such intervals, type [|None|]*. + +a) [`g`] is increasing on the interval(s) [_]{$ginc}{20} + +b) [`g`] is decreasing on the interval(s) [_]{$gdec}{20} +END_PGML + +BEGIN_PGML_SOLUTION +Factor [``g'(x) = [$gder] = x^{[$am1]}([$a]\ln(x) + 1) ``]. Since [`x>0`] the only root of [`g'(x)=0`] must come from solving [`[$a]\ln(x) + 1 = 0`], so [`g`] has a critical point at [`x = e^{-1/[$a]}`]. + +a) [`g'(x) > 0`] on [`(e^{-1/[$a]},\infty)`], so [`g`] is increasing on [`(e^{-1/[$a]},\infty).`] + +b) [`g'(x) < 0`] on [`(0,e^{-1/[$a]})`], so [`g`] is decreasing on [`(0,e^{-1/[$a]}).`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-1-4-Ap-C/8-1-4-Ap-C-poly-3-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-1-4-Ap-C/8-1-4-Ap-C-poly-3-jms.pg new file mode 100644 index 0000000000..16671840ba --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-1-4-Ap-C/8-1-4-Ap-C-poly-3-jms.pg @@ -0,0 +1,65 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(24 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context("Interval"); + +$a = non_zero_random(-2,1,1); +$b = $a + 3; #difference of three between roots ensures integer coefficients +$c = non_zero_random(-9,9,1); +$cubic = 4/3*(-$a-2*$b); +$quad = 2*(2*$a*$b+$b**2); +$lin = -4*$a*($b**2); + +$h = Formula("x^4 + $cubic*x^3 + $quad*x^2 + $lin*x + $c")->reduce(); +$hder = Formula("4*x^3 + 3*$cubic*x^2 + 2*$quad*x + $lin")->reduce(); +$hinc = List("($a,$b)", "($b,inf)"); +$hdec = List("(-inf,$a)"); + + + +BEGIN_PGML + +Suppose that [``h(x) = [$h]``]. + +Determine the maximal open intervals on which the function [`h`] is increasing and decreasing. + +Enter your answer as a **list of intervals separated by commas.** If there are no such intervals, type [|None|]*. + +a) [`h`] is increasing on the interval(s) [_]{$hinc}{20} + +b) [`h`] is decreasing on the interval(s) [_]{$hdec}{20} +END_PGML + +BEGIN_PGML_SOLUTION +First compute and factor the derivative +[``h'(x) = [$hder] = 4(x-[$a])(x-[$b])^2``]. Now make a sign-chart to determine that: + +a) [`h'(x) > 0`] on [`[$hinc]`], so [`h`] is increasing on [`[$hinc].`] + +b) [`h'(x) < 0`] on [`[$hdec]`], so [`h`] is decreasing on [`[$hdec].`] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-2-0-R-I/8-2-0-R-I-conc-defn-2-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-2-0-R-I/8-2-0-R-I-conc-defn-2-jms.pg new file mode 100644 index 0000000000..75fc4c3970 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-2-0-R-I/8-2-0-R-I-conc-defn-2-jms.pg @@ -0,0 +1,62 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Concavity and points of inflection) +## Date(20 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGcourse.pl","parserPopUp.pl"); + + +$upward = DropDown( + [ + 'constant', + 'increasing', + 'decreasing', + 'concave upward', + 'concave downward' + ], + 'concave upward' +); + +$downward = DropDown( + [ + 'constant', + 'increasing', + 'decreasing', + 'concave upward', + 'concave downward' + ], + 'concave downward' +); + +$quant = DropDown( + [ + 'for all', + 'for some', + ], + 'for all' +); + +BEGIN_PGML + +Fill in the blanks to identify the following concepts. + +Let [`f`] be a function that is twice-differentiable on an interval [`I`]. + ++ [`f`] is [_]{$downward} on the interval [`I`] if [_]{$quant} [`x \in I`], [`f''(x)<0.`] + ++ [`f`] is [_]{$upward} on the interval [`I`] if [_]{$quant} [`x \in I`], if [`f''(x)>0.`] + +END_PGML + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-2-0-R-I/8-2-0-R-I-defn-conc-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-2-0-R-I/8-2-0-R-I-defn-conc-jms.pg new file mode 100644 index 0000000000..cc93739f34 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-2-0-R-I/8-2-0-R-I-defn-conc-jms.pg @@ -0,0 +1,62 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Concavity and points of inflection) +## Date(20 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGcourse.pl","parserPopUp.pl"); + + +$quant = DropDown( + [ + 'for all', + 'for some', + ], + 'for all' +); + +$upward = DropDown( + [ + 'above', + 'below', + 'equal to' + ], + 'below' +); + +$downward = DropDown( + [ + 'above', + 'below', + 'equal to' + ], + 'above' +); + + + +BEGIN_PGML + +Fill in the blanks to complete the following definitions of **concave upward** and **concave downward** functions, respectively. + +Let [`f`] be a differentiable function that is defined on an interval [`I`]. + +For any [`a \in I`], let [`L(x)=f'(a)(x-a) + f(a)`] be the tangent line to [`y=f(x)`] at [`x=a`]. + ++ [`f`] is **concave upward** on the interval [`I`] if [_]{$quant} [`a\in I`], the graph [`y=L(x)`] of the tangent line to [`f`] at [`x=a`] is [_]{$upward} the graph of [`y=f(x).`] + ++ [`f`] is **concave downward** on the interval [`I`] if [_]{$quant} [`a\in I`], tthe graph [`y=L(x)`] of the tangent line to [`f`] at [`x=a`] is [_]{$downward} the graph of [`y=f(x).`] + +END_PGML + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-2-3-U-C/8-2-3-U-C-concave-original-1-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-2-3-U-C/8-2-3-U-C-concave-original-1-jms.pg new file mode 100644 index 0000000000..8414770953 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-2-3-U-C/8-2-3-U-C-concave-original-1-jms.pg @@ -0,0 +1,82 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Concavity and points of inflection) +## Date(20 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#roots +$a = non_zero_random(-2,2,1); +$b = random(-2,-1,1); +$k = random(-1,1,2); +if($a == -2) +{$c = -6;} +elsif($a == -1) +{$c = -4;} +elsif($a == 1) +{$c = 4;} +elsif($a == 2) +{$c = 6;} + +Context("Interval"); + +if($k < 0) +{ +$upward= "(-5,$a)"; +$downward = "($a,5)"; +} +else +{ +$downward = "(-5,$a)"; +$upward = "($a,5)"; +} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-7) grid (5,7); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth] plot[domain={-4.9}:{4.9}] (\x,{$k*(pow(\x,3)/18-pow(\x,2)*($a/6) + ($b/3)*\x + $c)}); +\draw[red] (5,5) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +#Print coefficients to test the graph: [`a = [$a], b = [$b], c=[$c], k=[$k]`] + +BEGIN_PGML + +Consider the following graph of the function [`y=f(x)`] on the interval [`(-5,5)`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +Determine the open subintervals of [`(-5,5)`] on which the function [`f`] is concave upward or concave downward. + +Enter the intervals that you find as a **list separated by commas**, if there are no such intervals enter [|None|]*. + +[`f`] is concave upward on the interval(s): [_]{$upward}{20} + +[`f`] is concave downward on the interval(s): [_]{$downward}{20} + +[@helpLink('intervals')@]* + +END_PGML + +BEGIN_PGML_SOLUTION +[`f`] is concave upward on the intervals [`[$upward]`] + +[`f`] is concave downward on the intervals [`[$downward]`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-2-3-U-C/8-2-3-U-C-concave-original-2-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-2-3-U-C/8-2-3-U-C-concave-original-2-jms.pg new file mode 100644 index 0000000000..293e92dcc4 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-2-3-U-C/8-2-3-U-C-concave-original-2-jms.pg @@ -0,0 +1,99 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Concavity and points of inflection) +## Date(20 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#roots +$a = random(-3,-2,1); +$b = random(2,3,1); +$aplusb = $a + $b; +$ab = $a*$b; +$c = non_zero_random(-2,2,1); +$d = random(-1,1,2); +$k = random(-1,1,2); + +# adjust $d to fix graph in certain cases +if($a == -2 && $b == 2 && $k ==1) +{$d = -3;} + +if($a == -2 && $b == 2 && $k == -1) +{$d = -3;} + +if($a == -2 && $b == 3 && $k == 1) +{$d = -2;} + +if($a == -2 && $b == 3 && $k == -1) +{$d = -2;} + +if($a == -3 && $b == 2 && $k == -1) +{$d = -2;} + +if($a == -3 && $b == 2 && $k == 1) +{$d = -2;} + + +Context("Interval"); + +if($k > 0) +{ +$upward = List("(-7,$a)","($b,7)"); +$downward = List("($a,$b)"); +} +else +{ +$downward = List("(-7,$a)","($b,7)"); +$upward = List("($a,$b)"); +} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-7,0) -- (7,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-9) -- (0,9) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-7,-9) grid (7,9); +\foreach \x in {-6,-4,-2,2,4,6} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth] plot[domain={-6.8}:{6.8}] (\x,{$k*((\x*\x*\x*\x)/120-($aplusb/60)*(\x*\x*\x)+($ab/20)*(\x*\x)+($c/10)*\x+$d)}); +\draw[red] (3,7) node[above, outer sep=2pt]{\(y=g(x)\)}; +END_TIKZ + +# Print coefficients to test the graph: [`a = [$a], b = [$b], c=[$c], d=[$d], k=[$k]`] + +BEGIN_PGML +Consider the following graph of the function [`y=g(x)`] on the interval [`(-7,7)`]. + +[@ image($graph_image, width => 600, tex_size => 600) @]* + +Determine the open subintervals of [`(-7,7)`] on which the function [`g`] is concave upward or concave downward. + +Enter the intervals that you find as a **list separated by commas**, if there are no such intervals enter [|None|]*. + +[`g`] is concave upward on the interval(s): [_]{$upward}{20} + +[`g`] is concave downward on the interval(s): [_]{$downward}{20} + +[@helpLink('intervals')@]* + +END_PGML + +BEGIN_PGML_SOLUTION + +[`g`] is concave upward on the interval(s): [`[$upward]`] + +[`g`] is concave downward on the interval(s): [`[$downward]`] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-2-4-U-I/8-2-4-U-I-cubic-first-der-concave-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-2-4-U-I/8-2-4-U-I-cubic-first-der-concave-jms.pg new file mode 100644 index 0000000000..7599947d78 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-2-4-U-I/8-2-4-U-I-cubic-first-der-concave-jms.pg @@ -0,0 +1,100 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Concavity and points of inflection) +## Date(20 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#roots +$a = random(-3,-2,1); +$b = $a + random(3,4,1); +$ab = $a*$b; +$k = random(-1,1,2); +# fix some problematic cases for the graph overflowing the grid +if($a == -3 && $k==1) +{$c = -6;} +elsif($a == -3 && $k== -1) +{$c = 6;} +elsif($a == -2 && $k== 1) +{$c = random(-3,-2,1);} +elsif($a == -2 && $k== -1) +{$c = random(2,3,1);} +else +{$c = random(1,2,1);} + +Context("Interval"); + +if($k < 0) +{ +$upward = "($a,$b)"; +$downward = List("(-5,$a)","($b,5)"); +} +else +{ +$downward= "($a,$b)"; +$upward = List("(-5,$a)","($b,5)"); +} + +$inflection = List("$a", "$b"); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-5,0) -- (5,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-5,-7) grid (5,7); +\foreach \x in {-4,-2,2,4} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth] plot[domain={-5}:{5}] (\x,{$k*((\x*\x*\x)/18 - ($a/12)*(\x*\x) - ($b/12)*(\x*\x) + ($ab/6)*\x)+$c}); +\draw[red] (5,6) node [above right]{\(y=h^\prime(x)\)}; +END_TIKZ + +BEGIN_PGML +Let [`h`] be a twice-differentiable function. + +Consider the following **graph of the first derivative** [`y=h'(x)`] on the interval [`(-5,5)`]. + +[@ image($graph_image, width => 500, tex_size => 800) @]* + +a) Determine the open subintervals of [`(-5,5)`] on which [`h`] is concave upward or concave downward. + + Enter the intervals that you find as a **list separated by commas**, if there are no such values enter [|None|]*. + + [`h`] is concave upward on the interval(s): [_]{$upward}{20} + + [`h`] is concave downward on the interval(s): [_]{$downward}{20} + + [@helpLink('intervals')@]* + +b) List the [`x`]-coordinates of the inflection points of [`h`] in the interval [`(-5,5)`], if any. + + Enter the [`x`]-values that you find as a **list separated by commas**, if there are no such values enter [|None|]*. + + [`h`] has inflection point(s) at [`x = \,`] [_]{$inflection}{15} + +END_PGML + +BEGIN_PGML_SOLUTION ++ [`h`] is concave upward on intervals where [`h''(x)>0`] and this is equivalent to saying that [`h'`] is increasing. + ++ [`h`] is concave downward on intervals where [`h''(x)<0`] and this is equivalent to saying that [`h'`] is decreasing. + +a) [`h'`] is increasing on the interval(s): [`[$upward]`], so [`h`] is concave upward on the interval(s): [`[$upward]`] + + [`h'`] is decreasing on the interval(s): [`[$downward]`], so [`h`] is concave downard on the interval(s): [`[$downward]`] + +b) The function [`h`] has inflection points where the function is continuous and the concavity of [`h`] changes. The function [`h`] is continuous on [`(-5,5)`] because it is a differentiable function, and the concavity of [`h`] changes at [`x = [$inflection]`] so [`h`] has inflection points at [`x = [$inflection]`]. + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-2-4-U-I/8-2-4-U-I-pw-frst-der-concave-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-2-4-U-I/8-2-4-U-I-pw-frst-der-concave-jms.pg new file mode 100644 index 0000000000..6b384dfd10 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-2-4-U-I/8-2-4-U-I-pw-frst-der-concave-jms.pg @@ -0,0 +1,222 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Concavity and points of inflection) +## Date(20 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +$a = random(-8,-4,1); +$b = $a + random(2,4,1); +$c = $b + random(2,4,1); +$d = $c + random(2,4,1); + +# ensure that consecutive values of the function are different to avoid a constant first derivative +$fm10 = non_zero_random(-3,3,1); +$fa = $fm10 + non_zero_random(-3,3,1); +$fb = $fa + non_zero_random(-3,3,1); +$fc = $fb + non_zero_random(-3,3,1); +$fd = $fc + non_zero_random(-3,3,1); +$f10 = $fd + non_zero_random(-3,3,1); + +$upper = max(max($fm10, $fa, $fb, $fc, $fd, $f10) + 1,2); +$lower = min(min($fm10, $fa, $fb, $fc, $fd, $f10) - 1,-2); + +# determine behaviour on small intervals; always inc/dec/constant +if($fm10 > $fa) +{$tentoa = 'is concave downward';} +elsif($fm10 < $fa) +{$tentoa = 'is concave upward';} + +if($fa > $fb) +{$atob = 'is concave downward';} +elsif($fa < $fb) +{$atob = 'is concave upward';} + +if($fb > $fc) +{$btoc = 'is concave downward';} +elsif($fb < $fc) +{$btoc = 'is concave upward';} + +if($fc > $fd) +{$ctod = 'is concave downward';} +elsif($fc < $fd) +{$ctod = 'is concave upward';} + +if($fd > $f10) +{$dtoten = 'is concave downward';} +elsif($fd < $f10) +{$dtoten = 'is concave upward';} + +# determine behavior on some concatenated intervals sometimes "neither" bevahiour +# use eq for string comparison == does not behave correctly for this comparison +if($tentoa eq $atob) +{$tentob = $tentoa;} +else +{$tentob = 'changes concavity at a point inside the interval';} + +if($atob eq $btoc) +{$atoc = $atob;} +else +{$atoc = 'changes concavity at a point inside the interval';} + +if($btoc eq $ctod) +{$btod = $btoc;} +else +{$btod = 'changes concavity at a point inside the interval';} + +#produce popups for each of the eight intervals above +$popup_tentoa = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity on a point inside the interval' + ], + $tentoa +); + +$popup_tentob = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $tentob +); + +$popup_atob = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $atob +); + +$popup_atoc = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $atoc +); + +$popup_btoc = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $btoc +); + +$popup_ctod = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $ctod +); + +$popup_btod = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $btod +); + +$popup_dtoten = DropDown( + [ + 'is concave upward', + 'is concave downward', + 'changes concavity at a point inside the interval' + ], + $dtoten +); + +# choose random subsets of intervals, paired with popup, to ask below +# use eq for string comparison == does not behave correctly for this comparison + +# one end -10 to a or d to 10 +$I1 = list_random("(-10,$a)","($d,10)"); + +if($I1 eq "(-10,$a)") +{$popup1 = $popup_tentoa;} +else +{$popup1 = $popup_dtoten;} + +# one interior a to b, b to c, or c to d +$I2 = list_random("($a,$b)","($b,$c)", "($c,$d)"); + +if($I2 eq "($a,$b)") +{$popup2 = $popup_atob;} +elsif($I2 eq "($b,$c)") +{$popup2 = $popup_btoc;} +else +{$popup2 = $popup_ctod;} + +# one concatenated -10 to b, a to c, or b to d +$I3 = list_random("(-10,$b)","($a,$c)", "($b,$d)"); + +if($I3 eq "(-10,$b)") +{$popup3 = $popup_tentob;} +elsif($I3 eq "($a,$c)") +{$popup3 = $popup_atoc;} +else +{$popup3 = $popup_btod;} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,$lower) -- (0,$upper) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,$lower) grid (10,$upper); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {$lower,...,-1,1,...,$upper} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) -- ($d,$fd); +\draw[->,red, very thick] ($d,$fd) -- (10,$f10); +\draw[red] (10,$f10) node [above right]{\(y=f^\prime(x)\)}; +END_TIKZ + +BEGIN_PGML +Suppose that [`f`] is a twice-differentiable function. + +Consider the **graph of the first derivative** [`y=f'(x)`] given below. + +[@ image($graph_image, width => 700, tex_size => 800) @]* + +Determine if the function [`f`] is concave upward, concave downward, or if the concavity of [`f`] changes at a point inside the following intervals. + +a) On the interval [`[$I1]`] the function [`f`] [_]{$popup1} + +a) On the interval [`[$I2]`] the function [`f`] [_]{$popup2} + +a) On the interval [`[$I3]`] the function [`f`] [_]{$popup3} + +END_PGML + +BEGIN_PGML_SOLUTION ++ [`f`] is concave upward on intervals where [`f''(x)>0`] and this is equivalent to saying that [`f'`] is increasing. + ++ [`f`] is concave downward on intervals where [`f''(x)<0`] and this is equivalent to saying that [`f'`] is decreasing. +END_PGML_SOLUTION + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-2-5-U-C/8-2-5-U-C-pw-second-der-concave-1-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-2-5-U-C/8-2-5-U-C-pw-second-der-concave-1-jms.pg new file mode 100644 index 0000000000..04cd234a1c --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-2-5-U-C/8-2-5-U-C-pw-second-der-concave-1-jms.pg @@ -0,0 +1,208 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Concavity and points of inflection) +## Date(20 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +#intervals +# (-10,$a), ($a,$c), ($c,$e), and ($e,10) + +$a = random(-8,-6,1); +$b = $a + random(2,4,1); +$c = $b + random(2,4,1); +$d = $c + random(2,4,1); +$e = $d + random(2,3,1); + +#funciton values + +$fm10 = random(2,7,1)*random(-1,1,2); +$fa = 0; +$fb = random(2,7,1)*random(-1,1,2); +$fc = 0; +$fd = random(2,7,1)*random(-1,1,2); +$fe = 0; +$f10 = random(2,7,1)*random(-1,1,2); + +#determine intervals of increase/decrease + +if($fm10 < 0) +{$tentoa = 'concave downward'; +$tentoa_sign = 'negative';} +else +{$tentoa = 'concave upward'; +$tentoa_sign = 'positive';} + +if($fb < 0) +{$atoc = 'concave downward'; +$atoc_sign = 'negative';} +else +{$atoc = 'concave upward'; +$atoc_sign = 'positive';} + +if($fd < 0) +{$ctoe = 'concave downward'; +$ctoe_sign = 'negative';} +else +{$ctoe = 'concave upward'; +$ctoe_sign = 'positive';} + +if($f10 < 0) +{$etoten = 'concave downward'; +$etoten_sign = 'negative';} +else +{$etoten = 'concave upward'; +$etoten_sign = 'positive';} + +#produce popups +#produce increasing/decreasing popups for each of the four intervals above +$popup_tentoa = DropDown( + [ + 'increasing', + 'decreasing', + 'concave upward', + 'concave downward' + ], + $tentoa +); + +$popup_atoc = DropDown( + [ + 'increasing', + 'decreasing', + 'concave upward', + 'concave downward' + ], + $atoc +); + +$popup_ctoe = DropDown( + [ + 'increasing', + 'decreasing', + 'concave upward', + 'concave downward' + ], + $ctoe +); + +$popup_etoten = DropDown( + [ + 'increasing', + 'decreasing', + 'concave upward', + 'concave downward' + ], + $etoten +); + +#produce popups +#produce positive/negative popups for each of the four intervals above +$popup_tentoa_sign = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + $tentoa_sign +); + +$popup_atoc_sign = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + $atoc_sign +); + +$popup_ctoe_sign = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + $ctoe_sign +); + +$popup_etoten_sign = DropDown( + [ + 'increasing', + 'decreasing', + 'positive', + 'negative' + ], + $etoten_sign +); + + + +# select random two intervals +# one of two end intervals +$I1 = list_random("(-10,$a)","($e,10)"); + +if($I1 eq "(-10,$a)") +{$popup1 = $popup_tentoa; +$posneg1 = $popup_tentoa_sign;} +else +{$popup1 = $popup_etoten; +$posneg1 = $popup_etoten_sign;} + + +# one of two middle intervals +$I2 = list_random("($a,$c)","($c,$e)"); + +if($I2 eq "($c,$e)") +{$popup2 = $popup_ctoe; +$posneg2 = $popup_ctoe_sign;} +else +{$popup2 = $popup_atoc; +$posneg2 = $popup_atoc_sign;} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) .. controls ($b,$fb) .. ($c,$fc); +\draw[red, very thick] ($c,$fc) .. controls ($d,$fd) .. ($e,$fe); +\draw[->,red, very thick] ($e,$fe) -- (10,$f10); +\draw[red] ($d,$fd) node[below] {\(y=h^{\prime\prime}(x)\)}; +END_TIKZ + +BEGIN_PGML +Let [`h`] be a twice-differentiable function. + +Consider the following **graph of the second derivative** [`y=h''(x)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +a) The function [`h`] is [_]{$popup1} on the interval [`[$I1]`] becasue [`h''(x)`] is [_]{$posneg1} for all [`x\in[$I1].`] + +a) The function [`h`] is [_]{$popup2} on the interval [`[$I2]`] becasue [`h''(x)`] is [_]{$posneg2} for all [`x\in[$I2].`] + +END_PGML + +BEGIN_PGML_SOLUTION +[`h`] is concave upward on intervals where [`h''(x)>0`] and [`h`] is concave downward on intervals where [`h''(x)<0`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-2-5-U-C/8-2-5-U-C-sec-der-quart-conc-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-2-5-U-C/8-2-5-U-C-sec-der-quart-conc-jms.pg new file mode 100644 index 0000000000..0c3e4389f9 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-2-5-U-C/8-2-5-U-C-sec-der-quart-conc-jms.pg @@ -0,0 +1,104 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Concavity and points of inflection) +## Date(20 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#roots +$a = random(-6,-5,1); +$b = $a + random(4,5,1); +$c = $b + random(4,5,1); + +# fix scale by additional spacing to roots if needed +if( ($b-$a) == ($c-$b) && ($c<6) && ($c-$b)<5 ) +{$c = $c+1;} + +$k = random(-1,1,2); + +if($k > 0) +{$low = -3; +$lowp1 = -2; +$high = 9; +$highm1=8;} +else +{$high = 3; +$highm1 = 2; +$low = -9; +$lowp1=-8;} + +Context("Interval"); + +if($k > 0) +{ +$upward = List("(-7,$a)","($b,$c)","($c,7)"); +$downward = List("($a,$b)"); +} +else +{ +$downward = List("(-7,$a)","($b,$c)","($c,7)"); +$upward = List("($a,$b)"); +} + +$inflection = List("$a", "$b"); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-7,0) -- (7,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,$low) -- (0,$high) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-7,$low) grid (7,$high); +\foreach \x in {-6,-4,-2,2,4,6} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {$lowp1,...,$highm1} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth] plot[domain={-6.8}:{6.8}] (\x,{$k*(\x-$a)*(\x-$b)*(\x-$c)*(\x-$c)/200)}); +\draw[red] (7,$high-) node [below left]{\(y=f^{\prime\prime}(x)\)}; +END_TIKZ + +BEGIN_PGML +Let [`f`] be a twice-differentiable function. + +Consider the following **graph of the second derivative** [`y=f''(x)`] on the interval [`(-7,7)`]. + +[@ image($graph_image, width => 600, tex_size => 600) @]* + +a) Determine the open subintervals of [`(-7,7)`] on which the function [`f`] is concave upward or concave downward. + + Enter the intervals that you find as a list separated by commas, if there are no such intervals enter [|None|]*. + + [`f`] is concave upward on the interval(s): [_]{$upward}{20} + + [`f`] is concave downward on the interval(s): [_]{$downward}{20} + + [@helpLink('intervals')@]* + +b) List the [`x`]-coordinates of the inflection points of [`f`] in the interval [`(-7,7)`], if any. + + Enter the [`x`]-values that you find as a **list separated by commas**, if there are no such values enter [|None|]*. + + [`f`] has inflection point(s) at [`x = \,`] [_]{$inflection}{15} + +END_PGML + +BEGIN_PGML_SOLUTION +a) [`f`] is concave upward on intervals where [`f''(x)>0`] and [`f`] is concave downward on intervals where [`f''(x)<0`]. + + [`f`] is concave upward on the intervals [`[$upward]`] + + [`f`] is concave downard on the intervals [`[$downward]`] + +b) The function [`f`] has inflection points where the function is continuous and the concavity of [`f`] changes. The function [`f`] is continuous on [`(-7,7)`] because it is a differentiable function, and the concavity of [`f`] changes at [`x = [$inflection]`] so [`f`] has inflection points at [`x = [$inflection]`]. + + Note that [`f`] does **not** have an inflection point at [`x=[$c]`] because the concavity of [`f`] does not change at [`x=[$c]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-2-6-Ap-C/8-2-6-Ap-C-abstract-3-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-2-6-Ap-C/8-2-6-Ap-C-abstract-3-jms.pg new file mode 100644 index 0000000000..1e8fd2aa82 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-2-6-Ap-C/8-2-6-Ap-C-abstract-3-jms.pg @@ -0,0 +1,69 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Concavity and points of inflection) +## Date(25 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context("Interval"); + +$a = random(2, 9, 1); +$gsign = random(-1,1,2); +if($gsign == -1) +{$gsymb = '<'; +$fup = List("(0,$a)"); +$fdown = List("(-inf,0)", "($a,inf)"); +} +else +{$gsymb = '>'; +$fup = List("(-inf,0)", "($a,inf)"); +$fdown = List("(0,$a)"); +} + + +BEGIN_PGML + +Suppose that [`f`] is a twice-differentiable function, defined for all [`x \in \mathbb{R}`]. + +Further suppose that [``f''(x)=x^2 g(x) - [$a] x g(x),``] where [`g`] is a continuous function with the property that [`g(x) [$gsymb] 0,`] for all [`x \in \mathbb{R}.`] + +Determine the maximal open intervals on which the function [`f`] is concave upward and concave downward. + +Enter your answer as a **list of intervals separated by commas.** If there are no such intervals, type [|None|]*. + +a) [`f`] is concave upward on the interval(s) [_]{$fup}{20} + +b) [`f`] is concave downward on the interval(s) [_]{$fdown}{20} +END_PGML + +BEGIN_PGML_SOLUTION +First factor [``f''(x)=x^2 g(x) - [$a] x g(x) = x(x-[$a])g(x)``], and we can see that [`0=f''(x)`] has solutions [`x=0`] and [`x=[$a]`]. + +We know that [`g(x) [$gsymb] 0,`] for all [`x \in \mathbb{R}.`] + +Now can make a table of values to determine that: + +a) [`f'(x) > 0`] on [`[$fup]`], so [`f`] is concave upward on [`[$fup].`] + +b) [`f'(x) < 0`] on [`[$fdown]`], so [`f`] is concave downward on [`[$fdown].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-2-6-Ap-C/8-2-6-Ap-C-exp-3-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-2-6-Ap-C/8-2-6-Ap-C-exp-3-jms.pg new file mode 100644 index 0000000000..d8abfc78ad --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-2-6-Ap-C/8-2-6-Ap-C-exp-3-jms.pg @@ -0,0 +1,71 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Concavity and points of inflection) +## Date(25 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context("Interval"); + +$a = non_zero_random(-5, 5, 1); +$ap2 = $a + 2; +$ap4 = $a + 4; +$twiceap6 = 2*$a+6; +$c = random(-9,9,1); +$f = Formula("e^x(x^2-$ap4*x + $twiceap6)")->reduce(); +$fder = Formula("e^x(x^2-$ap2*x + $ap2)")->reduce(); +$fderder = Formula("e^x(x^2-$a*x)")->reduce(); +$fderder_fac = Formula("e^x*x(x-$a)")->reduce(); +if($a < 0) +{ +$fup = List("(-inf,$a), (0,inf)"); +$fdown = List("($a,0)"); +} +else +{ +$fup = List("(-inf,0), ($a,inf)"); +$fdown = List("(0,$a)"); +} + +BEGIN_PGML + +Suppose that [`f(x)=[$f]`] function, which is defined for all [`x \in \mathbb{R}`]. + +Determine the maximal open intervals on which the function [`f`] is concave upward and concave downward. + +Enter your answer as a **list of intervals separated by commas.** If there are no such intervals, type [|None|]*. + +a) [`f`] is concave upward on the interval(s) [_]{$fup}{20} + +b) [`f`] is concave downward on the interval(s) [_]{$fdown}{20} +END_PGML + +BEGIN_PGML_SOLUTION +First compute [`f'(x) = [$fder]`] and [`f''(x) = [$fderder] = [$fderder_fac]`]. Notice that [`0=f''(x)`] has roots [`x=0`] and [`x=[$a].`] + +Now, using that [`e^x > 0`] for all [`x`], we can make a table of values to determine that: + +a) [`f''(x) > 0`] on [`[$fup]`], so [`f`] is concave upward on [`[$fup].`] + +b) [`f''(x) < 0`] on [`[$fdown]`], so [`f`] is concave downward on [`[$fdown].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-2-6-Ap-C/8-2-6-Ap-C-poly-1-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-2-6-Ap-C/8-2-6-Ap-C-poly-1-jms.pg new file mode 100644 index 0000000000..1858e16bf3 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-2-6-Ap-C/8-2-6-Ap-C-poly-1-jms.pg @@ -0,0 +1,91 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Concavity and points of inflection) +## Date(25 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context("Interval"); + +$a = random(-4,2,1); +$b = $a + random(0,4,1); +$c = non_zero_random(-9,9,1); +$d = non_zero_random(-9,9,1); +$sign = random(-1,1,2); +$aplusb = $a + $b; +$ab = $a*$b; + +$f = Formula("($sign*x^4/2 -$sign*($a+$b)*x^3 + $sign*3*$ab*x^2 + $c*x + $d)")->reduce(); +$fder = Formula("($sign*2*x^3 -$sign*3*($a+$b)*x^2 + $sign*6*$ab*x + $c)")->reduce(); +$fderder = Formula("($sign*6*x^2 -$sign*6*($a+$b)*x + $sign*6*$ab)")->reduce(); +$fderder_fac = Formula("$sign*6*(x-$a)*(x-$b)")->reduce(); + +if($sign == -1 && $a == $b) +{ +$fup = List("None"); +$fdown = List("(-inf,$a),($b,inf)"); +} +elsif($sign == 1 && $a == $b) +{ +$fup = List("(-inf,$a),($b,inf)"); +$fdown = List("None"); +} +elsif($sign == -1) +{ +$fup = List("($a,$b)"); +$fdown = List("(-inf,$a),($b,inf)"); +} +else +{ +$fup = List("(-inf,$a),($b,inf)"); +$fdown = List("($a,$b)"); +} + + + +BEGIN_PGML + +Suppose that [``f(x) = [$f]``], which is defined for all [`x\in\mathbb{R}.`] + +Determine the maximal open intervals on which the function [`f`] is concave upward and concave downward. + +Enter your answer as a **list of intervals separated by commas**. If there are no such intervals, type [|None|]*. + +a) [`f`] is concave upward on the interval(s) [_]{$fup}{20} + +b) [`f`] is concave downward on the interval(s) [_]{$fdown}{20} +END_PGML + +BEGIN_PGML_SOLUTION +First compute and factor the second derivative: +[```f'(x) = [$fder],```] +and +[``` f''(x) = [$fderder] = [$fderder_fac].```] + +Now make a sign-chart for the second derivative to determine that: + +a) [`f''(x) > 0`] on [`[$fup]`], so [`f`] is concave upward on [`[$fup].`] + +b) [`f''(x) < 0`] on [`[$fdown]`], so [`f`] is concave downward on [`[$fdown].`] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-8-0-0-C/8-2-6-Ap-C/8-2-6-Ap-C-rational-2-jms.pg b/Contrib/UCalgary/249-8-0-0-C/8-2-6-Ap-C/8-2-6-Ap-C-rational-2-jms.pg new file mode 100644 index 0000000000..dbdd0ae348 --- /dev/null +++ b/Contrib/UCalgary/249-8-0-0-C/8-2-6-Ap-C/8-2-6-Ap-C-rational-2-jms.pg @@ -0,0 +1,63 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Concavity and points of inflection) +## Date(25 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context("Interval"); + +$a = random(2, 5, 1)*random(-1,1,2); +$sgn = random(-1,1,2); +$g = Formula("($sgn*1)/(x-$a)")->reduce(); +$gder = Formula("(-$sgn*1)/((x-$a)^2)")->reduce(); +$gderder = Formula("($sgn*2)/((x-$a)^3)")->reduce(); +if($sgn == 1) +{ +$gup = List("($a,inf)"); +$gdown = List("(-inf,$a)"); +} +else +{ +$gup = List("(-inf,$a)"); +$gdown = List("($a,inf)"); +} + +BEGIN_PGML + +Suppose that [``g(x)=[$g]``], which is defined for all [`x\in \mathbb{R}, x\neq [$a]`]. + +Determine the maximal open intervals on which [`g`] is concave upward and concave downward. + +Enter your answer as a **list of intervals separated by commas**. If there are no such intervals, type [|None|]*. + +a. [`g`] is concave upward on the interval(s) [_]{$gup}{20} + +b. [`g`] is concave downward on the interval(s) [_]{$gdown}{20} +END_PGML + +BEGIN_PGML_SOLUTION +[``g'(x)=[$gder]``] and [``g''(x)=[$gderder]``], so we can make a sign chart to determine that [`g''(x) > 0`] on [`[$gup]`] and [`g''(x) < 0 `] on [`[$gdown]`]. + +Therefore, [`g`] is concave upward on the interval [`[$gup]`] and [`g`] is concave downward on the interval [`[$gdown].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-1-0-R-C/9-1-0-R-C-loc-ext-def-2-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-1-0-R-C/9-1-0-R-C-loc-ext-def-2-jms.pg new file mode 100644 index 0000000000..1da8d68430 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-1-0-R-C/9-1-0-R-C-loc-ext-def-2-jms.pg @@ -0,0 +1,63 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(26 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) +# MATH 249 Learning Outcomes 9-1-0-R-C + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$ver = random(-1, 1, 2); #version +# interval +$a = random(-5,3,1); +$b = $a + 4*random(1,4,1); +# sample point in interval +$t = random(0.25, 0.75, 0.25); +$c = $t*$b + (1-$t)*$a; + +if ($ver > 0) { + $maxmin = 'a local minimum'; + $sign = '≥'; +} else { + $maxmin = 'a local maximum'; + $sign = '≤'; +} + +$popup_sign = DropDown( + [ + '≤', + '≥', + '=' + ], + $sign +); + +$popup_near = DropDown( + [ + 'to the left of', + 'to the right of', + 'near' + ], + 'near' +); + +BEGIN_PGML +Let [`f`] be a function defined for all [`x`] in the interval [`([$a],[$b]).`] + +We say that [`f`] has [$maxmin] at [`x=[$c]`] if [`f(x)`] [_]{$popup_sign} [`f([$c])`] for all [`x \in ([$a],[$b])`] that are [_]{$popup_near} [`[$c].`] +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-1-0-R-C/9-1-0-R-C-loc-ext-def-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-1-0-R-C/9-1-0-R-C-loc-ext-def-jms.pg new file mode 100644 index 0000000000..c025713b56 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-1-0-R-C/9-1-0-R-C-loc-ext-def-jms.pg @@ -0,0 +1,64 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(26 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) +# MATH 249 Learning Outcomes 9-1-0-R-C + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$ver = random(-1, 1, 2); #version +# interval +$a = random(-5,3,1); +$b = $a + 4*random(1,4,1); +# sample point in interval +$t = random(0.25, 0.75, 0.25); +$c = $t*$b + (1-$t)*$a; + +if ($ver > 0) { + $maxmin = 'a local minimum'; + $sign = '\leq'; +} else { + $maxmin = 'a local maximum'; + $sign = '\geq'; +} + +$popup_maxmin = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'a critcal point', + 'a singular point' + ], + $maxmin +); + +$popup_near = DropDown( + [ + 'to the left of', + 'to the right of', + 'near' + ], + 'near' +); + +BEGIN_PGML +Let [`f`] be a function defined for all [`x`] in the interval [`([$a],[$b]).`] + +We say that [`f`] has [_]{$popup_maxmin} at [`x=[$c]`] if [`f([$c]) [$sign] f(x)`] for all [`x \in ([$a],[$b])`] that are [_]{$popup_near} [`x=[$c].`] +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-1-1-U-C/9-1-1-U-C-pw-loc-ext-1-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-1-1-U-C/9-1-1-U-C-pw-loc-ext-1-jms.pg new file mode 100644 index 0000000000..8c5f3ffe44 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-1-1-U-C/9-1-1-U-C-pw-loc-ext-1-jms.pg @@ -0,0 +1,181 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(26 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +$a = random(-8,-4,1); +$b = $a + random(2,4,1); +$c = $b + random(2,4,1); +$d = $c + random(2,4,1); + +$fm10 = random(-7,7,1); +$fa = random(-6,6,1); +$fb = random(-6,6,1); +$fc = random(-6,6,1); +$fd = random(-6,6,1); +$f10 = random(-7,7,1); + +# determine behaviour at internal singular points +if($fa <= $fm10 && $fa <= $fb) +{$a_maxmin = 'a local minimum';} +elsif($fa >= $fm10 && $fa >= $fb) +{$a_maxmin = 'a local maximum';} +else +{$a_maxmin = 'neither a local maximum nor a local minimum';} + +if($fb <= $fa && $fb <= $fc) +{$b_maxmin = 'a local minimum';} +elsif($fb >= $fa && $fb >= $fc) +{$b_maxmin = 'a local maximum';} +else +{$b_maxmin = 'neither a local maximum nor a local minimum';} + +if($fc <= $fb && $fc <= $fd) +{$c_maxmin = 'a local minimum';} +elsif($fc >= $fb && $fc >= $fd) +{$c_maxmin = 'a local maximum';} +else +{$c_maxmin = 'neither a local maximum nor a local minimum';} + +if($fd <= $fc && $fd <= $f10) +{$d_maxmin = 'a local minimum';} +elsif($fd >= $fc && $fd >= $f10) +{$d_maxmin = 'a local maximum';} +else +{$d_maxmin = 'neither a local maximum nor a local minimum';} + +#produce popups for each endpoint +#cannot have local extrema at endpoints +$popup_m10 = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor a local minimum' + ], + 'neither a local maximum nor a local minimum' +); + +$popup_10 = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor a local minimum' + ], + 'neither a local maximum nor a local minimum' +); + +#produce popups for each singular point + +$popup_a = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor a local minimum' + ], + $a_maxmin +); + +$popup_b = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor a local minimum' + ], + $b_maxmin +); + + +$popup_c = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor a local minimum' + ], + $c_maxmin +); + + +$popup_d = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor a local minimum' + ], + $d_maxmin +); + + +# choose random subsets of points, paired with popup, to ask below +# use eq for string comparison == does not behave correctly for this comparison + +# OPTION TO INCLUDE a) At the point [`x=[$pt1]`] the function [`f`] has [_]{$popup1} +# one end -10 or 10 +$pt1 = list_random("-10","10"); + +if($pt1 eq "-10") +{$popup1 = $popup_m10;} +else +{$popup1 = $popup_10;} + +# one of a or b +$pt2 = list_random("$a","$b"); + +if($pt2 eq "$a") +{$popup2 = $popup_a;} +else +{$popup2 = $popup_b;} + +# one of c or d +$pt3 = list_random("$c","$d"); + +if($pt3 eq "$c") +{$popup3 = $popup_c;} +else +{$popup3 = $popup_d;} + + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[red, very thick] (-9.9,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) -- ($d,$fd); +\draw[red, very thick] ($d,$fd) -- (9.9,$f10); +\draw[red, very thick] (-10,$fm10) circle (3.5 pt); +\draw[red, very thick] (10,$f10) circle (3.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +\Context("Interval"); + +BEGIN_PGML +Consider the following graph of the piecewise defined function [`y=f(x)`] on the open interval [`(-10,10).`] + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +b) At the point [`x=[$pt2]`] the function [`f`] has [_]{$popup2} + +c) At the point [`x=[$pt3]`] the function [`f`] has [_]{$popup3} +END_PGML + + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-1-1-U-C/9-1-1-U-C-quart-ext-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-1-1-U-C/9-1-1-U-C-quart-ext-jms.pg new file mode 100644 index 0000000000..2d12adfbf2 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-1-1-U-C/9-1-1-U-C-quart-ext-jms.pg @@ -0,0 +1,103 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(27 March 2025) +## Institution(Univeristy of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl"); +#roots +$a = random(-5,-4,1); +$b = $a + random(5,6,1); +$c = $b + random(3,4,1); +$ab = $a*$b; +$ac = $a*$c; +$bc = $b*$c; +$abc = $a*$b*$c; +$sum = $a+$b+$c; +$quad = $ab/2 + $ac/2 + $bc/2; +$k = random(-2,-1,1); + +# fix graph in "bad cases" +if($k > 0 && $c < 4) +{$d = random(-3,-2,1); +$c=4; +$ac = $a*$c; +$bc = $b*$c; +$abc = $a*$b*$c; +$sum = $a+$b+$c; +$quad = $ab/2 + $ac/2 + $bc/2;} +elsif($k < 0 && $c < 4) +{$d = random(2,3,1); +$c=4; +$ac = $a*$c; +$bc = $b*$c; +$abc = $a*$b*$c; +$sum = $a+$b+$c; +$quad = $ab/2 + $ac/2 + $bc/2;} +elsif($k > 0 && abs($b) < 2) +{$d = 0;} +elsif($k < 0 && abs($b) < 2) +{$d = 0;} +elsif($k > 0) +{$d = random(2,3,1);} +elsif($k < 0) +{$d = random(-3,-2,1);} + +Context("Interval"); + +if($k < 0) +{ +$inc = List("(-7,$a)","($b,$c)"); +$dec = List("($a,$b)","($c,7)"); +$locmax = List("$a", "$c"); +$locmin = List("$b"); +} +else +{ +$dec = List("(-7,$a)","($b,$c)"); +$inc = List("($a,$b)","($c,7)"); +$locmax = List("$b"); +$locmin = List("$a", "$c"); +} + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-7,0) -- (7,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-10) -- (0,10) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-7,-10) grid (7,10); +\foreach \x in {-6,-4,-2,2,4,6} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-8, -6,-4,-2,2,4,6,8} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<->,red, very thick, smooth] plot[domain={-7}:{7}] (\x,{$k*((-$abc/50)*\x + ($quad/50)*(\x*\x) - ($sum/150)*(\x*\x*\x) + (\x*\x*\x*\x)/200)+$d}); +\draw[red] (1.5,9.5) node[outer sep=2pt]{\(y=g(x)\)}; +END_TIKZ + +BEGIN_PGML +Consider the following graph of the function [`y=g(x)`] on the interval [`(-7,7)`]. + +[@ image($graph_image, width => 600, tex_size => 600) @]* + +Identify the [`x`]-values at which [`g`] has local extrema, enter all such values as a list separated by commas. If there are no such [`x`]-values, then enter [|None|]*. + +[`g`] has a local maximum at [`x = \, `] [_]{$locmax}{10} + +[`g`] has a local minimum at [`x = \, `] [_]{$locmin}{10} + +END_PGML + +BEGIN_PGML_SOLUTION +First notice that [`g`] has critical points at [`x=[$a], x=[$b]`] and [`x=[$c].`] In addition, +[`g`] is increasing on the intervals [`[$inc]`] and [`g`] is decreasing on the intervals [`[$dec].`] Therefore, [`g`] has a local maximum at [`x = [$locmax]`], and [`g`] has a local minimum at [`x = [$locmin].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-1-2-U-C/9-1-2-U-C-pw-der-ext-1-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-1-2-U-C/9-1-2-U-C-pw-der-ext-1-jms.pg new file mode 100644 index 0000000000..dcdbc6a8ba --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-1-2-U-C/9-1-2-U-C-pw-der-ext-1-jms.pg @@ -0,0 +1,189 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(27 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +#intervals +# (-10,$a), ($a,$c), ($c,$e), and ($e,10) + +$a = random(-8,-6,1); +$b = $a + random(2,3,1); +$c = $b + random(2,4,1); +$d = $c + random(2,3,1); +$e = $d + random(2,4,1); + +#funciton values + +$fm10 = random(2,7,1)*random(-1,1,2); +$fa = 0; +$fb = random(2,7,1)*random(-1,1,2); +$fc = 0; +$fd = random(2,7,1)*random(-1,1,2); +$fe = 0; +$f10 = random(2,7,1)*random(-1,1,2); + +# determine intervals of increase/decrease +if($fm10 < 0) +{$tentoa = 'decreasing';} +else +{$tentoa = 'increasing';} + +if($fb < 0) +{$atoc = 'decreasing';} +else +{$atoc = 'increasing';} + +if($fd < 0) +{$ctoe = 'decreasing';} +else +{$ctoe = 'increasing';} + +if($f10 < 0) +{$etoten = 'decreasing';} +else +{$etoten = 'increasing';} + +# produce popups +# produce increasing/decreasing popups for each of the four intervals above +$popup_tentoa = DropDown( + [ + 'increasing', + 'decreasing', + ], + $tentoa +); + +$popup_atoc = DropDown( + [ + 'increasing', + 'decreasing', + ], + $atoc +); + +$popup_ctoe = DropDown( + [ + 'increasing', + 'decreasing', + ], + $ctoe +); + +$popup_etoten = DropDown( + [ + 'increasing', + 'decreasing', + ], + $etoten +); + +# determine local extrema behavour at critical points $a, $c and $e +if($fm10 > 0 & $fb < 0) +{$a_maxmin = 'a local maximum';} +elsif($fm10 < 0 & $fb > 0) +{$a_maxmin = 'a local minimum';} +else +{$a_maxmin = 'neither a local maximum nor local minimum';} + +if($fb > 0 & $fd < 0) +{$c_maxmin = 'a local maximum';} +elsif($fb < 0 & $fd > 0) +{$c_maxmin = 'a local minimum';} +else +{$c_maxmin = 'neither a local maximum nor local minimum';} + +if($fd > 0 & $f10 < 0) +{$e_maxmin = 'a local maximum';} +elsif($fd < 0 & $f10 > 0) +{$e_maxmin = 'a local minimum';} +else +{$e_maxmin = 'neither a local maximum nor local minimum';} + +# produce popups for local max / local min / neither +$popup_a = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum' + ], + $a_maxmin +); + +$popup_c = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum' + ], + $c_maxmin +); + +$popup_e = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum' + ], + $e_maxmin +); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) .. controls ($b,$fb) .. ($c,$fc); +\draw[red, very thick] ($c,$fc) .. controls ($d,$fd) .. ($e,$fe); +\draw[->,red, very thick] ($e,$fe) -- (10,$f10); +\filldraw[red, very thick] ($a,$fa) circle (2.5 pt); +\filldraw[red, very thick] ($c,$fc) circle (2.5 pt); +\filldraw[red, very thick] ($e,$fe) circle (2.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=h^\prime(x)\)}; +END_TIKZ + +BEGIN_PGML +Let [`h`] be a differentiable function. + +Consider the following **graph of the derivative** [`y=h'(x)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +a) [`h`] has [_]{$popup_a} at [`x=[$a]`] because [`h`] is [_]{$popup_tentoa} on the interval [`(-10, [$a])`] and [_]{$popup_atoc} on the interval [`([$a],[$c]).`] + +b) [`h`] has [_]{$popup_c} at [`x=[$c]`] because [`h`] is [_]{$popup_atoc} on the interval [`([$a], [$c])`] and [_]{$popup_ctoe} on the interval [`([$c],[$e]).`] + +c) [`h`] has [_]{$popup_e} at [`x=[$e]`] because [`h`] is [_]{$popup_ctoe} on the interval [`([$c],[$e])`] and [_]{$popup_etoten} on the interval [`([$e],10).`] + +END_PGML + +BEGIN_PGML_SOLUTION ++ [``h'([$a]) = 0, h'([$c]) = 0 ``] and [``h'([$e]) = 0``], so [`x=[$a], x=[$c]`] and [`x=[$e]`] are all **critical points** of the function [`h.`] + ++ If [`h`] is increasing on the left and decreasing on the right of a critical point [`x=c`], then [`h`] has a local maximum at [`x=c.`] + ++ If [`h`] is decreasing on the left and increasing on the right of a critical point [`x=c`], then [`h`] has a local minimum at [`x=c.`] + ++ If [`h`] is increasing (respectively, decreasing) to the left and right of a critical point [`x=c`], then [`h`] does not have a local extrema at [`x=c.`] + ++ [`h`] is increasing on intervals where [`h'(x)>0,`] and [`h`] is decreasing on intervals where [`h'(x)<0.`] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-1-2-U-C/9-1-2-U-C-pw-der-ext-2-no-int-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-1-2-U-C/9-1-2-U-C-pw-der-ext-2-no-int-jms.pg new file mode 100644 index 0000000000..728b37d4b7 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-1-2-U-C/9-1-2-U-C-pw-der-ext-2-no-int-jms.pg @@ -0,0 +1,144 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(27 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +#intervals +# (-10,$a), ($a,$c), ($c,$e), and ($e,10) + +$a = random(-8,-6,1); +$b = $a + random(2,3,1); +$c = $b + random(2,4,1); +$d = $c + random(2,3,1); +$e = $d + random(2,4,1); + +#funciton values + +$fm10 = random(2,7,1)*random(-1,1,2); +$fa = 0; +$fb = random(2,7,1)*random(-1,1,2); +$fc = 0; +$fd = random(2,7,1)*random(-1,1,2); +$fe = 0; +$f10 = random(2,7,1)*random(-1,1,2); + +# determine local extrema behavour at critical points $a, $c and $e +if($fm10 > 0 & $fb < 0) +{$a_maxmin = 'a local maximum';} +elsif($fm10 < 0 & $fb > 0) +{$a_maxmin = 'a local minimum';} +else +{$a_maxmin = 'neither a local maximum nor local minimum';} + +if($fb > 0 & $fd < 0) +{$c_maxmin = 'a local maximum';} +elsif($fb < 0 & $fd > 0) +{$c_maxmin = 'a local minimum';} +else +{$c_maxmin = 'neither a local maximum nor local minimum';} + +if($fd > 0 & $f10 < 0) +{$e_maxmin = 'a local maximum';} +elsif($fd < 0 & $f10 > 0) +{$e_maxmin = 'a local minimum';} +else +{$e_maxmin = 'neither a local maximum nor local minimum';} + +# produce popups for local max / local min / neither +$popup_a = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum' + ], + $a_maxmin +); + +$popup_c = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum' + ], + $c_maxmin +); + +$popup_e = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum' + ], + $e_maxmin +); + +# popup for critical / singular point + +$crit = DropDown( + [ + 'critical', + 'singular' + ], + 'critical' +); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[<-,red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) .. controls ($b,$fb) .. ($c,$fc); +\draw[red, very thick] ($c,$fc) .. controls ($d,$fd) .. ($e,$fe); +\draw[->,red, very thick] ($e,$fe) -- (10,$f10); +\filldraw[red, very thick] ($a,$fa) circle (2.5 pt); +\filldraw[red, very thick] ($c,$fc) circle (2.5 pt); +\filldraw[red, very thick] ($e,$fe) circle (2.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f^\prime(x)\)}; +END_TIKZ + +BEGIN_PGML +Let [`f`] be a differentiable function. + +Consider the following **graph of the derivative** [`y=f'(x)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +a) The function [`f`] has a [_]{$crit} point and [_]{$popup_a} at [`x=[$a].`] + +b) The function [`f`] has a [_]{$crit} point and [_]{$popup_c} at [`x=[$c].`] + +c) The function [`f`] has a [_]{$crit} point and [_]{$popup_e} at [`x=[$e].`] + +END_PGML + +BEGIN_PGML_SOLUTION ++ [``f'([$a]) = 0, f'([$c]) = 0 ``] and [``f'([$e]) = 0``], so [`x=[$a], x=[$c]`] and [`x=[$e]`] are all **critical points** of the function [`f.`] + ++ If [`f`] is increasing on the left and decreasing on the right of a critical point [`x=c`], then [`f`] has a local maximum at [`x=c.`] + ++ If [`f`] is decreasing on the left and increasing on the right of a critical point [`x=c`], then [`f`] has a local minimum at [`x=c.`] + ++ If [`f`] is increasing (respectively, decreasing) to the left and right of a critical point [`x=c`], then [`f`] does not have a local extrema at [`x=c.`] + ++ [`f`] is increasing on intervals where [`f'(x)>0,`] and [`f`] is decreasing on intervals where [`f'(x)<0.`] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-1-3-Ap-C/9-1-3-Ap-C-fdt-abs-jms-1.pg b/Contrib/UCalgary/249-9-0-0-C/9-1-3-Ap-C/9-1-3-Ap-C-fdt-abs-jms-1.pg new file mode 100644 index 0000000000..137716a82d --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-1-3-Ap-C/9-1-3-Ap-C-fdt-abs-jms-1.pg @@ -0,0 +1,125 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(27 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = non_zero_random(-6, 6, 1); +$b = non_zero_random(-6, 6, 1); +$left = min($a,$b); +$right = max($a,$b); +$c = non_zero_random(-6, 6, 1); + +#avoid c = a and c = b +if($c == $a || $c == $b) +{$c = 7*random(-1,1,2);} + +$aplusb = $a + $b; +$ab = $a*$b; + +$fder = Formula("x^2-($aplusb)*x+$ab")->reduce(); + +$sign = random(-1,1,2); +if($sign == -1) +{ +$maxmin = 'minimum'; +$g_left = 'decreasing'; +$g_left_pn = 'negative'; +$g_right = 'increasing'; +$g_right_pn = 'postive'; + if($a == $b) + { + $loc_max = "None"; + $loc_min = List("$c"); + } + elsif($c < $a && $c < $b) + { + $loc_max = List("$left"); + $loc_min = List("$c", "$right"); + } + elsif($c > $a && $c > $b) + { + $loc_max = List("$right"); + $loc_min = List("$c", "$left"); + } + else + { + $loc_max = List("$c"); + $loc_min = List("$left", "$right"); + } +} +else +{ +$maxmin = 'maximum'; +$g_left = 'increasing'; +$g_left_pn = 'postive'; +$g_right = 'decreasing'; +$g_right_pn = 'negative'; + if($a == $b) + { + $loc_max = List("$c"); + $loc_min = "None"; + } + elsif($c < $a && $c < $b) + { + $loc_max = List("$c", "$right"); + $loc_min = List("$left"); + } + elsif($c > $a && $c > $b) + { + $loc_max = List("$c", "$left"); + $loc_min = List("$right"); + } + else + { + $loc_max = List("$left", "$right"); + $loc_min = List("$c"); + } +} + + + +BEGIN_PGML +Suppose that [`g`] is a differentiable function, with continuous derivative. Further suppose that [`g`] has only one critical point and that [`g`] has a local [$maxmin] at [`x=[$c].`] + +Suppose that [`f`] is a differentiable function which has first derivative equal to [``f'(x) = g'(x)([$fder]).``] + +Then [`f`] has a local maximum(s) at [`x = \, `] [_]{$loc_max}{20} + +and [`f`] has a local minimum(s) at [`x = \, `] [_]{$loc_min}{20} + +Enter the values that you find as a list separated by commas, if there are no such [`x`]-values, then enter [|None|]*. +END_PGML + +BEGIN_PGML_SOLUTION +Since [`g`] has only one critical point, a local [$maxmin] at [`x=[$c]`] and [`g`] is differentiable, we know that [`g'([$c])=0`] and [`x=[$c]`] is the only critical point of [`g.`] Since [`g'`] is assumed to be continuous, we know that the sign of [`g'`] can only change at [`x=[$c].`] Moreover, since [`g`] has a [$maxmin] at [`x=[$c]`] it must be the case that [`g`] is [$g_left] to the left of [`x=[$c],`] and [`g`] is [$g_right] to the right of [`x=[$c].`] Again, since [`g'`] is continuous we must have that [`g'`] is [$g_left_pn] to the left of [`x=[$c],`] and [`g'`] is [$g_right_pn] to the right of [`x=[$c].`] + +Now factor [`f'(x) = g'(x)([$fder]) = g'(x)(x-[$a])(x-[$b])`], so [`f`] has critical points [`x=[$a]`], [`x=[$b]`] and [`x=[$c],`] the last of these coming from [`g'([$c])=0.`] + +Putting the factorization of [`f'(x)`] together with the information about [`g`] from above, we can make a sign chart to determine the behaviour of [`f`] at its critical points. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-1-3-Ap-C/9-1-3-Ap-C-fdt-jms-1.pg b/Contrib/UCalgary/249-9-0-0-C/9-1-3-Ap-C/9-1-3-Ap-C-fdt-jms-1.pg new file mode 100644 index 0000000000..bbdf4cd497 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-1-3-Ap-C/9-1-3-Ap-C-fdt-jms-1.pg @@ -0,0 +1,103 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(27 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$a = random(1, 6, 1); +$aa = $a**2; +$aafour = 4*$aa; +$sign = random(1,3,1)*random(-1,1,2); + +$aasign = $aa*$sign; + +$c = random(-3,3,1); #critical point + +$f = Formula("$sign*((x-$c)^2 - $aa)/((x-$c)^2 + $aa)")->reduce(); +$fder = Formula("$sign*$aafour*(x-$c)/(((x-$c)^2 + $aa)^2)")->reduce(); + +$ans = Compute("$sign*(-$aa)/($aa)"); + +if($sign < 0) +{ +$left = 'increasing'; +$left_der = 'positive'; +$right = 'decreasing'; +$right_der = 'negative'; +$ext = 'maximum'; +} +else +{ +$left = 'decreasing'; +$left_der = 'negative'; +$right = 'increasing'; +$right_der = 'positive'; +$ext = 'minimum'; +} + +$incdec1 = DropDown( + [ + 'increasing', + 'decreasing' + ], + $left +); + +$incdec2 = DropDown( + [ + 'increasing', + 'decreasing' + ], + $right +); + +$maxmin = DropDown( + [ + 'maximum', + 'minimum' + ], + $ext +); + + +BEGIN_PGML +Consider the function [``f(x) = [$f]``] which has first derivative equal to [``f'(x) = [$fder]``]. + +[`f`] changes from [_]{$incdec1} to [_]{$incdec2} at [`x = \, `] [_]{$c}{2}, so the local and global [_]{$maxmin} value of [`f`] is [`f(`][_]{$c}{2}[`) = \, `][_]{$ans}{2}. +END_PGML + +BEGIN_PGML_SOLUTION +[``0 = f'(x) = [$fder]``] has one solution [`x=[$c],`] so [`x=[$c]`] is the only critical point of [`f`]. + +[`f'(x)`] is [$left_der] for [`x<[$c]`], so [`f`] is [$left] to the left of [`x=[$c]`] + +[`f'(x)`] is [$right_der] for [`x>[$c]`], so [`f`] is [$right] to the right of [`x=[$c]`] + +Therefore, [`f`] changes from [$left] to [$right] at [`x = [$c]`], so the local and global [$ext] value of [`f`] is [`f([$c]) = [$ans].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-1-4-Ap-C/9-1-4-Ap-C-danny-1.pg b/Contrib/UCalgary/249-9-0-0-C/9-1-4-Ap-C/9-1-4-Ap-C-danny-1.pg new file mode 100644 index 0000000000..93a7537142 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-1-4-Ap-C/9-1-4-Ap-C-danny-1.pg @@ -0,0 +1,53 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(January 2025) +## Institution(University of Calgary) +## Author(Danny Glin) +## Level(3) +# MATH 249 Learning Outcomes 9-1-3-Ap-C and/or 9-1-4-Ap-C + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2, 9, 1) * random(-1, 1, 2); +$b = non_zero_random(-7, 7, 1); +$f = Formula("$a*(x-$b)^2")->reduce(); +if ($a > 0) { + $maxmin = 'a local minimum'; + $negpos = 'positive'; +} else { + $maxmin = 'a local maximum'; + $negpos = 'negative'; +} + +$popup = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum' + ], + $maxmin +); + +BEGIN_PGML +The function [`f(x)=[$f]`] has [_]{$popup} when [`x=[$b]`]. +END_PGML + +$twoa = 2 * $a; +$fp = Formula("$twoa*(x-$b)")->reduce(); +BEGIN_PGML_SOLUTION +[`f'(x)=[$fp]`], and [`[$fp]=0`] when [`x=[$b]`]. To check if there is a local maximum or local minimum when [`x=[$b]`], use the second derivative test: [`f''(x)=[$twoa]`], which is [$negpos] when [`x=[$b]`], so [`f`] has [$maxmin] when [`x=[$b]`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-1-4-Ap-C/9-1-4-Ap-C-sdt-jms-1.pg b/Contrib/UCalgary/249-9-0-0-C/9-1-4-Ap-C/9-1-4-Ap-C-sdt-jms-1.pg new file mode 100644 index 0000000000..cf6f3f7af7 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-1-4-Ap-C/9-1-4-Ap-C-sdt-jms-1.pg @@ -0,0 +1,89 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(31 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$sign = random(1,3,1)*random(-1,1,2); +$c = 4*random(1,3,1); #coefficient +$pt = 3*$c/4; + +$f = Formula("$sign*x^4 - $sign*$c*x^3")->reduce(); +$fder = Formula("4*$sign*x^3 - 3*$sign*$c*x^2")->reduce(); +$fderder = Formula("12*$sign*x^2 - 6*$sign*$c*x")->reduce(); + +$sdt = Compute("12*$sign*($pt)^2 - 6*$sign*$c*($pt)"); +$ans = Compute("$sign*($pt)^4 - $sign*$c*($pt)^3"); + +if($sdt < 0) +{ +$posneg = '<'; +$ext = 'maximum'; +} +else +{ +$posneg = '>'; +$ext = 'minimum'; +} + +$ineq = DropDown( + [ + '>', + '<', + '=' + ], + $posneg +); + +$maxmin = DropDown( + [ + 'maximum', + 'minimum' + ], + $ext +); + + +BEGIN_PGML +Consider the function [``f(x) = [$f].``] + +At the critical point [`x=[$pt]`] we have that [`f''([$pt]) = \, `] [_]{$sdt}{5} so [`f''([$pt]) `] [_]{$ineq} [`0`], and by the Second Derivative Test [`f`] has a local [_]{$maxmin} at [`x=[$pt].`] The corresponding local extreme value of [`f`] is [`f([$pt]) = \, `][_]{$ans}{5}. +END_PGML + +$c3 = 3*$c; + +BEGIN_PGML_SOLUTION +The function [``f(x) = [$f]``] has first derivative equal to [``f'(x) = [$fder]``] and second derivative equal to [``f'(x) = [$fderder].``] + +Then [``f'(x) = x^2(4x-[$c3])``] so [`f'([$pt])=0`] and [`x=[$pt]`] is indeed a critical point of [`f.`] + +Now [`f''([$pt]) = [$sdt] [$ineq] 0`], so by the Second Derivative Test [`f`] has a local [$maxmin] at [`x=[$pt].`] + +The corresponding local extreme value of [`f`] is [`f([$pt]) = [$ans].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-1-4-Ap-C/9-1-4-Ap-C-sdt-jms-2.pg b/Contrib/UCalgary/249-9-0-0-C/9-1-4-Ap-C/9-1-4-Ap-C-sdt-jms-2.pg new file mode 100644 index 0000000000..2028a325e6 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-1-4-Ap-C/9-1-4-Ap-C-sdt-jms-2.pg @@ -0,0 +1,88 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(31 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +Context()->variables->add(k=>"Real"); + +$a = non_zero_random(-5,5,1); +$aa = $a**2; +$c = non_zero_random(-9,9,1); +$ver = random(-1,1,2); + +$f = Formula("k^3*x -k*x^3/3 + $c")->reduce(); +$fder = Formula("k^3 - k*x^2")->reduce(); +$fdera = Formula("k^3 - k*($aa)")->reduce(); +$fderder = Formula("-2*k*x")->reduce(); +$fderdera = Formula("-2*k*[$a]")->reduce(); + +if($ver < 0) +{ +$posneg = '>'; +$maxmin = 'minimum'; +$ans = Compute("-$a"); +} +else +{ +$posneg = '<'; +$maxmin = 'maximum'; +$ans = Compute("$a"); +} + +$ineq = DropDown( + [ + '>', + '<', + '=' + ], + $posneg +); + + + +BEGIN_PGML +Let [`k`] be an unknown constant and consider the function [``f(x) = [$f].``] + +Determine the value(s) of [`k`] that guarantee that [`f`] has a local [$maxmin] at [`x=[$a].`] + +[`k \, = `] [_]{$ans}{2} + +Enter the value(s) that you find as a list separated by commas, if there are no such values of [`k`], then enter [|None|]*. + +**Hint**: Use the Second Derivative Test. +END_PGML + +BEGIN_PGML_SOLUTION +Given [``f(x) = [$f]``], we first compute that [``f'(x) = [$fder]``] and [``f''(x) = [$fderder].``] + +Since [`f`] is differentiable for all [`x`], in order for [`f`] to have a [$maxmin] at [`x=[$a]`] it must be the case that [`x=[$a]`] is a critical point of [`f`]. That is, we need [`0 = f'([$a]) = [$fdera] = k(k^2-[$aa])`] and so [`k=[$a]`] or [`k = -[$a].`] + +For [`f`] to have a [$maxmin] at [`x=[$a]`] we need to have [`f''([$a]) [$ineq] 0.`] So since [`f''([$a]) = [$fderdera]`] we must take only [`k=[$ans].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-1-4-Ap-C/9-1-4-Ap-C-sdt-jms-3.pg b/Contrib/UCalgary/249-9-0-0-C/9-1-4-Ap-C/9-1-4-Ap-C-sdt-jms-3.pg new file mode 100644 index 0000000000..92be6d51bf --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-1-4-Ap-C/9-1-4-Ap-C-sdt-jms-3.pg @@ -0,0 +1,191 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(31 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course + "parserPopUp.pl" +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +# four distinct x points +$a = random(-9,2,1); +$b = $a + random(1,4,1); +$c = $b + random(1,4,1); +$d = $c + random(1,4,1); + +# first der values + +$fpa = random(0,1,1)*random(-9,9,1); #want high chance of being 0 +$fpb = random(0,1,1)*random(-9,9,1); +$fpc = random(0,1,1)*random(-9,9,1); +$fpd = random(0,1,1)*random(-9,9,1); + +# second der values + +$fppa = random(0,1,1)*random(-19,19,1); #want high chance of being 0 +$fppb = random(0,1,1)*random(-19,19,1); +$fppc = random(0,1,1)*random(-19,19,1); +$fppd = random(0,1,1)*random(-19,19,1); + +# determine max/min + + +if($fpa == 0) +{ + if($fppa > 0) + {$maxmin_a = 'a local minimum';} + elsif($fppa < 0) + {$maxmin_a = 'a local maximum';} + else + {$maxmin_a = 'there is not enough information to determine if f has a local extrema';} +} +else +{ +$maxmin_a = 'neither a local maximum nor local minimum'; +} + +if($fpb == 0) +{ + if($fppb > 0) + {$maxmin_b = 'a local minimum';} + elsif($fppb < 0) + {$maxmin_b = 'a local maximum';} + else + {$maxmin_b = 'there is not enough information to determine if f has a local extrema';} +} +else +{ +$maxmin_b = 'neither a local maximum nor local minimum'; +} + +if($fpc == 0) +{ + if($fppc > 0) + {$maxmin_c = 'a local minimum';} + elsif($fppc < 0) + {$maxmin_c = 'a local maximum';} + else + {$maxmin_c = 'there is not enough information to determine if f has a local extrema';} +} +else +{ +$maxmin_c = 'neither a local maximum nor local minimum'; +} + +if($fpd == 0) +{ + if($fppd > 0) + {$maxmin_d = 'a local minimum';} + elsif($fppd < 0) + {$maxmin_d = 'a local maximum';} + else + {$maxmin_d = 'there is not enough information to determine if f has a local extrema';} +} +else +{ +$maxmin_d = 'neither a local maximum nor local minimum'; +} + +# make popups + +$popup_a = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum', + 'there is not enough information to determine if f has a local extrema' + ], + $maxmin_a +); + +$popup_b = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum', + 'there is not enough information to determine if f has a local extrema' + ], + $maxmin_b +); + +$popup_c = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum', + 'there is not enough information to determine if f has a local extrema' + ], + $maxmin_c +); + +$popup_d = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor local minimum', + 'there is not enough information to determine if f has a local extrema' + ], + $maxmin_d +); + +BEGIN_PGML + +Let [`f`] be a twice-differentiable function and that [`f''`] is continuous. Further suppose that the following data is known about [`f'`] and [`f''`]. + +[# + [. [`f'([$a]) = [$fpa] `] .] + [. [`f'([$b]) = [$fpb] `] .] + [. [`f'([$c]) = [$fpc] `] .] + [. [`f'([$d]) = [$fpd] `].]* + [. [`f''([$a]) = [$fppa] `] .] + [. [`f''([$b]) = [$fppb] `] .] + [. [`f''([$c]) = [$fppc]`] .] + [. [`f''([$d]) = [$fppd]`].]* +#] + +Complete the following statements about the existence of local extrema of [`f`]. + ++ [`f`] has [_]{$popup_a} at [`x=[$a].`] + ++ [`f`] has [_]{$popup_b} at [`x=[$b].`] + ++ [`f`] has [_]{$popup_c} at [`x=[$c].`] + ++ [`f`] has [_]{$popup_d} at [`x=[$d].`] + +END_PGML + +BEGIN_PGML_SOLUTION +If [`f`] has a local extrema (maximum/minimum) at [`x=a`], then since [`f`] is differentiable it must be the case that [`f'(a)=0`]. + +Therefore, if [`f'(a)\neq 0`], then [`f`] has neither a local maximum nor local minimum at [`x=a`]. + +Suppose that [`f'(a) = 0`], so [`x=a`] is a critical point of [`f`], now we are in the situation where we can apply the Second Derivative Test. + ++ If [`f''(a) < 0`], then [`f`] has a local maximum at [`x=a.`] ++ If [`f''(a) > 0`], then [`f`] has a local minimum at [`x=a.`] ++ If [`f''(a) = 0`], then we do not have enough information to determine if [`f`] has a local extrema at [`x=a.`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-2-1-R-C/9-2-1-R-C-crit-sing-def-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-2-1-R-C/9-2-1-R-C-crit-sing-def-jms.pg new file mode 100644 index 0000000000..629686610d --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-2-1-R-C/9-2-1-R-C-crit-sing-def-jms.pg @@ -0,0 +1,81 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(26 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) +# MATH 249 Learning Outcomes 9-1-0-R-C + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$ver = random(-1, 1, 2); #version +# interval +$a = random(-5,3,1); +$b = $a + 5*random(2,3,1); +# sample point 1 in interval +$t = random(0.2, 0.4, 0.2); +$c = $t*$b + (1-$t)*$a; + +# sample point 2 in interval +$s = random(0.6, 0.8, 0.2); +$d = $s*$b + (1-$s)*$a; + +$popup_crit = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'a critical point', + 'a singular point' + ], + 'a critical point' +); + +$popup_sing = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'a critical point', + 'a singular point' + ], + 'a singular point' +); + +# randomize order that they appear +$pt1 = list_random("$c","$d"); + +if($pt1 eq "$c") +{ +$val1 = 'is equal to 0'; +$val2 = 'does not exist'; +$pt2 = "$d"; +$popup1 = $popup_crit; +$popup2 = $popup_sing;} +else +{$pt2 = "$c"; +$val1 = 'does not exist'; +$val2 = 'is equal to 0'; +$popup1 = $popup_sing; +$popup2 = $popup_crit;} + +BEGIN_PGML +Let [`f`] be a function defined for all [`x`] in the interval [`([$a],[$b]).`] + ++ We say that [`f`] has [_]{$popup1} at [`x=[$pt1]`] if [`f'([$pt1])`] [$val1]. + ++ We say that [`f`] has [_]{$popup2} at [`x=[$pt2]`] if [`f'([$pt2])`] [$val2]. + +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-2-3-U-I/9-2-3-U-I-crit-sing-tf-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-2-3-U-I/9-2-3-U-I-crit-sing-tf-jms.pg new file mode 100644 index 0000000000..7d7915e71f --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-2-3-U-I/9-2-3-U-I-crit-sing-tf-jms.pg @@ -0,0 +1,70 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(27 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2,5,1); +$b = $a + non_zero_random(-3,3,1); + +$maxmin = list_random("maximum", "minimum"); + +$critsing = list_random("critical", "singular"); +if($critsing eq "critical") +{$critsing2 = "singular";} +else +{$critsing2 = "critical";} + +$true = DropDown( + [ + 'true', + 'false', + 'impossible to tell' + ], + 'true' +); + +$false = DropDown( + [ + 'true', + 'false', + 'impossible to tell' + ], + 'false' +); + +BEGIN_PGML +Let [`f`] be a function of one real variable [`x`]. + +For each of the following statements, determine if the statement is **always true** or **always false** (that is, it is true/false for all functions [`f`]). + ++ [_]{$false} If [`f`] has a local [$maxmin] at [`x=[$a]`], then [`f`] has a [$critsing] point at [`x=[$a].`] + ++ [_]{$false} If [`f`] has a [$critsing2] point at [`x=[$b]`], then [`f`] has a local maximum or local minimum at [`x=[$b].`] + +END_PGML + +BEGIN_PGML_SOLUTION +Both statements are false. + ++ A local maxmimum or a local minimum will occur at **either** a critical point or a singular point, so this statement is not true for all functions [`f`]. For example, the local minimum of [`f(x) = |x|`] occurs at the singular point [`x=0`], and the local minimum of [`f(x) = x^2`] occurs at the critical point [`x=0.`] + ++ A critical/singular point does not necessarily have to be a local extreme point. For example, [`f(x) = x^3`] has a critical point at [`x=0`] and this point is not a local extrema. Similarly, [`f(x) = \sqrt[3]{x}`] has a singular point at [`x=0`] and this point is not a local extrema. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-2-3-U-I/9-2-3-U-I-fermat-evt-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-2-3-U-I/9-2-3-U-I-fermat-evt-jms.pg new file mode 100644 index 0000000000..155f1f5cfe --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-2-3-U-I/9-2-3-U-I-fermat-evt-jms.pg @@ -0,0 +1,68 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Increasing/decreasing functions and local extrema) +## Date(27 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2,5,1); +$b = $a + non_zero_random(-3,3,1); +$c = $b + random(2,5,1); + +$maxmin = list_random("maximum", "minimum"); + +if($maxmin eq "maximum") +{$maxmin2 = "minimum";} +else +{$maxmin2 = "maximum";} + +$critsing = DropDown( + [ + 'point of discontinuity', + 'inflection point', + 'critical or singular point' + ], + 'critical or singular point' +); + +$global = DropDown( + [ + 'a critical point only', + 'a singular point only', + 'an end point of the interval only', + 'a critical point, a singular point, or an endpoint of the interval', + 'none of the above, there does not have to be a global extrema' + ], + 'a critical point, a singular point, or an endpoint of the interval' +); + +BEGIN_PGML +Let [`f`] be a function of one real variable [`x`]. Complete the following statements. + ++ If [`f`] has a local [$maxmin] at [`x=[$a]`], then [`x=[$a]`] is a [_]{$critsing} of [`f.`] + ++ If [`f`] is continuous on the closed interval [`[[$b],[$c]]`], then the global [$maxmin2] of [`f`] on [`[[$b],[$c]]`] occurs at [_]{$global}. + +END_PGML + +BEGIN_PGML_SOLUTION ++ A local maxmimum or a local minimum will occur at **either** a critical point or a singular point. + ++ For a continuous function on a closed interval, a global maximum or a global minimum will occur at a critical point, a singular point or an endpoint of the closed interval. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-3-0-R-C/9-3-0-R-C-glob-ext-def-2-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-3-0-R-C/9-3-0-R-C-glob-ext-def-2-jms.pg new file mode 100644 index 0000000000..a76f9cdb34 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-3-0-R-C/9-3-0-R-C-glob-ext-def-2-jms.pg @@ -0,0 +1,64 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Global extrema) +## Date(26 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) +# MATH 249 Learning Outcomes 9-3-0-R-C + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$ver = random(-1, 1, 2); #version +# interval +$a = random(-5,3,1); +$b = $a + 4*random(1,4,1); +# sample point in interval +$t = random(0.25, 0.75, 0.25); +$c = $t*$b + (1-$t)*$a; + +if ($ver > 0) { + $maxmin = 'a global (absolute) minimum'; + $sign = '≤'; +} else { + $maxmin = 'a global (absolute) maximum'; + $sign = '≥'; +} + +$popup_sign = DropDown( + [ + '≤', + '≥', + '=' + ], + $sign +); + +$popup_quant = DropDown( + [ + 'for some', + 'for all', + 'for at least one', + 'for no more than one', + ], + 'for all' +); + +BEGIN_PGML +Let [`f`] be a function defined for all [`x`] in the interval [`([$a],[$b]).`] + +We say that [`f`] has [$maxmin] at [`x=[$c]`] if [`f([$c])`] [_]{$popup_sign} [`f(x)`] [_]{$popup_quant} [`x`] in the interval [`([$a],[$b]).`] +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-3-0-R-C/9-3-0-R-C-glob-ext-def-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-3-0-R-C/9-3-0-R-C-glob-ext-def-jms.pg new file mode 100644 index 0000000000..f157d65da9 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-3-0-R-C/9-3-0-R-C-glob-ext-def-jms.pg @@ -0,0 +1,66 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Global extrema) +## Date(26 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) +# MATH 249 Learning Outcomes 9-3-0-R-C + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$ver = random(-1, 1, 2); #version +# interval +$a = random(-5,3,1); +$b = $a + 4*random(1,4,1); +# sample point in interval +$t = random(0.25, 0.75, 0.25); +$c = $t*$b + (1-$t)*$a; + +if ($ver > 0) { + $maxmin = 'a global (absolute) minimum'; + $sign = '\geq'; +} else { + $maxmin = 'a global (absolute) maximum'; + $sign = '\leq'; +} + +$popup_maxmin = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'a global (absolute) maximum', + 'a global (absolute) minimum', + 'neither a maximum nor minimum' + ], + $maxmin +); + +$popup_quant = DropDown( + [ + 'for some', + 'for all', + 'for at least one', + 'for no more than one', + ], + 'for all' +); + +BEGIN_PGML +Let [`f`] be a function defined for all [`x`] in the interval [`([$a],[$b]).`] + +We say that [`f`] has [_]{$popup_maxmin} at [`x=[$c]`] if [`f(x) [$sign] f([$c]) `] [_]{$popup_quant} [`x`] in the interval [`([$a],[$b]).`] +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-3-2-U-C/9-3-2-U-C-pw-loc-glob-ext-1-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-3-2-U-C/9-3-2-U-C-pw-loc-glob-ext-1-jms.pg new file mode 100644 index 0000000000..d9c22f18c0 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-3-2-U-C/9-3-2-U-C-pw-loc-glob-ext-1-jms.pg @@ -0,0 +1,286 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Global extrema) +## Date(26 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl", "parserPopUp.pl"); + +$a = random(-8,-4,1); +$b = $a + random(2,4,1); +$c = $b + random(2,4,1); +$d = $c + random(2,4,1); + +$fm10 = random(-7,7,1); +$fa = random(-6,6,1); +$fb = random(-6,6,1); +$fc = random(-6,6,1); +$fd = random(-6,6,1); +$f10 = random(-7,7,1); + +# determine GLOBAL behaviour at endpoints and interior singular +if($fm10 <= $fa && $fm10 <= $fb && $fm10 <= $fc && $fm10 <= $fd && $fm10 <= $f10) +{$m10_maxmin = 'a global (absolute) minimum';} +elsif($fm10 >= $fa && $fm10 >= $fb && $fm10 >= $fc && $fm10 >= $fd && $fm10 >= $f10) +{$m10_maxmin = 'a global (absolute) maximum';} +else +{$m10_maxmin = 'neither a global maximum nor a global minimum';} + +if($fa <= $fm10 && $fa <= $fb && $fa <= $fc && $fa <= $fd && $fa <= $f10) +{$a_maxmin = 'a global (absolute) minimum';} +elsif($fa >= $fm10 && $fa >= $fb && $fa >= $fc && $fa >= $fd && $fa >= $f10) +{$a_maxmin = 'a global (absolute) maximum';} +else +{$a_maxmin = 'neither a global maximum nor a global minimum';} + +if($fb <= $fm10 && $fb <= $fa && $fb <= $fc && $fb <= $fd && $fb <= $f10) +{$b_maxmin = 'a global (absolute) minimum';} +elsif($fb >= $fm10 && $fb >= $fa && $fb >= $fc && $fb >= $fd && $fb >= $f10) +{$b_maxmin = 'a global (absolute) maximum';} +else +{$b_maxmin = 'neither a global maximum nor a global minimum';} + +if($fc <= $fm10 && $fc <= $fa && $fc <= $fb && $fc <= $fd && $fc <= $f10) +{$c_maxmin = 'a global (absolute) minimum';} +elsif($fc >= $fm10 && $fc >= $fa && $fc >= $fb && $fc >= $fd && $fc >= $f10) +{$c_maxmin = 'a global (absolute) maximum';} +else +{$c_maxmin = 'neither a global maximum nor a global minimum';} + +if($fd <= $fm10 && $fd <= $fa && $fd <= $fb && $fd <= $fc && $fd <= $f10) +{$d_maxmin = 'a global (absolute) minimum';} +elsif($fd >= $fm10 && $fd >= $fa && $fd >= $fb && $fd >= $fc && $fd >= $f10) +{$d_maxmin = 'a global (absolute) maximum';} +else +{$d_maxmin = 'neither a global maximum nor a global minimum';} + +if($f10 <= $fa && $f10 <= $fb && $f10 <= $fc && $f10 <= $fd && $f10 <= $fm10) +{$ten_maxmin = 'a global (absolute) minimum';} +elsif($f10 >= $fa && $f10 >= $fb && $f10 >= $fc && $f10 >= $fd && $f10 >= $fm10) +{$ten_maxmin = 'a global (absolute) maximum';} +else +{$ten_maxmin = 'neither a global maximum nor a global minimum';} + +#produce GLOBAL popups for each endpoint +$popup_m10 = DropDown( + [ + 'a global (absolute) maximum', + 'a global (absolute) minimum', + 'neither a global maximum nor a global minimum' + ], + $m10_maxmin +); + +$popup_10 = DropDown( + [ + 'a global (absolute) maximum', + 'a global (absolute) minimum', + 'neither a global maximum nor a global minimum' + ], + $ten_maxmin +); + +#produce GLOBAL popups for each singular point + +$popup_a = DropDown( + [ + 'a global (absolute) maximum', + 'a global (absolute) minimum', + 'neither a global maximum nor a global minimum' + ], + $a_maxmin +); + +$popup_b = DropDown( + [ + 'a global (absolute) maximum', + 'a global (absolute) minimum', + 'neither a global maximum nor a global minimum' + ], + $b_maxmin +); + + +$popup_c = DropDown( + [ + 'a global (absolute) maximum', + 'a global (absolute) minimum', + 'neither a global maximum nor a global minimum' + ], + $c_maxmin +); + + +$popup_d = DropDown( + [ + 'a global (absolute) maximum', + 'a global (absolute) minimum', + 'neither a global maximum nor a global minimum' + ], + $d_maxmin +); + +# determine LOCAL behaviour at internal singular points + +if($fa <= $fm10 && $fa <= $fb) +{$a_maxmin_loc = 'a local minimum';} +elsif($fa >= $fm10 && $fa >= $fb) +{$a_maxmin_loc = 'a local maximum';} +else +{$a_maxmin_loc = 'neither a local maximum nor a local minimum';} + +if($fb <= $fa && $fb <= $fc) +{$b_maxmin_loc = 'a local minimum';} +elsif($fb >= $fa && $fb >= $fc) +{$b_maxmin_loc = 'a local maximum';} +else +{$b_maxmin_loc = 'neither a local maximum nor a local minimum';} + +if($fc <= $fb && $fc <= $fd) +{$c_maxmin_loc = 'a local minimum';} +elsif($fc >= $fb && $fc >= $fd) +{$c_maxmin_loc = 'a local maximum';} +else +{$c_maxmin_loc = 'neither a local maximum nor a local minimum';} + +if($fd <= $fc && $fd <= $f10) +{$d_maxmin_loc = 'a local minimum';} +elsif($fd >= $fc && $fd >= $f10) +{$d_maxmin_loc = 'a local maximum';} +else +{$d_maxmin_loc = 'neither a local maximum nor a local minimum';} + +#produce LOCAL popups for each singular point +$popup_a_loc = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor a local minimum' + ], + $a_maxmin_loc +); + +$popup_b_loc = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor a local minimum' + ], + $b_maxmin_loc +); + + +$popup_c_loc = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor a local minimum' + ], + $c_maxmin_loc +); + + +$popup_d_loc = DropDown( + [ + 'a local maximum', + 'a local minimum', + 'neither a local maximum nor a local minimum' + ], + $d_maxmin_loc +); + + +# choose random subsets of points, paired with popup, to ask below +# use eq for string comparison == does not behave correctly for this comparison + + +# one of a or b +$pt1 = list_random("$a","$b"); + +if($pt1 eq "$a") +{$popup1 = $popup_a; +$popup2 = $popup_a_loc;} +else +{$popup1 = $popup_b; +$popup2 = $popup_b_loc;} + +# one of c or d +$pt2 = list_random("$c","$d"); + +if($pt2 eq "$c") +{$popup3 = $popup_c; +$popup4 = $popup_c_loc;} +else +{$popup3 = $popup_d; +$popup4 = $popup_d_loc;} + + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) -- ($d,$fd); +\draw[red, very thick] ($d,$fd) -- (10,$f10); +\filldraw[red, very thick] (-10,$fm10) circle (2.5 pt); +\filldraw[red, very thick] (10,$f10) circle (2.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +\Context("Interval"); + +BEGIN_PGML +Consider the following graph of the piecewise defined function [`y=f(x)`] on the closed interval [`[-10,10].`] + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +a) At the point [`x=[$pt1]`] the function [`f`] has [_]{$popup1} and [`f`] has [_]{$popup2}. + +b) At the point [`x=[$pt2]`] the function [`f`] has [_]{$popup3} and [`f`] has [_]{$popup4}. + +END_PGML + + +ENDDOCUMENT(); + + +# For testing GLOBAL + +a) At the point [`x=-10`] the function [`f`] has [_]{$popup_m10} + +a) At the point [`x=[$a]`] the function [`f`] has [_]{$popup_a} + +a) At the point [`x=[$b]`] the function [`f`] has [_]{$popup_b} + +a) At the point [`x=[$c]`] the function [`f`] has [_]{$popup_c} + +a) At the point [`x=[$d]`] the function [`f`] has [_]{$popup_d} + +a) At the point [`x=10`] the function [`f`] has [_]{$popup_10} + +# For testing LOCAL + +a) At the point [`x=[$a]`] the function [`f`] has [_]{$popup_a_loc} + +a) At the point [`x=[$b]`] the function [`f`] has [_]{$popup_b_loc} + +a) At the point [`x=[$c]`] the function [`f`] has [_]{$popup_c_loc} + +a) At the point [`x=[$d]`] the function [`f`] has [_]{$popup_d_loc} + diff --git a/Contrib/UCalgary/249-9-0-0-C/9-3-3-U-C/9-3-3-U-C-pw-glob-ext-1-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-3-3-U-C/9-3-3-U-C-pw-glob-ext-1-jms.pg new file mode 100644 index 0000000000..f2d6248187 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-3-3-U-C/9-3-3-U-C-pw-glob-ext-1-jms.pg @@ -0,0 +1,211 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Global extrema) +## Date(26 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl", "parserPopUp.pl"); + +$a = random(-8,-4,1); +$b = $a + random(2,4,1); +$c = $b + random(2,4,1); +$d = $c + random(2,4,1); + +$fm10 = random(-7,7,1); +$fa = random(-6,6,1); +$fb = random(-6,6,1); +$fc = random(-6,6,1); +$fd = random(-6,6,1); +$f10 = random(-7,7,1); + +# determine behaviour at endpoints and interior singular +if($fm10 <= $fa && $fm10 <= $fb && $fm10 <= $fc && $fm10 <= $fd && $fm10 <= $f10) +{$m10_maxmin = 'a global (absolute) minimum';} +elsif($fm10 >= $fa && $fm10 >= $fb && $fm10 >= $fc && $fm10 >= $fd && $fm10 >= $f10) +{$m10_maxmin = 'a global (absolute) maximum';} +else +{$m10_maxmin = 'neither a global maximum nor a global minimum';} + +if($fa <= $fm10 && $fa <= $fb && $fa <= $fc && $fa <= $fd && $fa <= $f10) +{$a_maxmin = 'a global (absolute) minimum';} +elsif($fa >= $fm10 && $fa >= $fb && $fa >= $fc && $fa >= $fd && $fa >= $f10) +{$a_maxmin = 'a global (absolute) maximum';} +else +{$a_maxmin = 'neither a global maximum nor a global minimum';} + +if($fb <= $fm10 && $fb <= $fa && $fb <= $fc && $fb <= $fd && $fb <= $f10) +{$b_maxmin = 'a global (absolute) minimum';} +elsif($fb >= $fm10 && $fb >= $fa && $fb >= $fc && $fb >= $fd && $fb >= $f10) +{$b_maxmin = 'a global (absolute) maximum';} +else +{$b_maxmin = 'neither a global maximum nor a global minimum';} + +if($fc <= $fm10 && $fc <= $fa && $fc <= $fb && $fc <= $fd && $fc <= $f10) +{$c_maxmin = 'a global (absolute) minimum';} +elsif($fc >= $fm10 && $fc >= $fa && $fc >= $fb && $fc >= $fd && $fc >= $f10) +{$c_maxmin = 'a global (absolute) maximum';} +else +{$c_maxmin = 'neither a global maximum nor a global minimum';} + +if($fd <= $fm10 && $fd <= $fa && $fd <= $fb && $fd <= $fc && $fd <= $f10) +{$d_maxmin = 'a global (absolute) minimum';} +elsif($fd >= $fm10 && $fd >= $fa && $fd >= $fb && $fd >= $fc && $fd >= $f10) +{$d_maxmin = 'a global (absolute) maximum';} +else +{$d_maxmin = 'neither a global maximum nor a global minimum';} + +if($f10 <= $fa && $f10 <= $fb && $f10 <= $fc && $f10 <= $fd && $f10 <= $fm10) +{$ten_maxmin = 'a global (absolute) minimum';} +elsif($f10 >= $fa && $f10 >= $fb && $f10 >= $fc && $f10 >= $fd && $f10 >= $fm10) +{$ten_maxmin = 'a global (absolute) maximum';} +else +{$ten_maxmin = 'neither a global maximum nor a global minimum';} + +#produce popups for each endpoint +$popup_m10 = DropDown( + [ + 'a global (absolute) maximum', + 'a global (absolute) minimum', + 'neither a global maximum nor a global minimum' + ], + $m10_maxmin +); + +$popup_10 = DropDown( + [ + 'a global (absolute) maximum', + 'a global (absolute) minimum', + 'neither a global maximum nor a global minimum' + ], + $ten_maxmin +); + +#produce popups for each singular point + +$popup_a = DropDown( + [ + 'a global (absolute) maximum', + 'a global (absolute) minimum', + 'neither a global maximum nor a global minimum' + ], + $a_maxmin +); + +$popup_b = DropDown( + [ + 'a global (absolute) maximum', + 'a global (absolute) minimum', + 'neither a global maximum nor a global minimum' + ], + $b_maxmin +); + + +$popup_c = DropDown( + [ + 'a global (absolute) maximum', + 'a global (absolute) minimum', + 'neither a global maximum nor a global minimum' + ], + $c_maxmin +); + + +$popup_d = DropDown( + [ + 'a global (absolute) maximum', + 'a global (absolute) minimum', + 'neither a global maximum nor a global minimum' + ], + $d_maxmin +); + + +# choose random subsets of points, paired with popup, to ask below +# use eq for string comparison == does not behave correctly for this comparison + +# OPTION TO INCLUDE a) At the point [`x=[$pt1]`] the function [`f`] has [_]{$popup1} +# one end -10 or 10 +$pt1 = list_random("-10","10"); + +if($pt1 eq "-10") +{$popup1 = $popup_m10;} +else +{$popup1 = $popup_10;} + +# one of a or b +$pt2 = list_random("$a","$b"); + +if($pt2 eq "$a") +{$popup2 = $popup_a;} +else +{$popup2 = $popup_b;} + +# one of c or d +$pt3 = list_random("$c","$d"); + +if($pt3 eq "$c") +{$popup3 = $popup_c;} +else +{$popup3 = $popup_d;} + + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[red, very thick] (-10,$fm10) -- ($a,$fa); +\draw[red, very thick] ($a,$fa) -- ($b,$fb); +\draw[red, very thick] ($b,$fb) -- ($c,$fc); +\draw[red, very thick] ($c,$fc) -- ($d,$fd); +\draw[red, very thick] ($d,$fd) -- (10,$f10); +\filldraw[red, very thick] (-10,$fm10) circle (2.5 pt); +\filldraw[red, very thick] (10,$f10) circle (2.5 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=f(x)\)}; +END_TIKZ + +\Context("Interval"); + +BEGIN_PGML +Consider the following graph of the piecewise defined function [`y=f(x)`] on the closed interval [`[-10,10].`] + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +a) At the point [`x=[$pt1]`] the function [`f`] has [_]{$popup1} + +b) At the point [`x=[$pt2]`] the function [`f`] has [_]{$popup2} + +c) At the point [`x=[$pt3]`] the function [`f`] has [_]{$popup3} + +END_PGML + + +ENDDOCUMENT(); + +# For testing + +a) At the point [`x=-10`] the function [`f`] has [_]{$popup_m10} + +a) At the point [`x=[$a]`] the function [`f`] has [_]{$popup_a} + +a) At the point [`x=[$b]`] the function [`f`] has [_]{$popup_b} + +a) At the point [`x=[$c]`] the function [`f`] has [_]{$popup_c} + +a) At the point [`x=[$d]`] the function [`f`] has [_]{$popup_d} + +a) At the point [`x=10`] the function [`f`] has [_]{$popup_10} diff --git a/Contrib/UCalgary/249-9-0-0-C/9-3-4-U-C/9-3-4-U-C-pw-der-glob-ext-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-3-4-U-C/9-3-4-U-C-pw-der-glob-ext-jms.pg new file mode 100644 index 0000000000..8d61b4e6cb --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-3-4-U-C/9-3-4-U-C-pw-der-glob-ext-jms.pg @@ -0,0 +1,131 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Global extrema) +## Date(27 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(2) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGtikz.pl", "PGcourse.pl","parserPopUp.pl"); + +#critical point +$a = non_zero_random(-4,4,1); + +# funciton values +$fm10 = non_zero_random(-5,5,1); +$fa = 0; #critical point +$f10 = non_zero_random(-5,5,1); + +# determine local extrema behavour at critical point x = $a +if($fm10 > 0 & $f10 < 0) +{$a_maxmin = 'a local and global maximum'; +$conl = $fm10+random(1,2,1); +$conr = $f10-random(1,2,1); +$max_pt = 'a critical point'; +$min_pt = 'an endpoint of [-10, 10]';} +elsif($fm10 < 0 & $f10 > 0) +{$a_maxmin = 'a local and global minimum'; +$conl = $fm10-random(1,2,1); +$conr = $f10+random(1,2,1); +$max_pt = 'an endpoint of [-10, 10]'; +$min_pt = 'a critical point';} +elsif($fm10 < 0 & $f10 < 0) +{$a_maxmin = 'neither a local/global maximum nor local/global minimum'; +$conl = $fm10-random(1,2,1); +$conr = $f10-random(1,2,1); +$max_pt = 'an endpoint of [-10, 10]'; +$min_pt = 'an endpoint of [-10, 10]';} +elsif($fm10 > 0 & $f10 > 0) +{$a_maxmin = 'neither a local/global maximum nor local/global minimum'; +$conl = $fm10+random(1,2,1); +$conr = $f10+random(1,2,1); +$max_pt = 'an endpoint of [-10, 10]'; +$min_pt = 'an endpoint of [-10, 10]';} + +# produce popups for local max / local min / neither +$popup_a = DropDown( + [ + 'a local maximum but not global maximum', + 'a local and global maximum', + 'a local minimum but not global maximum', + 'a local and global minimum', + 'neither a local/global maximum nor local/global minimum' + ], + $a_maxmin +); + +$popup_max = DropDown( + [ + 'a critical point', + 'a singular point', + 'an endpoint of [-10, 10]' + ], + $max_pt +); + +$popup_min = DropDown( + [ + 'a critical point', + 'a singular point', + 'an endpoint of [-10, 10]' + ], + $min_pt +); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); + +$graph_image->BEGIN_TIKZ +\draw[->,thick] (-10,0) -- (10,0) node[above left,outer sep=2pt]{\(x\)}; +\draw[->,thick] (0,-7) -- (0,7) node[below right,outer sep=2pt]{\(y\)}; +\draw[very thin,color=gray] (-10,-7) grid (10,7); +\foreach \x in {-8,-6,-4,-2,2,4,6,8} \draw[thin] (\x,5pt) -- (\x,-5pt) node[below]{\(\x\)}; +\foreach \y in {-6,-4,-2,2,4,6} \draw[thin] (5pt,\y) -- (-5pt,\y) node[left]{\(\y\)}; +\draw[red, very thick] (-9.9,$fm10) .. controls (-6,$conl) .. ($a,$fa); +\draw[red, very thick] ($a,$fa) .. controls (6, $conr) .. (9.9,$f10); +\draw[red, very thick] (-10,$fm10) circle (3 pt); +\filldraw[red, very thick] ($a,$fa) circle (2.5 pt); +\draw[red, very thick] (10,$f10) circle (3 pt); +\draw[red] (10,$f10) node[above right, outer sep=2pt]{\(y=g^\prime(x)\)}; +END_TIKZ + +BEGIN_PGML +Let [`g`] be a function that is continuous on [`[-10,10]`] and differentiable on [`(-10,10)`] + +Consider the following **graph of the derivative** [`y=g'(x)`]. + +[@ image($graph_image, width => 800, tex_size => 800) @]* + +a) At [`x=[$a],`] the function [`g`] has [_]{$popup_a} on the interval [`[-10,10].`] + +b) The global (absolute) maximum of [`g`] on the interval [`[-10,10]`] occurs at [_]{$popup_max}. + +c) The global (absolute) minimum of [`g`] on the interval [`[-10,10]`] occurs at [_]{$popup_min}. + +END_PGML + +BEGIN_PGML_SOLUTION +Recall that in general: + ++ If [`g`] is increasing on the left and decreasing on the right of a critical/singular point [`x=c`], then [`g`] has a local maximum at [`x=c.`] + ++ If [`g`] is decreasing on the left and increasing on the right of a critical/singular point [`x=c`], then [`g`] has a local minimum at [`x=c.`] + ++ If [`g`] is increasing (respectively, decreasing) to the left and right of a critical/singular point [`x=c`], then [`g`] does not have a local extrema at [`x=c.`] + ++ [`g`] is increasing on intervals where [`g'(x)>0,`] and [`g`] is decreasing on intervals where [`g'(x)<0.`] + +In this case, [`g`] has one critical point at [`x=[$a]`], so we can apply the Global (General) Interval Method to determine that if [`h`] has a local extrema at [`x=[$a]`], then this point is also a global extrema. In this case the other extrema must occur at an endpoint of [`[-10,10].`] + +If [`x=[$a]`] is not a local extrema, then both the global maximum and global minimum must occur at the end points of [`[-10,10].`] Can you determine which one occurs at each endpoint? + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-4-1-R-A/9-4-1-R-A-evt-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-4-1-R-A/9-4-1-R-A-evt-jms.pg new file mode 100644 index 0000000000..0d4cede3b1 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-4-1-R-A/9-4-1-R-A-evt-jms.pg @@ -0,0 +1,71 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Global extrema) +## Date(27 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(1) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$a = random(2,5,1); +$b = $a+ random(2,3,1); + + +$cont = DropDown( + [ + 'well-defined', + 'piecewise', + 'continuous' + ], + 'continuous' +); + +$closed = DropDown( + [ + 'closed', + 'open', + 'connected' + ], + 'closed' +); + +$both= DropDown( + [ + 'at least one of', + 'at most one of', + 'both', + 'neither' + ], + 'both' +); + +$global = DropDown( + [ + 'local', + 'global' + ], + 'global' +); + + + +BEGIN_PGML +Complete the following statement of the **Extreme Value Theorem**. + +If [`f`] is a [_]{$cont} function on the [_]{$closed} interval [`[[$a],[$b]]`], then [`f`] attains [_]{$both} a [_]{$global} maximum and minimum on [`[[$a],[$b]]`]. + +END_PGML + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-4-3-Ap-C/9-4-3-Ap-C-closed-int-jms-1.pg b/Contrib/UCalgary/249-9-0-0-C/9-4-3-Ap-C/9-4-3-Ap-C-closed-int-jms-1.pg new file mode 100644 index 0000000000..318e1f079c --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-4-3-Ap-C/9-4-3-Ap-C-closed-int-jms-1.pg @@ -0,0 +1,102 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Global extrema) +## Date(31 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$c = random(-2,2,1); #critical point inside the interval +$d = $c + random(3,4,1)*random(-1,1,2); #second critical point outside of the interval +$a = $c - random(1,2,1); #left end point +$b = $c + random(1,2,1); #right end point + +if($c + $d == 0) #make sure quadratic term nonzero +{$d = $d+1;} + +$sign = random(-1,1,2); +$cplusd = $c+$d; +$cd = $c*$d; + +$quad = 3*$sign*$cplusd; +$lin = 6*$sign*$cd; +$cub = 2*$sign; + +$g = Formula("$cub*x^3 - $quad*x^2 + $lin*x")->reduce(); +$gder = Formula("3*$cub*x^2 - 2*$quad*x + $lin")->reduce(); +$gder_fac = Formula("$sign*6*(x-$c)(x-$d)")->reduce(); + +$ga = Compute("$cub*($a)^3 - $quad*($a)^2 + $lin*($a)"); +$gb = Compute("$cub*($b)^3 - $quad*($b)^2 + $lin*($b)"); +$gc = Compute("$cub*($c)^3 - $quad*($c)^2 + $lin*($c)"); +$gd = Compute("$cub*($d)^3 - $quad*($d)^2 + $lin*($d)"); + +$maxval = max($ga, $gb, $gc); +$minval = min($ga, $gb, $gc); + +# not possible that value of the function is the same at a critical point in the interval and endpoint, +# but it is possible that the values of the funciton at the endpoints of the interval are equal +# it will happen that the value at the critical point outside of the interval is equal to the value at one of the endpoints + +if($maxval == $ga && $maxval == $gb) +{$max = List('$a','$b');} +elsif($maxval == $ga) +{$max = $a;} +elsif($maxval == $gb) +{$max = $b;} +else +{$max = $c;} + +if($minval == $ga && $minval == $gb) +{$min = List('$a','$b');} +elsif($minval == $ga) +{$min = $a;} +elsif($minval == $gb) +{$min = $b;} +else +{$min = $c;} + +BEGIN_PGML +Let [`g(x) = [$g].`] + +The global (absolute) maximum value of [`g`] on [`[[$a],[$b]]`] occurs at [`x=`][_]{$max}{5} and the maximum value is [_]{$maxval}{5}. + +The global (absolute) minimum value of [`g`] on [`[[$a],[$b]]`] occurs at [`x=`][_]{$min}{5} and the minimum value is [_]{$minval}{5}. + +If the extreme value occurs at multiple [`x`]-values, then enter the [`x`]-value(s) that you find as a list separated by commas; if there are no such values, then enter [|None|]*. +END_PGML + +BEGIN_PGML_SOLUTION +First [``g'(x) = [$gder] = [$gder_fac]``] so [`g`] has critical points at [`x=[$c]`] and [`x=[$d]`], but only [`x=[$c]`] is in the interval [`[[$a],[$b]]`]. + +Now we consider the values of [`g`] at the end points and the critical points inside the interval [`[[$a],[$b]]`] + ++ [`g([$a]) = [$ga]`] ++ [`g([$c]) = [$gc]`] ++ [`g([$b]) = [$gb]`] ++ But we cannot consider [`g([$d]) = [$gd]`] since [`[$d]\notin[[$a],[$b]].`] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-4-3-Ap-C/9-4-3-Ap-C-closed-int-jms-2.pg b/Contrib/UCalgary/249-9-0-0-C/9-4-3-Ap-C/9-4-3-Ap-C-closed-int-jms-2.pg new file mode 100644 index 0000000000..a8de56737c --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-4-3-Ap-C/9-4-3-Ap-C-closed-int-jms-2.pg @@ -0,0 +1,93 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Global extrema) +## Date(31 March 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(3) + +DOCUMENT(); + +loadMacros( + "PGstandard.pl", # Standard macros for PG language + "PGML.pl", # PGML markup and Math Objects + "PGcourse.pl", # Customization file for the course +); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# Uncomment the following to override the default numerical +# tolerances +# Context()->->flags->set(tolerance => 0.0001, tolType => 'absolute'); + +$sign = random(-1,1,2); +$c = $sign*random(1,4,1); #critical point inside the interval +$a = -abs($c)-random(1,2,1); #left end point +$b = abs($c)+random(1,2,1); #right end point + +$g = Formula("x*e^(-x/$c)")->reduce(); +$gder = Formula("e^(-x/$c) - x/$c*e^(-x/$c)")->reduce(); +$gder_fac = Formula("e^(-x/$c)(1-x/$c)")->reduce(); + +$ga = Compute("$a*e^(-$a/$c)"); +$gb = Compute("$b*e^(-$b/$c)"); +$gc = Compute("$c*e^(-1)"); + +$maxval = max($ga, $gb, $gc); +$minval = min($ga, $gb, $gc); + +# not possible that value of the function is the same at a critical point in the interval and endpoint, +# but it is possible that the values of the funciton at the endpoints of the interval are equal +# it will happen that the value at the critical point outside of the interval is equal to the value at one of the endpoints + +if($maxval == $ga && $maxval == $gb) +{$max = List('$a','$b');} +elsif($maxval == $ga) +{$max = $a;} +elsif($maxval == $gb) +{$max = $b;} +else +{$max = $c;} + +if($minval == $ga && $minval == $gb) +{$min = List('$a','$b');} +elsif($minval == $ga) +{$min = $a;} +elsif($minval == $gb) +{$min = $b;} +else +{$min = $c;} + +BEGIN_PGML +Let [`g(x) = [$g].`] + +The global (absolute) maximum value of [`g`] on [`[[$a],[$b]]`] occurs at [`x=`][_]{$max}{5} and the maximum value is [_]{$maxval}{5}. + +The global (absolute) minimum value of [`g`] on [`[[$a],[$b]]`] occurs at [`x=`][_]{$min}{5} and the minimum value is [_]{$minval}{5}. + +If the extreme value occurs at multiple [`x`]-values, then enter the [`x`]-value(s) that you find as a list separated by commas; if there are no such values, then enter [|None|]*. +END_PGML + +$expa = -$a/$c; +$expc = -$c/$c; +$expb = -$b/$c; + +BEGIN_PGML_SOLUTION +First [``g'(x) = [$gder] = [$gder_fac]``] so [`g`] has one critical point at [`x=[$c]`] in the interval [`[[$a],[$b]]`]. + +Now we consider the values of [`g`] at the end points and the critical points inside the interval [`[[$a],[$b]]`] + ++ [`g([$a]) = [$a]e^{[$expa]} \approx [$ga]`] ++ [`g([$c]) = [$c]e^{[$expc]} \approx [$gc]`] ++ [`g([$b]) = [$b]e^{[$expb]} \approx [$gb]`] + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-5-1-An-C/9-5-1-An-C-box-cost-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-5-1-An-C/9-5-1-An-C-box-cost-jms.pg new file mode 100644 index 0000000000..1302b99f44 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-5-1-An-C/9-5-1-An-C-box-cost-jms.pg @@ -0,0 +1,66 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Optimization - business and economics) +## Date(1 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$vol = 2*random(2,5,1); +$side = random(1,5,1); +$base = 2*$side; + +$height = Compute("$vol/x^2"); +$cost = Compute("$base*(2*x^2)+$side*(4*$vol/x)"); + + +$popup = DropDown( + [ + 'maximize', + 'minimize' + ], + 'minimize' +); + +BEGIN_PGML +Consider the following optimization problem. + +"You are in charge of creating the packaging for a new product for your company. You want to build a box with a square base and a lid that has a volume of exactly [`[$vol]`] cubic centimetres. The material for the sides of the box costs [`\$[$side]`] per square centimetre, and the material for the base and lid costs [`\$[$base]`] per square centimetre. You want to determine the dimensions of the least expensive box that meets your criteria." + +Answer the following questions about the above problem. + ++ You want to find the dimensions of the box that [_]{$popup} the cost of the box. + +Let [`x`] be the length of the base of the box, and let [`y`] be the height of the box, both measured in centimetres. + ++ Use the information given in the problem to write [`y`] as a function of [`x`]. + + [`y = \, `] [_]{$height}{20} + ++ Write the total cost of the materials needed to make the box as a function of [`x`]. + + [`C(x) = \, `] [_]{$cost}{20} +END_PGML + +BEGIN_PGML_SOLUTION ++ Since we want to make the **least** expensive box, we want to find the dimension of the box that **minimize** its cost. + ++ The base of the box is square with area equal to [`x^2`] and the height of the box is [`y`]. Therefore, volume of the box is [`[$vol] = x^2y`]; and [``y = \frac{[$vol]}{x^2}.``] + ++ The area of the base and the lid of the box is are both [`x^2`]. Since the base and lid material costs [`\$[$base]`] per square centimetre, the cost of the base and lid together is [``[$base](2x^2).``] There are four vertical sides of the box, each with area [``xy = x\frac{[$vol]}{x^2} = \frac{[$vol]}{x}.``] Since the material for the sides of the box costs [`\$[$side]`] per square centimetre, the cost of the four sides is [``[$side]\left( \frac{4\cdot[$vol]}{x} \right).``] Adding these costs together we get [``C(x) = [$cost].``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-5-1-An-C/9-5-1-An-C-cylinder-set-up-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-5-1-An-C/9-5-1-An-C-cylinder-set-up-jms.pg new file mode 100644 index 0000000000..b8137c6761 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-5-1-An-C/9-5-1-An-C-cylinder-set-up-jms.pg @@ -0,0 +1,86 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Optimization - general) +## Date(1 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; +Context()->variables->add(r=>"Real"); +Context()->variables->add(h=>"Real"); + +$vol = random(1,5,1); +$vol_cm = 1000*$vol; +$twice_vol_cm = 2*$vol_cm; + +$height = Compute("$vol_cm/(pi*r^2)"); +$area = Compute("2*pi*r^2 + $twice_vol_cm/r"); + + +$popup = DropDown( + [ + 'maximize', + 'minimize' + ], + 'minimize' +); + + +$surface = DropDown( + [ + 'radius', + 'height', + 'area of the base', + 'surface area', + 'volume' + ], + 'surface area' +); + +BEGIN_PGML +Consider the following optimization problem. + +"You are working for a company designing a new type of battery. The outer shell of the battery must be a closed circular cylinder that contains exactly [`[$vol]`] Litres of battery components. Find the radius and height of the battery that will use the smallest amount of material to manufacture the battery's outer shell." + +**Hint**: [`1`] Litre is equal to [`1000 \, \rm{cm}^3.`] + +Answer the following questions about the above problem. + ++ You want to find the radius and height of the cylindrical battery that [_]{$popup} the [_]{$surface} of the cylinder. + +Let [`r`] be the radius of the circular base of the cyliner, and let [`h`] be the height of the cylinder, both measured in centimetres. + ++ Use the information given in the problem to write [`h`] as a function of [`r`]. + + [`h = \, `] [_]{$height}{20} + ++ Write the amount of material, in square cenitimetres, needed to make the cylinder as a function of [`r`]. + + [`A(r) = \, `] [_]{$area}{20} +END_PGML + +BEGIN_PGML_SOLUTION ++ Since we want to use the **smallest** amount of material, we want to find the dimensions of the cylinder that **minimize** its **surface area**. + + The volume of a circular cylinder of radius [`r`] and height [`h`] is [`V = \pi r^2 h.`] + + The surface area of a circular cylinder of radius [`r`] and height [`h`] is [`A = 2\pi r^2 + 2\pi r h.`] + ++ We need to work in cubic centimeters, so first we convert [`[$vol] \, \rm{L} = [$vol_cm] \, \rm{cm}^3.`] So, the volume of the cylinder is [`[$vol_cm] = x\pi r^2 h`]; and [``h = \frac{[$vol_cm]}{\pi r^2}.``] + ++ We want to minimize the surface area of the cylinder, which is given by [``A(r) = 2\pi r^2 + 2\pi r \frac{[$vol_cm]}{\pi r^2} = 2\pi r^2 + \frac{[$twice_vol_cm]}{r}``] as a function of [`r`]. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-5-1-An-C/9-5-1-An-C-fence-set-up-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-5-1-An-C/9-5-1-An-C-fence-set-up-jms.pg new file mode 100644 index 0000000000..924551c7d6 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-5-1-An-C/9-5-1-An-C-fence-set-up-jms.pg @@ -0,0 +1,82 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Optimization - general) +## Date(1 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl", "PGtikz.pl"); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$area = 6*random(2,5,1); +$area2 = 2*$area; + +$width = Compute("$area/x"); +$perim = Compute("3*x+($area2)/x"); + + +$popup = DropDown( + [ + 'maximize', + 'minimize' + ], + 'minimize' +); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); +$graph_image->BEGIN_TIKZ +\draw[-,very thick] (-2,2) -- (2,2); +\draw (0,2) node[above right, outer sep=2pt]{\(y\)}; +\draw[-,very thick] (-2,-2) -- (2,-2); +\draw[-,very thick] (-2,-2) -- (-2,2); +\draw[-,very thick] (0,-2) -- (0,2); +\draw[-,very thick] (2,-2) -- (2,2); +\draw (2,0) node [right,outer sep=2pt]{\(x\)}; +END_TIKZ + + +BEGIN_PGML +Consider the following optimization problem. + +"You are going to build a new enclosure for two animals at the ranch you work at. The two animals will be housed next to each other, but need to be separated. You are going to build a fence to make a large rectangular enclosure with a total area of [`[$area]`] square metres, and then you will build one more length of fence to divide the enclosure into two smaller equal rectangles. You want to use calculus to find the best way to build this enclosure." + +Answer the following questions about the above problem. + ++ You want to [_]{$popup} the amount of fence used. + +Let [`x`] be the length of fencing that includes the additional piece to divide the enclosure into two parts, and let [`y`] be the length of the fencing perpendicular to the three pieces of fence with length [`x`]. + ++ Use the information given in the problem to write [`y`] as a function of [`x`]. + + [`y = \, `] [_]{$width}{20} + ++ Write the total length of fencing, in metres, required to build the enclosure as a function of [`x`]. + + [`f(x) = \, `] [_]{$perim}{20} +END_PGML + +BEGIN_PGML_SOLUTION +Here is a diagram of the pen (not to scale): + +[@ image($graph_image, width => 200, tex_size => 1000) @]* + ++ We want to find the **shortest** lengh of fence required, so we want to **minimize** the amount of fencing used. + ++ The area of the large enclosure is [`xy = [$area]`], so [``y = \frac{[$area]}{x}.``] + ++ The length of fencing required is [`3x + 2y`] so [``f(x) = 3x + \frac{[$area2]}{x}.``] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-5-1-An-C/9-5-1-An-C-open-box-set-up-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-5-1-An-C/9-5-1-An-C-open-box-set-up-jms.pg new file mode 100644 index 0000000000..a2e7bd0a32 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-5-1-An-C/9-5-1-An-C-open-box-set-up-jms.pg @@ -0,0 +1,85 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Optimization - general) +## Date(1 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(4) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "parserPopUp.pl", "PGcourse.pl", "PGtikz.pl"); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$length = 6*random(2,5,1); +$vol = Compute("x($length-2*x)^2"); + + +$popup = DropDown( + [ + 'maximize', + 'minimize' + ], + 'maximize' +); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); +$graph_image->BEGIN_TIKZ +\draw[very thick] (-2,2) -- (2,2); +\draw[very thick] (-2,-2) -- (2,-2); +\draw (0,-2) node[below, outer sep=2pt]{\($length \rm{ft}\)}; +\draw[very thick] (-2,-2) -- (-2,2); +\draw[very thick] (2,-2) -- (2,2); +\draw (2,0) node[right, outer sep=2pt]{\($length \rm{ft}\)}; +\draw[very thick, dotted] (-2,1.5) -- (-1.5,1.5); +\draw (-1.75,1.5) node[below, outer sep=2pt]{\(x\)}; +\draw[very thick, dotted] (-1.5,1.5) -- (-1.5,2); +\draw (-1.5,1.75) node[right, outer sep=2pt]{\(x\)}; +\draw[very thick, dotted] (2,1.5) -- (1.5,1.5); +\draw[very thick, dotted] (1.5,1.5) -- (1.5,2); +\draw[very thick, dotted] (2,-1.5) -- (1.5,-1.5); +\draw[very thick, dotted] (1.5,-1.5) -- (1.5,-2); +\draw[very thick, dotted] (-2,-1.5) -- (-1.5,-1.5); +\draw[very thick, dotted] (-1.5,-1.5) -- (-1.5,-2); +END_TIKZ + + +BEGIN_PGML +Consider the following optimization problem. + +"You are going to make a square box with an open top by cutting small squares out of each corner of a sheet of metal with dimensions [`[$length] \, \rm{ft} \times [$length] \, \rm{ft} `] and then folding up the sides of the remaining sheet metal. What is the volume of the largest possible box that you can make using this method?" + +Answer the following questions about the above problem. + ++ You want to [_]{$popup} the volume of the box. + +Let [`x`] be the side-length of the small square that you cut out of the corner of the [`[$length] \, \rm{ft} \times [$length] \, \rm{ft} `] sheet of metal. + + ++ Write the volume of the box, in cubic feet, as a function of [`x`]. + + [`V(x) = \, `] [_]{$vol}{20} +END_PGML + +BEGIN_PGML_SOLUTION + ++ We want make the **largest** possible box, so we want to **maximize** the volume of the box. + + +Let [`x`] be the side-length of the small square that you cut out of the corner of the [`[$length] \, \rm{ft} \times [$length] \, \rm{ft} `] sheet of metal. Here is a diagram (not to scale) of the metal sheet and the corner squares that you will remove: + +[@ image($graph_image, width => 200, tex_size => 1000) @]* + ++ The side length of the base of the box is [`[$length]-2x`], since we cut [`x`]-feet off of each end of the side of the metal sheet when we remove a square from the each corner. After folding up the sides, the height of the box will be [`x`]. Therefore, the volume of the box is [`V(x) = [$vol].`] +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-5-2-Ap-C/9-5-2-Ap-C-box-cost-full-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-5-2-Ap-C/9-5-2-Ap-C-box-cost-full-jms.pg new file mode 100644 index 0000000000..fa4a250203 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-5-2-Ap-C/9-5-2-Ap-C-box-cost-full-jms.pg @@ -0,0 +1,101 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Optimization - business and economics) +## Date(1 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(5) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGcourse.pl",); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +# manually version so that numbers are "nice" +# Fall 2021 MATH 249 Midterm Exam 2 Written Problem +$ver = random(0,3,1); +if($ver == 0) +{ +$vol = 4; +$side = 4; +$base = 2; +$width = 2; +$height = 1; +} +elsif($ver == 1) +{ +$vol = 12; +$side = 1; +$base = 3; +$width = 2; +$height = 3; +} +elsif($ver == 2) +{ +$vol = 16; +$side = 1; +$base = 2; +$width = 2; +$height = 4; +} +elsif($ver == 3) +{ +$vol = 8; +$side = 4; +$base = 2; +$width = 2; +$height = 2; +} + +$base2 = 2*$base; +$side4vol = 4*$side*$vol; + +$height_fcn = Formula("$vol/x^2")->reduce(); +$cost_fcn = Formula("$base2*x^2+$side4vol/x")->reduce(); + +$critval = Formula("(($side4vol)/(2*$base2))^(1/3)")->reduce(); +$heightval = Formula("$vol/($critval^2)")->reduce(); + +BEGIN_PGML +You are in charge of creating the container for a scientific instrument that is to be placed into a small research satellite called a "CubeSat". You want to build a box with a square base and a lid that has a volume of exactly [`[$vol]`] cubic centimetres. The material for the sides of the box costs [`\$[$side]`] per square centimetre, and the material for the base and lid costs [`\$[$base]`] per square centimetre. Find the dimensions of the least expensive box that meets your criteria. + ++ The base-length of the least expensive box is [_]{$critval}{5} centimetres. + ++ The height of the least expensive box is [_]{$heightval}{5} centimetres. + +END_PGML + +$cost_der = Formula("2*$base2*x-$side4vol/(x^2)")->reduce(); +$critval = Formula("(($side4vol)/(2*$base2))^(1/3)")->reduce(); +$heightval = Formula("$vol/($critval^2)")->reduce(); +$factor = 2*$base2; + +BEGIN_PGML_SOLUTION +Since we want to make the **least** expensive box, we want to find the dimension of the box that **minimize** its cost. + +Let [`x`] be the length of the base of the box, and let [`y`] be the height of the box, both measured in centimetres. +The base of the box is square with area equal to [`x^2`] and the height of the box is [`y`]. Therefore, volume of the box is [`[$vol] = x^2y`]; and [``y = \frac{[$vol]}{x^2}.``] + +The area of the base and the lid of the box is are both [`x^2`]. Since the base and lid material costs [`\$[$base]`] per square centimetre, the cost of the base and lid together is [``[$base](2x^2).``] There are four vertical sides of the box, each with area [``xy = x\frac{[$vol]}{x^2} = \frac{[$vol]}{x}.``] Since the material for the sides of the box costs [`\$[$side]`] per square centimetre, the cost of the four sides is [``[$side]\left( \frac{4\cdot[$vol]}{x} \right).``] Adding these costs together we get [``C(x) = [$cost_fcn]``] and the domain of the cost function is [`(0,\infty).`] + +Now we can proceed to minimize [`C(x).`] First we will find [`C'(x)`] and the critical points of [`C(x).`] + [```C'(x) = [$cost_der] = [$factor]\frac{(x^3-8)}{x^2}```] + so [`C(x)`] has one critical number [`x=[$critval].`] + +Next, observe that [`C'(x)`] is negative on [`(0,[$width])`] and [`C'(x)`] is postive on [`([$width],\infty)`]. So [`C(x)`] is decreasing on [`(0,[$width])`] and increasing on [`([$width],\infty)`]; therefore, by the Global Interval Method, [`C(x)`] has a local and global minimum at [`x=[$width].`] + +We can conclude: + ++ The base-length of the least expensive box is [`x=[$critval]`] centimetres. ++ The height of the least expensive box is [``y = \frac{[$vol]}{([$critval])^2} = [$heightval]``] centimetres. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-5-2-Ap-C/9-5-2-Ap-C-cylinder-cost-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-5-2-Ap-C/9-5-2-Ap-C-cylinder-cost-jms.pg new file mode 100644 index 0000000000..e0a2e4fb60 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-5-2-Ap-C/9-5-2-Ap-C-cylinder-cost-jms.pg @@ -0,0 +1,57 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Optimization - general) +## Date(1 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(5) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGcourse.pl"); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +Context()->variables->add(r=>"Real"); +Context()->variables->add(h=>"Real"); + +$cost = 2*random(2,5,1); #cost or volume needs to be even to be "nice" for factoring the derivative +$vol = random(2,5,1); +$cv = $vol*$cost; +$cv_div_2 = $cv/2; +$radius = ($cv_div_2)**(1/3); # integer only when $cv_div_2 is a cube, but seems too artificial +$ans = Compute("($cv_div_2)^(1/3)"); + +BEGIN_PGML +The total cost to build a large cylindrical storage tank is given by [``` C = \pi r^2 + [$cost]\pi r h,```] +where [`r`] is the radius of the tank in metres and [`h`] is the height of the tank in metres. If the total volume that the tank contains needs to be [`[$vol]\pi`] cubic metres, when what should the radius of the tank be in order to minimize the cost of the tank? + ++ The radius of the tank that minimizes the cost is [`r = \, `] [_]{$ans}{5} metres. + +END_PGML + +BEGIN_PGML_SOLUTION +The volume of a circular cylinder of radius [`r`] and height [`h`] is [`V = \pi r^2 h.`] + ++ First we eliminate one variable using the volume constraint. The volume of the cylinder is [`[$vol]\pi = \pi r^2 h`], so [``h = \frac{[$vol]}{r^2}.``] + ++ We want to minimize the cost of the cylinder, which is given by [```C = \pi r^2 + [$cost]\pi r h = \pi r^2 + [$cost]\pi r\left(\frac{[$vol]}{r^2}\right) = \pi r^2 + \pi \frac{[$cv]}{r}```] as a function of [`r`], where [`r>0`]. + ++ Now we will compute [`C'(r)`] and find the critical points of [`C.`] Taking the derivative of [`C(r)`] we get + [``` C'(r) = 2\pi r - \pi \frac{[$cv]}{r^2} = 2\pi \frac{(r^3 - [$cv_div_2])}{r^2},```] + so [`C`] has one critical point [`r = \sqrt[3]{[$cv_div_2]}.`] + ++ For [`0\sqrt[3]{[$cv_div_2]}`] we have that [`C'(r)>0`]. Therefore, [`C`] is decreasing on [`(0,\sqrt[3]{[$cv_div_2]})`] and increasing on [`(\sqrt[3]{[$cv_div_2]},\infty)`]. + ++ We can conclude that the local and global minimum cost to produce the tank occurs when [`r = \sqrt[3]{[$cv_div_2]}`] metres. + +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-5-2-Ap-C/9-5-2-Ap-C-fence-full-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-5-2-Ap-C/9-5-2-Ap-C-fence-full-jms.pg new file mode 100644 index 0000000000..f3e6b84115 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-5-2-Ap-C/9-5-2-Ap-C-fence-full-jms.pg @@ -0,0 +1,70 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Optimization - general) +## Date(1 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(5) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGcourse.pl","PGtikz.pl"); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$area = 6*(random(2,5,1)**2); #six times a square to get integer values +$area2 = 2*$area; + +$crit = Compute("sqrt(2*$area/3)"); +$length = Compute("3*$crit+($area2)/$crit"); + +$width = Formula("$area/x")->reduce(); +$perim = Formula("3*x+($area2)/x")->reduce(); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); +$graph_image->BEGIN_TIKZ +\draw[-,very thick] (-2,2) -- (2,2); +\draw (0,2) node[above right, outer sep=2pt]{\(y\)}; +\draw[-,very thick] (-2,-2) -- (2,-2); +\draw[-,very thick] (-2,-2) -- (-2,2); +\draw[-,very thick] (0,-2) -- (0,2); +\draw[-,very thick] (2,-2) -- (2,2); +\draw (2,0) node [right,outer sep=2pt]{\(x\)}; +END_TIKZ + + +BEGIN_PGML +You are going to build a new enclosure for two animals at the ranch you work at. The two animals will be housed next to each other, but need to be separated. You are going to build a fence to make a large rectangular enclosure with a total area of [`[$area]`] square metres, and then you will build one more length of fence to divide the enclosure into two smaller equal rectangles. What is the shortest length of fencing, in metres, that is required to build this enclosure? + ++ The shortest length of fencing needed to build the enclosure is [_]{$length}{5} metres. +END_PGML + +$area2over3 = $area2/3; + +BEGIN_PGML_SOLUTION +We want to find the **shortest** lengh of fence required, so we want to **minimize** the amount of fencing used. + +Let [`x`] be the length of fencing that includes the additional piece to divide the enclosure into two parts, and let [`y`] be the length of the fencing perpendicular to the three pieces of fence with length [`x`]. Here is a diagram (not to scale): + +[@ image($graph_image, width => 200, tex_size => 1000) @]* + +The area of the large enclosure is [`xy = [$area]`], so [``y = \frac{[$area]}{x}.``] The total length of fencing required is [`3x + 2y`] so we want to minimize [``f(x) = 3x + \frac{[$area2]}{x}.``] Note that we must have [`x>0`], so we can work with the domain of [`f`] as [`(0,\infty).`] + +Now we will find [`f'(x)`] and the critical points of [`f.`] +[```f'(x) = 3 - \frac{[$area2]}{x^2} = 3\frac{(x^2 - [$area2over3])}{x^2} = 3\frac{(x-[$crit])(x+[$crit])}{x^2} ```] +So, [`f`] has one critical point [`x=[$crit]`] in [`(0,\infty).`] + +Next we can observe that [`f'(x) < 0`] on [`(0,[$crit])`] and [`f'(x)>0`] on [`([$crit],\infty).`] Therefore, [`f`] is decreasing on [`(0,[$crit])`] and [`f`] is increasing on [`([$crit],\infty).`] Thus, [`f`] has a local and global minimum at [`x=[$crit].`] + +The minimum amount of fencing required to build the pen is [``f([$crit]) = 3([$crit]) + \frac{[$area2]}{[$crit]} = [$length]``] metres. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/249-9-0-0-C/9-5-2-Ap-C/9-5-2-Ap-C-open-box-full-jms.pg b/Contrib/UCalgary/249-9-0-0-C/9-5-2-Ap-C/9-5-2-Ap-C-open-box-full-jms.pg new file mode 100644 index 0000000000..6d1b2a0bf7 --- /dev/null +++ b/Contrib/UCalgary/249-9-0-0-C/9-5-2-Ap-C/9-5-2-Ap-C-open-box-full-jms.pg @@ -0,0 +1,85 @@ +## DESCRIPTION +## +## ENDDESCRIPTION + + +## DBsubject(Calculus - single variable) +## DBchapter(Applications of differentiation) +## DBsection(Optimization - general) +## Date(1 April 2025) +## Institution(University of Calgary) +## Author(Jerrod Smith) +## Level(5) + +DOCUMENT(); + +loadMacros("PGstandard.pl", "PGML.pl", "PGcourse.pl","PGtikz.pl"); + +# Uncomment the following if you don't want to show which +# answers are correct and which are incorrect +#$showPartialCorrectAnswers = 0; + +$length = 6*random(2,5,1); +$crit = $length/6; +$vol_fcn = Formula("x($length-2*x)^2")->reduce(); +$vol = Compute("$crit*($length-2*$crit)^2"); + +$graph_image = createTikZImage(); +$graph_image->tikzLibraries("arrows.meta"); +$graph_image->BEGIN_TIKZ +\draw[very thick] (-2,2) -- (2,2); +\draw[very thick] (-2,-2) -- (2,-2); +\draw (0,-2) node[below, outer sep=2pt]{\($length \rm{ft}\)}; +\draw[very thick] (-2,-2) -- (-2,2); +\draw[very thick] (2,-2) -- (2,2); +\draw (2,0) node[right, outer sep=2pt]{\($length \rm{ft}\)}; +\draw[very thick, dotted] (-2,1.5) -- (-1.5,1.5); +\draw (-1.75,1.5) node[below, outer sep=2pt]{\(x\)}; +\draw[very thick, dotted] (-1.5,1.5) -- (-1.5,2); +\draw (-1.5,1.75) node[right, outer sep=2pt]{\(x\)}; +\draw[very thick, dotted] (2,1.5) -- (1.5,1.5); +\draw[very thick, dotted] (1.5,1.5) -- (1.5,2); +\draw[very thick, dotted] (2,-1.5) -- (1.5,-1.5); +\draw[very thick, dotted] (1.5,-1.5) -- (1.5,-2); +\draw[very thick, dotted] (-2,-1.5) -- (-1.5,-1.5); +\draw[very thick, dotted] (-1.5,-1.5) -- (-1.5,-2); +END_TIKZ + + +BEGIN_PGML +You are going to make a square box with an open top by cutting small squares out of each corner of a sheet of metal with dimensions [`[$length] \, \rm{ft} \times [$length] \, \rm{ft} `] and then folding up the sides of the remaining sheet metal. What is the volume of the largest possible box that you can make using this method? + ++ The volume of the largest possible box is [_]{$vol}{5} [`\, \rm{ft}^3`]. ++ The largest possible box is obtained by cutting a square of side length [_]{$crit}{5} [`\, \rm{ft}`] from each corner of the metal sheet. +END_PGML + +$half_length = $length/2; +$twothirds_length = 2*$length/3; + +BEGIN_PGML_SOLUTION +We want make the **largest** possible box, so we want to **maximize** the volume of the box. + +Let [`x`] be the side-length of the small square that you cut out of the corner of the [`[$length] \, \rm{ft} \times [$length] \, \rm{ft} `] sheet of metal. Here is a diagram (not to scale) of the metal sheet and the corner squares that you will remove: + +[@ image($graph_image, width => 200, tex_size => 1000) @]* + +The side length of the base of the box is [`[$length]-2x`], since we cut [`x`]-feet off of each end of the side of the metal sheet when we remove a square from the each corner. After folding up the sides, the height of the box will be [`x`]. Therefore, the volume of the box is [`V(x) = [$vol_fcn].`] + +Let's determine the domain of [`V(x).`] Of course, we need [`0\leq x`] since we cannot have cut out a square with a negative side length. +Since the side length of the metal sheet is [`[$length]`] feet, and we cut [`x`]-feet off of each end, we must have that [`x \leq \frac{[$length]}{2} = [$half_length].`] We can solve this problem by working with the domain of [`V(x)`] as the closed interval [`[0,[$half_length]],`] but it is worth noting that [`V(0)=0`] and [`V([$half_length]) = 0`] so the end points will not give us the desired maximum. + +Next we will find [`V'(x)`] and the critical points of [`V`] in the interval [`[0,[$half_length]].`] +Using the product rule and the chain rule, we get +[``` V'(x) = ([$length]-2x)^2 + x\cdot 2([$length]-2x)(-2) = ([$length]-2x)([$length]-6x),```] +so the critical points of [`V`] in [`[0,[$half_length]]`] are the endpoint [`x=[$half_length]`] and the point [`x=[$crit].`] + +Now, to finish applying the Closed Interval Method, we have that: + ++ [`V(0) = 0`] ++ [`V([$crit]) = [$crit]([$length]-2([$crit]))^2 = [$crit]([$twothirds_length])^2 = [$vol]`] ++ [`V([$half_length]) = 0`] + +Therefore, the absolute maximum volume of the box that we can make is [`[$vol] \, \rm{ft}^3`], and we can accomplish this by cutting a square of side-length [`[$crit]\, \rm{ft}`] from each corner of the metal sheet. +END_PGML_SOLUTION + +ENDDOCUMENT(); diff --git a/Contrib/UCalgary/MATH_249_CLO_(High-level).rtf b/Contrib/UCalgary/MATH_249_CLO_(High-level).rtf new file mode 100644 index 0000000000..7a6827724c --- /dev/null +++ b/Contrib/UCalgary/MATH_249_CLO_(High-level).rtf @@ -0,0 +1,116 @@ +{\rtf1\ansi\ansicpg1252\cocoartf2822 +\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;\f2\froman\fcharset0 TimesNewRomanPSMT; +} +{\colortbl;\red255\green255\blue255;\red0\green0\blue0;} +{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;} +\margl1440\margr1440\vieww11520\viewh8400\viewkind0 +\deftab720 +\pard\pardeftab720\sl340\partightenfactor0 + +\f0\b\fs29\fsmilli14667 \cf2 \expnd0\expndtw0\kerning0 +MATH 249 Introductory Calculus +\f1\b0\fs32 \ + +\f0\b\fs29\fsmilli14667 Revise Course Learning Outcomes (high-level outcomes for syllabus) +\f1\b0\fs32 \ + +\f0\b\fs29\fsmilli14667 January 2025 +\f1\b0\fs32 \ + +\f0\b\fs29\fsmilli14667 \'a0 +\f1\b0\fs32 \ +\pard\pardeftab720\sl340\sa213\partightenfactor0 + +\fs29\fsmilli14667 \cf2 After completing MATH 249, learners will be able to: +\fs32 \ +\pard\pardeftab720\li960\fi-480\sl340\partightenfactor0 + +\f0\b\fs29\fsmilli14667 \cf2 1. +\f2\b0\fs18\fsmilli9333 \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 +\f1\fs29\fsmilli14667 work with functions algebraically, graphically and symbolically; identify and interpret key features of functions (slope, intercepts, equations) +\f0\b #1-0-0-C; functions +\f1\b0\fs32 \ + +\fs29\fsmilli14667 2. +\f2\fs18\fsmilli9333 \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 +\f1\fs29\fsmilli14667 develop fluency working with variables and equations using algebra to solve equations +\f0\b #2-0-0-C; equations +\f1\b0\fs32 \ + +\fs29\fsmilli14667 3. +\f2\fs18\fsmilli9333 \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 +\f1\fs29\fsmilli14667 identify appropriate calculus concept or tool to solve a variety of abstract and concrete problems +\f0\b #3-0-0-C; problem-solving +\f1\b0\fs32 \ + +\f0\b\fs29\fsmilli14667 4. +\f2\b0\fs18\fsmilli9333 \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 +\f1\fs29\fsmilli14667 use a variety of approximation techniques to solve abstract and concrete approximation problems +\f0\b #4-0-0-I; approximation; application domain +\f1\b0\fs32 \ + +\fs29\fsmilli14667 5. +\f2\fs18\fsmilli9333 \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 +\f1\fs29\fsmilli14667 explain the concept of "limit" and how it arises in various calculus concepts; in particular continuity and the Intermediate Value Theorem +\f0\b #5-0-0-C; limits +\f1\b0\fs32 \ + +\fs29\fsmilli14667 6. +\f2\fs18\fsmilli9333 \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 +\f1\fs29\fsmilli14667 articulate the concept of the "derivative" in terms of "rates of change" and "slope" and give a precise definition +\f0\b #6-0-0-C; derivative +\f1\b0\fs32 \ + +\fs29\fsmilli14667 7. +\f2\fs18\fsmilli9333 \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 +\f1\fs29\fsmilli14667 identify necessary differentiation rules (product, quotient, chain) and carry out these computations for explicit and abstract functions +\f0\b #7-0-0-C; differentiation rules +\f1\b0\fs32 \ + +\fs29\fsmilli14667 8. +\f2\fs18\fsmilli9333 \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 +\f1\fs29\fsmilli14667 interpret information about the shape/graph of a function by using information about the first and second derivative +\f0\b #8-0-0-C; graphs +\f1\b0\fs32 \ + +\fs29\fsmilli14667 9. +\f2\fs18\fsmilli9333 \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 +\f1\fs29\fsmilli14667 identify maximum/minimum values of a function on a given interval and solve single-variable constrained optimization problems +\f0\b #9-0-0-C; optimization +\f1\b0\fs32 \ + +\f0\b\fs29\fsmilli14667 10. +\f2\b0\fs18\fsmilli9333 \'a0\'a0 +\f1\fs29\fsmilli14667 state the Mean Value Theorem, interpret the statement of the theorem in terms of "rates of change" and "slope", and solve problems using the Mean Value Theorem +\f0\b #10-0-0-I; MVT; application domain +\f1\b0\fs32 \ + +\fs29\fsmilli14667 11. +\f2\fs18\fsmilli9333 \'a0\'a0 +\f1\fs29\fsmilli14667 state the definition of an antiderivative of a function, explain the relationship between antiderivatives, and compute antiderivatives of common functions # +\f0\b 11-0-0-C; antiderivatives +\f1\b0\fs32 \ + +\fs29\fsmilli14667 12. +\f2\fs18\fsmilli9333 \'a0\'a0 +\f1\fs29\fsmilli14667 explore the process of estimating areas under the graph of a function and develop the definition of the Riemann integral +\f0\b #12-0-0-C; area +\f1\b0\fs32 \ + +\fs29\fsmilli14667 13. +\f2\fs18\fsmilli9333 \'a0\'a0 +\f1\fs29\fsmilli14667 state the Fundamental Theorem of Calculus and explore/demonstrate the relationship between differentiation and integration +\f0\b #13-0-0-C; FTC +\f1\b0\fs32 \ +\pard\pardeftab720\li960\fi-480\sl340\sa213\partightenfactor0 + +\fs29\fsmilli14667 \cf2 14. +\f2\fs18\fsmilli9333 \'a0\'a0 +\f1\fs29\fsmilli14667 define and identify improper integrals, evaluate two types of improper integrals by direct computation and comparison +\f0\b #14-0-0-C; improper integrals +\f1\b0\fs32 \ +\pard\pardeftab720\sl340\sa213\partightenfactor0 + +\f0\b\fs29\fsmilli14667 \cf2 Learning Outcomes 4 and 10 are \'93application domain\'94 CLOs, all other learning outcomes are \'93core\'94 CLOs. To pass the course learners must demonstrate proficiency in 10 out of 12 of the core CLOs (at least 8 at the \'93met level\'94, at least two more at the \'93basic level\'94 or higher), and 1 or more of the application domain CLOs. +\f1\b0\fs32 \ +} \ No newline at end of file diff --git a/Contrib/UCalgary/MATH_249_Revised_Learning_Outcomes_F25.csv b/Contrib/UCalgary/MATH_249_Revised_Learning_Outcomes_F25.csv new file mode 100644 index 0000000000..18e806b8c5 --- /dev/null +++ b/Contrib/UCalgary/MATH_249_Revised_Learning_Outcomes_F25.csv @@ -0,0 +1,184 @@ +CLO Identifier (auto),CLO Number (edit),"Bloom's Taxonomy (R=Remembering, U=Understanding, Ap=Applying, An=Analyzing, E=Evaluating, C=Creating)","CLO Level (C=core, I=intermediate, A=advanced) (edit)",WeBWork Level Classification of CLO,Course Learning Outcome (CLO),Notes / topics / questions,Week / Meeting,WeBWork 1 (question name and type),WeBWork 2 (question name and type), WeBWork 3 (question name and type) ... 2 Q's each should be enough for most outcomes ...,WeBWork 4 +1-0-0-C,1-0-0,,C,,"work with functions algebraically, graphically and symbolically; identify and interpret key features of functions (slope, intercepts, equations)",High-level outcome (for course outline); short name: #1-0-0-C; functions,,No. of 1-0-0-C problems --- >>>,19,, +1-7-0-C-A,1-7-0,C,A,N/A,create functions that satisfy a given set of properties,,W1-M2,,,, +1-1-0-An-C,1-1-0,An,C,4,interpret key features and properties from the graph of a function,,W1-M1,1-1-0-An-C-interpret-graph1.pg; numeric and intervals; no randomization,1-1-0-An-C-graph-interval-jms.pg; interval list; read intervals of increase/decrease off the graph of a random parabola,"1-1-0-An-C-quad-linear-jms.pg; drop down; determine if graph is a linear or quadratic, if linear determine if slope is +/-", +1-2-0-An-C,1-2-0,An,C,4,switch between different representations of functions,,W1-M1,1-2-0-An-C-mc1-jms.pg; multiple choice; set builder and function notation,1-2-0-An-C-fcn-sub-jms.pg; function answer; make subsitutions of numbrers and variables in function,, +1-3-1-Ap-C,1-3-1,Ap,C,3,solve problems and make calculations involving trigonometric functions,,,1-3-1-Ap-C-eval-cos-sin-AT.pg,1-3-1-AP-C-solve-for-theta-AT.pg,, +1-3-2-Ap-C,1-3-2,Ap,C,3,solve problems and make calculations involving logarithmic functions,,,1-3-2-Ap-C-log-to-exp-jms.pg; numeric and function; given log equation write exponential equation,1-3-2-Ap-C-exp-to-log-jms.pg; numeric and function; givenexp equation write logarithm,, +1-3-3-Ap-C,1-3-3,Ap,C,3,solve problems and make calculations involving exponential functions,,,,,, +1-3-4-Ap-C,1-3-4,Ap,C,3,solve problems and make calculations involving piecewise functions,,W1-M2,,,, +1-3-5-Ap-C,1-3-5,Ap,C,3,solve problems and make calculations involving polynomial and algebraic functions,,,,,, +1-4-0-U-C,1-4-0,U,C,2,identify different classes of common functions ,,W1-M1,1-4-0-U-C-rational1-jms.pg; multiselect; choose rational functions,1-4-0-U-C-drop-down-jms_1.pg; drop down; choose best description of type of function,, +1-6-0-U-C,1-6-0,U,C,2,"identify components of a function (domain, codomain, definition, image)",,W1-M1,1-6-0-U-C-rational-dom-jms.pg; interval (union); find domain of rational function,1-6-0-U-C-alg-dom-dg.pg; interval (union); find domain of algebraic function (Danny's template example),, +1-1-1-U-C,1-1-1,U,C,2,identify the slope and intercept from the graph of a linear function,,W1-M2,"1-1-1-U-C-slope-int-1-jms.pg; numeric; identify slope, x and y intercepts from a random linear graph (positive slope)","1-1-1-U-C-slope-int-2-jms.pg; numeric; identify slope, x intercepts from a random linear graph + calculuate y-int (negative slope)",, +1-10-0-U-C,1-10-0,U,C,2,identify when a function is invertible,,W1-M2,,,, +1-1-3-U-C,1-1-3,U,C,2,interpret the meaning of a slope algebraically in terms of change in dependent/independent variables,"e-g-, if m = 3 and Delta x = 2, then Delta y = 6",W1-M2,"1-1-3-U-C-delta-slope-jms.pg; numeric; random line, calculate change in x and y given random changes (one increase, one decrease) in two parts",1-1-3-U-C-point-slope-jms.pg; numeric and function; find slope and equation of line joining two randomly generated points,, +1-1-4-U-C,1-1-4,U,C,2,interpret the meaning of an intercept algebraically in terms of solutions to equations,"e-g-, if the x intercept of y=f(x) is x = 2, then f(2) = 0",W1-M2,1-1-4-U-C-num-int-jms.pg; numeric; fill in interpretation of x and y intercepts given unknown function and random values,1-1-4-U-C-int-from-eq-jms.pg; drop down + numeric; given equations identify intercepts,, +1-5-0-E-I,1-5-0,E,I,4,identify appropriate types of functions for various calculus problems/applications,,,,,, +1-2-1-E-I,1-2-1,E,I,4,identify appropriate representations of functions for communicating information,,W1-M1,,,, +1-2-2-An-I,1-2-2,An,I,4,conceptualize functions as transformations or operations,,W1-M1,,,, +1-8-0-C-I,1-8-0,C,I,N/A,do math with bad pictures (develop intuitive sense of salient features of a function graphically),,,,,, +2-0-0-C,2-0-0,,C,,develop fluency working with variables and equations using algebra to solve equations,"High-level outcome (for course outline); short name #2-0-0-C; equations ** This really should be a course ""in-come""",,No. of 2-0-0-C problems --- >>>,17,Make 3 each here!, +2-1-0-Ap-C,2-1-0,Ap,C,3,factor polynomial functions of degree less than or equal to 3,,,2-1-0-Ap-C-factor-root-jms.pg; numeric list; factor non-monic quadratic to find distinct roots,2-1-0-Ap-C-factor-root-v2-jms.pg; numeric list; factor monic cubic with root x=0 to find distinct roots of resulting monic quadratic,2-1-0-Ap-C-factor-blanks-jms.pg; numeric; fill-in coefficients to factor quadratic based on a pre-determined pattern (x+b)(cx+a),2-1-0-Ap-C-factor-blanks-v2-jms.pg; numeric; fill-in variable or coefficients to factor cubic based on a pre-determined pattern x(x+b)(cx+a) +2-2-0-Ap-C,2-2-0,Ap,C,3,solve equations involving common functions in the course,,,2-2-0-Ap-C-quad-log-jms.pg; numeric list; solve quadratic equation with log variable,2-2-0-Ap-C-abs-quad-jms.pg; numeric list; solve equation with absolute value and quadratic,, +2-2-1-Ap-C,2-2-1,Ap,C,3,solve equations involving polynomial functions,,,"2-2-1-Ap-C-poly-int-jms.pg; list of points; find intersection point of quadratic and linear; sometimes no solution, integer solutions, one case of irrational solutions",2-2-1-Ap-C-poly-int-v2-jms.pg; numeric list; find intersection to two quadratics; integer solutions (sometimes large) or no solutions; revised version of other problem,2-2-1-Ap-C-quad-lin-int-jms.pg; find intersection point of quadratic and linear; integer solutions or no solutions; same problem as poly-int-v2 but with f and g changed, +2-2-2-Ap-C,2-2-2,Ap,C,3,solve equations involving logarithmic and exponential functions,,,2-2-2-Ap-C-quad-log-dist-jms.pg; numeric; solve quadratic equation with log variable with distinct roots ordered large to small,2-2-2-Ap-C-exp-log-jms.pg; list; no solutions to a log/exp equation,2-2-2-Ap-C-lin-log-jms.pg; numeric list; linear factor with log variable; x=0 not in the domain so only one solution, +2-2-3-Ap-C,2-2-3,Ap,C,3,solve equations involving trigonometric functions (with or without domain restrictions),,,"2-2-3-Ap-C-sin-eq-jms.pg; numeric or numeric list; solve sin(x) = sin(2x) or sin(x) = sin(3x) for x in (0,pi)","2-2-3-Ap-C-cos-eq-jms.pg; numeric; solve cos(x) = cos(2x) or cos(x) = cos(3x) for x in (0,pi)","2-2-3-Ap-C-trig-x-jms.pg; numeric or numeric list; solve either x+sin(2x) = x or x+cos(2x) = x for x in (0,pi)", +2-3-0-An-C,2-3-0,An,C,4,translate between symbolic equations and information presented in other ways,,,"249-2-0-0-C/2-3-0-An-C/2-3-0-An-C-tnslt-ineq-cmm.pg; multiple choice; sentence invovling sqr rt, inequality, and multiplication with two variables x and y; translate sentence into symbolic equation .","249-2-0-0-C/2-3-0-An-C/2-3-0-An-C-tnslt-eqtn-cmm.pg; multiple choice; symbolic euqation given with inequality, root, and power; translate symbolic equation into sentence. ",, +2-3-1-U-C,2-3-1,U,C,2,"represent solutions to equations graphically (intersections, roots, intercepts)",,,,,, +3-0-0-C,3-0-0,,C,,identify appropriate calculus concept or tool to solve a variety of abstract and concrete problems,High-level outcome (for course outline); short name #3-0-0-C; problem-solving,,No. of 3-0-0-C problems --- >>>,10,, +3-3-0-C-A,3-3-0,C,A,N/A,create problems that do/do not involve calculus in their solution,,,,,, +3-1-0-Ap-I,3-1-0,Ap,I,5,translate a word problem into an abstract calculus problem,,,"3-1-0-Ap-I-opt-funct-jms.pg; function, given an optimization problem, choose the correct objective function to optimize; drop down; choose the type of problem this is (to see if learners would know where to look for additional information on how to solve...)","3-1-0-Ap-I-approx-funct-jms.pg; given a numerical approximation problem, choose a function to use for a Taylor Polynomial calcultation at a given centre; choose the type of problem from a drop down",, +3-2-0-E-I,3-2-0,E,I,4 or 5,"identify practical, concrete situations where calculus is a useful tool",WeBWork level 5 = word problems,,,,, +3-4-0-E-I,3-4-0,E,I,4,"choose an appropriate approximation technique to approximate values of functions, roots of functions, or (percentage) change in functions","values of functions (linear or taylor polynomial), roots of functions (IVT or Newton's method), change in a function (differentials)",,"3-4-0-E-I-approx-choice-jms.pg; drop down, choosing approximation method given two specific approximation problems","3-4-0-E-I-approx-choice-v2-jms.pg (versioned question); drop down, choosing approximation method given two specific approximation problems",, +3-5-1-Ap-I,3-5-1,Ap,I,3,choose an appropriate optimization technique to solve abstract optimization problems,"Make sure students know the language ""Closed Interval Method"" and ""Global Interval Method"" in the case of one critical point for optimization problems, given domain and number of critical points should influence choice of method",,"3-5-1-Ap-I-opt-choice-jms.pg; drop down (yes/no); given an abstract or standard box optimization problem, determine if the Closed Interval Method can be used.",3-5-1-Ap-I-second-der-test-jms.pg; drop down and numeric; given data about two critical points choose correct method and conclusion abuout an extrema,3-5-1-Ap-I-first-der-test-jms.pg; drop down and numeric; given data about one critical and intervals choose correct method and conclusion abuout an extrema between First Derivative Test / Global Interval Method, +3-5-2-Ap-I,3-5-2,Ap,I,5,choose an appropriate optimization technique to solve optimization word problems,"will typically involve finding a domain first, then doing above",,,,, +3-6-0-Ap-I,3-6-0,Ap,I,3,choose between using derivatives or antiderivatives (integrals) to solve problems involving rates of change,,,"3-6-0-Ap-I-drop-down-jms.pg; drop down; generic problem description choose ""derivative"" ""integral"" or ""no calculus required""","3-6-0-Ap-I-drop-down-detail-jms.pg; drop down; specific/detailed problem description choose ""derivative"" ""indefinite integral"" or ""definite integral""",, +3-7-0-Ap-I,3-7-0,Ap,I,3,"identify when a major ""value"" theorem (EVT, IVT, MVT) can be used to solve a problem",,,3-7-0-Ap-I-drop-down-jms.pg; drop down; choose correct name for each of the value theorems with statements given,3-7-0-Ap-I-value-choice-jms.pg; drop-down; randomly chooses on of the three problems to the right of this entry,3-7-0-Ap-I-mvt-jms.pg; drop down; given abstract problem choose the best theorem to help solve the problem (MVT),3-7-0-Ap-I-ivt-jms.pg; drop down; given abstract problem choose the best theorem to help solve the problem (IVT) +4-0-0-I,4-0-0,,I,,use a variety of approximation techniques to solve abstract and concrete approximation problems,High-level outcome (for course outline); short name #4-0-0-I; approximation,,No. of 4-0-0-C problems --- >>>,21,, +4-1-1-Ap-C,4-1-1,Ap,C,3,implement linear approximation to approximate numerical values of a function,,,4-1-1-Ap-C-root-jms.pg.; numeric; linear approximation of a square root of a number given a function and the point to approximate at,4-1-1-Ap-C-power-jms.pg.tmp; numeric; approximate (integer + x/100)^power with linear approximation; no function or point given,4-1-1-Ap-C-log-jms.pg; numeric; linear approximation of ln(a+x/100) with a close to 1, +4-2-1-Ap-C,4-2-1,Ap,C,3,implement Taylor Polynomial approximation to approximate numerical values of a function,,,4-2-1-Ap-C-taylor-poly-approx-AT.pg,,, +4-2-2-Ap-I,4-2-2,Ap,I,3,use Taylor's Remainder Theorem to estimate the error in a Taylor Polynomial approximation,,,4-2-2-Ap-I-taylor-remainder-approx-AT.pg,,, +4-2-3-Ap-I,4-2-3,Ap,I,3,use Taylor's Remainder Theorem to identify the degree of Taylor Polynomial approximation required to reach a given error threshold,,,4-2-3-Ap-I-taylor-poly-degree-AT.pg,,, +4-1-2-E-I,4-1-2,E,I,4,determine if a linear approximation is an over/under estimate by using the second derivative and concavity,Need to know about concavity to do first two problems; last problem can be done earlier since a graph is given,,4-1-2-E-I-poly-over-under-jms.pg; drop down; determine over or under value of odd deg polynomial for point left/right of IP; solution using second derivative,4-1-2-E-I-abstract-over-under-jms.pg; drop down; determine over or under for unknown function given information about f' and f'' on an interval; solution uses concavity,4-1-2-E-I-graph-overunder-jms.pg; multiple choice and drop down; given graph choose correct linear approximation and determine if over/under estimate, +4-3-1-Ap-I,4-3-1,Ap,I,3,implement differential approximation to estimate the change in a function given the change in the independent/dependent variable,Related to 11-5-4-Ap-C; using differentials in the context of integration by substitution,,4-3-1-Ap-I-demand-change-jms.pg; numeric; given demand function find approximate change in demand given a price decrease,4-3-1-Ap-I-fcn-change1-jms.pg; function and numeric; compute differential of polynomial and then compute approximate change and actual change in f given initial and final values of x,"4-3-1-Ap-I-fcn-change-2-jms.pg; fundtion and numeric; given initial point and change in x, find differential, approximate change in x and actual change in x.","4-3-1-Ap-I-fcn-change-3-jms; function and numeric; with a square root of (x-a); differential, approximate change in f, and actual change in x and f" +4-3-2-Ap-I,4-3-2,Ap,I,3,implement differential approximation to estimate the percent change in a function given the percent change in the independent variable,Related to 11-5-4-Ap-C; using differentials in the context of integration by substitution,,"4-3-2-Ap-I-percent-sphere-jms.pg; numeric; given percent change in surface area of sphere, find corresponding percentage change in radius and volume; phrased as a physics application","4-3-2-Ap-I-percent-change-jms; numeric and drop down; given quantity that depends on power of x (pos/neg) and percent change in x, find percent change in A and determine inc/dec","4-3-2-Ap-I-percent-change-2-jms.pg; given y = f(x) and percent change in x (inc/dec), determine percent change in y (signed +/-)", +4-3-3-Ap-I,4-3-3,Ap,I,3,use the Intermediate Value Theorem as a coarse method of approximating roots of functions,,,4-3-3-Ap-I-ivt-mc-jms.pg; multiple choice; given data table choose smallest interval where IVT gives a solution to 0=f(x),"4-3-3-Ap-I-ivt-mc-no-sol-jms.pg; same as 4-3-3-Ap-I-ivt-mc-jms.pg; multiple choice; given data table choose smallest interval where IVT gives a solution to 0=f(x) but all function values have the same sign so ""none of the above"" is correct",, +4-4-0-Ap-C,4-4-0,Ap,C,3,use Newton's Method to approximate roots of functions,,,4-4-0-Ap-C-nm-exp-jms.pg; numeric; 3 iterations of Newton's Method. Similar equation to one that appears in a 3-0-0-C question where they need to choose the method. ,4-4-0-Ap-C-nm-cubic-jms.pg; three iterations of Newton's Method to approximate root of a cubic. Similar to one that appears in a 3-0-0-C question where they need to choose the method.,4-4-0-Ap-C-nm-log-jms.pg; numeric; 3 iterations of Newton's Method; have to rearrange to get function first; will always be accurate to 5 decimal places after 4 iterations (highlighted in the solution), +4-4-1-E-I,4-4-1,E,I,4,"evaluate situations where Newton's Method fails to approximate a root of a function due to a poor initial estimate (e.g., oscillation between two roots), arriving at a derivative that is equal to zero, or the fact that there is no root",,,,,, +5-0-0-C,5-0-0,,C,,"explain the concept of ""limit"" and how it arises in various calculus concepts; in particular continuity and the Intermediate Value Theorem",High-level outcome (for course outline); short name: #5-0-0-C; limits,,No. of 5-0-0-C problems --- >>>,42,, +5-6-3-An-A,5-6-3,An,A,4,explore how the assumption of continuity is necessary to apply the Intermediate Value Theorem,,,,,, +5-1-1-R-C,5-1-1,R,C,1,state a precise definition of what it means for a limit to exist,Any quiz should only have at most one of the following questions; solution not provided,,5-1-1-R-C-defn-mc-jms.pg; mutliple choice; definition of a limit; abstract function random explicit value,5-1-1-R-C-defn-inf-mc-jms.pg; multiple choice; definition of a limit at infinity; abstract function random explicit value,5-1-1-R-C-defn-neg-inf-mc-jms.pg; multiple choice; definition of a limit at infinity; abstract function random explicit value,"5-1-1-R-C-defn-inf-lim-mc-jms.pg; multiple choice, definition of infinite limit; abstract function random value to approach" +5-2-1-An-C,5-2-1,An,C,4,determine if the limit of a function (including piecewise) exists graphically,,,5-2-1-An-C-limit-graph-1-jms.pg; numeric; randomly generated graph of piecewise function; either asks about one-sided and two-sided limits at -2 or 2; two-sided limit may or may not exist (getting at notational issues with +/- 2 and one-sided),"5-2-1-An-C-limit-graph-2-jms.pg; numeric; one-sided limits, two-sided limit DNE, asks for value of function at -3 or 1; randomly generated piecewie function graph given","5-2-1-An-C-limit-graph-3-jms.pg; graph with a removable discontinuity; asks for two-sided limit, value of the function; and either the right or left limit at a point with a jump discontintuity", +5-2-2-An-C,5-2-2,An,C,4,defermine if the limit of a function exists analytically/algebraically,,,5-2-2-An-C-compute-limits-1-jms.pg; numeric; two limits; both exist; one direct subsitution (Danny's template); one one-sided factor and cancel with an absolute value to deal with,5-2-2-An-C-compute-limits-2-jms.pg; numeric; ratio of quadratics (answer is always 0); absolute value two-sided (answer is always DNE),5-2-2-An-C-compute-limits-3-inf-jms.pg; reciprocal of a difference of squares; one-sided limits and two sided; one sided will be +/- inf and two sided will not exist, +5-2-3-An-C,5-2-3,An,C,4,determine if the limit of a piecewise function exists analytically,,,5-2-3-An-C-pw-limit-1-jms.pg; numeric; piecewise function with two pieces; compute two one-sided limits always using two different pieces,5-2-3-An-C-pw-limit-2-jms.pg; numeric; piecewise function (similar to last example); compute one and two sided limits at one point; two sided limit may or may not exist (exists ~15% of cases),5-2-3-An-C-pw-limit-3-jms.pg; numeric; piecewise funciton with 3 pieces; two two-sided limits; first limit exists 33% of the time; second exists 50% of the time, +5-3-1-U-C,5-3-1,U,C,2,determine if L'Hopital's Rule can be applied to compute a given limit,L'Hôpital's Rule will be covered later in the semester than other limit problems,,5-3-1-U-C-ms-lhop-jms.pg; multiselect; choose limits where L'Hopital's Rule can be applied,5-3-1-U-C-ms-lhop-v2-jms.pg; multiselect; choose limits where L'Hopital's Rule can be applied,, +5-3-2-Ap-C,5-3-2,Ap,C,3,use L'Hopital's Rule to compute a limit of Type 0/0 or infinity/infinity,L'Hôpital's Rule will be covered later in the semester than other limit problems,,5-3-2-Ap-C-compute-lhop-1-jms.pg; numeric; two limits; one type 0/0 and one inf/inf; second is always 0,5-3-2-Ap-C-compute-lhop-2-jms.pg; numeric; both exist; both type 0/0; need to use L'Hôpital twice for second limit,5-3-2-Ap-C-compute-lhop-3-jms.pg ; numeric; Both type inf/inf but L'Hoptial is not the best approach; algebraic funciton sqrt(x^2)/x to pm infty; solution does not use L'Hopital, +5-3-5-E-I,5-3-5,E,I,4,recognize that L'Hoptial's Rule has been applied incorrectly in a given calculation,L'Hôpital's Rule will be covered later in the semester than other limit problems,,,,, +5-4-1-U-C,5-4-1,U,C,2,explain the relationship between limits and vertical/horizontal asymptotes of a function,,,5-4-1-U-C-asymp-dd-jms.pg; drop down and numeric; given information about two limits choose if funciton has a horizontal/vertical asymptote; choose equation as x/y = numeric blank,5-4-1-U-C-asymp-num-dd-jms.pg; given simple function; compute two limits and identify type of asymptote and equation; simiilar to other quesiton here but adds one additional step but less versioning,, +5-4-2-Ap-C,5-4-2,Ap,C,3,identify the vertical/horizontal asmptoes of a function by computing limits,,,5-4-2-Ap-C-asymp-vert-jms.pg; numeric; given rational function identify point where there is a vertical asymptote and compute a one-sided limit; identify a point where the funciton is undefined but there is no vertical asymptote,5-4-2-Ap-C-asymp-horiz-jms.pg; numeric; given rational function with equal largest power in numerator and denominator find limit at +/- infinity and state equation of horizontal asymptote.,5-4-2-Ap-C-asymp-horiz-2-jms.pg; numeric; compute limit at infinity of function with exp(-x) and state horizontal asymptote equation y = L, +5-4-5-U-C,5-4-5,U,C,2,"recognize that a function may ""cross"" its horizontal asymptotes",,,5-4-5-U-C-t-f-asmp-1-jms.pg; drop down with graph of function (sine) and asymptote; true or false limit at infinity (Squeeze Theorem) and statement about horizontal asymptote,5-4-5-U-C-t-f-asmp-2-jms.pg; drop down with graph of function (cosine) and asymptote; true or false limit at infinity (Squeeze Theorem) and statement about horizontal asymptote,, +5-5-0-R-C,5-5-0,R,C,1,state a precise definition of what it means for a function to be continuous at a point,,,5-5-0-R-C-cont-def-dd-jms.pg; drop down and numeric; table of values given for a function and continuity at a point definition is asked for,,, +5-5-1-U-C,5-5-1,U,C,2,"recognize types of discontinuities (removable, jump, infinite) given the graph of a function",Using same graph code as 5-2-1-An-C questions above; question changed to drop-down; two bold questions are likely enough and capture more situations with randomization / question design,,"5-5-1-U-C-discon-graph-1-jms.pg; dropdown; given graph of piecewise function, either has a jump discontinuity or is continuous at +/-2",5-5-1-U-C-dicon-graph-2-jms.pg; drop down and numeric; jump and infinite discontinuity at -3 and 1 respectively; also asks for numeric answers for limits from the graph to give the justification for the type of discontinuity.,"5-5-1-U-C-discon-graph-3-jms.pg; drop down; one point always a removable discontinuity; other point is either a jump, removable or is continuous", +5-5-2-U-C,5-5-2,U,C,2,"recognize types of discontinuities (removable, jump, infinite) given an algebraic or piecewise expression for a function",,,5-5-2-U-C-pw-cont-1-jms.pg; drop down; piecewise function from 5-2-3-An-C-pw-limit-3-jms.pg; either continuous or jump discontinuity,5-5-2-U-C-pw-cont-2-jms.pg; two pieces; internal to two intervals there are removable / infinite discontinuity (switches places); do not ask about points where pieces join intentionally,, +5-5-4-Ap-C,5-5-4,Ap,C,3,find the intervals where a given piecewise function is continuous,,,"5-5-4-Ap-C-cont-int-1-jms.pg; interval; piecewise with two parts; one part has a discontinuity inside its interval of defn; very rarely randomization will make the function continuous at the point where the two parts are joined (a=1,b=6,c=-2,m=3)","5-5-4-Ap-C-cont-int-2-jms.pg; interval; piecewise with two functions and a point defined; one piece always infinite discontinuity at 0; at point where functions join could be continuous, removable or jump.",, +5-6-2-Ap-C,5-6-2,Ap,C,3,apply the Intermediate Value Theorem to make conclusion about the roots of continuous functions,Question from 4-0-0-C above,,4-3-3-Ap-I-ivt-mc-jms.pg; problem can also be used for 5-6-2-Ap-C,,, +5-3-0-R-I,5-3-0,R,I,1,state L'Hopital's Rule,L'Hôpital's Rule will be covered later in the semester than other limit problems,,,,, +5-3-3-Ap-I,5-3-3,Ap,I,3,manipulate an indeterminate limit into a Type 0/0 or infinity/infinity limit,L'Hôpital's Rule will be covered later in the semester than other limit problems,,249-5-0-0-C/5-3-3-Ap-I/5-3-3-Ap-I-manip-lhop-1-cmm.pg; infinity times 0 type; asked to re-write as infinity/infinity form and enter the numerator/denominator expressions,249-5-0-0-C/5-3-3-Ap-I/5-3-3-Ap-I-manip-lhop-2-cmm.pg; 1^{infinity} type; asked to re-write as infinity/infinity form and enter the numerator/denominator expressions ,, +5-3-4-Ap-I,5-3-4,Ap,I,3,use L'Hopital's Rule to compute an indeterminate limit that is not presented as Type 0/0 or infinity/infinity,L'Hôpital's Rule will be covered later in the semester than other limit problems,,5-3-4-Ap-I-compute-lhop-power-jms.pg; numeric; gives one of two limits of Type 1^inf; one needs L'Hopital once the other twice,5-3-4-Ap-I-compute-lhop-product-jms.pg; infinity times 0 type with trig function; answer is nonzero and finite,5-3-4-Ap-I-compute-lhop-difference-jms.pg; infinity - infinity; use L'Hop twice; answer is coefficient/2, +5-5-3-R-I,5-5-3,R,I,1,"state the precise definition of different types of discontinuities (removable, jump, infinite)",,,5-5-3-R-I-discon-defn-jms.pg; drop-down; match name of discontinuity to the given definition,,, +5-5-5-Ap-I,5-5-5,Ap,I,3,find unknown constants in a given piecewise function in order to make the function continuous everwhere,,,5-5-5-Ap-I-const-cont-1-jms.pg; numeric list; solve a quadratic to find all values that make a piecewise function continuous at x=-1,"5-5-5-Ap-I-const-cont-2-jms.pg; solve a quadratic to find all values that make a piecewise function continuous at 2, 3, 4 or 5; allows for a repeated root to be entered only once",5-5-5-Ap-I-const-cont-3-jms.pg; numeric; piecewise with three pieces; solve two quadratics with only one root in common that makes the function continuous everwhere, +5-6-1-R-I,5-6-1,R,I,1,state the Intermediate Value Theorem,,,,,, +6-0-0-C,6-0-0,,C,,"articulate the concept of the ""derivative"" in terms of ""rates of change"" and ""slope"" and give a precise definition",High-level outcome (for course outline); short name #6-0-0-C; derivative,,No. of 6-0-0-C problems --- >>>,24,, +6-1-0-U-C,6-1-0,U,C,2,interpret rates of change in practical/applied contexts as the derivative of a function,,,"6-1-0-U-C-vel-acc-dd-jms.pg; drop-down, numeric and function; derivative of position is velocity; find when velocity is zero for a polynomial position function; asks for acceleration as a funciton of t",6-1-0-U-C-reaction-dd-jms.pg; drop-down and interval; given function that describes concentration; need to know/interpret increasing and decreasing in terms of sign; given intervals where inceasing/decreasing given simple derivative with e^x(x-a),6-1-0-U-C-cost-dd-jms.pg; drop down and numeric; marginal cost as inst rate of change; compute change in cost; interpret marginal cost as C(x+1)-C(x),6-1-0-U-C-pop-dd-jms.pg; drop down only; population; includes question about the graph and slope; asks to inperpret population as increasing/decreasing +6-1-1-R-C,6-1-1,R,C,1,state a precise definition of the derivative of a function at a point,,,6-1-1-R-C-defn-pt-1-jms.pg; numeric and function; power of x and sqrt(x),,, +6-1-2-R-C,6-1-2,R,C,1,state a precise definition of the derivative of a function as a function in its own right,,,6-1-2-R-C-defn-fcn-1-jms.pg; function; +sin(x) +/- ln(x),6-1-2-R-C-defn-fcn-2-jms.pg; function; ln(x) - cos(x),, +6-3-0-Ap-C,6-3-0,Ap,C,3,compute derivatives of simple algebraic functions by using the definition of the derivative,,,,,, +6-3-1-Ap-C,6-3-1,Ap,C,3,compute the equation of the tangent line to the graph of a function at a given point,,,"6-3-1-Ap-C-fcn-to-line-1-jms.pg; numeric; function; find derivative, find slope, find equation of line and find point on the graph",6-3-1-Ap-C-slope-1-jms.pg; numeric; find slope of a secant line and slope of a tangent line to a polynomial (neat: integer points will always give integer slope of secant lines),"6-3-1-Ap-C-fcn-to-line-2-jms.pg; numeric; function; GIVEN derivative, slope, equation of tangent line and point; trigonometric function", +6-9-1-U-C,6-9-1,U,C,2,"interpret ""slope of functions"" using the derivative analytically/algebraically",,,6-9-1-U-C-line-to-fcn-1-jms.pg; numeric; given equation of the tangent line find f(a) and f'(a),"6-9-1-U-C-line-to-fcn-2-jms.pg; numeric; given equation of the tangent line find f(a) and f'(a); includes ""pi"" in the slope to make it look superficially different",, +6-9-2-U-C,6-9-2,U,C,2,"interpret ""slope of functions"" using the derivative graphically",,,6-9-2-U-C-der-from-graph-1-jms.pg; numeric; function; given graph of piecewise function (all line segments); find slope and equation of tangent line to one of four points,"6-9-2-U-C-der-dne-graph-1-jms.pg; numeric list; given piecewise linear graph find points where derivative does not exist, could be 2, 1 or 0 (somtimes hard to see!); hint and solution provided",6-9-2-U-C-der-zero-graph-1-jms.pg; numeric list; given graph of a cubic find the two points where the derivative is equal to 0; always two distinct points ... easier to get the graph to appear reasonable this way,6-9-2-U-C-der-zero-graph-2-jms.pg; given graph of a cubic find the ONE points where the derivative is equal to 0; ... easier to get the graph to appear reasonable this way +6-10-1-Ap-C,6-10-1,Ap,C,3,calculate values and derivatives of the inverse of a function (abstractly),,,6-10-1-Ap-C-inv-table-1-jms.pg; numeric; given table of values find f^{-1}(pt) and (f^{-1})'(pt); 4 random points; picks one point to ask fo,"6-10-1-Ap-C-inv-table-2-jms.pg; numeric; fill in table of values for f, f-inv, fder, f-inv-der; some values of the table are unknown; probably HARD because there are 9 blanks and 3 DNE?",6-10-1-Ap-C-inv-der-from-graph-1-jms.pg; given graph of piecewise decreasing function find derivative of function and inverse funciton where you need to use two different line segments for each derivative, +6-10-2-Ap-C,6-10-2,Ap,C,3,calculate values and derivatives of the inverse of a trigonometric function,,,"6-10-2-Ap-C-inv-trig-1-jms.pg; numeric; two values of inverse trig functions one sin^-1(special), cos^-1(sin)=cos^-1(-1), one derivative of sin^-1",6-10-2-Ap-C-inv-trig-2-jms.pg; numeric; derivative of cos^-1 and tan^-1 at the same point,, +6-2-0-U-I,6-2-0,U,I,2,recognize when a given limit is equal to the derivative of a function,,,,,, +6-2-1-Ap-I,6-2-1,Ap,I,3,compute sophisticated limits by recognizing them as derivatives and using the derivative to evaluate the limit,,,249-6-0-0-C/6-2-1-Ap-I/6-2-1-Ap-I-trkylmt-deriv-1-cmm.pg; find the derivative using the chain rule; involves the sine function; presented as a limit calculation using the limit definition of the derivative. ,249-6-0-0-C/6-2-1-Ap-I/6-2-1-Ap-I-trkylmt-deriv-2-cmm.pg; find the derivative using the chain rule; involves e^x; presented as a limit calculation using the limit definition of the derivative.,249-6-0-0-C/6-2-1-Ap-I/6-2-1-Ap-I-trkylmt-deriv-3-cmm.pg; find the derivative using the chain rule; involves a*ln(X); presented as a limit calculation using the limit definition of the derivative. , +7-0-0-C,7-0-0,,C,,"identify necessary differentiation rules (product, quotient, chain) and carry out these computations for explicit and abstract functions",High-level outcome (for course outline); short name: #7-0-0-C; differentiation rules,,No. of 7-0-0-C problems --- >>>,16,Make 3 each here!, +7-1-0-U-C,7-1-0,U,C,2,identify necessary differentiation rules to evaluate the derivative of a given function,,,,,, +7-2-1-Ap-C,7-2-1,Ap,C,3,compute the derivative of a function with the product rule,,,7-2-1-Ap-C-simple-prod1-mlb.pg; function; product derive of poly*trig,7-2-1-Ap-C-simple-prod2-mlb.pg; function; product derive of poly*trig,7-2-1-Ap-C-prod-mlb.pg; function; product derive of (poly+trig)*(poly+exp), +7-2-2-Ap-C,7-2-2,Ap,C,3,compute the derivative of a function with the quotient rule,,,7-2-1-Ap-C-simple-quo1-mlb.pg; function; product derive of poly/poly,7-2-1-Ap-C-simple-quo2-mlb.pg; function; product derive of poly/trig,7-2-1-Ap-C-quo-mlb.pg; function; product derive of (poly + exp)/(poly + trig), +7-2-3-Ap-C,7-2-3,Ap,C,3,compute the derivative of a funciton with the chain rule,,,7-2-3-Ap-C-simple-chain1-mlb.pg; function; power rule - poly^int,7-2-3-Ap-C-simple-chain2-mlb.pg; function; power rule - tri(poly),, +7-2-4-Ap-I,7-2-4,Ap,I,3,compute the derivative of a function requiring multiple applications of the product rule,,,249-7-0-0-C/7-2-4-Ap-I/7-2-4-Ap-I-mtpl-prod-1-cmm.pg; function; multiple uses of the product rule; trig and polys. ,249-7-0-0-C/7-2-4-Ap-I/7-2-4-Ap-I-mtpl-prod-2-cmm.pg; function; multiple uses of the product rule; e^x and polys. ,249-7-0-0-C/7-2-4-Ap-I/7-2-4-Ap-I-mtpl-prod-3-cmm.pg; function; multiple uses of the product rule to find f'(a) at a given value x=a. , +7-2-5-Ap-I,7-2-5,Ap,I,3,compute the derivative of a function requiring multiple applications of the chain rule,,,249-7-0-0-C/7-2-5-Ap-I/7-2-5-Ap-I-mtpl-chain-1-cmm.pg; function; multiple uses of the chain rule; ()^pwr + e^((x)^a). ,"249-7-0-0-C/7-2-5-Ap-I/7-2-5-Ap-I-mtpl-chain-2-cmm.pg; function; multiple uses of the chain rule to find g'(x) at x=a with f(a), f'(a) provided.",, +7-2-6-Ap-I,7-2-6,Ap,I,3,compute the derivative of a function requiring a combination of the product/quotient and chain rules,,,249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-prod-chain-1-cmm.pg; function; quotient rule; multiple uses of the chain rule. ,249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-prod-chain-2-cmm.pg; function; product rule; multiple uses of the chain rule. ,249-7-0-0-C/7-2-6-Ap-I/7-2-6-Ap-I-mtpl-prod-chain-3-cmm.pg; function; quotient rule; multiple uses of the chain rule to find the derivative of f(x) at a given x=a. , +8-0-0-C,8-0-0,,C,,interpret information about the shape/graph of a function by using information about the first and second derivative,High-level outcome (for course outline); short name: #8-0-0-C; graphs,,No. of 8-0-0-C problems --- >>>,27,, +8-1-2-U-C,8-1-2,U,C,2,identify intervals where a function is increasing/decreasing given the graph of the original function,,,1-1-0-An-C-graph-interval-jms.pg; interval list; read intervals of increase/decrease off the graph of a random parabola,"8-1-2-U-C-pw-inc-dec-1-jms.pg; dropdown; random piecewise linear generated; askes about three intervals (at random); one using and enpoint, one small interior (inc/dec/constant), one concatenated interval (inc/dec/constant/NEITHER)",8-1-2-U-C-cubic-inc-dec-jms.pg; interval; given graph of cubic; find intervals of increase/decrase; uses the same cubic graph as 6-9-2-U-C-der-zero-graph-1-jms.pg,8-1-2-U-C-quart-inc-dec-jms.pg; interval; find intervals of increase/decrase given graph of a generic quartic (derivative with distinct roots) +8-1-3-U-C,8-1-3,U,C,2,identify intervals where a function is increasing/decreasing given the graph of the derivative,,,8-1-3-U-C-pw-der-inc-dec-1-jms.pg; dropdown; piecewise linear graph of derivative; two of four intervals randomly chosen; asked about f inc/dec with justification,"8-1-3-U-C-pw-der-inc-dec-2-jms.pg; piecewise smooth version of question; two of four intervals randomly chosen (one on end, one in middle); asked about f inc/dec with justification","8-1-3-U-C-der-cubic-inc-dec-jms.pg; interval and numeric; given graph of a cubic that is the derivative of a function, find intervals of increase/decrease",8-1-3-U-C-der-quart-inc-dec-jms.pg; intervals; given graph of a quartic that is the derivative of a function; find intervals of increase/decrease; one repeated root so two intervals next to each other with the same behaviour +8-1-1-R-C,8-1-1,R,C,1,state what it means for a function to be increasing/decreasing in terms of the derivative,Ask only one of 8-1-1-R-C-state-der-inc-dec-jms.pg or 8-1-1-R-C-state-der-inc-dec-2-jms.pg on an assessment.,,8-1-3-U-C-pw-der-inc-dec-1-jms.pg; dropdown; from above includes this outcome as well as interpreting the graph of the derivative,8-1-1-R-C-state-der-inc-dec-jms.pg; dropdown; given increasing/decreasing choose pos/neg for deriative; includes choosing the universal quantifier,8-1-1-R-C-state-der-inc-dec-2-jms.pg; given derivative pos/negative choose if function is increasing/decreasing; includes choosing the universal quantifier, +8-2-3-U-C,8-2-3,U,C,2,identify intervals where a function is concave up/down given the graph of the original function,,,8-2-3-U-C-concave-original-1-jms.pg; intervals; graph of cubic with nonzero integer inflection point,8-2-3-U-C-concave-original-2-jms.pg; interal; graph of quartic with two distinct nonzero integer inflection points,, +8-2-5-U-C,8-2-5,U,C,2,identify intervals where a function is concave up/down given the graph of the second derivative,,,"8-2-5-U-C-pw-second-der-concave-1-jms.pg; dropdown; piecewice smooth second derivative graph; determine concave up/down on two of four random intervals (one on end, one in middle); indicate sign of second derivative (modified version of code from 8-1-3-U-C-pw-der-inc-dec-1-jms.pg)",8-2-5-U-C-sec-der-quart-conc-jms.pg; intervals and numeric; quartic graph given as graph of the second derivative; determine intervals where original function is concave up/down and list x-values of inflection points; one repeated root so two intervals next to each other with the same behaviour (modified from code 8-1-3-U-C-der-quart-inc-dec-jms.pg),, +8-1-4-Ap-C,8-1-4,Ap,C,3,identify intervals where a function is increasing/decreasing by algebraically determining the sign of the derivative,,,8-1-4-Ap-C-danny-1.pg; interval list; Danny's template problem,8-1-4-Ap-C-abstract-1-jms.pg; interval; given derivative involving an uknown function with a fixed sign; find intervals where original funciton is increasing / decreasing,8-1-4-Ap-C-log-2-jms.pg; interval; given function and its derivative involving log(x); find intervals of increase and decrease,8-1-4-Ap-C-poly-3-jms.pg; interval; quartic given; derivative is a cubic with one repeated root +8-2-6-Ap-C,8-2-6,Ap,C,3,identify intervals where a function is concave up/down by algebraically determining the sign of the second derivative,,,8-2-6-Ap-C-poly-1-jms.pg; interval; quartic function; second derivative is a quadratic has can have distinct or repeated roots and either a pos/neg constant factor,8-2-6-Ap-C-rational-2-jms.pg; interval; simple rational function +/-(x-a)^(-1); determine intervals where concave up / concave down; modified version of 8-1-4-Ap-C-danny-1.pg,8-2-6-Ap-C-abstract-3-jms.pg; interval; modified version of 8-1-4-Ap-C-abstract-1-jms.pg; given SECOND derivative involving an uknown function with a fixed sign; find intervals where original funciton is CU/CD,8-2-6-Ap-C-exp-3-jms.pg; interval; f''(x) = x(x-a)e^x; given f need to compute f'' using the product rule +8-1-0-R-I,8-1-0,R,I,1,state the definition what it means for a function to be increasing/decreasing,,,8-1-0-R-I-defn-inc-dec-jms.pg; dropdown; given increasing/decreasing fill in quantifier and one of two inequalities to complete the two definitions,8-1-0-R-I-defn-inc-dec-2-jms.pg; given technical definition match the correct word,, +8-2-4-U-I,8-2-4,U,I,2,identify intervals where a function is concave up/down given the graph of the first derivative,,,"8-2-4-U-I-pw-frst-der-concave-jms.pg; dropdown; piecise linear graph of first derivative (always non-constant on small intervals); determine if function is concave up, concave down, or if concavity changes on three randomly selected intervals (modified version of 8-1-2-U-C-pw-inc-dec-1-jms.pg;)","8-2-4-U-I-cubic-first-der-concave-jms.pg; given graph of first derivative that is a cubic, determine where original function is concave upward/downward and find inflection points",, +8-2-0-R-I,8-2-0,R,I,1,state the definition what it means for a function to be concave up/down; and what it means to be concave up/down in terms of the second derivative,,,8-2-0-R-I-defn-conc-jms.pg; dropdown; define concaity in terms of the graph and tangent lines,8-2-0-R-I-conc-defn-2-jms.pg; dropdown; identify concacve up / down in terms of the second derivative; also includes universal quantifier,, +9-0-0-C,9-0-0,,C,,identify maximum/minimum values of a function on a given interval and solve single-variable constrained optimization problems,High-level outcome (for course outline); short name: #9-0-0-C; optimization,,No. of 9-0-0-C problems --- >>>,32,, +9-2-4-C-A,9-2-4,C,A,N/A,create an example of a function with a critical/singular point that is not a local extrema,,,,,, +9-1-5-C-A,9-1-5,C,A,N/A,create an example of a function where the Second Derivative Test is inconclusive,,,,,, +9-4-1-R-A,9-4-1,R,A,1,state the Extreme Value Theorem,,,9-4-1-R-A-evt-jms.pg; dropdown; complete the statement of the theorem (non-technical); 4 dropdowns,,, +9-4-2-An-A,9-4-2,An,A,4,explain the relationship between the Extreme Value Theorem and the Closed Interval Method,,,,,, +9-1-0-R-C,9-1-0,R,C,1,state the definiton of a local maximum/minimum,,,9-1-0-R-C-loc-ext-def-jms.pg; dropdown; given inequality choose local/max or local min and indicate 'near',9-1-0-R-C/9-1-0-R-C-loc-ext-def-2-jms.pg; dropdown; given maxmin choose correct inequality (f(x) and f(c) positions reversed from other version) and indicate 'near',, +9-1-1-U-C,9-1-1,U,C,2,identify a local maximum/minimum given the graph of the original function,**Note Definition 3.5.3 of CLP-1 allows endpoints of intervals to be local extrema (this is inconsistent with what we have done in 249/265 over the last few years),,"9-1-1-U-C-pw-loc-ext-1-jms.pg; dropdown; piecewise linear function; choose local max or local min / neither for interior singular points; CODE HAS OPTION TO INCLUDE AN ADDITIONAL POINT: domain is open interval so indicate ""neither"" at one of two endpoints",9-1-1-U-C-quart-ext-jms.pg; numeric (list); indiate numerical locations of local maximum and minimum given a graph of a quartic; code adapted from 8-1-2-U-C-quart-inc-dec-jms.pg,, +9-1-3-Ap-C,9-1-3,Ap,C,3,identify local maximum/minimums by using the First Derivative Test analytically/algebraically,,,9-1-4-Ap-C-danny-1.pg; drop-down; randomly generated parabola; depends on approach,9-1-3-Ap-C-fdt-jms-1.pg; dropdown and numeric; given f and f'; force using first derivative test by asking inc/dec; could be max/min,"9-1-3-Ap-C-fdt-abs-jms-1.pg; given function f with f'(x) = g'(x)(x-a)(x-b); find local max/min; given g continuous differentiable with one critical point and a local max/min; ten different cases occur; allows a=b, but avoids a=c and b=c", +9-2-1-R-C,9-2-1,R,C,1,state the definition of a critical point,,,9-2-1-R-C-crit-sing-def-jms.pg; identify difference between critical and singular points from their definitions; uses local maximum and local minimum as distractors,,, +9-1-4-Ap-C,9-1-4,Ap,C,3,identify local maximum/minimums by using the Second Derivative Test analytically/algebraically,,,9-1-4-Ap-C-danny-1.pg; drop-down; randomly generated parabola; depends on approach,"9-1-4-Ap-C-sdt-jms-1.pg; numeric; dropdown; given quartic and critical point find value of f'', determine sign of f'', indicate max/min and find value of function","9-1-4-Ap-C-sdt-jms-2.pg; numeric; given a cubic with an unknown parameter find the value of the constant that gives a local max/min; get two possible critical points, but only one gives desired max/min",9-1-4-Ap-C-sdt-jms-3.pg; dropdown; given table of values determine if max/min/neither or inconclusive; points may or may not be critical points +9-3-0-R-C,9-3-0,R,C,1,state the definition of a global maximum/minimum,,,9-3-0-R-C-glob-ext-def-jms.pg; dropdown; given inequality; choose global max/min and correct quantifier to make a correct definition,9-3-0-R-C-glob-ext-def-2-jms.pg; dropdown; given global max/min choose inequality and quantifier to complete definition; positions of f(x) and f(c) reversed from other version and opposite to local questions,, +9-3-1-U-C,9-3-1,U,C,2,explain the difference between a local/global extrema,Jerrod is not sure how to make this in WeBWork ... other than the question with a graph that I've made for 9-3-2-U-C,,,,, +9-3-2-U-C,9-3-2,U,C,2,recognize the difference between a local/global extreme by interpreting the graph of a given function,,,9-3-2-U-C-pw-loc-glob-ext-1-jms.pg; dropdown; piecewise linear; ask about global max/min AND local max/min for two out of four interior singular points; does not ask about endpoints but they are included on the graph in the closed interval; combines code from 9-1-1-U-C-pw-loc-ext-1-jms.pg and 9-3-3-U-C-pw-glob-ext-1-jms.pg,9-3-2-U-C-loc-glob-ext-ms-cmm.pg; multiple select; evaluation of statements about global/local extrema on a closed interval of a graph of a function. SOLUTION NOT DONE YET,, +9-3-4-U-C,9-3-4,U,C,2,identify a global maxumum/minimum given the graph of the derivative of a function,,,9-3-4-U-C-pw-der-glob-ext-jms.pg; dropdown; piecewise graph with one critical point; determine extrema type of critical point (could be neither); determine if global max/min occur at a critical point or endpoint,,, +9-4-3-Ap-C,9-4-3,Ap,C,3,implement the Closed Interval Method to find the absolute extrema of a continuous function on a closed interval,,,9-4-3-Ap-C-closed-int-jms-1.pg; numeric; cubic; one critical point in the interval and one outside; find the location and value of the global extrema,9-4-3-Ap-C-closed-int-jms-2.pg; numeric; xe^x type function; one critical point; find location and value of absolute max/min; HARD,, +9-5-1-An-C,9-5-1,An,C,4,translate a given optimization problem into an abstract mathematical problem; in particular: use a constraint to eliminate secondary variables in order to produce a single-variable optimization problem,,,"9-5-1-An-C-box-cost-jms.pg; dropdown and function; cost of box with a lid; indicate ""minimize""; identify constraint; find cost as function of one variable",9-5-1-An-C-fence-set-up-jms.pg; dropdown and function; indicate minimize; find perimeter as function of one variable,9-5-1-An-C-open-box-set-up-jms.pg; dropdown and function; box with an open top by cutting squares from a square sheet; no constraint; maxmimize,9-5-1-An-C-cylinder-set-up-jms.pg; dropdown and function; indidicate minimize surface area; set up function to minimize the amount of material used for a cylinder of a fixed volume +9-5-2-Ap-C,9-5-2,Ap,C,5,solve optimization word problems,,,9-5-2-Ap-C-box-cost-full-jms.pg; numeric; solve a version of 9-5-1-An-C-box-cost-jms.pg with a reworded context; four versions with simplified numbers from an old 249 midterm exam 2021,9-5-2-Ap-C-fence-full-jms.pg; numeric; solvea version of the problem 9-5-1-An-C-fence-set-up-jms.pg so that critical values are integers; ask for the minimum amount of fencing (the minimum value instead of the dimensions),9-5-2-Ap-C-open-box-full-jms.pg; numeric; ask for maximum volume and the critical point; solving the problem 9-5-1-An-C-open-box-set-up-jms.pg,9-5-2-Ap-C-cylinder-cost-jms.pg; numeric; given cost function and fixed volume of a cylindrical container; find radius of the cylinder that minimizes the cost function +9-5-3-An-C,9-5-3,An,C,4,interpret the results of optimization proceedures into an answer to a given optimization problem,,,,,, +9-1-2-U-C,9-1-2,U,C,2,identify a local maxumum/minimum given the graph of the derivative of a function,,,9-1-2-U-C-pw-der-ext-1-jms.pg; dropdown; piecewise graph given with three critical points; choose local max/min/neither for each point and include justification about the funciton increasing/decreasing to the left/right of the critical point on specific intervals; uses code from 8-1-3-U-C-pw-der-inc-dec-2-jms.pg,"9-1-2-U-C-pw-der-ext-2-no-int-jms.pg; dropdown; same critical points, etc. as 9-1-2-U-C-pw-der-ext-1-jms.pg; however, does not ask for increasing/decrasing justification; instead asks students to identify that the three points are all critical points (since they are looking at the graph of the derivative)",, +9-3-3-U-I,9-3-3,U,I,2,identify a global maximum/minimum given the graph of the original function,,,9-3-3-U-C-pw-glob-ext-1-jms.pg; dropdown; piecewise linear function on closed interval; choose global max or global min / neither for random subset of one endpoint and two interior singular points,,, +9-5-4-E-I,9-5-4,E,I,4,communicate an approach to solving an optimization problem and the results of the process to an appropriate audience,,,,,, +9-2-2-R-I,9-2-2,R,I,1,state the definition of a singular point,,,9-2-1-R-C-crit-sing-def-jms.pg; identify difference between critical and singular points from their definitions; uses local maximum and local minimum as distractors,,, +9-2-3-U-I,9-2-3,U,I,2,recognize that local extrema occur at critical/singular points but that not all critical/singular points are local extrema,"The problems first two problems for 9-1-2-U-C touch on this outcome (for critical points), depending on the randomization...",,9-2-3-U-I-crit-sing-tf-jms.pg; dropdown; true or false; two statements about the relationship between critical/singular points and local extrema; both are false,"9-2-3-U-I-fermat-evt-jms.pg; dropdown; if you have a local max, then crit or sing; if you have global max on closed interval, then crit/sing/endpoint.",, +10-0-0-I,10-0-0,,I,,"state the Mean Value Theorem, interpret the statement of the theorem in terms of ""rates of change"" and ""slope"", and solve problems using the MVT","High-level outcome (for course outline); short name: #10-0-0-I; MVT; WeBWork Quiz for 10-0-0-I will consist of one problem from 10-0-2-U-C, two problems from 10-1-1-Ap-C (one upper/lower and one big/small), one problem from 10-1-2-Ap-C, and one problem from 10-0-1-R-I",,No. of 10-0-0-C problems --- >>>,13,, +10-2-0-E-A,10-2-0,E,A,4,"use the Mean Value Theorem, and Intermediate Value Theorem, to make conclusions about the existence/number of roots of a differentiable function","""Show there is exactly one real root ---""",,,,, +10-0-2-U-C,10-0-2,U,C,2,"interpret the statement of the Mean Value Theorem in terms of ""rates of change"" and ""slope""",,,10-0-2-U-C-mvt-meaning-1-jms.pg; numeric and drop down; calculate average rate of change and indicate that instantaneous rate of change must euqal this also with quantifier; uses context of reaction rate from 6-1-0-U-C-reaction-dd-jms.pg,10-0-2-U-C-mvt-meaning-2-jms.pg; drop down and numeric; indicate that information provided allows computation of average velocity; indicate that mean value theorem is a statement about the instantaneous velocity; use similar context to 6-1-0-U-C-vel-acc-dd-jms.pg,"10-0-2-U-C-mvt-meaning-3-jms.pg; numeric and drop down; given points find function values, slope of secant line, and interpret mean value theorem.","10-0-2-U-C-mvt-meaning-4-jms.pg; numeric and drop down; given point, slope of secant line, and second x-value; find funciton values, equation of secant line, indicate interval on wich MVT applies and indidicate parallell lines have equal slopes" +10-1-1-Ap-C,10-1-1,Ap,C,3,use the Mean Value Theorem to find upper/lower limits for values of a function given upper/lower limits on the derivative,,,10-1-1-Ap-C-mvt-upper-lower-1-jms.pg; dropdown and numeric; choose that MVT applies; given upper and lower bounds on f'(x) find upper and lower bounds for f(a),10-1-1-Ap-C-mvt-upper-lower-2-jms.pg; dropdown and numeric; choose that MVT applies; given upper and lower bounds on f'(x) find upper and lower bounds for f(b),10-1-1-Ap-C-mvt-big-small-1-jms.pg; numeric; given value of f(b) and upper/lower limits on f'(x) find the largest/smallest value of f(a) (versioned on biggest/smallest); ask for funciton that achieves this value,10-1-1-Ap-C-mvt-big-small-2-jms.pg; numeric; given value of f(a) and upper/lower limits on f'(x) find the largest/smallest value of f(a) (versioned on biggest/smallest); ask for funtion that achieves this value +10-1-2-Ap-C,10-1-2,Ap,C,3,use the Mean Value Theorem to solve practical problems about rates of change,Need unit conversions to solve this problem; then students compare a computed average to a given limit/record to determin if MVT can help give a conclusion,,"10-1-2-Ap-C-mvt-speeding-tickets-jms.pg; find average velocity for a car trip, compare to a speed limit and attempt to use the MVT to determine if they were speeding or not. Sometimes no determination can be made since average speed is lower than the posted limit.",10-1-2-Ap-C-mvt-solar-jms.pg; find average velocity for a test vehicle compare to a record speed and attempt to use the MVT to determine if the record was broke. Sometimes no determination can be made since average speed is lower than the record.,"10-1-2-Ap-C-mvt-sound-jms.pg; same idea as other problems, but requires coverting kilometers/minute to metres/second as well", +10-0-1-R-I,10-0-1,R,I,1,precisely state the Mean Value Theorem,,,10-0-1-R-I-state-mvt-jms.pg; dropdown and numeric; complete statement of MVT for a specific interval and an unknown function,10-0-1-R-I-state-mvt-spec-jms.pg; dropdown and numeric; complete specific statement of MVT for a polynomial function,, +11-0-0-C,11-0-0,,C,,"state the definition of an antiderivative of a function, explain the relationship between antiderivatives, and compute antiderivatives of common functions",High-level outcome (for course outline); short name: #11-0-0-C; antiderivatives,,No. of 11-0-0-C problems --- >>>,21,, +11-2-4-E-A,11-2-4,E,A,4,justify that two antiderivatives differ by a constant by using the Mean Value Theorem,,,,,, +11-1-1-An-C,11-1-1,An,C,4,determine if a given function is an antiderivative of another,multiselect questions here also cover 11-2-1-R-C,,11-1-1-An-C-anti-der-ms-1-jms.pg; multiselect; find all antiderivatives of x^3 + sin(x) + b,11-1-1-An-C-anti-der-ms-2-jms.pg; multiselect; find all antiderivatives of 1/sqrt(x) and cos(x),11-1-1-An-C-anti-mc-1-jms.pg; multiple choice; find antiderivative with e^x and 1/x, +11-1-0-R-C,11-1-0,R,C,1,state the definition of the antiderivative of a function,,,11-1-0-R-C-anti-der-defn-jms.pg; dropdown; given equation f'(x) = g state relationship between two functions; two different orders randomized,,, +11-1-2-Ap-C,11-1-2,Ap,C,3,"compute the antiderivative of a given function (polynomial, exp, trigonometric)",Without requiring substitution,,"11-1-2-Ap-C-fcn-anti-der-1-jms.pg; function; power of x, e^(-x), cos(x)","11-1-2-Ap-C-fcn-anti-der-2-jms.pg; function; x^2 or x^3, 1/x, sin(x)",11-1-2-Ap-C-fcn-anti-der-3-jms.pg; function; sqrt(x) and sec^2(x), +11-2-1-R-C,11-2-1,R,C,1,recognize that two antiderivatives only differ by a constant,11-1-1-An-C ms problems also include this aspect,,11-2-1-R-C-two-anti-der-1-jms.pg; dropdown; given two abstract antiderivatives indicate what F-G and F'-G' are equal to; random order of bullets,,, +11-2-2-U-C,11-2-2,U,C,2,"explain what the fact that ""two antiderivatives differ by a constant"" means graphically",,,11-2-2-U-C-two-anti-der-gph-jms.pg; dropdown; given two different antiderivatives'; indicate that they will have the same slope for each x but different y-intercpepts,,, +11-2-3-U-C,11-2-3,U,C,2,"explain what the fact that ""two antiderivatives differ by a constant"" means algebraically",,,11-2-3-U-C-two-anti-der-mc-jms.pg; multiple choice; choose best statement (with quantifiers) that reprsens what it menas for two antiderivatives to differ by a constant,,, +11-4-1-An-C,11-4-1,An,C,4,recognize when a practical problem requires a derivative or an antiderivative to be solved,Covered by 3-6-0-Ap-I above (two problems),,,,, +11-5-1-Ap-C,11-5-1,Ap,C,3,implement integration by substitution to evaluate antiderivatives of composite functions,,,11-5-1-Ap-C-sub-anti-der-1-jms.pg; function; indicate best subsitution to make and evaluate indefinite integral (large power of binomial),"11-5-1-Ap-C-sub-anti-der-2-jms.pg; function; indicate best substiution, differential and evaluate indefinite integral (large power of sin or cos)","11-5-1-Ap-C-sub-anti-der-3-jms.pg; function; indicate best substitution, differential and evaluate indefinite integral (square root of e^x + b or ln(x) + b)",11-5-1-Ap-C-sub-anti-der-4-mc-jms.pg; multiple choice; u-sub with unknown function +11-5-2-U-C,11-5-2,U,C,2,explain the relationship between the chain rule and integration by substitution,,,11-5-2-U-C-chain-sub-jms.pg; dropdown; indidiate that substitution is antiderivative version of chain rule,,, +11-5-4-Ap-C,11-5-4,Ap,C,3,compute the differential of a given function ,,,11-5-4-Ap-C-dx-1-jms.pg; function; given exp and trig function; compute du with chain rule; dx added as a varible so the learner must include it,11-5-4-Ap-C-dx-2-jms.pg; function; product rule and chain rule with ln; compute du with chain rule; dx added as a varible so the learner must include it,11-5-4-Ap-C-dx-3-jms.pg; function; square root of polynomial; compute du with chain rule; dx added as a varible so the learner must include it, +11-3-1-Ap-I,11-3-1,Ap,I,3,solve initial value problems given information about the second derivative of a function,,,"11-3-1-Ap-I-ivp-1-jms.pg; function; given f''(x), f'(0) and f(0) find f(x); f''(x) = asin(x) +bcos(x)","11-3-1-Ap-I-ivp-2-jms.pg; function; given f''(x), f'(0) and f(0) find f(x); f''(x) = ae^x +be^(-x)","11-3-1-Ap-I-ivp-3-jms.pg; function; given f'(x) and f(a), find f(x); a*sqrt(x) + b/sqrt(x)", +11-5-3-R-I,11-5-3,R,I,1,state the definition of the differential of a function,Related to 4-3-1-Ap-I; differential approximation; Need to know this in order to complete 11-5-4-Ap-C outcomes,,,,, +12-0-0-C,12-0-0,,C,,explore the process of estimating areas under the graph of a function and develop the definition of the Riemann integral,High-level outcome (for course outline); short name: #12-0-0-C; area,,No. of 12-0-0-C problems --- >>>,14,Make 3 each here!, +12-1-1-R-A,12-1-1,R,A,1,state the precise definition of the Riemann integral of a continuous function,,,,,, +12-1-3-U-A,12-1-3,U,A,2,recognize when a given limit of a sum is the definite integral of a function,,,,,, +12-1-2-U-C,12-1-2,U,C,2,state the intuitive interpretation of the definite integral in terms of areas,,,"12-1-2-U-C-def-int-idea-1-jms.pg; multiple choice; does not use the phrase ""net area""",12-1-2-U-C-def-int-idea-2-jms.pg; multiple choice; asks about |f(x)|,12-1-2-U-C-application-1-jms.pg; interpret meaning of definite integral, +12-2-1-An-C,12-2-1,An,C,4,"interpret the definite integral on an interval [a, x] as a function of x",,,12-2-1-An-C-area-function-1-jms.pg; dropdown and numeric; indicate that A(x) is a funciton of x and find two of its values given a graph of f,"12-2-1-An-C-area-function-2-jms.pg; dropdown and numeric; integral of absolute value; indicate that A(x) is a function of x, and find two of its values given graph of f",, +12-3-1-Ap-C,12-3-1,Ap,C,3,evaluate the definite integral of a function given the graph of the function,,,12-3-1-Ap-C-area-graph-1-jms.pg; numeric; given piecewise linear function; evaluate four definite integrals; one right-to-left; all with same lower limit of integration,"12-3-1-Ap-C-area-graph-2-jms.pg; numeric; piecewise linear graph with regions that are triangles, rectangles, or a triangle + rectangle; evaluate two definite integral",12-3-1-Ap-C-area-graph-3-jms.pg; numeric; piecewise with a quarter circle; ask for quarter circle only and one other integral which involves using 5-sub-interval, +12-3-2-Ap-C,12-3-2,Ap,C,3,evaluate the definite integral of a piecewise function (without the fundamental theorem of calculus),,,12-3-2-Ap-C-pw-def-no-ftc-1-jms.pg; numeric; function is linear and semicircle (both either pos/neg); solution evaluates with a graph; requires area as a rectangle + triangle and quarter circle,12-3-2-Ap-C-pw-def-no-ftc-2-jms.pg; numeric; peicewise function; graph is linear wtih y-int 0 and semicricle with centre on x-axis; requires triangle and half-circle area,12-3-2-Ap-C-pw-def-no-ftc-3-jms.pg; numeric; peicewise function; graph is piecewise linear; one part horizontal; one with nonzero slope; function changes definition at nonzero point (EASIER!), +12-3-4-An-C,12-3-4,An,C,4,calculate definite integrals using properties of the integral and given limited information about other integrals,,,12-3-4-An-C-abstract-int-1-jms.pg; numeric; find two definite integrals of one function using given integrals; just about manipulating intervals and splitting up integrals; scaffolded,12-3-4-An-C-abstract-int-2-jms.pg; numeric; find two definite integrals; given information about one function; second involves a scalar multiple and a constant function; scaffolded order,12-3-4-An-C-abstract-int-3-jms.pg; numeric; given information about two functions; find integrals of linear combinations; one uses two integrals given directly; the second involves splitting the two integrals up in to different ways but only as a to b and b to c and adding, +12-3-3-Ap-I,12-3-3,Ap,I,3,evaluate the definite integral of odd/even functions by using symmetry,,,,,, +13-0-0-C,13-0-0,,C,,state the Fundamental Theorem of Calculus and explore/demonstrate the relationship between differentiation and integration,High-level outcome (for course outline); short name: #13-0-0-C; FTC,,No. of 13-0-0-C problems --- >>>,34,, +13-4-1-Ap-A,13-4-1,Ap,A,3,apply the FTC and earlier knowledge to determine intervals of increase/decrease of functions presented as integrals,,,13-4-1-Ap-A-ftc-increase-decrease-AT.pg,,, +13-4-2-Ap-A,13-4-2,Ap,A,3,apply the FTC and earlier knowledge to determine intervals of concavity of functions presented as integrals,,,13-4-2-Ap-A-ftc-concavity-AT.pg,,, +13-4-3-Ap-A,13-4-3,Ap,A,3,apply the FTC and the First Derivative Test to find local extrema of functions presented as integrals,,,,,, +13-4-4-Ap-A,13-4-4,Ap,A,3,apply the FTC and the Closed Interval Method to find global extrema of functions presented as integrals on a closed interval,,,13-4-4-Ap-A-ftc-closed-interval-method-AT.pg,,, +13-4-G-Ap-A,,,,,Folder containing questions for next four graph-based FTC learning outcomes,,,,,, +13-4-1G-Ap-A,13-4-1G,Ap,A,3,apply the FTC and earlier knowledge to determine intervals of increase/decrease of functions presented as integrals WITH INTEGRAND GIVEN AS A GRAPH,In folder 13-4-G-Ap-A,,13-4-1G-Ap-A-int-graph-inc-dec-1-jms.pg; drop down; for each interval choose increasing or decreasing'; graph is piecewise linear; rewritten version of 12-3-1-Ap-C-area-graph-1-jms.pg,13-4-1G-Ap-A-int-graph-inc-dec-2-jms.pg; rewritten version of 8-1-3-U-C-der-cubic-inc-dec-jms.pg,, +13-4-2G-Ap-A,13-4-2G,Ap,A,3,apply the FTC and earlier knowledge to determine intervals of concavity of functions presented as integrals WITH INTEGRAND GIVEN AS A GRAPH,In folder 13-4-G-Ap-A,,13-4-2G-Ap-A-int-graph-concave-1-jms.pg; dropdown; rewritten version of 8-2-4-U-I-pw-frst-der-concave-jms.pg,13-4-2G-Ap-A-int-graph-concave-2-jms.pg; interval; rewritten versionof 8-2-4-U-I-cubic-first-der-concave-jms.pg,, +13-4-3G-Ap-A,13-4-3G,Ap,A,3,apply the FTC and the First Derivative Test to find local extrema of functions presented as integrals WITH INTEGRAND GIVEN AS A GRAPH,In folder 13-4-G-Ap-A,,13-4-3G-Ap-A-loc-ext-int-graph-1-jms.pg; drop down; rewritten version of 9-1-2-U-C-pw-der-ext-2-no-int-jms.pg,,, +13-4-4G-Ap-A,13-4-4G,Ap,A,3,apply the FTC and the Closed Interval Method to find global extrema of functions presented as integrals on a closed interval WITH INTEGRAND GIVEN AS A GRAPH,In folder 13-4-G-Ap-A,,13-4-4G-Ap-A-ftc-closed-int-jms-1.pg; numeric; piecewise linear; 3 critical points; find value of global max and global min (not x-values); rewritten version of 12-3-1-Ap-C-area-graph-1-jms.pg,13-4-4G-Ap-A-ftc-closed-int-jms-2.pg; numeric; rewritten version of 12-3-1-Ap-C-area-graph-2-jms.pg,, +13-0-1-R-C,13-0-1,R,C,1,state the Fundamental Theorem of Calculus (FTC),,,13-0-1-R-C-state-ftc-jms.pg; dropdown and numeric; indicate partial area function is an anitiderivative; indicate that any antiderivative can be used for computing definite integrals.,,, +13-0-2-C-C,13-0-2,C,C,N/A,"demonstrate the relationship between differentiation and integration by using examples (e-g-, f(x) = x, f(x) = x^2)",,,13-0-2-C-C-cpt-anti-der-int-jms-1.pg; function; evaluate explicit antierivative given in terms of integrals; evaluate derivative of integral; integrand is binomial quadratic or linear,13-0-2-C-C-cpt-anti-der-int-jms-2.pg; same question with trig and exponential,, +13-1-1-Ap-C,13-1-1,Ap,C,3,apply the FTC to evaluate definite integrals of polynomial functions,,,13-1-1-Ap-C-poly-definite-jms-1.pg; numeric; evaluate two definite integrals of polynomial functions; one binomial and one trinomial,13-1-1-Ap-C-poly-definite-jms-2.pg; same question with powers and intervals slightly adjusted,, +13-1-2-Ap-C,13-1-2,Ap,C,3,apply the FTC to evaluate definite integrals of exponential functions,,,"13-1-2-Ap-C-exp-definite-jms-1.pg; evaluate to integrals of exponential functions; one e^x + c, one e^x + e^-x",13-1-2-Ap-C-exp-ln-definite-jms-2.pg; exp and log (integral of 1/x); modified from ver 1,, +13-1-3-Ap-C,13-1-3,Ap,C,3,apply the FTC to evaluate definite integrals of trigonometric functions,,,"13-1-3-Ap-C-trig-definite-jms-1.pg; integral of Acos+B and Asin+Bcos, first quardrant special angles only, second from 0 to positive angle","13-1-3-Ap-C-trig-definite-jms-2.pg; integral of Acos and Asin first quardrant special angles only, first - to + (symmetric); second from 0 to positive angle",, +13-1-4-Ap-C,13-1-4,Ap,C,3,apply the FTC to evaluate definite integrals of piecewise functions,,,13-1-4-Ap-C-pw-def-int-1-jms.pg; numeric; linear function and scalar multiple of square root,13-1-4-Ap-C-pw-def-int-2-jms.pg; numeric; polynomial and 1/sqrt(x) + const,13-1-4-Ap-C-pw-def-int-3-jms.pg; numeric; exponential and cos,13-1-4-Ap-C-pw-def-int-4-jms.pg; numeric; exponential(-x) and sin +13-2-1-Ap-C,13-2-1,Ap,C,3,apply the FTC and integration by substitution to evalute definite integrals,,,13-2-1-Ap-C-definite-sub-jms-1.pg; numeric; e^sqrt(x)/sqrt(x) and (ln(x) + r)^2/x,13-2-1-Ap-C-definite-sub-jms-2.pg; numeric; xcos(x^2+a) and cos(x)sqrt(sin(x)),13-2-1-Ap-C-definite-sub-jms-3-abstract.pg; numeric; uknown function; use substitution twice to relate to given integrals, +13-2-2-U-C,13-2-2,U,C,2,recognize that the limits of integration in a definite integral change when using a substitution,,,"13-2-2-U-C-def-sub-mc-1-jms.pg; multiple choice; u=ax+b; integrand is unknown function; simple distractors (error in differential, not changing limits)",13-2-2-U-C-def-sub-mc-2-jms.pg; multiple choice; u = ax^2 and unknown function,13-2-2-U-C-def-sub-mc-3-jms.pg; multiple choice; u = sin(x) with square root of sin^2+b,13-2-2-U-C-def-sub-mc-4-jms.pg; multiple choice; u = ln(x) + b with squre root of ln(x) + b +13-3-1-Ap-I,13-3-1,Ap,I,3,apply the FTC to compute derivatives of functions presented as integrals,,,13-3-1-Ap-I-der-int-jms-1.pg; function; derivative of a definite and intedefinite integral; cannot integrate either of the functions presented with MATH 249 techniques,13-3-1-Ap-I-der-int-jms-2.pg; function; derivative of a definite and intedefinite integral; cannot integrate either of the functions presented with MATH 249 techniques; order reversed from other verson,, +13-3-2-Ap-I,13-3-2,Ap,I,3,apply the FTC and the chain rule to compute derivatives of functions presented as integrals,,,13-3-2-Ap-I-ftc-chain-1-jms.pg; function; one is with x^2 and the other has x in upper and lower limits of integration,"13-3-2-Ap-I-ftc-chain-2-jms.pg; function; one has e^x as upper limit, the second requires chain rule twice",, +14-0-0-C,14-0-0,,C,,"define and identify improper integrals, evaluate two types of improper integrals by direct computation and comparison",High-level outcome (for course outline); short name: #14-0-0-C; improper integrals,,No. of 14-0-0-C problems --- >>>,9,, +14-2-2-Ap-A,14-2-2,Ap,A,3,use the Comparison Test to evaluate the convergence/divergence of explicit improper integrals,,,14-2-2-Ap-A-use-comparison-test-AT.pg,,, +14-0-1-R-C,14-0-1,R,C,1,identify an integral as being improper because it is over an infinite interval,,,14-0-1-R-C-infinite-interval-AT.pg,,, +14-0-2-U-C,14-0-2,U,C,2,identify an integral as improper because the function has a vertical asymptote in the domain of integration (algebraically),,,14-0-2-U-C-asymptote-algebraic-AT.pg,,, +14-0-3-U-C,14-0-3,U,C,2,identify an integral as improper because the function has a vertical asymptote in the domain of integration (graphically),,,14-0-3-U-C-asymptote-graphic-2-AT.pg,,, +14-0-4-R-I,14-0-4,R,I,1,state the definition of convergence/divergence for an improper integral,,,14-0-4-R-I-improper-conv-div-AT.pg;,,, +14-1-1-Ap-I,14-1-1,Ap,I,3,compute improper integrals over an infinite interval,,,14-1-1-Ap-I-compute-improper-int-inf-AT.pg,,, +14-1-2-Ap-I,14-1-2,Ap,I,3,compute improper integrals over a finite interval where a function has a vertical asymptote,,,14-1-2-Ap-I-compute-improper-int-AT.pg; ,,, +14-2-1-R-I,14-2-1,R,I,1,state the Comparison Test for improper integrals,,,14-2-1-R-I-comparison-test-def-AT.pg,,, +14-2-3-Ap-I,14-2-3,Ap,I,3,use the Comparison Test to evaluate the convergence/divergence of abstract improper integrals,,,14-2-3-Ap-I-abstract-comparison-test-AT.pg,,, \ No newline at end of file diff --git a/Contrib/UCalgary/README.md b/Contrib/UCalgary/README.md new file mode 100644 index 0000000000..e039c6d07e --- /dev/null +++ b/Contrib/UCalgary/README.md @@ -0,0 +1,21 @@ +# Specifications-Calculus-WeBWork-2026 +WeBWork assessments linked to detailed learning outcomes for introductory calculus. This work was financially supported by a University of Calgary Teaching & Learning Grant (2404-119 Transforming Assessment: Specifications Grading in First-Year Calculus). + +Contact jerrod.smith@ucalgary.ca. + +This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License + http://creativecommons.org/licenses/by-nc-sa/4.0/ + +WeBWork users may use and copy material in this repository under the following license conditions: + +- Attribution: Users must give appropriate credit in the source code, provide a link to this repository, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. +- NonCommercial: Users may not use the material for commercial purposes. +- ShareAlike: If users remix, transform, or build upon the material, users must only distribute their contributions under the same license as the original. + +Material within this repository (UCalgary/) may only be modified by users: smith36j and dlglin. + +MATH_249_Revised_Learning_Outcomes_F25.csv contains detailed learning outcomes, classification based on Bloom's taxonomy and the WeBWork problem classification scheme. Course learning outcomes (CLOs) are used to organize and name WeBWork problems. + + MATH_249_CLO_(High-level).rtf contain course learning outcomes (CLOs) used to organize assessments. + + Folders 249-N-0-0-C/I contain WeBWork problems. Folder and file names correspond to course learning outcomes.