You are on page 1of 31

Lecture Notes on Numerical Analysis

Harris R. Dela Cruz


Bulacan State University
Malolos, Bulacan

1 Mathematical Preliminaries
This section reviews some of the results from calculus that are frequently used in this
course. Only definitions and important theorems are provided. However, the readers are
assumed to be familiar with a first course in calculus. Throughout, we use the following
notations:
N = {1, 2, 3, . . .} - the set of natural numbers
Z = {0,
n m1, 2, 3, . . .} - the
o set of integers
Q= | m, n N, n 6= 0 - the set of rational numbers
n
R - the set of real nuumbers

1.1 Function
A function can be thought of as a correspondence from a set X of real numbers to a set
Y of real numbers where a number x X is map to a unique value y Y .

Definition 1.1.1. A function f from a set X to a set Y , denoted by f : X Y , is a rule


that assign to each element x X a unique element y = f (x) Y . It can be thought of
as ordered pairs of numbers (x, y) in which no two distinct ordered pairs have the same
first number.
The element f (x) is called the image of x under f . The set of all admissible values
of x is called the domain of the function, and the set of all resulting values of y is called
the range of the function. The domain and range of f are denoted by dom f and ran f ,
respectively.

1
1.2 Examples of Functions
I. Linear Function is a function whose equation can be written in the form

f (x) = mx + b.

Its graph is a line with slope m and y-intercept b. If m = 0, the line is called a
constant function whose graph is a horizontal line passing through (0, b).

R if m 6= 0,
dom f = R, ran f =
{b} if m = 0

II. Quadratic Function is a function whose equation can be written in the form

f (x) = ax2 + bx + c, (a 6= 0).

Its graph is a parabola opening upward if a > 0, or downward if a < 0. The graph
can be describe by its roots x1 and x2 given by

b + b2 4ac b b2 4ac
x1 = and x2 =
2a 2a
and the vertex V (h, k) given by the formula

4ac b2
 
b b
h= and k=f = .
2a 2a 4a
The domain of f is all real numbers while the range depend on the value of a.
2
 
4ac b
, if a > 0,


4a

dom f = R, ran f =  2

4ac b
, if a < 0.


4a

III. Polynomial Function

P (x) = an xn + an1 xn1 + + a2 x2 + a1 x + a0 ,

where n > 0 is a positive integer and an 6= 0, is a polynomial function of degree


n. The linear function and quadratic functions are polynomial functions of degree
1 and 2, respectively.

2
IV. Rational Function
P (x)
f (x) = , Q(x) 6 0,
Q(x)
where P and Q are polynomials.
V. Trigonometric Functions

y = sin x y = csc x
y = cos x y = sec x
y = tan x y = cot x

VI. Exponential Function

y = bx , (b > 0, b 6= 1).

If b = e, then y = ex is called the natural exponential function.


VII. Logarithmic Function

y = logb x (b > 0, b 6= 1).

If b = e, then y = loge x = ln x is called the natural logarithmic function.

1.3 Continuity of a Function


Definition 1.3.1. A function f is said to be continuous at the number a if and only if the
following 3 conditions are satisfied:
(i) f (a) exists,
(ii) lim f (x) exists, and
xa

(iii) lim f (x) = f (a).


xa

If one or more conditions failed to hold at a, we say that the function f is discontinuous
at a.
Theorem 1.3.2 (Intermediate Value Theorem - IVT). If the function f is conitnuous
on the closed interval [a, b], and if a 6= b, then for any number k between f (a) and f (b),
there exists a number c between a and b such that f (c) = k.

3
Figure 1.3.1: The IVT assures the existence of c (a, b) such that f (c) = k.

Remark 1.3.1. The IVT assures that if f is continuous on [a, b], then f (x) assumes every
value between f (a) and f (b) as x ranges from a to b.
Theorem 1.3.3 (Intermediate-Zero Theorem - IZT). If the function f is continuous
on the closed interval [a, b] and if f (a) and f (b) have opposite signs, then there exists a
number c between a and b such that f (c) = 0
Example 1.3.1. Apply IZT to show that

f (x) = 2x3 2x2 4x + 1

has three zeros between 2 and 2.


Solution. We compute the values under f of x = 2, 1, 0, 1, 2. We obtain

f (2) = 15 f (1) = 1 f (0) = 1 f (1) = 3 f (2) = 1

Since f (x) changes signs from x = 2 to x = 1, it follows from the IZT that f has
a root between 2 and 1. Similarly, f has a root between x = 0 to x = 1, and another
root between x = 1 to x = 2.

Exercise for Section 1.3


1. State the Intermediate-Value Theorem, then determine if it holds for the function
f , the closed interval [a, b], and the given value of k. If the theorem does not hold,
state the reason. If the theorem holds, sketch the graph of f in the interval [a, b]
and show the point (c, k) on the graph.
(a) f (x) = 2 + x x2 , [a, b] = [0, 3], k = 1

(b) 100 x2 , [a, b] = [0, 8]. k = 8

4
(c) f (x) = x2 + 5x 6, [a, b] = [1, 2], k = 4

