Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
##DESCRIPTION
##KEYWORDS('integrals', 'trigonometric','substitution')

## DBsubject('Calculus')
## DBchapter('Techniques of Integration')
## DBsection('Trigonometric Substitution')
## Date('2/22/13')
## Author('Barbara Margolius')
## Institution('Cleveland State University')
## TitleText1('')
## EditionText1('')
## AuthorText1('')
## Section1('')
## Problem1('1')
##ENDDESCRIPTION

############################################################################
## development of this problem is supported in part by the National Science#
## Foundation under the grant DUE-0941388. #
############################################################################

DOCUMENT(); # This should be the first executable line in the problem.

loadMacros(
"PGstandard.pl",
"AppletObjects.pl",
"MathObjects.pl",
"parserFormulaUpToConstant.pl",
);

TEXT(beginproblem());
$showPartialCorrectAnswers = 1;

$a = random(2,9,1);

$a2 = $a*$a;

$funct = FormulaUpToConstant("x/2*sqrt($a2+x^2)+$a2/2*ln(x+sqrt($a2+x^2))");

###################################
# Create link to applet
###################################
$appletName = "trigSubWW";
$applet = FlashApplet(
codebase => findAppletCodebase("$appletName.swf"),
appletName => $appletName,
appletId => $appletName,
setStateAlias => 'setXML',
getStateAlias => 'getXML',
setConfigAlias => 'setConfig',
maxInitializationAttempts => 10, # number of attempts to initialize applet
#answerBoxAlias => 'answerBox',
height => '550',
width => '595',
bgcolor => '#e8e8e8',
debugMode => 0,
);

###################################
# Configure applet
###################################

$applet->configuration(qq{<xml><trigString>sec</trigString></xml>});
$applet->initialState(qq{<xml><trigString>sec</trigString></xml>});

##################################
# Setup Flash applet -- this does not need to be changed
###################################

TEXT(MODES(TeX=>"", HTML=><<'END_TEXT'));
<script>
if (navigator.appVersion.indexOf("MSIE") > 0) {
document.write("<div width='3in' align='center' style='background:yellow'>You seem to be using Internet Explorer.<br/>It is recommended that another browser be used to view this page.</div>");
}
</script>
END_TEXT

BEGIN_TEXT

Evaluate the indefinite integral.
$BR \[ \int \sqrt{$a2 + x^2}\; dx \]
$BR \{ans_rule( 50) \}

END_TEXT

ANS( $funct->cmp() );

##################################
Context()->texStrings;
TEXT($PAR, $BBOLD, $BITALIC, "Hi $studentLogin, If you don't get this in 5 tries I'll give you a hint with an applet to help you out.", $EITALIC, $EBOLD, $PAR);

$im = image( "trigsub.png",
width=>486, height=>306, tex_size=>900 );

$showHint=5;
Context()->normalStrings;
TEXT(hint(
$PAR, MODES(TeX=>'object code', HTML=>$applet->insertAll(
debug =>0, reinitialize_button => 0, includeAnswerBox=>0,
), TeX=>$im),"Follow the step-by-step questions in the hint in the online version of this problem."
));

##################################
Context()->normalStrings;

##################################
Context()->texStrings;
SOLUTION(EV3(<<'END_SOLUTION'));
$BBOLD Solution: $EBOLD $PAR
To evaluate this integral use a trigonometric substitution. For this problem use the \(\tan\) substitution. \[x = {$a}\tan(\theta)\]
So:
\[dx = {$a}\sec^2(\theta) \; d\theta\]
Therefore:
\[\int \sqrt{$a2 + x^2} \;dx=\int \sqrt{$a2+$a2\tan\theta}($a\sec^2\theta) \; d\theta\]
\[=\int $a2\sec^3\theta \; d\theta\]

$BR$BR
Before proceeding to the several methods we can use to evaluate the integral of \(\sec^3\theta\), note that \(\tan\theta=\frac{x}{$a}\), and \(\sec\theta=\frac{$a2+x^2}{$a}\). To see this, label a right triangle so that the tangent is \(x/$a\). We will have the opposite side with length \(x\), and the adjacent side with length \($a\), so the hypotenuse has length \(\sqrt{$a2+x^2}\).

