[npl] / trunk / NationalProblemLibrary / WHFreeman / Rogawski_Calculus_Early_Transcendentals_Second_Edition / 10_Infinite_Series / 10.4_Absolute_and_Conditional_Convergence / 10.4.15.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.15.pg

Tue Nov 8 15:17:41 2011 UTC (2 years, 5 months ago) by aubreyja
File size: 2409 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('')
3 # DBsection('')
4 # KEYWORDS('')
5 # TitleText1('Calculus: Early Transcendentals')
6 # EditionText1('2')
7 # AuthorText1('Rogawski')
8 # Section1('10.4')
9 # Problem1('15')
10 # Author('LA Danielson')
11 # Institution('The College of Idaho')
12 DOCUMENT();
13
15
19
21
22 #Book Values
23 #$series = \sum (-1)^n/(n)(n+3)(n+4) 24 25$errorp = random(3,4,1);
26 $a=Real(random(1,10,1)); 27 do{$b=Real(random(1,10,1));}until($b!=$a);
28 if($errorp>3){#modify constants so magnitude of N similar for all 29$a+=70;
30    $b+=70; 31 } 32$ap1 = $a+1; 33$bp1 = $b+1; 34 35$tolerance =10**(-$errorp); 36 37 38$term = Formula("(-1)^(n+1)/((n+$a)(n+$b))");
39
40 $error = sprintf "%.2f",(sqrt(($ap1+$bp1)**2-4*($ap1*$bp1-10**$errorp))-$ap1-$bp1)/2;
41 $N = Real(int($error)+1);
42
43 $answer=0; 44 45 for($i=1;$i<=$N;$i++){ 46$answer+=$term->eval(n=>$i);
47 }
48
49 Context()->texStrings;
50
51 BEGIN_TEXT
52 \{ beginproblem() \}
53 \{ textbook_ref_exact("Rogawski ET 2e", "10.4", "15") \}
54 $PAR 55 Approximate the value of the series to within an error of at most $$10^{-errorp}$$. 56 57 $\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{(n+a)(n+b)}$ 58$PAR
59 According to Equation (2):
60 $\left| S_N-S \right|\le a_{N+1}$
61 what is the smallest value of $$N$$ that approximates $$S$$ to within an error of at most $$10^{-errorp}$$?
62 $BR 63 $$N =$$ \{ ans_rule() \} 64$PAR
65 $$S\approx$$ \{ ans_rule() \}
66 END_TEXT
67
68 Context()->normalStrings;
69 Context()->flags->set(tolerance=>$tolerance); 70 71 #Answer Check Time! 72 ANS($N->cmp);
73 ANS(Real("$answer")->cmp); 74 75 Context()->texStrings; 76 SOLUTION(EV3(<<'END_SOLUTION')); 77$PAR
78 \$SOL
79 Let $$S = \sum _{n=1}^{\infty} \frac{ (-1)^{n+1}}{(n+a)(n+b)}$$, so that $$a_n = \frac{1}{(n+a)(n+b)}$$.  By Equation (2),
80
81
82 $| S_N - S | \le a_{N+1} = \frac{1}{(N+ap1)(N+bp1)}.$
83 We must choose $$N$$ so that
84 $\frac{1}{(N+ap1)(N+bp1)} \le 10^{-errorp} \quad \textrm{or} \quad (N+ap1)(N+bp1) \ge 10^{errorp}.$
85
86 Solving this quadratic inequality yields $$N \ge error$$.   The smallest value that satisfies the required inequality is then $$N=N$$.
87
88 Thus $S \approx S_{N} = \sum_{n=1}^{N} \frac{ (-1)^{n+1}}{(n+a)(n+b)} = answer$
89
90
91 END_SOLUTION
92
93 ENDDOCUMENT()