DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'answerHints.pl', 'PGcourse.pl');

Context()->variables->are(x => 'Real', dx => 'Real', y => 'Real', dy => 'Real');

$upper = Real('1');
$lower = Real('0');
$int   = Compute('(pi x^2 - pi x^4) dx');
$vol   = Compute('2pi/15');

$upperLimit = NEW_ANS_NAME();
$lowerLimit = NEW_ANS_NAME();
$integrand  = NEW_ANS_NAME();
$volume     = NEW_ANS_NAME();

BEGIN_PGML
Set up and evaluate an integral for the volume of the solid of revolution
obtained by rotating the region bounded by [`y = x`] and [`y = x^2`] about
the [`x`]-axis.

[#
    [. .] [.[_]{$upper->cmp(weight => 5)}{4}{$upperLimit}.]*

    [.[`V =`].]
    [.[``\int``].]
    [.
        [_]{
            $int->cmp(weight => 40)->withPostFilter(AnswerHints(
                Formula('pi x^2 - pi x^4 dx') =>
                    "Don't forget to multiply every term in the integrand by dx",
                Formula('pi(x^2 - x^4)')   => "Don't forget the differential dx",
                Formula('pi(x^4 - x^2)dx') => 'Is the parabola above the line?',
                Formula('pi(x^4 - x^2)')   => 'Is the parabola above the line?',
                Formula('pi(x - x^2)')     => 'Make sure you use the disk method.',
                Formula('pi(x - x^2)dx')   => 'Make sure you use the disk method.',
            ))
        }{10}{$integrand}
    .]
    [.[`\;=\;`].]
    [.[_]{$vol->cmp(weight => 50)}{4}{$volume}.]*

    [. .] [.[_]{$lower->cmp(weight => 5)}{4}{$lowerLimit}.]
#]*{
    align      => 'rl',
    valign     => 'middle',
    allcellcss => { padding => '3pt' }
}
END_PGML

BEGIN_PGML_SOLUTION
Solution explanation goes here.
END_PGML_SOLUTION

ENDDOCUMENT();