(d) 25 x2 , [a, b] = [4.5, 3]. k = 3
2. State the Intermediate-Zero Theorem then use the theorem to show that the func-
tion f has the indicated number of zeros between the number a and the number
b.
(a) f (x) = x3 + x + 3, two zeros, a = 2, b = 2
(b) f (x) = x3 6x + 3, three zeros, a = 5, b = 5
(c) f (x) = x4 + 7x3 + x 8, two zeros, a = 10, b = 5
(d) f (x) = 4x4 3x3 + 2x 5, two zeros, a = 3, b = 3
(e) f (x) = 3x4 21x3 + 36x2 + 2x 8, four zeros, a = 5, b = 5

1.4 Derivative of a Function


Definition 1.4.1. The derivative of a function f at the number x0 , denoted as f 0 (x0 ), is
defined by
f (x) f (x0 )
f 0 (x0 ) = lim
xx0 x x0
provided the limit exists.
If we let x = x x0 , then x 0 as x x0 . An alternative definition for f 0 (x0 )
is given by
f (x0 + x) f (x0 )
f 0 (x0 ) = lim .
x0 x
Definition 1.4.2. The derivative of the function f is that function denoted by f 0 such
that its value at a number x in the domain of f is given by
f (x + x) f (x)
f 0 (x) = lim .
x0 x
Definition 1.4.3. Suppose the function f is continuous at x0 . The tangent line to the
graph of f at the point P (x0 , f (x0 )) is
(i) the line thru P having slope m(x0 ) given by
f (x0 + x) f (x0 )
m(x0 ) = f 0 (x0 ) = lim ,
x0 x
if the limit exist; and

5
(ii) the line x = x0 if
f (x0 + x) f (x0 )
lim + is and
x0 x
f (x0 + x) f (x0 )
lim is
x0 x

Example 1.4.1. Find an equation of the tangent line to the graph of the given equation
at the given point (x0 , y0 ).

1. y = 9 x2 at the point (2, 5) 8


3. y = at the point (2, 1)
x2 + 4
2. y = x3 4 at the point (2, 4) 4. y = 4 tan 2x at the point (/8, 4)

Solution.

1. y = 9 x2 at the point (2, 5) 2. y = x3 4 at the point (2, 4)

f (x) = 9 x2 f (x) = x3 4
f 0 (x) = 2x f 0 (x) = 3x2
mT (2) = f 0 (2) = 4 mT (2) = f 0 (2) = 12

Using y = y0 = m(x x0 ) for the Using the slope mT = 12 and the


equation of a line, we have point (2, 4), we have

lT : y 5 = 4(x 2) lT : y 4 = 12(x 2)
y 5 = 4x + 8 y 4 = 12x 24
y = 4x + 13. y = 12x 20.

6
8 4. y = 4 tan 2x at the point (/8, 4)
3. y = at the point (2, 1)
x2 + 4

0 8(2x) 16x f 0 (x) = 4(sec2 x)(2)


f (x) = 2 =
(x + 4)2 (x2 + 4)2 f 0 (x) = 8 sec2 x
32 1 mT (/8) = f 0 (/8) = 8 sec2 (/4)
mT (2) = f 0 (2) = =
64 2
= 8( 2)2 = 16
Using the slope mT = 21 and the
point (2, 1), we have Using the slope mT = 16 and the
1 point (/8, 4), we have
lT : y 1 = (x 2)
2
1 lT : y 4 = 16(x )
y1= x+1 8
2
1 y 4 = 16x 2
y = x + 2. y = 16x 2 + 4.
2

Theorem 1.4.4 (Rolles Theorem). Let f be a function continuous on the bounded in-
terval [a, b] and differentiable on (a, b). If f (a) = f (b) = 0, then there is a number c in
the open interval (a, b) such that f 0 (c) = 0.

Theorem 1.4.5 (Mean Value Theorem). If the function f is continuous on the closed
interval [a, b] and differentiable on the open interval (a, b), then there is a number c
between a and b such that
f (b) f (a)
f 0 (c) = .
ba

7
Figure 1.4.1: The Rolles Theorem assures the existence of c such that the tangent line at (c, f (c)) has
slope 0

Example 1.4.2. Given f (x) = x3 x2 2x, verify that the MVT is satisfied for a = 1
and b = 3; then find a number c in the intervala (1, 3) such that

f (3) f (1)
f 0 (c) = .
31

Exercises for Section 1.4


1. Find an equation of the tangent line to the graph of the equation at the given point.
Sketch the graph and show a segment of the tangent line at the point.

(a) y = x2 + 4, (1, 5) (d) y = x3 + 3, (1, 4)


(b) y = 2x2 + 4x, (2, 0) (e) y = 1 x3 , (1, 7)
(c) y = x2 6x + 9, (3, 0)

2. Find the slope of the tangent line to the graph of the function f at the point
(x, f (x)) then find the points on the graph where the tangent line is horizontal.

(a) f (x) = 3x2 12x + 8 (c) f (x) = x3 6x2 + 9x 2