$BR
From this point, we have several choices as to how to evaluate the integral of \(\sec^3\theta\).

$BR$BR
Method 1:

$BR
Look up the antiderivative of \(\int\sec^3\theta d\theta\). It is

\[\int\sec^3\theta d\theta=\frac{1}{2}\sec\theta\tan\theta+\frac{1}{2}\ln\left|\sec\theta+\tan\theta\right|+C\]

$BR$BR
so
\[ \int \sqrt{$a2 + x^2}\; dx=\frac{$a2}{2}\sec\theta\tan\theta+\frac{$a2}{2}\ln\left|\sec\theta+\tan\theta\right|+C \]

$BR
Substituting back in terms of \(\theta\) yields:
\[\frac{$a2}{2}\frac{\sqrt{$a2+x^2}}{$a}\frac{x}{$a}+\frac{$a2}{2}\ln\left|\frac{\sqrt{$a2+x^2}}{$a}+\frac{x}{$a}\right|+C \]
Simplifying:
\[\frac{x\sqrt{$a2+x^2}}{2}+\frac{$a2}{2}\ln\left|\frac{\sqrt{$a2+x^2}}{$a}+\frac{x}{$a}\right|+C \]


$BR$BR
Method 2:

$BR
Use the rule for substitution for products of sines and cosines. If sine is to an odd power, use a cosine substitution. If cosine is to an odd power, use a sine substitution. \(\sec^3\theta=\cos^{-3}\theta\), and -3 is an odd number, so we use a sine substitution.

$BR
Let \(u=\sin\theta\), then \(du=\cos\theta d\theta\) so
\[\int $a2\sec^3\theta \; d\theta=$a2\int\frac{1}{\cos^3\theta}d\theta\]
\[=$a2\int\frac{\cos\theta}{\cos^4\theta}d\theta\]
\[=$a2\int\frac{\cos\theta}{(1-\sin^2\theta)^2}d\theta\]
\[=$a2\int\frac{du}{(1-u^2)^2}du\]
From here, we use a partial fractions decomposition:
\[$a2\int\frac{du}{(1-u^2)^2}du=$a2\int\left[\frac{A}{(1-u)^2}+\frac{B}{1-u}+\frac{C}{(1+u)^2}+\frac{D}{1+u}\right]du\]

$BR
Solving for the constants \(A\), \(B\), \(C\) and \(D\) we find that \(A=B=C=D=\frac{1}{4}\).

$BR$BR
\[\int $a2\sec^3\theta \; d\theta=\frac{$a2}{4}\int\frac{1}{(1-u)^2}+\frac{1}{1-u}+\frac{1}{(1+u)^2}+\frac{1}{1+u}du \]
\[=\frac{$a2}{4}\left(\frac{1}{1-u}-\ln|1-u|-\frac{1}{1+u}+\ln|1+u|\right)+C \]
\[=\frac{$a2}{4}\left(\frac{2u}{1-u^2}+\ln\left|\frac{1+u}{1-u}\right|\right)+C \]
\[=\frac{$a2}{4}\left(\frac{2\sin\theta}{1-\sin^2\theta}+\ln\left|\frac{1+\sin\theta}{1-\sin\theta}\right|\right)+C \]
\[=\frac{$a2}{4}\left(\frac{2\sin\theta}{\cos^2\theta}+\ln\left|\frac{(1+\sin\theta)^2}{1-\sin^2\theta}\right|\right)+C \]
\[=\frac{$a2}{4}\left(2\sec\theta\tan\theta+\ln\left|\frac{(1+\sin\theta)^2}{\cos^2\theta}\right|\right)+C \]
\[=\frac{$a2}{2}\sec\theta\tan\theta+\frac{$a2}{2}\ln\left|\frac{1+\sin\theta}{\cos\theta}\right|+C \]
\[=\frac{$a2}{2}\sec\theta\tan\theta+\frac{$a2}{2}\ln|\sec\theta+\tan\theta|+C \]

