Calculus & Analytic Geometry II, MTH 169  

(Instructor: M. USMAN) 

Lab#2 

 

 

Objectives: In this lab we will apply Integral Test  and Direct Comparison Test to check the convergence of series. 

Integral Test 

 

Estimates of sum from integral test: Let f be a positive, continuous and decreasing function for  

If  

 

Example. Use Maple to evaluate the infinite sum  sum(`/`(1, `*`(`^`(n, 2))), n = 1 .. infinity) . 

> sum('1/n^2', 'n'=1..infinity);
 

`+`(`*`(`/`(1, 6), `*`(`^`(Pi, 2))))
 

> evalf(%);
 

1.644934068
 

 

Example. Use Maple to evaluate the infinite sum  sum(`/`(`*`(`^`(ln(`+`(n, 1)), 2)), `*`(`^`(n, 2))), n = 1 .. infinity) . 

> sum('(ln(n+1))^2/(n^2)', 'n'=1..infinity);
 

sum(`/`(`*`(`^`(ln(`+`(n, 1)), 2)), `*`(`^`(n, 2))), n = 1 .. infinity)
 

> evalf(%);
 

sum(`/`(`*`(`^`(ln(`+`(n, 1)), 2)), `*`(`^`(n, 2))), n = 1 .. infinity)
 

Maple did not evaluate the sum, we can use the Integral Test to convince ourselves that this series converges. Lets plot the function to see if it is positive, decreasing and continuous on [1,infinity) 

> plot(ln(x+1)^2/x^2,x=1..10);
 

Plot_2d
 

> f:=x->(ln(x+1))^2/x^2;
 

proc (x) options operator, arrow; `/`(`*`(`^`(ln(`+`(x, 1)), 2)), `*`(`^`(x, 2))) end proc (1)
 

> int(f,1..infinity);
 

int(`/`(`*`(`^`(ln(`+`(_X, 1)), 2)), `*`(`^`(_X, 2))), _X = 1 .. infinity)
 

> evalf(%);
 

2.605840095
 

Since the integral converges, the series does too. Remember that the series and the integral are not equal. We can sketch f(x) and the inscribed rectangles (with bases having width 1) which represent the terms of the series: 

> with(student):
 

 

> f:=x->(ln(x+1))^2/x^2;
 

proc (x) options operator, arrow; `/`(`*`(`^`(ln(`+`(x, 1)), 2)), `*`(`^`(x, 2))) end proc (2)
 

> rightbox(f(x), x=1..51,50);
 

Plot_2d
 

One way to approximate an infinite sum is to use a partial sum  -- a sum of a finite number of terms.  Suppose we want to use the first 50 terms of this series as an approximation to the sum of the infinite series. 

> s50:=evalf(sum('f(n)','n'=1..50));
 

2.366661804
 

An estimate for the errror (discussed in class) is that: 

 

                    int(`*`(f, `*`(x)), x = `+`(n, 1) .. infinity)    < R[n] <    int(`*`(f, `*`(x)), x = n .. infinity) 

 

We can have Maple compute these integrals for us. 

> leb:=evalf(int(f, 51..infinity));
 

.4982232843
 

> ueb:=evalf(int(f,50..infinity));
 

.5043156253
 

Since the error R[50] is between leb and ueb, the sum S of the whole series lies in the interval  

[`+`(s50, leb), `+`(s50, ueb)]. An improved estimate for S is the midpoint of this interval: 

> ImpS:=s50+(leb+ueb)/2;
 

2.867931259
 

The error is now at most: 

> (ueb-leb)/2;
 

0.30461704e-2
 

Comparison Test: 

 

Let  

1. If  

2. If  

Example: Use the Direct Comparison Test to show that the following series converges 

sum(`+`(`/`(`*`(4), `*`(`+`(`*`(`^`(n, 3)), n, 10)))), n = 1 .. infinity) 

 

Solution: 

sum(`+`(`/`(`*`(4), `*`(`^`(n, 3)))), n = 1 .. infinity) = 4 sum(`/`(1, `*`(`^`(n, 3))), n = 1 .. infinity) 

 

`+`(sum(`/`(`*`(is, `*`(a, `*`(p))), `*`(`^`(n, 3))), n = 1 .. infinity), `-`(series)) with p=3>1 so it converges and thus  

 

 

 

 

Thus