[npl] / trunk / NationalProblemLibrary / WHFreeman / Rogawski_Calculus_Early_Transcendentals_Second_Edition / 10_Infinite_Series / 10.4_Absolute_and_Conditional_Convergence / 10.4.13.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/WHFreeman/Rogawski_Calculus_Early_Transcendentals_Second_Edition/10_Infinite_Series/10.4_Absolute_and_Conditional_Convergence/10.4.13.pg

Tue Nov 8 15:17:41 2011 UTC (18 months, 1 week ago) by aubreyja
File size: 2441 byte(s)
Rogawski problems contributed by publisher WHFreeman. These are a subset of the problems available to instructors who use the Rogawski textbook. The remainder can be obtained from the publisher.

    1 # DBsubject('Calculus')
2 # DBchapter('Infinite Series and Sequences')
3 # DBsection('Alternating Series')
4 # KEYWORDS('calculus', 'series', 'sequences', 'alternating series', 'convergence')
5 # TitleText1('Calculus: Early Transcendentals')
6 # EditionText1('2')
7 # AuthorText1('Rogawski')
8 # Section1('10.4')
9 # Problem1('13')
10 # Author('LA Danielson')
11 # Institution('The College of Idaho')
12 DOCUMENT();
13
15
19
21
22 #Book Values
23 #$series = \sum (-1)^(n+1)/n^4 24 25$errorp = random(4,5,1);
26 $plus = random(1,2,1); 27$exponent = $errorp +$plus;
28 $tolerance =10**(-$errorp);
29
30
31 $terms = Formula("(-1)^(n+1)/(n^($exponent))");
32
33 #$error = 10**($errorp/$exponent)-1; 34$error = sprintf "%.2f",10**($errorp/$exponent)-1;
35 $N = Real(int($error) + 1);
36 $answer=0; 37$sum = "1";
38 @sign = ("-","+");
39
40 for($i=1;$i<=$N;$i++){
41   $answer+=$terms->eval(n=>$i); 42 if($i>1){
43       $sum.="$sign[$i%2]\frac{1}{$i^{$exponent}}"; 44 } 45 } 46 47 Context()->texStrings; 48 49 BEGIN_TEXT 50 \{ beginproblem() \} 51 \{ textbook_ref_exact("Rogawski ET 2e", "10.4", "13") \} 52$PAR
53 Approximate the value of the series to within an error of at most $$10^{-errorp}$$.
54
55
56 $\sum_{n=1}^{\infty} \frac{ (-1)^{n+1}}{n^{exponent}}$
57 According to Equation (2):
58 $\left| S_N-S \right|\le a_{N+1}$
59 what is the smallest value of $$N$$ that approximates $$S$$ to within an error of at most $$10^{-errorp}$$?
60 $BR 61 $$N =$$ \{ ans_rule() \} 62$PAR
63 $$S\approx$$ \{ ans_rule() \}
64 END_TEXT
65
66 Context()->normalStrings;
67 Context()->flags->set(tolerance=>$tolerance); 68 69 #Answer Check Time! 70 ANS($N->cmp);
71 ANS(Real("$answer")->cmp); 72 73 Context()->texStrings; 74 SOLUTION(EV3(<<'END_SOLUTION')); 75$PAR
76 \$SOL
77 Let $$S = \sum _{n=1}^{\infty} \frac{ (-1)^{n+1}}{n^{exponent}}$$, so that $$a_n = \frac{1}{n^{exponent}}$$.  By Equation (2),
78
79 $| S_N - S | \le a_{N+1} = \frac{1}{(N+1)^{exponent}}.$
80
81 To make the error less than $$10^{-errorp}$$, we must choose $$N$$ so that
82 $\frac{1}{(N+1)^{exponent}} < 10^{-errorp} \qquad\textrm{or}\qquad N > 10^\frac{errorp}{exponent}-1\approx error.$
83
84 The smallest value that satisfies the required inequality is then $$N=N$$.  Thus,
85 $S \approx S_{N} = sum = answer$
86
87
88 END_SOLUTION
89
90 ENDDOCUMENT()