$BR
Substituting back in terms of \(\theta\) yields:
\[\frac{$a2}{2}\frac{\sqrt{$a2+x^2}}{$a}\frac{x}{$a}+\frac{$a2}{2}\ln\left|\frac{\sqrt{$a2+x^2}}{$a}+\frac{x}{$a}\right|+C \]
Simplifying:
\[\frac{x\sqrt{$a2+x^2}}{2}+\frac{$a2}{2}\ln\left|\frac{\sqrt{$a2+x^2}}{$a}+\frac{x}{$a}\right|+C \]

$BR$BR
Method 3:

$BR
Use the secant reduction formula. The secant reduction formula is given by
\[\int \sec^n\theta d\theta=\frac{1}{n-1}\tan\theta\sec^{n-2}\theta+\frac{n-2}{n-1}\int\sec^{n-2}\theta d\theta.\]

$BR$BR
so
\[$a2\int\sec^3\theta d\theta = \frac{$a2}{2}\sec\theta\tan\theta+\frac{$a2}{2}\int\sec\theta d\theta.\]

$BR$BR
We can evaluate \(\int\sec\theta d\theta\) by looking the antiderivative up in a table (\(\int\sec\theta d\theta=\ln|\sec\theta+\tan\theta|+C\)) or we can derive this antiderivative using the substitution rule for products of sines and cosines. We have an odd power of the cosine, we use a sine substitution.

$BR$BR
\[\int\sec\theta d\theta=\int\frac{\cos\theta}{\cos^2\theta}d\theta\]
\[=\int\frac{\cos\theta}{1-\sin^2\theta}d\theta\]
\[=\int\frac{1}{1-u^2}du\]

$BR
Do a partial fractions decomposition.
\[\int\frac{1}{1-u^2}du=\frac{1}{2}\int\left(\frac{1}{1-u}+\frac{1}{1+u}\right)du\]
\[=\frac{1}{2}\left(-\ln|1-u|+\ln|1+u|\right)+C\]
\[=\frac{1}{2}\ln\left|\frac{1+u}{1-u}\right|+C\]
\[=\frac{1}{2}\ln\left|\frac{1+\sin\theta}{1-\sin\theta}\right|+C\]
\[=\frac{1}{2}\ln\left|\frac{(1+\sin\theta)^2}{1-\sin^2\theta}\right|+C\]
\[=\frac{1}{2}\ln\left|\frac{(1+\sin\theta)^2}{\cos^2\theta}\right|+C\]
\[=\ln\left|\frac{1+\sin\theta}{\cos\theta}\right|+C\]
\[=\ln\left|\sec\theta+\tan\theta\right|+C\]

so \[\int\sec\theta d\theta=\ln\left|\sec\theta+\tan\theta\right|+C\] and
\[$a2\int\sec^3\theta d\theta = \frac{$a2}{2}\sec\theta\tan\theta+\frac{$a2}{2}\int\sec\theta d\theta.\]
\[=\frac{$a2}{2}\sec\theta\tan\theta+\frac{$a2}{2}\ln\left|\sec\theta+\tan\theta\right|+C.\]


END_SOLUTION
Context()->normalStrings;
##################################


COMMENT('MathObject version. Uses Flash applet.');
ENDDOCUMENT(); # This should be the last executable line in the problem.
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
##DESCRIPTION
##KEYWORDS('integrals', 'trigonometric','substitution')

## DBsubject('Calculus')
## DBchapter('Techniques of Integration')
## DBsection('Trigonometric Substitution')
## Date('2/22/13')
## Author('Barbara Margolius')
## Institution('Cleveland State University')
## TitleText1('')
## EditionText1('')
## AuthorText1('')
## Section1('')
## Problem1('10')
##ENDDESCRIPTION

############################################################################
## development of this problem is supported in part by the National Science#
## Foundation under the grant DUE-0941388. #
############################################################################

DOCUMENT(); # This should be the first executable line in the problem.

loadMacros(
"PGstandard.pl",
"AppletObjects.pl",
"MathObjects.pl",
"parserFormulaUpToConstant.pl",
);

TEXT(beginproblem());
$showPartialCorrectAnswers = 1;

$a = random(2,9,1);

$a2 = $a*$a;
$a3 = $a2*$a;
$a4 = $a2*$a2;

