-
-
Notifications
You must be signed in to change notification settings - Fork 418
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from djhunter/branden_dev
Added Chapter 8 stuff for active calculus.
- Loading branch information
Showing
16 changed files
with
2,104 additions
and
0 deletions.
There are no files selected for viewing
272 changes: 272 additions & 0 deletions
272
Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_a.pg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
|
||
|
||
|
80 changes: 80 additions & 0 deletions
80
Contrib/Westmont/ActiveCalculus/Preview_5_5/preview_5_5_b.pg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
|
||
|
||
|
||
|
Oops, something went wrong.