(b) f (x) = 7 6x x2 (d) f (x) = 2x3 3x2

3. Find the equation of the tangent line to the graph of the equation at the indicated
point

8
Figure 1.4.2: The MVT assures the existence of c such that the tangent line at (c, f (c)) is parallel to the
secant line passing through (a, f (a)) and (b, f (b)).

8
(a) y = x + 1; (3, 2) (e) y = ; (4, 4)
x
(b) y = 4 x; (5, 3)
4 (f) y = sin x; (/3, 3/2)
(c) y = 2 ; (2, 1)
x (g) y = cos x; (/4, 2/2)
8
(d) y = 2 ; (2, 1) (h) x2/3 + y 2/3 = 1 at x = 1/8
x +4

4. State the Rolles Theorem. Verify if the 3 conditions of the theorem are satisfied
by f on the indicated interval, then find a suitable value for c that satisfies the
conclusion of Rolles Theorem.

(a) f (x) = x3 4x + 3, [1, 3] (c) f (x) = sin 2x, [0, /2]


(b) f (x) = x3 2x2 x + 2, [1, 2] (d) f (x) = 3 cos2 x, [/2, 3/2]

5. State the Mean-Value Theorem. Verify if the hypothesis of the theorem is satisfied
for the function in the indicated interval [a, b], then find a suitable choice for c that
satisfy the conclusion of the theorem.

(a) f (x) = x2 + 2x 1, [0, 1] x2 + 4x


(f) f (x) = , [2, 6]
(b) f (x) = x2 , [3, 5] x7
(c) f (x) = x2 , [2, 4] (g) f (x) = sin x, [0, /2]
(d) f (x) = x3 + x2 x, [2, 1] (h) f (x) = 2 cos x, [/3, 2/3]
(e) f (x) = x2/3 , [0, 1]
9
1.5 Sequences
A sequence is a possibly infinite collection of numbers following a certain orders or
patterns. For instance
1 2 3 4
, , , ,...
3 5 7 9
The three dots with no number following indicate that there is no last number.

Definition 1.5.1. A sequence function is a function f whose domain is the set

{1, 2, 3, }

of all positive integers. If we let an = f (n), we may write the sequence as

{an }
n=1 = {a1 , a2 , a3 , . . .}

Example 1.5.1. Let f be the function defined by


n
f (n) = n = 1, 2, 3, . . .
2n + 1
Then f is a sequence function, and the elements defined by f are
1 2 3 4 n
, , , ,..., ,...
3 5 7 9 2n + 1
Definition 1.5.2. A sequence {an } has the limit L if the value an gets close to L as n
increases without bound (n ).
In a precise and usable form, this is equivalently saying that for any number  > 0,
there corresponds a number N > 0 such that if n is an integer and

if n > N, then |an L| < .

Theorem 1.5.3. If lim f (x) = L and f is defined for every positive integer, then
x

lim f (n) = L
n

where n is restricted to positive integers.

10
1.6 Infinite Series
Let us associate with the sequence

u1 , u2 , u3 , . . .

the infinite sum


u1 + u2 + u3 + . . . .
From the sequence u1 , u2 , u3 , . . ., we form the new sequence {sn } by adding successive
elements of un

s1 = u1
s2 = u1 + u2
s3 = u1 + u2 + u3
..
.
sn = u1 + u2 + u3 + + un .

The sequence {sn } obtained in this manner is a sequence of partial sums called infinite
series.

Definition 1.6.1. If {un } is a sequence and

sn = u1 + u2 + u3 + + un

then {sn } is a sequence of partial sums called an infinite series defined by



X
un = u1 + u2 + u3 + .
n=1

The numbers u1 , u2 , u3 , . . . are the terms of the infinite series.



X 1
Example 1.6.1. Given the infinite series ,
n=1
n(n + 1)

1. Find the first four terms of the infinite series.

2. Find a formula for sn in terms of n.

Solution.

11
1. We compute s1 , s2 , s3 , s4 .

s1 = u1 s2 = s1 + u2 s3 = s2 + u3 s4 = s3 + u4
1 1 1 2 1 3 1
= = + = + = +
1(2) 2 2(3) 3 3(4) 4 4(5)
1 2 3 4
= = = =
2 3 4 5

1 1 1
2. Observe that un = = . We have
n(n + 1) n n + 1
     
1 1 1 1 1 1
sn = + + +
1 2 2 3 3 4
   
1 1 1 1
... + +
n1 n+1 n n+1
Each term will cancel out except the first and the last term. Hence
1
sn = 1 .
n+1
P
Definition 1.6.2. Let un denote a given infinite series for which {sn } is the sequence
of partial sums. If
S = lim sn
n
exists, then the series is convergent and S is the sum of the series, that is

X
un = S.
n=1

If the limit does not exist, the series is divergent and the series does not have a sum.

X 1
Example 1.6.2. Determine if the infinite series has a sum.
n=1
n(n + 1)

Solution. We showed from Example 1.6.1 that the nth term of the sequence of partial
sum is given by
1
sn = 1
n+1

12
 
