Lecture Notes On Numerical Analysis: 1 Mathematical Preliminaries
Lecture Notes On Numerical Analysis: 1 Mathematical Preliminaries
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 .
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
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
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
y = bx , (b > 0, b 6= 1).
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.
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.
4
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
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)
5
Figure 1.4.1: The Rolles Theorem assures the existence of c such that the tangent line at (c, f (c)) has
slope 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
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)).
Example 1.4.2. Given f (x) = x3 x2 2x, verify that the MVT is satisfied for a = 1
6
and b = 3; then find a number c in the intervala (1, 3) such that
f (3) f (1)
f 0 (c) = .
31
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, }
{an }
n=1 = {a1 , a2 , a3 , . . .}
Theorem 1.5.3. If lim f (x) = L and f is defined for every positive integer, then
x
lim f (n) = L
n
7
1.6 Infinite Series
Let us associate with the sequence
u1 , u2 , u3 , . . .
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.
sn = u1 + u2 + u3 + + un
Solution.
8
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
9
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
10
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.
X 4
Example 1.7.1. Determine whether the series is convergent or divergent.
n=1
3n + 1
Solution. Comparing the nth term of the given series to the geometric series
n
X 4 X 1
n
= 4 ,
n=1
3 n=1
3
we have
4 4
an = < = bn .
3n + 1 3n
X 4
By comparison test, since the geometric series is convergent, then so is .
n=1
3n + 1
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
divergent or divergent.
X 4 X 1 X 1
1. 2. 3.
n=1
3n + 1 n=1
n n=1
(n2 + 2)1/3
11
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.
12
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,
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
4. If we replace x by x2 in (1),
1
1 x2 + x4 x6 + + (1)n x2n + = , if |x| < 1.
1 + x2
13
Theorem 1.8.2. Procedure for determining the interval of convergence of a power series
in (x a)
1. Apply the ration test (or sometimes 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.
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 xn
2. 4. nx 6.
n=0
n! n=1 n=1
2 + n2
P
Theorem 1.8.3. Let n=0 cn xn is a power series with radius of convergence R. If f is
the function defined by
X
f (x) = cn xn ,
n=0
then
14
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 +
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
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 + .
Example 1.9.1.
2. Find the Taylor series for sin x at a. Then use this formula to write the Taylor
series for sin x at /4.
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!
16
We can write
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!
=0
f (n+1) (zn )
lim Rn (x) = lim (x a)n+1
n n (n + 1)!
17