[npl] / trunk / NationalProblemLibrary / Rochester / setSeries1Definitions / ur_sr_1_6.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Rochester/setSeries1Definitions/ur_sr_1_6.pg

Wed Oct 17 17:35:27 2012 UTC (8 months ago) by jj
File size: 1154 byte(s)
Took pairs of problems which were exact duplicates except for their tags,
merged tags, and made one point to the other.


    1 ## DESCRIPTION
2 ##   Series Notation
3 ## ENDDESCRIPTION
4
5 ## Tagged by nhamblet
6
7 ## DBsubject('Calculus')
8 ## DBchapter('Infinite Sequences and Series')
9 ## DBsection('Infinite Sequences and Series')
10 ## Date('6/3/2002')
11 ## TitleText1('Calculus: Early Transcendentals')
12 ## AuthorText1('Stewart')
13 ## EditionText1('6')
14 ## Section1('11.1')
15 ## Problem1('25')
16 ## KEYWORDS('Series', 'Finite','')
17
18 DOCUMENT();        # This should be the first executable line in the problem.
19
21 "PG.pl",
22 "PGbasicmacros.pl",
23 "PGchoicemacros.pl",
25 "PGgraphmacros.pl"
26 );
27
28 TEXT(beginproblem());
29 $showPartialCorrectAnswers = 1; 30 31$a = random(3,5,1);
32 $b = random(-5,10); 33$c = random(1,3,1);
34
35 if ($a == 3) {$ans = $c**2 - ($c+1)**2 + ($c+2)**2 - ($c+3)**2 + 4*$b;} 36 if ($a == 4) {$ans =$c**2 - ($c+1)**2 + ($c+2)**2 - ($c+3)**2 + ($c+4)**2 + 5*$b;} 37 if ($a == 5) {$ans =$c**2 - ($c+1)**2 + ($c+2)**2 - ($c+3)**2 + ($c+4)**2 - ($c+5)**2 + 6*$b;}
38
39 BEGIN_TEXT
40 Evaluate the sum:
41 $\sum_{k=0}^{a}{((-1)^k (k+c)^2+b)}$
42 \{ans_rule(20)\}
43
44 END_TEXT
45 ANS(num_cmp(\$ans, mode=>"arith"));
46
47 ENDDOCUMENT();       # This should be the last executable line in the problem.