1
Since lim 1 = 1, the infinite series has a sum equal to 1, that is,
n n+1

X 1 1 1 1
= + + +
n+1
n(n + 1) 2 6 12
= 1.

X
Theorem 1.6.3. If the infinite series un is convergent, then lim un = 0.
n
n=1
Theorem 1.6.4. The harmonic series

X 1 1 1 1
= 1 + + + +
n=1
n 2 3 4
is divergent.
Theorem 1.6.5. The geometric series

X
arn = a + ar + ar2 + ar3 +
n=1
a
converges to the sum if |r| < 1, and diverges if |r| 1.
1r
Theorem 1.6.6. The series

X 1 1 1 1
=1+ + + +
n=1
n! 2 1 3 2 1 4 3 2 1
is convergent.
Theorem 1.6.7. The p-series

X 1 1 1 1
p
= 1 + p
+ p
+ p
+
n=1
n 2 3 4
diverges if p 1; and converges if p > 1.
Theorem 1.6.8. The alternating series

X
(1)n an = a0 a1 + a2 a3 +
n=0

where an are nonnegatives, is convergent provided lim an = 0 and an an1 .


n

13
1.7 Convergence Tests for Infinite Series
P
Theorem 1.7.1 (Comparison Test). Let the series an be a series of positive terms.
P
(i) If P terms known to be convergent and an bn for all
bn is a series of positive
positive integeres n, then an is also convergent.
P
(ii) If P terms known to be divergent and an bn for all
cn is a series of positive
positive integeres n, then an is also divergent.

Example 1.7.1. Use comparison test to determine whether the following series is con-
vergent or divergent.

X 4 X 1
1. 2.
n=1
3n + 1 n=1
n1

Solution.
 n
4
X X 4 X 1
1. The series n+1
is similar to the geometric series n
= 4 .
n=1
3 n=1
3 n=1
3
th
Comparing their n term, we have
4 4
an = < n = bn .
3n +1 3

X 4
By comparison test, since the geometric series is convergent, then so is .
n=1
3n + 1

X1 X 1 X 1
2. The series is similar to the p-series = 1/2
. Comparing
n=1
n 1 n=1
n n=1
n
th
their n term, we have
1 1
an = > = bn .
n1 n

X 1
By comparison test, since the p-series , with p = 1/2, is divergent, the
n=1
n

X 1
series is also divergent.
n=1
n 1

14
P P
Theorem 1.7.2 (Limit Comparison Test). Let an and bn be two series of positive
terms.
an
(i) If lim = c > 0, then the two series either both converge or both diverge.
ninf ty bn

an P P
(ii) If lim = 0 and if bn converges, then an also converges.
ninf ty bn

an P P
(iii) If lim = and if bn diverges, then an also diverges.
ninf ty bn

Example 1.7.2. Use limit comparison test to determine whether the following series is
convergent or divergent.

X 4 X 1 X 1
1. n
2. 3.
n=1
3 +1 n=1
n1 n=1
(n2 + 2)1/3

Solution.
 n
X 4 X 4 X 1
1. The series is similar to the geometric series = 4 .
n=1
3n + 1 n=1
3 n
n=1
3