$funct = FormulaUpToConstant("x/({$a2}*($a2-x^2)^(1/2))");
###################################
# Create link to applet
###################################
$appletName = "trigSubWW";
$applet = FlashApplet(
codebase => findAppletCodebase("$appletName.swf"),
appletName => $appletName,
appletId => $appletName,
setStateAlias => 'setXML',
getStateAlias => 'getXML',
setConfigAlias => 'setConfig',
maxInitializationAttempts => 10, # number of attempts to initialize applet
#answerBoxAlias => 'answerBox',
height => '550',
width => '595',
bgcolor => '#e8e8e8',
debugMode => 0,
);

###################################
# Configure applet
###################################

$applet->configuration(qq{<xml><trigString>sin</trigString></xml>});
$applet->initialState(qq{<xml><trigString>sin</trigString></xml>});

##################################
# Setup Flash applet -- this does not need to be changed
###################################

TEXT(MODES(TeX=>"", HTML=><<'END_TEXT'));
<script>
if (navigator.appVersion.indexOf("MSIE") > 0) {
document.write("<div width='3in' align='center' style='background:yellow'>You seem to be using Internet Explorer.<br/>It is recommended that another browser be used to view this page.</div>");
}
</script>
END_TEXT


###################################
# Main text

BEGIN_TEXT

Evaluate the indefinite integral.
$BR \[ \int \frac{ dx}{($a2 - x^2)^{3/2}} \]
$BR \{ans_rule( 50) \}

END_TEXT

$ans = $funct;
ANS( $funct->cmp() );
#ANS(fun_cmp($ans, limits=>[$lend,$rend], mode=>"antider", vars=>"x"));
##################################
Context()->texStrings;

###################################
TEXT($PAR, $BBOLD, $BITALIC, "Hi $studentLogin, If you don't get this in 5 tries I'll give you a hint with an applet to help you out.", $EITALIC, $EBOLD, $PAR);

$im = image( "trigsub.png",
width=>486, height=>306, tex_size=>900 );

$showHint=5;
Context()->normalStrings;
TEXT(hint(
$PAR, MODES(TeX=>'object code', HTML=>$applet->insertAll(
debug =>0, reinitialize_button => 0, includeAnswerBox=>0,
), TeX=>$im),"Follow the step-by-step questions in the hint in the online version of this problem."
));

##################################
Context()->texStrings;
SOLUTION(EV3(<<'END_SOLUTION'));
$BBOLD Solution: $EBOLD $PAR
To evaluate this integral use a trigonometric substitution. For this problem use the \(\tan\) substitution. \[x = {$a}\sin(\theta)\]

$BR$BR
Before proceeding note that \(\sin\theta=\frac{x}{$a}\), and \(\cos\theta=\frac{\sqrt{$a2-x^2}}{$a}\). To see this, label a right triangle so that the sine is \(x/$a\). We will have the opposite side with length \(x\), and the hypotenuse with length \($a\), so the adjacent side has length \(\sqrt{$a2-x^2}\).

$BR$BR
With the substitution \[x = {$a}\sin\theta\]
\[dx = {$a}\cos\theta \; d\theta\]
$BR$BR
Therefore:
\[\int \frac{ dx}{($a2 - x^2)^{3/2}}=
\int \frac{{$a}\cos\theta }{($a2 - $a2\sin^2\theta)^{3/2}}\;d\theta\]
\[=
\int \frac{{$a}\cos\theta }{$a3\cos^3\theta}\;d\theta\]
\[=
\frac{1 }{$a2}\int \sec^2\theta\;d\theta\]
\[=
\frac{1 }{$a2}\tan\theta+C\]

$BR
Substituting back in terms of \(\theta\) yields:
\[=
\frac{1 }{$a2}\tan\theta+C
=
\frac{ x}{{$a2}\sqrt{$a2-x^2} } +C \]
so
\[ \int \frac{ dx}{($a2- x^2)^{3/2}}=\frac{ x}{{$a2}\sqrt{$a2-x^2} } +C \]

END_SOLUTION
Context()->normalStrings;
##################################

COMMENT('MathObject version. Uses Flash applet.');

ENDDOCUMENT(); # This should be the last executable line in the problem.
Loading