# DESCRIPTION
# arc length for (x+a)^3 /12 + (x+a)^(-1) on [L,R] (with a >= 0)
# ENDDESCRIPTION
## DBsubject('Calculus')
## DBchapter('Applications of Integration')
## DBsection('Arc Length')
## KEYWORDS('calculus', 'integrals', 'integration', 'arc length')
## TitleText1('Calculus: Early Transcendentals')
## EditionText1('2')
## AuthorText1('Rogawski')
## Section1('8.1')
## Problem1('3')
## Institution('W.H.Freeman')
## Author('Dick Lane')
## Date('05/19/2011')
DOCUMENT();
loadMacros( "PGstandard.pl" , "MathObjects.pl" ,
"contextFraction.pl" ,
"freemanMacros.pl" ) ;
Context( "Fraction" ) ;
# Context() -> flags -> set(reduceConstants => 0,reduceConstantFunctions => 0);
$a = random(1,7,1) ;
$L = random(0,4,1) ; #### allowing L=0 is ok since a > 0
$R = $L + random(1,3,1) ; #### interval [ L , R ]
$W = Formula( "x + $a" ) ;
$f = Formula( "$W^3 / 12 + $W^(-1)" ) -> reduce ;
$fp = $f -> D -> reduce ;
$integrand = Formula( "$W^2 / 4 + $W^(-2)" ) -> reduce ;
$antideriv = Formula( "$W^3 / 12 - $W^(-1)" ) -> reduce ;
TEXT(beginproblem());
$showPartialCorrectAnswers = 0 ;
Context() -> texStrings ;
BEGIN_TEXT
\{ textbook_ref_exact("Rogawski ET 2e", "8.1", "3") \}$BR
The graph of \(\displaystyle f(x) = $f \)
on the interval \( [$L,$R] \) has
arc length $SPACE \{ ans_rule() \}
END_TEXT
$showHint = 3 ; #### default value is 1
BEGIN_HINT
$HINT
\( 1 + \left( y' \right)^2 \) is a perfect square.
END_HINT
Context() -> normalStrings;
$right = $antideriv -> substitute( x => $R ) -> reduce ;
$left = $antideriv -> substitute( x => $L ) -> reduce ;
$arc = Compute( "$right - $left" ) ;
ANS( $arc -> cmp() );
$Fp = "\frac{$W^2}{4} - \frac{1}{$W^2}" ;
Context() -> texStrings;
BEGIN_SOLUTION
$SOLUTION
\( y = $f \) implies \( y^\prime = $Fp \) and
\[\begin{aligned}
1 + (y^\prime)^2
& = 1 +
\left( \frac{($W)^4}{16} - \frac{1}{2} + \frac{1}{($W)^4} \right)\\
& = \frac{($W)^4}{16} + \frac{1}{2} + \frac{1}{($W)^4}
= \left( \frac{($W)^2}{4} + \frac{1}{($W)^2} \right)^2
\end{aligned} \]
Since \(\displaystyle $integrand > 0 \) on \( [$L,$R] \),
the arc length is
\[ \begin{aligned}
s & = \int_{$L}^{$R} \sqrt{ 1 + (y^\prime)^2 } \; dx \\
& = \int_{$L}^{$R }\left( \frac{($W)^2}{4} + \frac{1}{($W)^2} \right) dx \\
& = \left( $antideriv \right) \Bigg|_{$L}^{$R} \\
& = $right - $left
= $arc
\end{aligned} \]
END_SOLUTION
Context() -> normalStrings;
ENDDOCUMENT();