[npl] / trunk / NationalProblemLibrary / Rochester / setIntegrals0Theory / sc5_2_2a.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/Rochester/setIntegrals0Theory/sc5_2_2a.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 197 - (download) (annotate)
Fri Apr 28 21:06:19 2006 UTC (7 years ago) by jjholt
File size: 987 byte(s)
*** empty log message ***

    1 ## DESCRIPTION
    2 ## Calculus
    3 ## ENDDESCRIPTION
    4 
    5 ## KEYWORDS('integral' 'summation' 'area' 'riemann')
    6 ## Tagged by tda2d
    7 
    8 ## DBsubject('Calculus')
    9 ## DBchapter('Integrals')
   10 ## DBsection('Area and Distance')
   11 ## Date('')
   12 ## Author('')
   13 ## Institution('Rochester')
   14 ## TitleText1('')
   15 ## EditionText1('')
   16 ## AuthorText1('')
   17 ## Section1('')
   18 ## Problem1('')
   19 
   20 DOCUMENT();        # This should be the first executable line in the problem.
   21 
   22 loadMacros(
   23 "PG.pl",
   24 "PGbasicmacros.pl",
   25 "PGchoicemacros.pl",
   26 "PGanswermacros.pl",
   27 "PGauxiliaryFunctions.pl"
   28 );
   29 
   30 TEXT(beginproblem());
   31 $showPartialCorrectAnswers = 1;
   32 
   33 $l= random(3, 5, 1);
   34 $k= random(0,2,1);
   35 $lbound =-.5-$k;
   36 $ubound = $l+.5;
   37 $n = 1+$k+$l;
   38 
   39 BEGIN_TEXT
   40 Use the Midpoint Rule  to approximate \[ \int_{$lbound}^{$ubound} x^3 dx\]
   41   with \( n= $n \).$BR
   42  \{ans_rule(40)\}
   43 
   44 END_TEXT
   45 
   46 $ansA = .25*($l**4 + 2*$l**3 + $l**2 - $k**4 -2*$k**3 -$k**2);
   47 
   48 ANS(num_cmp($ansA));
   49 
   50 ENDDOCUMENT();        # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9