From 3a33498145a85d0a616f49fb5876a6d2ad1d3153 Mon Sep 17 00:00:00 2001 From: Branden Stone Date: Sat, 9 Jan 2016 17:58:09 -0800 Subject: [PATCH 1/3] added development files --- .../Preview_5_5/preview_5_5_a.pg | 272 ++++++++++++++++++ .../Preview_5_5/preview_5_5_b.pg | 80 ++++++ .../Preview_5_5/preview_5_5_c.pg | 80 ++++++ .../Preview_5_5/preview_5_5_d.pg | 79 +++++ .../Preview_6_5/preview_6_5_abcde.pg | 119 ++++++++ .../Preview_7_1/preview_7_1_abcdefg.pg | 101 +++++++ .../Preview_7_2/preview_7_2_abcde.pg | 103 +++++++ .../Preview_7_3/preview_7_3_abcde.pg | 108 +++++++ .../Preview_7_4/preview_7_4_abcd.pg | 86 ++++++ .../Preview_7_5/preview_7_5_a.pg | 80 ++++++ .../Preview_7_5/preview_7_5_b.pg | 89 ++++++ .../Preview_7_6/preview_7_6_abcdef.pg | 102 +++++++ .../Preview_8_1/preview_8_1_abcd.pg | 1 + .../Preview_8_2/preview_8_2_abcdef.pg | 1 + .../Preview_8_3/preview_8_3_ab.pg | 1 + .../Preview_8_4/preview_8_4_ab.pg | 1 + .../Preview_8_5/preview_8_5_ab.pg | 1 + .../Preview_8_6/preview_8_6_abcdefg.pg | 1 + 18 files changed, 1305 insertions(+) create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_a.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_b.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_c.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_d.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_6_5/preview_6_5_abcde.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_7_1/preview_7_1_abcdefg.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_7_2/preview_7_2_abcde.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_7_3/preview_7_3_abcde.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_7_4/preview_7_4_abcd.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_7_5/preview_7_5_a.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_7_5/preview_7_5_b.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_7_6/preview_7_6_abcdef.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_1/preview_8_1_abcd.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_2/preview_8_2_abcdef.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_ab.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_ab.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_5/preview_8_5_ab.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_6/preview_8_6_abcdefg.pg diff --git a/Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_a.pg b/Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_a.pg new file mode 100644 index 0000000000..ece9bf6b76 --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_a.pg @@ -0,0 +1,272 @@ +##-*- perl -*- ## +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject('Calculus - single variable') +## DBchapter('Integrals') +## DBsection('Antiderivatives') +## KEYWORDS('integral', 'Antiderivatives') +## TitleText1('Active Calculus') +## EditionText1('2015') +## AuthorText1('Matthew Boelkins') +## Section1('5.5') +## Problem1('Preview Activity 5.5abcd') +## Author('Branden Stone') +## Institution('Adelphi University') + + +DOCUMENT(); +loadMacros( +## Required Macros +"PGstandard.pl", +"MathObjects.pl", +"PGcourse.pl", +## Problem Macros +"PGessaymacros.pl", +"PGchoicemacros.pl", +"parserPopUp.pl", +"niceTables.pl", +); + + +# Uncomment to eliminate partial credit +# install_problem_grader(~~&std_problem_grader); + +# 0 does not show correct answers and 1 does show them +$showPartialCorrectAnswers = 1; + + +###################################### +## Set-Up for the questions +###################################### +Context("Numeric"); + +@menuChoice = ("u-Sub","By Parts","Combo","Neither"); +$menuList = ["?",$menuChoice[0],$menuChoice[1],$menuChoice[2],$menuChoice[3]]; + +@mc =(PopUp($menuList,$menuChoice[0]), + PopUp($menuList,$menuChoice[1]), + PopUp($menuList,$menuChoice[2]), + PopUp($menuList,$menuChoice[3]) +); + +@indexA = shuffle(4); +@intA = ( + "\(\displaystyle \int x^2 \sin(x^3) \, dx\)", # u-sub + "\(\displaystyle \int x^2 \sin(x) \, dx\)", # by parts + "\(\displaystyle \int \sin(x^3) \, dx\)", # neither + "\(\displaystyle \int x^5 \sin(x^3) \, dx\)" # combo + ); + +@indexB = shuffle(4); +@intB = ( + "\(\displaystyle \int \frac{1}{1+x^2} \, dx\)", # neither + "\(\displaystyle \int \frac{x}{1+x^2} \, dx\)", # u-sub + "\(\displaystyle \int \frac{2x+3}{1+x^2} \, dx\)", # neither + "\(\displaystyle \int \frac{e^x}{1+(e^x)^2} \, dx\)" # u-sub + ); + +@indexC = shuffle(4); +@intC = ( + "\(\displaystyle \int x \ln(x) \, dx\)", # by parts + "\(\displaystyle \int \frac{\ln(x)}{x} \, dx\)", # u-sub + "\(\displaystyle \int \ln(1+x^2) \, dx\)", # neither + "\(\displaystyle \int x\ln(1+x^2) \, dx\)" # combo + ); + +@indexD = shuffle(4); +@intD = ( + "\(\displaystyle \int x \sqrt{1-x^2} \, dx\)", # u-sub + "\(\displaystyle \int \frac{1}{\sqrt{1-x^2}} \, dx\)", # neither + "\(\displaystyle \int \frac{x}{\sqrt{1-x^2}}\, dx\)", # by parts + "\(\displaystyle \int \frac{1}{x\sqrt{1-x^2}} \, dx\)" # neither + ); + + +## Attempts at automating the process of creating the drop down menu. +## I got tired of trying, I guess I need to learn perl. + +#$mml = "?"; +#for $n (@menuChoice) { +# $mml= $mml.",".$n; +#}; +#$mmLL = [$mml]; + +#@mmc = (); +#for $popupMenu (@menuChoice) { +# push @mmc, PopUp($mmLL,$popupMenu); +#}; + + +#@ml = ("?"); +#for $n (@menuChoice) { +# push @ml, $n; +#} +#$mLL = join(",",@ml); + +#@mcc = (); +#for $popupMenu (@menuChoice) { +# push @mcc, "PopUp([".$mLL."],".$popupMenu.")"; +#}; + +#for ($i = 1; $i <= 4; $i++) { +# $menuList[$i] = $menuChoice[$i-1]; +#}; + +#@indexNum = qw(0 1 2 3); +#@mc =PopUp($menuList,$menuAns[$indexNum]); + + +###################################### +## Begin Problem +###################################### + + +TEXT(beginproblem()); + +Context()->texStrings; +BEGIN_TEXT +$PAR +For each of the indefinite integrals below, the main question is to decide whether +the integral can be evaluated using \(u\)-substitution, integration by parts, a +combination of the two, or neither. +$PAR +For integrals for which your answer is affirmative (\(u\)-sub, by parts, combo), state +the substitution you would use. It is not necessary to actually evaluate +any of the integrals completely, unless the integral can be evaluated immediately +using a familiar basic antiderivative. +$PAR +\{ +LayoutTable ( +[ + ["TABLE A" , "Method", "\(u = \)" , "\(dv = \)"], + ["$intA[0]", $mc[0]->menu(), ans_rule, ans_rule], + ["$intA[1]", $mc[1]->menu(), ans_rule, ans_rule], + ["$intA[2]", $mc[3]->menu(), ans_rule, ans_rule], + ["$intA[3]", $mc[2]->menu(), ans_rule, ans_rule], +], +align => '|l|c|c|c|', +midrules => 1, + ); +\} + +$PAR$BR$BR + In TABLE B, assume you know the antiderivative of \(\tan^{-1}(x)\). Further, answer the questions without doing any simple algebraic manipulations. + +\{ +LayoutTable ( +[ + ["TABLE B" , "Method", "\(u = \)" , "\(dv = \)"], + ["$intB[0]", $mc[3]->menu(), ans_rule, ans_rule], + ["$intB[1]", $mc[0]->menu(), ans_rule, ans_rule], + ["$intB[2]", $mc[3]->menu(), ans_rule, ans_rule], + ["$intB[3]", $mc[0]->menu(), ans_rule, ans_rule], +], +align => '|l|c|c|c|', +midrules => 1, + ); +\} + +$PAR$BR$BR + +\{ +LayoutTable ( +[ + ["TABLE C" , "Method", "\(u = \)" , "\(dv = \)"], + ["$intC[0]", $mc[1]->menu(), ans_rule, ans_rule], + ["$intC[1]", $mc[0]->menu(), ans_rule, ans_rule], + ["$intC[2]", $mc[3]->menu(), ans_rule, ans_rule], + ["$intC[3]", $mc[2]->menu(), ans_rule, ans_rule], +], +align => '|l|c|c|c|', +midrules => 1, + ); +\} + +$PAR$BR$BR + +\{ +LayoutTable ( +[ + ["TABLE D" , "Method", "\(u = \)" , "\(dv = \)"], + ["$intD[0]", $mc[0]->menu(), ans_rule, ans_rule], + ["$intD[1]", $mc[3]->menu(), ans_rule, ans_rule], + ["$intD[2]", $mc[1]->menu(), ans_rule, ans_rule], + ["$intD[3]", $mc[3]->menu(), ans_rule, ans_rule], +], +align => '|l|c|c|c|', +midrules => 1, + ); +\} + +$PAR + +END_TEXT + + +###################################### +## Compute Solutions +###################################### + +Context()->normalStrings; + +ANS( $mc[0]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( $mc[1]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( $mc[3]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( $mc[2]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + +ANS( $mc[3]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( $mc[0]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( $mc[3]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( $mc[0]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + +ANS( $mc[1]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( $mc[0]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( $mc[3]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( $mc[2]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + +ANS( $mc[0]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( $mc[3]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( $mc[1]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( $mc[3]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + + + + +ENDDOCUMENT(); + + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_b.pg b/Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_b.pg new file mode 100644 index 0000000000..a4dffffc2c --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_b.pg @@ -0,0 +1,80 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject('Calculus - single variable') +## DBchapter('Integrals') +## DBsection('Antiderivatives') +## KEYWORDS('integral', 'Antiderivatives') +## TitleText1('Active Calculus') +## EditionText1('2015') +## AuthorText1('Matthew Boelkins') +## Section1('5.1') +## Problem1('Preview Activity 5.1abc') +## Author('Branden Stone') +## Institution('Adelphi University') +## RESOURCES('preview_5_1.png') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGessaymacros.pl", +"PGcourse.pl", +); + +Context("Numeric"); + +$intInc = List( "(0,1.5),(4,6)" ); +$intDec = List( "(1.5,4)" ); + + +TEXT(beginproblem()); +$showPartialCorrectAnswers = 0; + +install_problem_grader(~~&std_problem_grader); #for correct behavior with essay +Context()->texStrings; +BEGIN_TEXT +$PAR +For each of the indefinite integrals below, the main question is to decide whether +the integral can be evaluated using \(u\)-substitution, integration by parts, a +combination of the two, or neither. For integrals for which your answer is affirmative, +state the substitution(s) you would use. It is not necessary to actually evaluate +any of the integrals completely, unless the integral can be evaluated immediately +using a familiar basic antiderivative. +$PAR +\(\displaystyle \int \frac{1}{1+x^2} \, dx\) \{ essay_box(1,25) \} +\(\displaystyle \int \frac{x}{1+x^2} \, dx\) \{ essay_box(1,25) \} +\(\displaystyle \int \frac{2x+3}{1+x^2} \, dx\) \{ essay_box(1,25) \} +\(\displaystyle \int \frac{e^x}{1+(e^x)^2} \, dx\) \{ essay_box(1,25) \} +$PAR + + + + + +END_TEXT +Context()->normalStrings; + +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + + + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR +This needs to be written up. +$PAR +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_c.pg b/Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_c.pg new file mode 100644 index 0000000000..f55f931581 --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_c.pg @@ -0,0 +1,80 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject('Calculus - single variable') +## DBchapter('Integrals') +## DBsection('Antiderivatives') +## KEYWORDS('integral', 'Antiderivatives') +## TitleText1('Active Calculus') +## EditionText1('2015') +## AuthorText1('Matthew Boelkins') +## Section1('5.1') +## Problem1('Preview Activity 5.1abc') +## Author('Branden Stone') +## Institution('Adelphi University') +## RESOURCES('preview_5_1.png') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGessaymacros.pl", +"PGcourse.pl", +); + +Context("Numeric"); + +$intInc = List( "(0,1.5),(4,6)" ); +$intDec = List( "(1.5,4)" ); + + +TEXT(beginproblem()); +$showPartialCorrectAnswers = 0; + +install_problem_grader(~~&std_problem_grader); #for correct behavior with essay +Context()->texStrings; +BEGIN_TEXT +$PAR +For each of the indefinite integrals below, the main question is to decide whether +the integral can be evaluated using \(u\)-substitution, integration by parts, a +combination of the two, or neither. For integrals for which your answer is affirmative, +state the substitution(s) you would use. It is not necessary to actually evaluate +any of the integrals completely, unless the integral can be evaluated immediately +using a familiar basic antiderivative. +$PAR +\(\displaystyle \int x \ln(x) \, dx\) \{ essay_box(1,25) \} +\(\displaystyle \int \frac{\ln(x)}{x} \, dx\) \{ essay_box(1,25) \} +\(\displaystyle \int \ln(1+x^2) \, dx\) \{ essay_box(1,25) \} +\(\displaystyle \int x\ln(1+x^2) \, dx\) \{ essay_box(1,25) \} +$PAR + + + + + +END_TEXT +Context()->normalStrings; + +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + + + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR +This needs to be written up. +$PAR +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_d.pg b/Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_d.pg new file mode 100644 index 0000000000..ad037a074f --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_d.pg @@ -0,0 +1,79 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject('Calculus - single variable') +## DBchapter('Integrals') +## DBsection('Antiderivatives') +## KEYWORDS('integral', 'Antiderivatives') +## TitleText1('Active Calculus') +## EditionText1('2015') +## AuthorText1('Matthew Boelkins') +## Section1('5.1') +## Problem1('Preview Activity 5.1abc') +## Author('Branden Stone') +## Institution('Adelphi University') +## RESOURCES('preview_5_1.png') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGessaymacros.pl", +"PGcourse.pl", +); + +Context("Numeric"); + +$intInc = List( "(0,1.5),(4,6)" ); +$intDec = List( "(1.5,4)" ); + + +TEXT(beginproblem()); +$showPartialCorrectAnswers = 0; + +install_problem_grader(~~&std_problem_grader); #for correct behavior with essay +Context()->texStrings; +BEGIN_TEXT +$PAR +For each of the indefinite integrals below, the main question is to decide whether +the integral can be evaluated using \(u\)-substitution, integration by parts, a +combination of the two, or neither. For integrals for which your answer is affirmative, +state the substitution(s) you would use. It is not necessary to actually evaluate +any of the integrals completely, unless the integral can be evaluated immediately +using a familiar basic antiderivative. +$PAR +\(\displaystyle \int x \sqrt{1-x^2} \, dx\) \{ essay_box(1,25) \} +\(\displaystyle \int \frac{1}{\sqrt{1-x^2}} \, dx\) \{ essay_box(1,25) \} +\(\displaystyle \int \frac{x}{\sqrt{1-x^2}}\, dx\) \{ essay_box(1,25) \} +\(\displaystyle \int \frac{1}{x\sqrt{1-x^2}} \, dx\) \{ essay_box(1,25) \} +$PAR + + + + +END_TEXT +Context()->normalStrings; + +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + + + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR +This needs to be written up. +$PAR +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_6_5/preview_6_5_abcde.pg b/Contrib/Westmont/ActiveCalculus/Preview_6_5/preview_6_5_abcde.pg new file mode 100644 index 0000000000..633fa99df6 --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_6_5/preview_6_5_abcde.pg @@ -0,0 +1,119 @@ +## -*- perl -*- ## +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject('Calculus - single variable') +## DBchapter('Integrals') +## DBsection('Antiderivatives') +## KEYWORDS('integral', 'Antiderivatives') +## TitleText1('Active Calculus') +## EditionText1('2015') +## AuthorText1('Matthew Boelkins') +## Section1('5.1') +## Problem1('Preview Activity 5.1abc') +## Author('Branden Stone') +## Institution('Adelphi University') +## RESOURCES('preview_5_1.png') + +DOCUMENT(); +loadMacros( +## Required Macros +"PGstandard.pl", +"MathObjects.pl", +"PGcourse.pl", +## Problem Macros +"PGessaymacros.pl", +); + +# Uncomment to eliminate partial credit +# install_problem_grader(~~&std_problem_grader); + +# 0 does not show correct answers and 1 does show them +$showPartialCorrectAnswers = 1; + +###################################### +## Answers to the questions +###################################### + +Context("Numeric"); + +$FF = Formula("-e^(-.25*x)"); +$F[0] = $FF->eval(x=>0); +$F[5] = $FF->eval(x=>5); +$F[10] = $FF->eval(x=>10); +$F[15] = $FF->eval(x=>15); +$F[20] = $FF->eval(x=>20); + +$int[5,10] = Compute($F[10]-$F[5]); +$int[10,20] = $F[20]-$F[10]; +$int[0,5]= $F[5]-$F[0]; +$int[0,10]= $F[10]-$F[0]; +$int[0,15]= $F[15]-$F[0]; +$int[0,20]= $F[20]-$F[0]; + +###################################### +## Begin Problem +###################################### + + +TEXT(beginproblem()); + +Context()->texStrings; +BEGIN_TEXT +$PAR + +A company with a large customer base has a call center that receives thousands of calls a day. After studying the data that represents how long callers wait for assistance, they find that the function \(p(t) = 0.25e^{-0.25t}\) models the time customers wait in the following way: the fraction of customers who wait between \(t = a\) and \(t = b\) minutes is given by +\[\int_a^b p(t) \, dt.\] +Use this information to answer the following questions. +$PAR +$BBOLD (a) $EBOLD The fraction of callers who wait between 5 and 10 minutes is \{ ans_rule \}.$BR +$PAR +$BBOLD (b) $EBOLD The fraction of callers who wait between 10 and 20 minutes is \{ ans_rule \}.$BR +$PAR +$BBOLD (c) $EBOLD Next, let us study the fraction who wait up to a certain number of minutes: +$BR +$BBOLD (i) $EBOLD What is the fraction of callers who wait between 0 and 5 minutes? $BR +Answer: \{ ans_rule \} +$PAR +$BBOLD (ii) $EBOLD What is the fraction of callers who wait between 0 and 10 minutes? $BR +Answer: \{ ans_rule \} +$PAR +$BBOLD (iii) $EBOLD Between 0 and 15 minutes? $BR +Answer: \{ ans_rule \} +$PAR +$BBOLD (iv) $EBOLD Between 0 and 20? $BR +Answer: \{ ans_rule \} +$PAR +$BBOLD (d) $EBOLD Let \(F(b)\) represent the fraction of callers who wait between \(0\) and \(b\) minutes. Find a formula for \(F(b)\) that involves a definite integral, and then use the First FTC to find a formula for \(F(b)\) that does not involve a definite integral. $BR +\{ essay_box(4,60) \} +$PAR +(e) What is the value of \(\displaystyle \lim_{b \to \infty} F(b)\)? Why? $BR +\{ essay_box(4,60) \} +$PAR + + +END_TEXT + +###################################### +## Grade Problem +###################################### + +Context()->normalStrings; + +ANS( $int[5,10]->cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + + + + + +ENDDOCUMENT(); + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_7_1/preview_7_1_abcdefg.pg b/Contrib/Westmont/ActiveCalculus/Preview_7_1/preview_7_1_abcdefg.pg new file mode 100644 index 0000000000..55a26dec28 --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_7_1/preview_7_1_abcdefg.pg @@ -0,0 +1,101 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject('Calculus - single variable') +## DBchapter('Integrals') +## DBsection('Antiderivatives') +## KEYWORDS('integral', 'Antiderivatives') +## TitleText1('Active Calculus') +## EditionText1('2015') +## AuthorText1('Matthew Boelkins') +## Section1('5.1') +## Problem1('Preview Activity 5.1abc') +## Author('Branden Stone') +## Institution('Adelphi University') +## RESOURCES('preview_5_1.png') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGessaymacros.pl", +"PGcourse.pl", +); + +Context("Numeric"); + +$intInc = List( "(0,1.5),(4,6)" ); +$intDec = List( "(1.5,4)" ); + + + +TEXT(beginproblem()); +$showPartialCorrectAnswers = 0; + +install_problem_grader(~~&std_problem_grader); #for correct behavior with essay +Context()->texStrings; +BEGIN_TEXT +$PAR +The position of a moving object is given by the +function \(s(t)\), where \(s\) is measured in feet and \(t\) in seconds. We +determine that the velocity is \(v(t) = 4t + 1\) feet per second. +$PAR +(a) How much does the position change over the time interval + \([0,4]\)? $BR +\{ essay_box(4,60) \} +$PAR +(b) Does this give you enough information to determine \(s(4)\), the + position at time \(t=4\)? If so, what is \(s(4)\)? If not, what + additional information would you need to know to determine \(s(4)\)? $BR +\{ essay_box(4,60) \} +$PAR +(c) Suppose you are told that the object's initial position \(s(0) = + 7\). Determine \(s(2)\), the object's position 2 seconds later. $BR +\{ essay_box(4,60) \} +$PAR +(d) If you are told instead that the object's initial position is + \(s(0) = 3\), what is \(s(2)\)? $BR +\{ essay_box(4,60) \} +$PAR +(e) If we only know the velocity \(v(t)=4t+1\), is it possible that the + object's position at all times is \(s(t) = 2t^2 + t - 4\)? Explain how + you know. $BR +\{ essay_box(4,60) \} +$PAR +(f) Are there other possibilities for \(s(t)\)? If so, what are they? $BR +\{ essay_box(4,60) \} +$PAR +(g) If, in addition to knowing the velocity function is \(v(t) = 4t+1\), we know the initial position \(s(0)\), how many possibilities + are there for \(s(t)\)? $BR +\{ essay_box(4,60) \} +$PAR + + + +END_TEXT +Context()->normalStrings; + +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + + + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR +This needs to be written up. +$PAR +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_7_2/preview_7_2_abcde.pg b/Contrib/Westmont/ActiveCalculus/Preview_7_2/preview_7_2_abcde.pg new file mode 100644 index 0000000000..45c93884f0 --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_7_2/preview_7_2_abcde.pg @@ -0,0 +1,103 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject('Calculus - single variable') +## DBchapter('Integrals') +## DBsection('Antiderivatives') +## KEYWORDS('integral', 'Antiderivatives') +## TitleText1('Active Calculus') +## EditionText1('2015') +## AuthorText1('Matthew Boelkins') +## Section1('5.1') +## Problem1('Preview Activity 5.1abc') +## Author('Branden Stone') +## Institution('Adelphi University') +## RESOURCES('preview_5_1.png') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGessaymacros.pl", +"PGcourse.pl", +); + +Context("Numeric"); + +$intInc = List( "(0,1.5),(4,6)" ); +$intDec = List( "(1.5,4)" ); + + + +TEXT(beginproblem()); +$showPartialCorrectAnswers = 0; + +install_problem_grader(~~&std_problem_grader); #for correct behavior with essay +Context()->texStrings; +BEGIN_TEXT +$PAR + + +Let's consider the initial value problem +\[ \frac{dy}{dt} = t - 2, \ \ y(0) = 1. \] +$PAR + +(a) Use the differential equation to find the slope of the tangent + line to the solution \(y(t)\) at \(t=0\). Then use the initial value to + find the equation of the tangent line at \(t=0\). Sketch this tangent + line over the interval \(-0.25\leq t\leq0.25\) on the axes provided. $BR +\{ essay_box(4,60) \} +$PAR + +(b) Also shown in the given figure are the tangent lines to the solution \(y(t)\) at + the points \(t=1, 2,\) and \(3\) (we will see how to find these later). + Use the graph to measure the slope of each tangent line + and verify that each agrees with the value specified by the differential + equation. $BR +\{ essay_box(4,60) \} +$PAR + + +(c) Using these tangent lines as a guide, sketch a graph of the + solution \(y(t)\) over the interval \(0\leq t\leq 3\) so that the lines + are tangent to the graph of \(y(t)\). $BR +\{ essay_box(4,60) \} +$PAR + +(d) Use the Fundamental Theorem of Calculus to find \(y(t)\), the + solution to this initial value problem. $BR +\{ essay_box(4,60) \} +$PAR + +(e) Graph the solution you found in (d) on the axes provided, and compare it to the sketch + you made using the tangent lines. $BR +\{ essay_box(4,60) \} +$PAR + + +END_TEXT +Context()->normalStrings; + +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + + + + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR +This needs to be written up. +$PAR +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_7_3/preview_7_3_abcde.pg b/Contrib/Westmont/ActiveCalculus/Preview_7_3/preview_7_3_abcde.pg new file mode 100644 index 0000000000..aaf016712a --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_7_3/preview_7_3_abcde.pg @@ -0,0 +1,108 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject('Calculus - single variable') +## DBchapter('Integrals') +## DBsection('Antiderivatives') +## KEYWORDS('integral', 'Antiderivatives') +## TitleText1('Active Calculus') +## EditionText1('2015') +## AuthorText1('Matthew Boelkins') +## Section1('5.1') +## Problem1('Preview Activity 5.1abc') +## Author('Branden Stone') +## Institution('Adelphi University') +## RESOURCES('preview_5_1.png') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGessaymacros.pl", +"PGcourse.pl", +); + +Context("Numeric"); + +$intInc = List( "(0,1.5),(4,6)" ); +$intDec = List( "(1.5,4)" ); + + + +TEXT(beginproblem()); +$showPartialCorrectAnswers = 0; + +install_problem_grader(~~&std_problem_grader); #for correct behavior with essay +Context()->texStrings; +BEGIN_TEXT +$PAR + + +Consider the initial value problem +\[ \frac{dy}{dt} = \frac 1 2 (y + 1), \ y(0) = 0. \] +$PAR + +(a) Use the differential equation to find the slope of the tangent + line to the solution \(y(t)\) at \(t=0\). Then use the given initial value to + find the equation of the tangent line at \(t=0\). $BR +\{ essay_box(4,60) \} +$PAR + +(b) Sketch the tangent line on the axes below on the interval \(0\leq + t\leq 2\) and use it to approximate \(y(2)\), + the value of the solution at \(t=2\). $BR +\{ essay_box(4,60) \} +$PAR + + +(c) Assuming that your approximation for \(y(2)\) is the actual value + of \(y(2)\), use the differential equation to find the slope of the + tangent line to \(y(t)\) at \(t=2\). Then, write the equation of the + tangent line at \(t=2\). $BR +\{ essay_box(4,60) \} +$PAR + + +(d) Add a sketch of this tangent line to your plot on the axes above on the interval \(2\leq + t\leq 4\); use this new tangent line to approximate \(y(4)\), + the value of the solution at \(t=4\). $BR +\{ essay_box(4,60) \} +$PAR + + +(e) Repeat the same step to find an approximation for \(y(6)\). $BR +\{ essay_box(4,60) \} +$PAR + + +\ea +\end{pa} +\afterpa + + +END_TEXT +Context()->normalStrings; + +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + + + + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR +This needs to be written up. +$PAR +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_7_4/preview_7_4_abcd.pg b/Contrib/Westmont/ActiveCalculus/Preview_7_4/preview_7_4_abcd.pg new file mode 100644 index 0000000000..2442144e41 --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_7_4/preview_7_4_abcd.pg @@ -0,0 +1,86 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject('Calculus - single variable') +## DBchapter('Integrals') +## DBsection('Antiderivatives') +## KEYWORDS('integral', 'Antiderivatives') +## TitleText1('Active Calculus') +## EditionText1('2015') +## AuthorText1('Matthew Boelkins') +## Section1('5.1') +## Problem1('Preview Activity 5.1abc') +## Author('Branden Stone') +## Institution('Adelphi University') +## RESOURCES('preview_5_1.png') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGessaymacros.pl", +"PGcourse.pl", +); + +Context("Numeric"); + +$intInc = List( "(0,1.5),(4,6)" ); +$intDec = List( "(1.5,4)" ); + + + +TEXT(beginproblem()); +$showPartialCorrectAnswers = 0; + +install_problem_grader(~~&std_problem_grader); #for correct behavior with essay +Context()->texStrings; +BEGIN_TEXT +$PAR + +In this preview activity, we explore whether certain differential equations are separable or not, and then revisit some key ideas from earlier work in integral calculus. +$PAR +(a) Which of the following differential equations are separable? If the equation is separable, write the equation in the revised form \(\displaystyle g(y) \frac{dy}{dt} = h(t)\). +$BR +\(\displaystyle \frac{dy}{dt} = -3y\). $BR +\(\displaystyle \frac{dy}{dt} = ty - y\). $BR +\(\displaystyle \frac{dy}{dt} = t + 1\). $BR +\(\displaystyle \frac{dy}{dt} = t^2 - y^2\). $BR +$PAR +(b) Explain why any autonomous differential equation is guaranteed to be separable. $BR +\{ essay_box(4,60) \} +$PAR +(c) Why do we include the term "\(+C\)" in the expression +\[\int x~dx = \frac{x^2}{2} + C?\] +\{ essay_box(4,60) \} +$PAR +(d) Suppose we know that a certain function \(f\) satisfies the equation + \[ \int f'(x)~dx = \int x~dx.\] + What can you conclude about \(f\)? $BR +\{ essay_box(4,60) \} +$PAR + + +END_TEXT +Context()->normalStrings; + +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + + + + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR +This needs to be written up. +$PAR +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_7_5/preview_7_5_a.pg b/Contrib/Westmont/ActiveCalculus/Preview_7_5/preview_7_5_a.pg new file mode 100644 index 0000000000..8fcd06ef09 --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_7_5/preview_7_5_a.pg @@ -0,0 +1,80 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject('Calculus - single variable') +## DBchapter('Integrals') +## DBsection('Antiderivatives') +## KEYWORDS('integral', 'Antiderivatives') +## TitleText1('Active Calculus') +## EditionText1('2015') +## AuthorText1('Matthew Boelkins') +## Section1('5.1') +## Problem1('Preview Activity 5.1abc') +## Author('Branden Stone') +## Institution('Adelphi University') +## RESOURCES('preview_5_1.png') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGessaymacros.pl", +"PGcourse.pl", +); + +Context("Numeric"); + +$intInc = List( "(0,1.5),(4,6)" ); +$intDec = List( "(1.5,4)" ); + + + +TEXT(beginproblem()); +$showPartialCorrectAnswers = 0; + +install_problem_grader(~~&std_problem_grader); #for correct behavior with essay +Context()->texStrings; +BEGIN_TEXT +$PAR + +Any time that the rate of change of a quantity is related to the amount of a quantity, a differential equation naturally arises. In the following problem, we see such a scenario; we want to develop a differential equation whose solution is the quantity of interest. +$PAR +Suppose you have a bank account in which money grows at an + annual rate of 3\%. +$PAR +(i) If you have \(\$10,000\) in the account, at what rate is your + money growing? $BR +\{ essay_box(4,60) \} +$PAR +(ii) Suppose that you are also withdrawing money from the account + at \(\$1,000\) per year. What is the rate of change in the amount + of money in the account? What are the units on this rate of change? $BR +\{ essay_box(4,60) \} +$PAR + + + + +END_TEXT +Context()->normalStrings; + +ANS( essay_cmp() ); +ANS( essay_cmp() ); + + + + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR +This needs to be written up. +$PAR +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_7_5/preview_7_5_b.pg b/Contrib/Westmont/ActiveCalculus/Preview_7_5/preview_7_5_b.pg new file mode 100644 index 0000000000..4eeaabb31d --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_7_5/preview_7_5_b.pg @@ -0,0 +1,89 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject('Calculus - single variable') +## DBchapter('Integrals') +## DBsection('Antiderivatives') +## KEYWORDS('integral', 'Antiderivatives') +## TitleText1('Active Calculus') +## EditionText1('2015') +## AuthorText1('Matthew Boelkins') +## Section1('5.1') +## Problem1('Preview Activity 5.1abc') +## Author('Branden Stone') +## Institution('Adelphi University') +## RESOURCES('preview_5_1.png') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGessaymacros.pl", +"PGcourse.pl", +); + +Context("Numeric"); + +$intInc = List( "(0,1.5),(4,6)" ); +$intDec = List( "(1.5,4)" ); + + + +TEXT(beginproblem()); +$showPartialCorrectAnswers = 0; + +install_problem_grader(~~&std_problem_grader); #for correct behavior with essay +Context()->texStrings; +BEGIN_TEXT +$PAR + + +Any time that the rate of change of a quantity is related to the amount of a quantity, a differential equation naturally arises. In the following problem, we see such a scenario; we want to develop a differential equation whose solution is the quantity of interest. +$PAR +Suppose that a water tank holds 100 gallons and that a salty + solution, which contains 20 grams of salt in every gallon, enters the + tank at 2 gallons per minute. +$PAR +(i) How much salt enters the tank each minute? $BR +\{ essay_box(4,60) \} +$PAR +(ii) Suppose that initially there are 300 grams of salt in the tank. How + much salt is in each gallon at this point in time? $BR +\{ essay_box(4,60) \} +$PAR +(iii) Finally, suppose that evenly mixed solution is pumped out of the tank at the + rate of 2 gallons per minute. How much salt leaves the tank + each minute? $BR +\{ essay_box(4,60) \} +$PAR +(iv) What is the total rate of change in the amount of salt in + the tank? $BR +\{ essay_box(4,60) \} +$PAR + + +END_TEXT +Context()->normalStrings; + +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + + + + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR +This needs to be written up. +$PAR +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_7_6/preview_7_6_abcdef.pg b/Contrib/Westmont/ActiveCalculus/Preview_7_6/preview_7_6_abcdef.pg new file mode 100644 index 0000000000..77096ab54e --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_7_6/preview_7_6_abcdef.pg @@ -0,0 +1,102 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject('Calculus - single variable') +## DBchapter('Integrals') +## DBsection('Antiderivatives') +## KEYWORDS('integral', 'Antiderivatives') +## TitleText1('Active Calculus') +## EditionText1('2015') +## AuthorText1('Matthew Boelkins') +## Section1('5.1') +## Problem1('Preview Activity 5.1abc') +## Author('Branden Stone') +## Institution('Adelphi University') +## RESOURCES('preview_5_1.png') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGessaymacros.pl", +"PGcourse.pl", +); + +Context("Numeric"); + +$intInc = List( "(0,1.5),(4,6)" ); +$intDec = List( "(1.5,4)" ); + + + +TEXT(beginproblem()); +$showPartialCorrectAnswers = 0; + +install_problem_grader(~~&std_problem_grader); #for correct behavior with essay +Context()->texStrings; +BEGIN_TEXT +$PAR + +Recall that one model for population growth states that a population grows at a rate proportional to its size. +$PAR +(a) We begin with the differential equation + \[ \frac{dP}{dt} = \frac12 P. \] + Sketch a slope field below as well as a few typical solutions on the axes provided. $BR +\{ essay_box(4,60) \} +$PAR + +(b) Find all equilibrium solutions of the equation \(\displaystyle \frac{dP}{dt} = \frac 1 2 P\) and classify them as stable or + unstable. $BR +\{ essay_box(4,60) \} +$PAR + +(c) If \(P(0)\) is positive, describe the long-term behavior of the + solution to \(\displaystyle \frac{dP}{dt} = \frac12 P\). $BR +\{ essay_box(4,60) \} +$PAR + +(d) Let's now consider a modified differential equation given by + \[ \frac{dP}{dt} = \frac 12 P(3-P). \] + As before, sketch a slope field as well as a few typical solutions on the following axes provided. $BR +\{ essay_box(4,60) \} +$PAR + +(e) Find any equilibrium solutions and classify them as stable or + unstable. $BR +\{ essay_box(4,60) \} +$PAR + +(f) If \(P(0)\) is positive, describe the long-term behavior of the + solution. $BR +\{ essay_box(4,60) \} +$PAR + + + + +END_TEXT +Context()->normalStrings; + +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); +ANS( essay_cmp() ); + + + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR +This needs to be written up. +$PAR +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_1/preview_8_1_abcd.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_1/preview_8_1_abcd.pg new file mode 100644 index 0000000000..d11d968c1f --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_8_1/preview_8_1_abcd.pg @@ -0,0 +1 @@ +preview activity diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_2/preview_8_2_abcdef.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_2/preview_8_2_abcdef.pg new file mode 100644 index 0000000000..d11d968c1f --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_8_2/preview_8_2_abcdef.pg @@ -0,0 +1 @@ +preview activity diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_ab.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_ab.pg new file mode 100644 index 0000000000..d11d968c1f --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_ab.pg @@ -0,0 +1 @@ +preview activity diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_ab.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_ab.pg new file mode 100644 index 0000000000..d11d968c1f --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_ab.pg @@ -0,0 +1 @@ +preview activity diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_5/preview_8_5_ab.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_5/preview_8_5_ab.pg new file mode 100644 index 0000000000..d11d968c1f --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_8_5/preview_8_5_ab.pg @@ -0,0 +1 @@ +preview activity diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_6/preview_8_6_abcdefg.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_6/preview_8_6_abcdefg.pg new file mode 100644 index 0000000000..d11d968c1f --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_8_6/preview_8_6_abcdefg.pg @@ -0,0 +1 @@ +preview activity From 8f675c4c3ed5ee2ccdd37e014772a324d32d8637 Mon Sep 17 00:00:00 2001 From: Branden Stone Date: Sat, 3 Mar 2018 18:03:43 -0500 Subject: [PATCH 2/3] added chapter eight stuff --- .../Preview_8_3/preview_8_3_ab.pg | 1 - .../Preview_8_3/preview_8_3_all.pg | 191 +++++++++++++ .../Preview_8_4/preview_8_4_ab.pg | 1 - .../Preview_8_4/preview_8_4_all.pg | 198 ++++++++++++++ .../Preview_8_5/preview_8_5_ab.pg | 1 - .../Preview_8_5/preview_8_5_all.pg | 164 ++++++++++++ .../Preview_8_6/preview_8_6_abcdefg.pg | 1 - .../Preview_8_6/preview_8_6_all.pg | 252 ++++++++++++++++++ 8 files changed, 805 insertions(+), 4 deletions(-) delete mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_ab.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_all.pg delete mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_ab.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_all.pg delete mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_5/preview_8_5_ab.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_5/preview_8_5_all.pg delete mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_6/preview_8_6_abcdefg.pg create mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_6/preview_8_6_all.pg diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_ab.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_ab.pg deleted file mode 100644 index d11d968c1f..0000000000 --- a/Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_ab.pg +++ /dev/null @@ -1 +0,0 @@ -preview activity diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_all.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_all.pg new file mode 100644 index 0000000000..3333dbb407 --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_all.pg @@ -0,0 +1,191 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject(Calculus - single variable) +## DBchapter(Infinite sequences and series) +## DBsection(Geometric) +## Institution(Adelphi University) +## Author(Branden Stone) +## Level(4) +## MO(1) +## TitleText1('Active Calculus') +## AuthorText1('Matthew Boelkins') +## EditionText1('2016') +## Section1('8.3') +## Problem1('8.3') +## KEYWORDS('geometric series', 'modeling') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGcourse.pl", +); + +# Uncomment to eliminate partial credit +# install_problem_grader(~~&std_problem_grader); + +# 0 does not show correct answers and 1 does show them +$showPartialCorrectAnswers = 1; + + +###################################### +## Answers to the questions +###################################### +Context("Numeric"); + +$L = Formula("1+x"); +$L1 = Compute("2"); +$one = Compute("1"); +$P2one = Compute("5/2"); +$P3one = Compute("1+1+1/2+1/6"); + +###################################### +## Begin Problem +###################################### + +TEXT(beginproblem()); +Context()->texStrings; +BEGIN_TEXT + +Have you ever wondered how your calculator can produce a numeric approximation for +complicated numbers like \(e\), \(\pi\) or \(\ln(2)\)? After all, the only operations a +calculator can really perform are addition, subtraction, multiplication, and division, +the operations that make up polynomials. This activity provides the first steps in +understanding how this process works. Throughout the activity, let \(f(x) = e^x\). +$PAR + +$BBOLD Part (a) $EBOLD $PAR + +The tangent line to \(f = e^x\) at \(x=0\) is \(L(x) =\) \{ans_rule(10)\}. +$PAR +The formula \(L(x)\) can be used to appriximate \(e\) since \(L(1) \approx f(1) = e\). In particular, +\(L(1)=\)\{ans_rule(10)\}. +$PAR + +$BBOLD Part (b) $EBOLD $PAR + +The linearization of \(e^x\) does not provide a good approximation to \(e\) +since 1 is not very close to 0. To obtain a better approximation, we alter our approach a bit. +Instead of using a straight line to approximate \(e\), we put an appropriate bend in our estimating +function to make it better fit the graph of \(e^x\) for \(x\) close to 0. With the linearization, +we had both \(f(x)\) and \(f'(x)\) \{#'# syntax color issue\} +share the same value as the linearization at \(x=0\). We will now use a quadratic approximation +\(P_2(x)\) to \(f(x) = e^x\) centered at \(x=0\) which has the property that \(P_2(0) = f(0)\), +\(P'_2(0) = f'(0)\), and \(P''_2(0) = f''(0)\). +$PAR + + (i) Let \(P_2(x) = 1+x+\frac{x^2}{2}\). Compute the following: $PAR + + \(P_2(0)=\) \{ans_rule(10)\}, this should equal \(f(0)=\) \{ans_rule(10)\}; $BR + \(P'_2(0)=\) \{ans_rule(10)\}, this should equal \(f'(0)=\) \{ans_rule(10)\};$BR + \(P''_2(0)=\) \{ans_rule(10)\}, this should equal \(f''(0)=\)\{ans_rule(10)\}.$PAR + + Now that you have shown the equalities above, use \(P_2(x)\) to approximate \(e\) by observing that + \(P_2(1) \approx f(1)\). In particular \(P_2(1) =\)\{ans_rule(10)\}. + $PAR + + (ii) We can continue approximating \(e\) with polynomials of larger degree whose higher + derivatives agree with those of \(f\) at 0. This turns out to make the polynomials fit the graph + of \(f\) better for more values of \(x\) around 0. For example, let + \(P_3(x) = 1+x+\frac{x^2}{2}+\frac{x^3}{6}\). Show that \(P_3(0) = f(0)\), \(P'_3(0) = f'(0)\), + \(P''_3(0) = f''(0)\), and \(P'''_3(0) = f'''(0)\) by completing the following: + $PAR + + \(P_3(0)=\) \{ans_rule(10)\}, \(f(0)=\) \{ans_rule(10)\}; $BR + \(P'_3(0)=\) \{ans_rule(10)\}, \(f'(0)=\) \{ans_rule(10)\};$BR + \(P''_3(0)=\) \{ans_rule(10)\}, \(f''(0)=\)\{ans_rule(10)\}.$PAR + + Now use \(P_3(x)\) to approximate \(e\) in a way + similar to how you did so with \(P_2(x)\) above. In particular, \(P_3(1) = \)\{ans_rule(10)\}. + $PAR + +END_TEXT + +###################################### +## Compute Solutions +###################################### + +Context()->normalStrings; + +# Answers to (a) +ANS( Compute($L) -> cmp ); +ANS( $L1 -> cmp ); + +# Answers to (b.i) +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $P2one -> cmp ); + +# Answers to (b.ii) +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $P3one -> cmp ); + + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR +For Part (a) the linearization of \(f\) at \(x=a\) is +\[f(a) + f'(a)(x-a),\] +so the linearization \(P_1(x)\) of \(f(x) = e^x\) at \(x=0\) is +\[P_1(x) = e^0 + e^0(x-0) = 1+x.\] +Now +\[f(x) \approx P_1(x)\] +for \(x\) close to 0 and so +\[e = e^1 \approx P_1(1) = 1+1 = 2.\] +$PAR + +For the first item in Part (b), the derivatives of \(P_2\) and \(f\) are +\begin{align} +P_2(x) &= 1+x+\frac{x^2}{2}, & f(x) &= e^x, \\ +P'_2(x) &= 1 + x, & f'(x) &= e^x, \\ +P''_2(x) &= 1, & f''(x) &= e^x, +\end{align} +and so the derivatives of \(P_2\) and \(f\) evaluated at 0 are +\begin{align} +P_2(0) &= 1 , & f(0) &= e^0 = 1, \\ +P'_2(0) &= 1 , & f'(0) &= e^0 = 1, \\ +P''_2(0) &= 1 , & f''(0) &= e^0 = 1. +\end{align} +Then +\[e = e^1 \approx P_2(1) = 1 + 1 + \frac{1}{2} = 2.5.\] + +In the second item of Part (b), the derivatives of \(P_3\) and \(f\) are +\begin{align} +P_3(x) &= 1+x+\frac{x^2}{2}+\frac{x^3}{6} , & f(x) &= e^x, \\ +P'_3(x) &= 1 + x +\frac{x^2}{2} , & f'(x) &= e^x, \\ +P''_3(x) &= 1+x , & f''(x) &= e^x, \\ +P'''_3(x) &= 1 , & f'''(x) &= e^x, +\end{align} +and so the derivatives of \(P_3\) and \(f\) evaluated at 0 are +\begin{align} +P_3(0) &= 1 , & f(0) &= e^0 = 1, \\ +P'_3(0) &= 1 , & f'(0) &= e^0 = 1, \\ +P''_3(0) &= 1 , & f''(0) &= e^0 = 1, \\ +P'''_3(0) &= 1 , & f'''(0) &= e^0 = 1. +\end{align} +Then +\[e = e^1 \approx P_3(1) = 1 + 1 + \frac{1}{2} + \frac{1}{6} = \frac{8}{3} \approx 2.67.\] + + +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + + +# \end{activitySolution} + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_ab.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_ab.pg deleted file mode 100644 index d11d968c1f..0000000000 --- a/Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_ab.pg +++ /dev/null @@ -1 +0,0 @@ -preview activity diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_all.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_all.pg new file mode 100644 index 0000000000..2475d5b8ad --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_all.pg @@ -0,0 +1,198 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject(Calculus - single variable) +## DBchapter(Infinite sequences and series) +## DBsection(Geometric) +## Institution(Adelphi University) +## Author(Branden Stone) +## Level(4) +## MO(1) +## TitleText1('Active Calculus') +## AuthorText1('Matthew Boelkins') +## EditionText1('2016') +## Section1('8.4') +## Problem1('8.4') +## KEYWORDS('alternating series', 'modeling') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGcourse.pl", +); + +# Uncomment to eliminate partial credit +# install_problem_grader(~~&std_problem_grader); + +# 0 does not show correct answers and 1 does show them +$showPartialCorrectAnswers = 1; + + +###################################### +## Answers to the questions +###################################### +Context("Numeric"); + +$L = Formula("x"); +$L1 = Compute("1"); +$zero = Compute("0"); +$one = Compute("1"); +$negOne = Compute("-1"); +$P2one = Compute("1/2"); +$P3one = Compute("5/6"); + +###################################### +## Begin Problem +###################################### + +TEXT(beginproblem()); +Context()->texStrings; +BEGIN_TEXT + + +It can be shown how to approximate the number \(e\) with linear, quadratic, +and other polynomial approximations. We use a similar approach in this activity to obtain linear +and quadratic approximations to \(\ln(2)\). Along the way, we encounter a type of series that is +different than most of the ones we have seen so far. Throughout this activity, let \(f(x) = \ln(1+x)\). +$PAR + +$BBOLD Part (a) $EBOLD $PAR + +The tangent line to \(f = \ln(1+x)\) at \(x=0\) is \(L(x) =\) \{ans_rule(10)\}. +$PAR +The formula \(L(x)\) can be used to appriximate \(\ln(2)\) since \(L(1) \approx f(1) = \ln(2)\). In particular, +\(L(1)=\)\{ans_rule(10)\}. +$PAR + +$BBOLD Part (b) $EBOLD $PAR + +The linearization of \(\ln(1+x)\) does not provide a very good approximation to \(\ln(2)\) since 1 is +not that close to 0. To obtain a better approximation, we alter our approach; instead of using a +straight line to approximate \(\ln(2)\), we use a quadratic function to account for the concavity of +\(\ln(1+x)\) for \(x\) close to 0. With the linearization, both the function's value and slope agree +with the linearization's value and slope at \(x=0\). We will now make a quadratic approximation +\(P_2(x)\) to \(f(x) = \ln(1+x)\) centered at \(x=0\) with the property that \(P_2(0) = f(0)\), +\(P'_2(0) = f'(0)\), and \(P''_2(0) = f''(0)\). + + (i) Let $P_2(x) = x - \frac{x^2}{2}$. Compute the following: $PAR + + \(P_2(0)=\) \{ans_rule(10)\}, this should equal \(f(0)=\) \{ans_rule(10)\}; $BR + \(P'_2(0)=\) \{ans_rule(10)\}, this should equal \(f'(0)=\) \{ans_rule(10)\};$BR + \(P''_2(0)=\) \{ans_rule(10)\}, this should equal \(f''(0)=\)\{ans_rule(10)\}.$PAR + + Now that you have shown the equalities above, use \(P_2(x)\) to approximate \(\ln(2)\) by observing that + \(P_2(1) \approx f(1)\). In particular \(P_2(1) =\)\{ans_rule(10)\}. + $PAR + + + (ii) We can continue approximating \(\ln(2)\) with polynomials of larger degree whose derivatives + agree with those of \(f\) at 0. This makes the polynomials fit the graph of \(f\) better for more + values of \(x\) around 0. For example, let \(P_3(x) = x - \frac{x^2}{2}+\frac{x^3}{3}\). Show that + \(P_3(0) = f(0)\), \(P'_3(0) = f'(0)\), \(P''_3(0) = f''(0)\), and \(P'''_3(0) = f'''(0)\) by completing + the following: + $PAR + + \(P_3(0)=\) \{ans_rule(10)\}, \(f(0)=\) \{ans_rule(10)\}; $BR + \(P'_3(0)=\) \{ans_rule(10)\}, \(f'(0)=\) \{ans_rule(10)\};$BR + \(P''_3(0)=\) \{ans_rule(10)\}, \(f''(0)=\)\{ans_rule(10)\}.$PAR + + + Now use \(P_3(x)\) to approximate \(\ln(2)\) in a way + similar to how you did so with \(P_2(x)\) above. In particular, \(P_3(1) = \)\{ans_rule(10)\}. + $PAR + + \{ + # (iii) If we used a degree 4 or degree 5 polynomial to approximate \(\ln(1+x)\), what approximations + # of \(\ln(2)\) do you think would result? Use the preceding questions to conjecture a pattern that + # holds, and state the degree 4 and degree 5 approximation. + # $PAR + \} + +END_TEXT + +###################################### +## Compute Solutions +###################################### + +Context()->normalStrings; + +# Answers to (a) +ANS( Compute($L) -> cmp ); +ANS( $L1 -> cmp ); + +# Answers to (b.i) +ANS( $zero -> cmp ); +ANS( $zero -> cmp ); +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $negOne -> cmp ); +ANS( $negOne -> cmp ); +ANS( $P2one -> cmp ); + +# Answers to (b.ii) +ANS( $zero -> cmp ); +ANS( $zero -> cmp ); +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $negOne -> cmp ); +ANS( $negOne -> cmp ); +ANS( $P3one -> cmp ); + + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR +For Part (a) the linearization of \(f\) at \(x=a\) is +\[f(a) + f'(a)(x-a),\] +so the linearization \(P_1(x)\) of \(f(x) = \ln(1+x)\) at \(x=0\) is +\[P_1(x) = 0 + \frac{1}{1+0}(x-0) = x.\] +Now +\[f(x) \approx P_1(x)\] +for \(x\) close to 0 and so +\[\ln(2) = \ln(1+1) \approx P_1(1) = 1.\] +$PAR + +For the first item in Part (b), the derivatives of \(P_2\) and \(f\) are +\begin{align} +P_2(x) &= x - \frac{x^2}{2}, & f(x) &= \ln(1+x), \\ +P'_2(x) &= 1 - x, & f'(x) &= \frac{1}{1+x}, \\ +P''_2(x) &= -1, & f''(x) &= -\frac{1}{(1+x)^2}, +\end{align} +and so the derivatives of \(P_2\) and \(f\) evaluated at 0 are +\begin{align} +P_2(0) &= 0 , & f(0) &= \ln(1) = 0, \\ +P'_2(0) &= 1 , & f'(0) &= \frac{1}{1+0} = 1, \\ +P''_2(0) &= -1 , & f''(0) &= -\frac{1}{(1+0)^2} = -1. +\end{align} +Then +\[\ln(2) = \ln(1+1) \approx P_2(1) = 1 - \frac{1}{2} = \frac{1}{2}.\] + +In the second item of Part (b), the derivatives of \(P_3\) and \(f\) are +\begin{align} +P_3(x) &= x-\frac{x^2}{2}+\frac{x^3}{3} , & f(x) &= \ln(1+x), \\ +P'_3(x) &= 1 - x + x^2 , & f'(x) &= \frac{1}{1+x}, \\ +P''_3(x) &= -1+2x , & f''(x) &= -\frac{1}{(1+x)^2}, \\ +P'''_3(x) &= 2 , & f'''(x) &= \frac{2}{(1+x)^3}, +\end{align} +and so the derivatives of \(P_3\) and \(f\) evaluated at 0 are +\begin{align} +P_3(0) &= 0 , & f(0) &= \ln(1+0) = 0 \\ +P'_3(0) &= 1 , & f'(0) &= \frac{1}{1+0} = 1 \\ +P''_3(0) &= -1 , & f''(0) &= -\frac{1}{(1+0)^2} = -1 \\ +P'''_3(0) &= 2 , & f'''(0) &= \frac{2}{(1+0)^3} = 2. +\end{align} +Then +\[\ln(2) = \ln(1+1) \approx P_3(0) = 1 - \frac{1}{2} + \frac{1}{3} = \frac{5}{6} \approx 0.83.\] + + +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_5/preview_8_5_ab.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_5/preview_8_5_ab.pg deleted file mode 100644 index d11d968c1f..0000000000 --- a/Contrib/Westmont/ActiveCalculus/Preview_8_5/preview_8_5_ab.pg +++ /dev/null @@ -1 +0,0 @@ -preview activity diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_5/preview_8_5_all.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_5/preview_8_5_all.pg new file mode 100644 index 0000000000..e31f055602 --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_8_5/preview_8_5_all.pg @@ -0,0 +1,164 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject(Calculus - single variable) +## DBchapter(Infinite sequences and series) +## DBsection(Geometric) +## Institution(Adelphi University) +## Author(Branden Stone) +## Level(4) +## MO(1) +## TitleText1('Active Calculus') +## AuthorText1('Matthew Boelkins') +## EditionText1('2016') +## Section1('8.5') +## Problem1('8.5') +## KEYWORDS('alternating series', 'modeling') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGcourse.pl", +); + +# Uncomment to eliminate partial credit +# install_problem_grader(~~&std_problem_grader); + +# 0 does not show correct answers and 1 does show them +$showPartialCorrectAnswers = 1; + + +###################################### +## Answers to the questions +###################################### +Context("Numeric"); + +Context()->variables->add(c => 'Real'); + +$P = Formula("1+x"); +$P1 = Compute("1"); +$one = Compute("1"); +$C = Compute("1/2"); +$P2 = Formula("1+x+c*x^2"); +$ddP2 = Formula("2*c"); + + + +###################################### +## Begin Problem +###################################### + +TEXT(beginproblem()); +Context()->texStrings; +BEGIN_TEXT + +It can be shown how to approximate the number \(e\) using linear, quadratic, and other +polynomial functions; the same techneques can be used to approximate \(\ln(2)\). In this +activity, we review and extend the process to find the "best" quadratic approximation to +the exponential function \(e^x\) around the origin. Let \(f(x) = e^x\) throughout this activity. +$PAR + +$BBOLD Part (a) $EBOLD $PAR + +The linearlization of \(f = e^x\) at \(x=0\) is \(P_1(x) =\) \{ans_rule(10)\}. +$PAR +(We label this linearization \(P_1\) because it is a first degree polynomial approximation.) +Recall that \(P_1(x)\) is a good approximation to \(f(x)\) for values of \(x\) close to \(0\). +On your own, plot \(f\) and \(P_1\) near \(x=0\) to illustrate this fact. +$PAR + +$BBOLD Part (b) $EBOLD $PAR + +Since \(f(x) = e^x\) is not linear, the linear approximation eventually is not a very good one. +To obtain better approximations, we want to develop a different approximation that "bends" +to make it more closely fit the graph of \(f\) near \(x=0\). To do so, we add a quadratic term +to \(P_1(x)\). In other words, we let +\[P_2(x) = P_1(x) + c_2x^2\] +for some real number \(c_2\). We need to determine the value of \(c_2\) that makes the graph of +\(P_2(x)\) best fit the graph of \(f(x)\) near \(x=0\). +$PAR + +Remember that \(P_1(x)\) was a good linear approximation to \(f(x)\) near \(0\); this is because +\(P_1(0) = f(0)\) and \(P'_1(0) = f'(0)\). It is therefore reasonable to seek a value of \(c_2\) so that +\begin{align} +P_2(0) &= f(0), \\ +P'_2(0) &= f'(0), \ \mbox{and} \\ +P''_2(0) &= f''(0). +\end{align} +Remember, we are letting \(P_2(x) = P_1(x) + c_2x^2\). Let \(c = c_2\) and calculate the following +(in other words, if you need to use \(c_2\) in your answer, use \(c\) instead.) +$PAR + + \(P_2(0)=\) \{ans_rule(10)\}, \(f(0)=\) \{ans_rule(10)\}; $BR + \(P'_2(0)=\) \{ans_rule(10)\}, \(f'(0)=\) \{ans_rule(10)\};$BR + \(P''_2(0)=\) \{ans_rule(10)\}, \(f''(0)=\) \{ans_rule(10)\}.$PAR + + + Notice that \(P''_2(0)\) is in terms of \(c_2\). Find a value for \(c_2\) so that \(P''_2(0) = f''(0)\). $BR + \(c_2=\)\{ans_rule(10)\}. + $PAR + + Think about why the condition \(P''_2(0) = f''(0)\) will put an appropriate "bend" in the + graph of \(P_2\) to make \(P_2\) fit the graph of \(f\) around \(x=0\). + $PAR + +END_TEXT + +###################################### +## Compute Solutions +###################################### + +Context()->normalStrings; + +# Answers to (a) +ANS( Compute($P) -> cmp ); + +# Answers to (b) +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $one -> cmp ); +ANS( $ddP2 -> cmp ); +ANS( $one -> cmp ); +ANS( $C -> cmp ); + + + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR + + + +We know that +\[P_1(x) = f(0) + f'(0)x = 1+x.\] +Since \(P_1(0) = f(0) = 1\) and \(P'_1(0) = f'(0) = 1\), the graphs of \(P_1\) and \(f\) agree at \(x=0\) and have the same slope at \(x=0\) (which means they go in the same direction at \(x=0\)). This is why \(P_1(x)\) is a good approximation to \(f(x)\) for values of \(x\) close to \(0\). +$PAR + +Since +\[P_2(x) = P_1(x) + c_2(x)^2 = f(0) + f'(0)x + c_2x^2\] +we have that +\[P_2(0) = 1 = f(0)\] +as desired. +$PAR + +A simple calculation shows \(P'_2(x) = P'_1(x) + 2c_2x\). So \(P'_2(0) = P'_1(0) = 1 = f'(0)\) as desired. +$PAR + +A simple calculation shows \(P''_2(x) = 2c_2\). So \(P''_2(0) = 2c_2\). To have \(P''_2(0) = f''(0)\) we must have \(2c_2 = f''(0)\) or \(c_2 = \frac{f''(0)}{2} = \frac{1}{2}\). +$PAR + +The second derivative of a function tells us the concavity of the function. Concavity measures how the slopes of the tangent lines to the graph of the function are changing. This tells us how much bend there is in the graph. So if \(P''_2(0) = f''(0)\), then \(P_2\) will have the same bend in it at \(x=0\) as \(f\) does. This will make the graph of \(P_2\) mold to the graph of \(f\) around \(x=0\). +$PAR + +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + + diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_6/preview_8_6_abcdefg.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_6/preview_8_6_abcdefg.pg deleted file mode 100644 index d11d968c1f..0000000000 --- a/Contrib/Westmont/ActiveCalculus/Preview_8_6/preview_8_6_abcdefg.pg +++ /dev/null @@ -1 +0,0 @@ -preview activity diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_6/preview_8_6_all.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_6/preview_8_6_all.pg new file mode 100644 index 0000000000..d58434dc62 --- /dev/null +++ b/Contrib/Westmont/ActiveCalculus/Preview_8_6/preview_8_6_all.pg @@ -0,0 +1,252 @@ +# DESCRIPTION +# Preview Activity from _Active Calculus_ by Matthew Boelkins +# ENDDESCRIPTION + +## DBsubject(Calculus - single variable) +## DBchapter(Infinite sequences and series) +## DBsection(Geometric) +## Institution(Adelphi University) +## Author(Branden Stone) +## Level(4) +## MO(1) +## TitleText1('Active Calculus') +## AuthorText1('Matthew Boelkins') +## EditionText1('2016') +## Section1('8.5') +## Problem1('8.5') +## KEYWORDS('alternating series', 'modeling') + +DOCUMENT(); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGcourse.pl", +"PGchoicemacros.pl", +"parserPopUp.pl", +"parserRadioButtons.pl", +); + +# Uncomment to eliminate partial credit +# install_problem_grader(~~&std_problem_grader); + +# 0 does not show correct answers and 1 does show them +$showPartialCorrectAnswers = 1; + + +###################################### +## Answers to the questions +###################################### +Context("Numeric"); + + +Context()->variables->add(a0 => 'Real'); +Context()->variables->add(a1 => 'Real'); +Context()->variables->add(a2 => 'Real'); +Context()->variables->add(a3 => 'Real'); + +$rel1 = Formula("a0"); +$rel2_1 = Formula("a1/2"); +$rel2_0 = Formula("a0/2!"); +$rel3_2 = Formula("a2/3"); +$rel3_0 = Formula("a0/3!"); +$rel4_3 = Formula("a3/4"); +$rel4_0 = Formula("a0/4!"); +$rel101_0 = Formula("a0/100!"); +$impossibleAnswer = Formula("a0*e^x"); + + +$mc = RadioButtons(["\[f'(x) = \sum_{i=0}^\infty (i-1)a_ix^i\]", + "\[f'(x) = \sum_{i=0}^{\infty} a_ix^i\]", + "\[f'(x) = \sum_{i=0}^{\infty} ia_ix^i\]", + "\[f'(x) = \sum_{i=0}^{\infty} ia_ix^{i-1}\]", + "\[f'(x) = \sum_{i=0}^{\infty} ia_ix^i\]"],"\[f'(x) = \sum_{i=0}^{\infty} ia_ix^{i-1}\]"); + +$mc1 = RadioButtons(["\[\sum_{i=1}^{\infty} ia_ix^{i-1} = \sum_{i=1}^{\infty} a_ix^{i}\]", + "\[\sum_{i=0}^{\infty} ia_ix^{i-1} = \sum_{i=0}^{\infty} a_ix^{i+1}\]", + "\[\sum_{i=1}^{\infty} ia_ix^{i-1} = \sum_{i=0}^{\infty} a_ix^{i}\]", + "\[\sum_{i=1}^{\infty} a_ix^{i-1} = \sum_{i=1}^{\infty} a_ix^{i}\]", + "\[\sum_{i=1}^{\infty} (i+1)ia_ix^{i-1} = \sum_{i=1}^{\infty} a_ix^{i+1}\]"], + "\[\sum_{i=1}^{\infty} ia_ix^{i-1} = \sum_{i=0}^{\infty} a_ix^{i}\]"); + +###################################### +## Begin Problem +###################################### + +TEXT(beginproblem()); +Context()->texStrings; +BEGIN_TEXT + +Previously, we learned some of the many important applications of differential equations, +and learned some approaches to solve or analyze them. Here, we consider an important approach +that will allow us to solve a wider variety of differential equations. +$PAR + +Let's consider the familiar differential equation from exponential population growth given by \{#'# syntax color issue\} +\[ + y' = ky, \{#'# syntax color issue\} +\] +where \(k\) is the constant of proportionality. While we can solve this differential equation using +familiar methods, we take a different approach now that can be applied to a much +larger set of differential equations. For the rest of this activity, let's \{#'# syntax color issue\} +assume that \(k=1\). We will use our knowledge of Taylor series to find a solution to the differential equation. +$PAR + +To do so, we assume that we have a solution \(y=f(x)\) and that \(f(x)\) has a Taylor series that +can be written in the form +\[ + y = f(x) = \sum_{i=0}^{\infty} a_ix^i, +\] +where the coefficients \(a_i\) are undetermined. Our task is to find the coefficients. +$PAR + +$BBOLD Part (a) $EBOLD $PAR + +Assume that we can differentiate a power series term by term. By taking the derivative of +\(f(x)\) with respect to \(x\). Which of the following is the derivative of \(f(x)\)? +$PAR + +\{ $mc->buttons() \} + +$PAR + +Substituting \(f'(x)\) into the differential equation \(y' = ky\), \{#'# syntax color issue\} +which of the following must be satisfied in order for \(f(x) = \sum_{i=0}^{\infty} a_ix^i\) +to be a solution of the differential equation? (Keep in mind we are assuming \(k=1\).) +$PAR + +\{ $mc1->buttons() \} +$PAR + +$BBOLD Part (b) $EBOLD $PAR + +Two series are equal if and only if they have the same coefficients on like power terms. Use this fact to +write \(a_1\) in terms of \(a_0\). When writing your answer, use \(a0\) for \(a_0\). +$PAR +Answer: \(a_1=\)\{ans_rule(10)\} +$PAR + +$BBOLD Part (c) $EBOLD $PAR + +Now write \(a_2\) in terms of \(a_1\). Then write \(a_2\) in terms of \(a_0\). +When writing your answer, use \(a1\) for \(a_1\) +$PAR +Answer in terms of \(a_1\): \(\ a_2=\)\{ans_rule(10)\} +$PAR +Answer in terms of \(a_0\): \(\ a_2=\)\{ans_rule(10)\} +$PAR + +$BBOLD Part (d) $EBOLD $PAR + +Write \(a_3\) in terms of \(a_2\). Then write \(a_3\) in terms of \(a_0\). +When writing your answer, use \(a2\) for \(a_2\) +$PAR +Answer in terms of \(a_2\): \(\ a_3=\)\{ans_rule(10)\} +$PAR +Answer in terms of \(a_0\): \(\ a_3=\)\{ans_rule(10)\} +$PAR + +$BBOLD Part (e) $EBOLD $PAR + +Write \(a_4\) in terms of \(a_3\). Then write \(a_4\) in terms of \(a_0\). +When writing your answer, use \(a3\) for \(a_3\) +$PAR +Answer in terms of \(a_3\): \(\ a_4=\)\{ans_rule(10)\} +$PAR +Answer in terms of \(a_0\): \(\ a_4=\)\{ans_rule(10)\} +$PAR + +$BBOLD Part (f) $EBOLD $PAR + +Observe that there is a pattern in (b)-(e). Find a general formula for \(a_k\) in terms of \(a_0\). +Use this formula to calculate \(a_{101}\) in terms of \(a_0\). +$PAR +Answer in terms of \(a_0\):\(\ a_{101} = \)\{ans_rule(10)\} +$PAR + +$BBOLD Part (g) $EBOLD $PAR + +Using your formula for \(a_i\) in part (f), write the series expansion for \(y\) using only +the unknown coefficient \(a_0\). Factor out \(a_0\) and determine what familiar functions satisfy the +differential equation \(y' = ky\). \{#'# syntax color issue\} +({\bf Hint}: Compare to a familiar Taylor series.) +$PAR +Answer: \(\ y = \)\{ans_rule(10)\} +$PAR + +END_TEXT + +###################################### +## Compute Solutions +###################################### + +Context()->normalStrings; + + +# Answers to (a) +ANS( $mc->cmp() ); +ANS( $mc1->cmp() ); + +# Answers to (b) +ANS( Compute($rel1) -> cmp ); + +# Answers to (c) +ANS( Compute($rel2_1) -> cmp ); +ANS( Compute($rel2_0) -> cmp ); + +# Answers to (d) +ANS( Compute($rel3_2) -> cmp ); +ANS( Compute($rel3_0) -> cmp ); + +# Answers to (e) +ANS( Compute($rel4_3) -> cmp ); +ANS( Compute($rel4_0) -> cmp ); + +# Answers to (f) +ANS( Compute($rel101_0) -> cmp ); + +# Answers to (g) +ANS( Compute($impossibleAnswer) -> cmp ); + + + +Context()->texStrings; +SOLUTION(EV3(<<'END_SOLUTION')); +$PAR SOLUTION $PAR + + +Differentiation term by term gives +\[y' = \sum_{k=1}^{\infty} ka_kx_{k-1}.\] +We then substitute this series into the differential equation \(y' = ky\) to obtain the equation + + + +When we write the first few terms of the series on either side of our differential equation we obtain +\[a_1 + (2)a_2x + (3)a_3x^2 + (4)a_4x^3 + \cdots + (k+1)a_{k+1}x^{k} + \cdots = a_0 + a_1x + a_2x^2 + \cdots + a_kx^k + \cdots.\] +Equating the constant terms gives us \(a_1 = a_0\). + + +Equating the degree 1 terms gives us \(2a_2 = a_1\) or \(a_2 = \frac{a_1}{2}\). Since \(a_1 = a_0\), we have \(a_2 = \frac{a_0}{2}\). + + +Equating the degree 2 terms gives us \(3a_3 = a_2\) or \(a_3 = \frac{a_2}{3}\). Since \(a_2 = \frac{a_0}{2}\), we have \(a_3 = \frac{a_0}{3!}\). + + +Equating the degree 3 terms gives us \(4a_4 = a_3\) or \(a_4 = \frac{a_3}{4}\). Since \(a_3 = \frac{a_0}{3!}\), we have \(a_4 = \frac{a_0}{4!}\). + + +Equating the degree \(k-1\) terms gives us \(ka_k = a_{k-1}\) or \(a_k = \frac{a_{k-1}}{k}\). It appears that \(a_{k-1} = \frac{a_0}{(k-1)!}\), so we have +\[a_k = \frac{a_0}{k!}.\] + + +Since \(a_k = \frac{a_0}{k!}\) we have +\[y = a_0 \sum_{k=0}^{\infty} \frac{x^k}{k!}.\] +So the functions that satisfy the differential equation \(y' = ky\) are the exponential functions of the form \(y = a_0e^x\). + + +END_SOLUTION +Context()->normalStrings; + +ENDDOCUMENT(); + + + From 24af4902ee998acce1e73af3d2a92dc7dd754c9b Mon Sep 17 00:00:00 2001 From: Branden Stone Date: Sat, 3 Mar 2018 18:04:46 -0500 Subject: [PATCH 3/3] cleaned up files --- Contrib/Westmont/ActiveCalculus/Preview_8_1/preview_8_1_abcd.pg | 1 - .../Westmont/ActiveCalculus/Preview_8_2/preview_8_2_abcdef.pg | 1 - 2 files changed, 2 deletions(-) delete mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_1/preview_8_1_abcd.pg delete mode 100644 Contrib/Westmont/ActiveCalculus/Preview_8_2/preview_8_2_abcdef.pg diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_1/preview_8_1_abcd.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_1/preview_8_1_abcd.pg deleted file mode 100644 index d11d968c1f..0000000000 --- a/Contrib/Westmont/ActiveCalculus/Preview_8_1/preview_8_1_abcd.pg +++ /dev/null @@ -1 +0,0 @@ -preview activity diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_2/preview_8_2_abcdef.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_2/preview_8_2_abcdef.pg deleted file mode 100644 index d11d968c1f..0000000000 --- a/Contrib/Westmont/ActiveCalculus/Preview_8_2/preview_8_2_abcdef.pg +++ /dev/null @@ -1 +0,0 @@ -preview activity