4 n 1
n 3n 3 1
lim 3 + 1 = lim n = lim 3n = lim
n 4 n 3 + 1 n n + 1)
1 n 1
(3 1 +
3n 3n 3n
1
= =1
1+0

an X 4
By limit comparison test, since lim = 1 < 0, and n
is convergent, then
n bn 3
n=1

X 4
n+1
is also convergent.
n=1
3

X 1
2. The series is similar to the series
n=1
n1

X 1 X 1
= 1/2
,
n=1
n n=1
n

15
1 1
which is a p-series with p = 1/2. We let an = and bn = and compute
n1 n
an
lim .
n bn

1 1
n
n1 1 n n n
lim = lim = lim = lim
n 1 n n1 1 n n 1 n n 1 1

n n
r
n
n 1 1
= lim r = lim r = =1
n n 1 n 1 10
1
n n

an X 1 X 1
Since lim = 1 < 0 and is divergent, is also divergent.
n bn n n 1
n=1 n=1


X 1 X 1
3. The series 2 + 2)1/3
is similar to the series 2/3
, which is a p-series with
n=1
(n n=1
n
1 1
p = 2/3. We let an = 2 and bn = 2/3 .
(n + 2)1/3 n
1
(n2 + 2)1/3 1 n2/3 n2/3
lim = lim 2 = lim 2
n 1 n (n + 2)1/3 1 n (n + 2)1/3
n2/3
1
n2/3 2 1/3
(n ) 1
= lim = lim 
n 1 n 2
1/3
(n2 + 2)1/3 2 1/3 1 + 2/3
(n ) n
1
= =1
(1 + 0)2/3

X 1 X 1
Since the p-series 2/3
is divergent, the series 2 1/3
is also diver-
n=1
n n=1
(n + 2)
gent.

16
Theorem 1.7.3 (Integral Test). Let f be a function that is continuous, decreasing and
positive for all x 1. Then the infinite series

X
f (n) = f (1) + f (2) + f (3) +
n=1
Z Z
is convergent if f (x)dx exist, and it is divergent if f (x)dx = +.
1 1
P P
Definition 1.7.4. The infinite series an is absolutely convergent if the series |an |
is convergent. A series that is convergent but not absolutely convergent is said to be
conditionally convergent.
Theorem 1.7.5. If the series is absolutely convergent, then it is also convergent.
P
Theorem 1.7.6 (Ratio Test). Let an be a series for which every an is nonzero and let

an+1
L = lim .
n an

(i) If L < 1, the series is absolutely convergent.

(ii) If L > 1, the series is divergent.

(iii) If L = 1, no conclusion regarding convergence may be made from the test.


P
Theorem 1.7.7 (Root Test). Let an be a series for which every an is nonzero and let
p
L = lim n |an |.
n

(i) If L < 1, the series is absolutely convergent.

(ii) If L > 1, the series is divergent.

(iii) If L = 1, no conclusion regarding convergence may be made from the test.


Example 1.7.3. Determine whether the given series is convergent or divergent.
2n+1
X
n+1 n X
n3
X n+2
1. (1) 2. (1) 3. (1)n
n=1
2n n=1
n2n n=1
n(n + 1)

Solution.

17

X n
1. (1)n+1
n=1
2n

n+1 n n+1 n n

=|an | = (1) = |(1) | =

2n 2n 2n

n+1
|an+1 | = n+1
2
Using Ratio Test, we have
n+1
n + 1 2n

an+a 2 n+1 n+1
lim = lim n = lim = lim
n an n n 2n+1 n n 2n
2 n
1 1
= lim = < 1.
n 2 2
By Ratio test, the series is convergent.
2n+1
n3
X
2. (1)
n=1
n2n
We use Root Test.
r s
p n
2n+1
3 n (32 )n 2 9n
lim n |an | = lim = lim = lim 2 =01<1
n n n2n n (n2 )n n n2

By Ratio Test, the series is convergent.



X n+2
3. (1)n
n=1
n(n + 1)
We use Ratio Test.
(n + 1) + 2

an+a n+3 n(n + 1)
lim = lim (n + 1)(n + 2) = lim
n an n n+2 n (n + 1)(n + 2) n+2
n(n + 1)
2 1 3
2
n + 3n (n + 3n) 1 +
= lim 2 = lim n2 = lim n
n n + 2n + 4 n 1 n 2 4
(n2 + 2n + 4) 2 1+ + 2
n n n
1+0
= = 1.
1+0+0

18
Therefore, the test is inconclusive. We need to use other test for this series. Lets
use the alternating series test. We need to check to things,
(i) lim an = 0
n
(ii) an < an1
n+2
We have an = , so
n(n + 1)
n+2 1
lim an = lim = lim = 0.
n n n2 + n n 2n + 1

Furthermore,
n+2 n+1
an < an1 <
n(n + 1) (n 1)n
(n + 2)(n2 n) < n(n + 1)(n + 1)
n3 + n2 2n < n3 + 2n2 + n
0 < n2 3n
The last statement is true for n > 3. Hence the series is a convergent alternating
series.

Exercises for Sections 1.5, 1.6 and 1.7


1. Find the first for elements of the sequence of partial sum {sn } then find a formula
for sn in terms of n. Also, determine whether the infinite series is convergent or
divergent. If convergent, find its sum.

X 1 X 2
(a) (d)
n=1
(2n 1)(2n + 1) n=1
(4n 3)(4n + 1)

X X 2
(b) n (e)
n=1 n=1
5n1

X 5 X 2n1
(c) (f)
n=1
(3n + 1)(3n 2) n=1
3n

2. Determine whether the series is convergent or divergent by applying either the


comparison test or the limit comparison test.

19

X 1 X 3
(a) (e)
n=1
n2n n=1
n3 + n

X 1 X | sin n|
(b) (f)
n=1
n+1 n=1
n2

X n2 X n!
(c) (g)
n=1
4n3 + 1 n=1
(n + 3)!

X 3n + 1 X (n 1)!
(d) (h)
n=1
2n2 + 5 n=1
(n + 1)!

3. Determine whether the series is convergent or divergent by applying any test.



X 1 n
X 3n
(a) (1) (e)
n=1
2n n=1
n2

X 1 X n
(b) (1)n (f)
n=1
n2 n=1
2n

X 3 X n
(c) (1)n (g)
n=1
n3 + 1 n=1
3n 1

X
n+1 n2 X 3n
(d) (1) (h)
n=1
n3 + 2 n=1
1 + 32n

1.8 Power Series


The infinite series we have discussed so far involves constant terms. We now discuss an
important type of series of variable terms, called power series, which can be considered
as generalization of polynomials.

Definition 1.8.1. A power series in (x a) is a series of the form



X
c0 (x a)n = c0 + c1 (x a) + c2 (x a)2 + c3 (c a)3 + .
n=0

A special case is obtained when a = 0 and the series becomes a power series in x,

20
which is
X
cn xn = c0 + c1 x + c2 x2 + c3 x3 + .
n=0
Example 1.8.1.
1. Consider the geometric series for which a = 1 and r = x.

X
xn = 1 + x + x2 + x3 + .
n=0

1
The series converges to the sum if |x| < 1. Therefore
1x
1
1 + x + x2 + x3 + = , if |x| < 1.
1x
2. If in (1), we replace x by x, we have
1 1
1 x + x2 x3 + + (1)n xn + = = , if |x| < 1.
1 (x) 1 + x

3. Replace x by x2 in (1) and we get


1
1 + x2 + x4 + x6 + + x2n + = , if |x| < 1.
1 x2
4. If we replace x by x2 in (1),
1
1 x2 + x4 x6 + + (1)n x2n + = , if |x| < 1.
1 + x2
Theorem 1.8.2. Procedure for determining the interval of convergence of a power series
in (x a)
1. Apply either the ratio test or the root test to find the radius of convergence of the
series.
2. If R > 0, the series convergse absolutely for all x (a R, a + R), and diverges
for |x a| > R.
3. Individual test of convergence (aside from root/ratio test) for the endpoints of the
interval (a R, a + R).
Example 1.8.2. Find the values of x for which the following series is convergent.

21
n n
n+1 2x
X X X
n
1. (1) 3. n!x 5. n(x 2)n
n=1
n3n n=0 n=1


X xn X
3 n
X (x + 1)n
2. 4. nx 6.
n=0
n! n=1 n=1
n2 + 2

Solution.
n n
n+1 2
x
X
1. (1)
n=1
n3n
We will use ratio test to find an interval for x for which the series is convergent.
n+1 n+1 n

an+1 2 x n3 2n
L = lim = lim = lim |x|
n an n (n + 1)3n+1 2n xn n 3(n + 1)

(We can factor |x| out since the variable x is independent of the variable n.)
2n 2
= |x| lim = |x|
n 3n + 3 3
If L < 1, then the series is absolutely convergent.
2
L < 1 |x| < 1
3
3
|x| <
2
3 3
< x <
2 2
The Ratio Test is inconclusive when L = 1 so we must test the convergence of the
3 3
series for x = and x = , the endpoints of the interval, using other tests. If
2 2
3
x = , the series becomes
2
 n
n 3
2 n n n
X
n+1 2 X
n+1 2 (1) 3
X 1 X 1
(1) n
= (1) n n
= =
n=1
n3 n=1
n3 2 n=1
n n=1
n

This is the negative of the harmonic series which is divergent. Hence the series is
3
divergent when x = .
2
22
3
If x = , the series becomes
2
 n
n 3
2 n n
2 n+1 2 3 n+1 1
X X X
n+1
(1) = (1) = (1)
n=1
n3n n=1
n3n 2n n=1
n
This is the alternating series whose terms are those of the harmonic series. Clearly,
1
(i) lim an = lim = 0, and
n n n
1 1
(ii) an = < = an1 .
n n1
3
By alternating series test, the series is convergent at x = . From the above tests,
2
we conclude that the power series is convergent for all x (3/2, 3/2].

X xn
2.
n=0
n!
First, we use ratio test to find the interval of convergence.
n+1 n+1

an+1 x n! x n(n 1) (3)(2)(1)
L = lim = lim = lim
n an n (n + 1)! xn n (n + 1)(n)(n 1) (3)(2)(1)xn
1 1
= lim |x| = |x| lim = |x| 0
n n + 1 n n + 1

In the second to the last equation, we were able to factor |x| out of the limit since
the variable x is independent of the limit variable n. Since L = 0 < 1 for any value
x, we conclude that the power series is convergent for all x (, ).

X
3. n!xn
n=0
We use ratio test to determine the interval of convergence.
(n + 1)!xn+1 (n + 1)(n)(n 1) (2)(1)xn+1

an+1
L = lim = lim
n
= lim
n

n an n n!x n n(n 1) (2)(1)x
= lim (n + 1)|xn | = |x| lim (n + 1) = |x| = , when x 6= 0.
n n

Therefore, the power series is divergent for any value of x 6= 0. If x = 0, the series

X X
n
is reduced to the trivial case n!x = 0 = 0.
n=0 n=0

23

X
4. n3 xn
n=1
We use Ratio Test to determine the interval of convergence.
3
(n + 1)3 xn+1 3

an+1 (n + 1) n + 1
L = lim n n3 |x| = |x| n
= lim = lim lim
n an n n3 xn n
 3
1
= |x| lim 1 + = |x|(1 + 0)3 = |x|.
n n
The series is convergent if L =< 1. Hence the series is convergent for all

|x| < 1 1 < x < 1.

We now test the convergence at the endpoints. If x = 1, the series becomes



X
X
3 n
n (1) = (1)n n3
n=1 n=1

On the otherhand, if x = 1, the series becomes



X
X
3 n
n (1) = n3
n=1 n=1

In either case, lim an 6= 0, hence both series are divergent. According to these
n
tests, the power series is convergent for all x (1, 1).

X
5. n(x 2)n
n=1
We use ratio test for the interval of convergence.
(n + 1)(x 2)n+1

an+1
L = lim = lim = lim n + 1 |x 2|
n an n n(x 2)n n n
1
= |x 2| lim = |x 2|.
n 1

The series is convergent if

L = |x 2| < 1 1 < x 2 < 1


1 < x < 3.

24
We also test the endpoints. If x = 1, the series becomes

X
X
n
n(1) = (1)n n,
n=1 n=1

which is divergent, since lim an 6= 0. Likewise, for x = 3, we have


n

X
X
n
n(1) = n,
n=1 n=1

which is also divergent. From here, we conclude that the power series is conver-
gent for all x (1, 3).

X (x + 1)n
6.
n=1
n2 + 2
We use the ration test for the interval of convergence.
(x + 1)n+1 2
n2 + 2

an+1 n + 2
L = lim = lim = lim 2 |x + 1|
n an n (n + 1)2 + 2 (x + 1)n n n + 2n + 3
1 2
(n2 + 2) 2 1+ 2
= |x + 1| lim n = |x + 1| lim n
n 1 n 2 3
(n2 + 2n + 3) 2 1+ + 2
n n n
1+0
= |x + 1| = |x + 1|
1+0+0
The series is absolutely convergent if L = |x + 1| < 1,
|x + 1| < 1 1 < x + 1 < 1
2 < x < 0.
We now test the endpoints. If x = 2, the series becomes

X (1)n
n=1
n2 + 2

By alternating series test, this is convergent. On the otherhand, if x = 0, the series


becomes
X 1
2+2
.
n=1
n

25

X 1
This is convergent by Comparison Test with the p-series 2
. We therefore
n=1
n
conclude that the power series is convergent for all x [2, 0].

Theorem 1.8.3. Let n


P
n=0 cn x be a power series with radius of convergence R. If f is
the function defined by

X
f (x) = cn xn ,
n=0
then

(i) f 0 (x) exist for every x in the interval (R, R) and



X
0
f (x) = ncn xn1 .
n=1

(ii) f is integrable for every closed subinterval of (R, R) with


Z x
X cn n+1
f (t)dt = x .
0 n=0
n + 1

1.9 Taylor Series


Suppose f is a function defined by a power series, that is

f (x) = c0 + c1 x + c2 x2 + c3 x3 + + cn xn +

whose radius of convergence is R > 0. Consecutive differentiation of f gives

f 0 (x) = c1 + 2c2 x + 3c3 x2 + 4c4 x3 + + ncn xn1 +


f 00 (x) = 2c2 + 2 3c3 x + 3 4c4 x2 + + (n 1)ncn xn2 +
f 000 (x) = 2 3c3 + 2 3 4c4 x + + (n 2)(n 1)ncn xn3 +
f (4) (x) = 2 3 4c4 + + (n 3)(n 2)(n 1)ncn xn4 +

and so on.
If we set x = 0 in each equation, we get

f (0) = c0 f 0 (0) = c1 f 00 (0) = 2!c2 f 000 (0) = 3!c3 f (4) (0) = 4!c4

26
so that
f (0) f 0 (0) f 00 (0) f 000 (0) f (4) (0)
c0 = c1 = c2 = c3 = c4 = .
0! 1! 2! 3! 4!
f (n) (0)
In general, we have cn = for every positive integer n. the power series of f in
n!
terms of x can be written as

X f (n) (0) n 0 f 00 (0) 2 f 000 (0) 3 f (4) (0) 4
f (x) = x = f (0) + f (0)x + x + x + x + .
n=0
n! 2! 3! 4!

In a more general sense, let f be a function defined by a power series in (x a), that
is

X
f (x) = cn (x a)n
n=0
= c0 + c1 (x a) + c2 (x a)2 + c3 (x a)3 + + cn (x a)n + .
By successive differentiation of the power series, and evaluating each derivative at x = a,
we get the general formula
f (n) (a)
cn = .
n!
The power series of f in (x a) can be written as

X f (n) (a) n 0 f 00 (a) 2 f 000 (a)
f (x) = (x a) = f (a) + f (a)(x a) + (x a) + (x a)3
n=0
n! 2! 3!
f (4) (a) 4 f (n) (a)
+ (x a) + + (x a)n + .
4! n!
The series is called the Taylor series of f at a. A special case when a = 0 is called the
Maclaurin series.
Example 1.9.1.
1. Find the Maclaurin series for ex . Use the series to estimate the value of e correct
up to 5 decimal places.
2. Find the Taylor series for sin x at a. Then use this formula to write the Taylor
series for sin x at /4. Use the resulting series to approzimate the value of sin 46
correct up to 5 decimal digits.

27
Solution.
1. Let f (x) = ex . We compute the successive derivative of f , then evaluate at x = 0.

f (x) = ex f (0) = 1
f 0 (x) = ex f 0 (0) = 1
..
.
f (n) (x) = ex f (n) (0) = 1

Using the formula for the Maclaurin series, we have



x
X f (n) (0) n
X xn x2 x3 x4 xn
e = x = =1+x+ + + + + +
n=0
n! n=0
n! 2 6 24 n!

We now use this series to estimate the value of e = e1 correct up to 5 decimal digit.

e = 1 + 1 + 0.5 + 0.166667 + 0.041667 + 0.008333 + 0.001389 + 0.000198


+ 0.000025 + 0.000003
= 2.718282 2.71828

Observe that we stop at the 10th term since the next term, and the succeeding term
thereafter, no longer have any non-zero digit for the first 6 decimal places.
2. Let f (x) = sin x and a = /4. We have

2
f (x) = sin x f (a) = sin a f (/4) = sin(/4) =
2

2
f 0 (x) = cos x f 0 (a) = cos a f 0 (/4) = cos(/4) =
2
2
f 00 (x) = sin x f 00 (a) = sin a f 00 (/4) = sin(/4) =
2

2
f 000 (x) = cos x f 000 (a) = cos a f 000 (/4) = cos(/4) =
2
2
f (4) (x) = sin x f (4) (a) = sin a f (4) (/4) = sin(/4) =
2
2
f (5) (x) = cos x f (5) (a) = cos a f (5) (/4) = cos(/4) =
2
.. .. ..
. . .

28
Using the formula for the Taylor series of f , we have

X f (n) (/4)
sin x = (x /4)n
n=0
n!
   
2 2  2 2 2 3 2 4
= + x x x + x
2 2 4 4 4 12 4 48 4
2  5
 2  6
 2  7
+ x x x +
240 4 1440 4 10080 4
We now use this series to find the value of sin 46 . In radian form, 46 = 46/180 =
If we set x = 23/90, then x /4 = /180. We use the approximated
23/90.
values 2 = 1.414214 and = 3.141593 in our computations.

23 X f (n) (/4)
sin 46 = sin = (/180)n
90 n!
n=0    
2 2 2 2 2 3 2 4
= + +
2 2 180 4 180 12 180 48 180
2 5
  2  6 2  7

+ +
240 180 1440 180 10080 180
= 0.707107 + 0.012341 0.000108 0.0000006 +
sin 46 0.719339

Observe that we stop at the 4th term since every term thereafter is smaller than
0.000001, the desired magnitude of accuracy.

Definition 1.9.1. If an infinite series is convergent, then the remainder after k th term,
obtained by subtracting the k th partial sum, is denoted by Rk , and

X
Rk = un sk
n=1

In some literature, Rk is called the tail of the series after the k th term.

Let f be function representated by its Taylor series



X f (n) (a)
f (x) = (x a)n .
n=0
n!

29
For a fixed n, the series can be written as

f 00 (a) f (n) (a)


 
0 2 n
f (x) = f (a) + f (a)(x a) + (x a) + + (x a)
2! n!
 (n+1)
f (n+2) (a)

f (a) n+1 n+2
+ (x a) + (x a) +
(n + 1)! (n + 2)!
We can write

f (x) = Pn (x) + Rn (x), where


0 f 00 (a) 2 f (n) (a)
Pn (x) = f (a) + f (a)(x a) + (x a) + + (x a)n
2! n!
(n+1) (n+2)
f (a) f (a)
Rn (x) = (x a)n+1 + (x a)n+2 +
(n + 1)! (n + 2)!

Pn (x) is called the nth degree Taylor polynomial of f while Rn (x) is called the re-
mainder (or tail) of f after the nth term.

Theorem 1.9.2. Let f be a function such that f and all its derivative exist in some
interval containing a. Then the function f is representated by its Taylor series

X f (n) (a)
f (x) = (x a)n
n=0
n!

for all x such that |x a| < r if and only if

f (n+1) (zn )
lim Rn (x) = lim (x a)n+1
n n (n + 1)!

= 0,

where each zn is between x and a.

Exercises for Section 1.8 and 1.9


1. Determine the interval of convergence of the power series.

X x X xn X n2 xn
(a) (b) (c)
n=0
n+1 n=0
n2 + 1 n=0
2n

30

X 2n x n X x2n
n
X (x + 2)n
(d) (g) (1) (j)
n=1
n2 n=1
(2n)! n=1
(n + 1)2n

X xn X (x 2)n X (x + 5)n1
(e) (h) (k)
n=1
2 n n n=2
n1 n=1
n2

X xn X (x + 3)n X n2 (x 1)n
(f) (i) (l)
n=1
(n + 1)5n n=1
2n n=1
5n

2. Obtain the Maclaurin for the following function.

(a) f (x) = cos x (e) f (x) = sin2 x


(b) f (x) = sin x Hint: sin2 x = 21 (1 cos 2x)
(c) f (x) = ex (f) f (x) = cos2 x
(d) f (x) = cosh x Hint: cos2 x = 21 (1 + cos 2x)

3. Find a Taylor series of the function about the indicated a.

(a) f (x) = ex at a = 3 (d) f (x) = cos x at a = /3


(b) f (x) = ex at a = 2 (e) f (x) = sin x at a = /6

(c) f (x) = 4 x at a = 1 (f) f (x) = 2a at a = 0

31

You might also like