0% found this document useful (0 votes)
14 views6 pages

Session 3

Chapter 2 discusses the approximation of functions using interpolation methods based on differences of functions. It introduces forward, backward, and central differences, detailing how to compute these differences and their properties. The chapter also includes examples and tables to illustrate the construction of difference tables and their applications in evaluating function values and derivatives.

Uploaded by

sabbathshema
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views6 pages

Session 3

Chapter 2 discusses the approximation of functions using interpolation methods based on differences of functions. It introduces forward, backward, and central differences, detailing how to compute these differences and their properties. The chapter also includes examples and tables to illustrate the construction of difference tables and their applications in evaluating function values and derivatives.

Uploaded by

sabbathshema
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

2 Chapter 2: Approximation of Functions

Assume that we have a set of values (xi , yi ), i = 1, 2, 3, . . . , n of functions y = f (x), the value
of x being equally spaced i.e

xi = x0 + ih, i = 1, 2, 3, . . . , n.

x1 = x0 + h, x2 = x0 + 2h, x3 = x0 + 3h, . . . , xn = x0 + nh.


Suppose that we are required to recover the values of f (x) for some intermediate values of x,
or to obtain the derivative of f (x) for some x in the range x0 ≤ x ≤ xn .
The methods for the solution of these problems are based on the concept of the differences of
a function which we now proceed to define.
When the values of x are equally spaced as above, interplation formulae are based on three
types of differences:

1. Forward differences;

2. Backward differences;

3. Central differences.

2.1 Forward Differences


If we subtract from each value of y (except y0 ) the proceding value of y, we get y1 − y0 , y2 −
y1 , y3 −y2 , . . . yn −yn−1 respectively known as the first differences of y. Or if y0 , y1 , y2 , . . . , yn
denotes a set of values of y, then y1 −y0 , y2 −y1 , y3 −y2 , . . . yn −yn−1 are called the differences
of y. Denoting these differences by

4y0 , 4y1 , 4y2 , 4y3 , . . . 4yn .

We have:

4y0 = y1 − y0 , 4y1 = y2 − y1 , 4y2 = y3 − y2 , 4y3 = y4 − y3 , . . . 4yn = yn − yn−1 .

Where 4 is called the forward difference operator, and 4y0 , 4y1 , 4y2 , 4y3 , . . . 4yn
are called the first forward differences. In general, the first forward differences are given by

4yi = yi+1 − yi , i = 0, 1, 2, 3, . . . , n.

The differences of the first forward differences are called the second forward differences and are
denotes by
42 y0 , 42 y1 , 42 y2 , 42 y3 , . . . 42 yn .
Now, the second forward differences are defines as the differences of the first differences, that
is:
42 y0 = 4(y1 − y0 ) = 4y1 − 4y0 = (y2 − y1 ) − (y1 − y0 ) = y2 − 2y1 + y0 .
42 y1 = 4(y2 − y1 ) = 4y2 − 4y1 = (y3 − y2 ) − (y2 − y2 ) = y3 − 2y2 + y1 .
In general
42 yn = 4yn+1 − 4yn = yn+2 − 2yn+1 + yn .

15
Here, 42 is called the second forward difference operator. Similarly, one can define third
forward differences are:

43 y0 = 42 (4y0 ) = 42 y1 − 42 y0 = (y3 − 2y2 + y1 ) − (y2 − 2y1 + y0 ) = y3 − 3y2 + 3y1 − y0 .

43 y1 = 42 (4y1 ) = 42 y2 − 42 y1 = y4 − 3y3 + 3y2 − y1 .


Generally, we have

43 y0 = 42 (4yn ) = 42 yn+1 − 42 yn = yn+3 − 3yn+2 + 3yn+1 − yn .

The fourth forward differences can be defined as

44 y 0 = 43 y 1 − 4 3 y 0
= (y4 − 3y3 + 3y2 − y1 ) − (y3 − 3y2 + 3y1 − y0 )
= y4 − 4y3 + 6y2 − 4y1 + y0

Hence,

44 yn = 43 yn+1 − 43 yn = yn+4 − 4yn+3 + 6yn+2 − 4yn+1 + yn .

It is therefore, clear that any higher order forward differences can easly be expressed in terms
of the ordinated, since the coefficients occuring on the right side are the binomial coefficients.
In general, the nth differences are difined as:

4n yk = 4n−1 yk+1 − 4n−1 yk .

In function notation, the forward differences are as written below:

4f (x) = f (x + h) − f (x),
42 f (x) = f (x + 2h) − 2f (x + h) + f (x),
43 f (x) = f (x + 3h) − 3f (x + 2h) + 3f (x + h) − f (x),

and so on, where h is the interval of differencing.

The following table shows how the forward differences of all orders can be formed:
x y = f (x) 4 42 43 44 45
x0 y0
x1 y1 4y0
x2 y2 4y1 42 y 0
x3 y3 4y2 42 y 1 43 y0
x4 y4 4y3 42 y 2 43 y1 44 y 0
x5 y5 4y4 42 y 3 43 y2 44 y 1 45 y 0

The first term in the table y0 is called the leading term and the differences 4y0 , 42 y0 , 43 y0 , . . .
are called the leading differences. The above differences table is known as forward difference
table or Diagonal difference table.

Properties: The operator 4 satisfies the following properties


• 4(f (x) ± g(x)) = 4f (x) ± 4g(x) i.e 4 is linear.

• 4(αf (x)) = α4f (x), α being a constant.

16
• 4m 4n f (x) = 4m+n f (x), where m and n are positive integers.
• 4 [f (x).g(x)] 6= f (x).4g(x).
Observation 1: We can express any higher order forward difference of y0 in terms of the entire
y0 , y1 , y2 , . . . , yn . From
4y0 = y1 − yo ,
42 y0 = y2 − 2y1 + y0 ,
43 y 0 = y3 − 3y2 + 3y1 − y0 ,
44 y 0 = y4 − 4y3 + 6y2 − 4y1 + y0 , and so on.
We can see that the coefficients of the entries on the RHS are binomial coefficients. Therefore,
in general      
n n n n
4 yn = yn + yn−1 + yn−2 + yn−3 + . . . + (−1)n y0 (10)
1 2 3
Observation 2: We can express any value of y in terms of leading entry y0 . We know that
y1 − y0 = 4y0 ⇒ y1 = y0 + 4y0
⇒ y1 = (1 + 4)y0 .
Now,
y2 − y1 = 4y1 ⇒ y2 = y1 + 4y1
⇒ y2 = (1 + 4)y1
y2 = (1 + 4)2 y0 .
Similarly, y3 = (1 + 4)3 y0 and so on. In general,
     
n n n 2 n
yn = (1 + 4) y0 = y0 + 4y0 + 4 y0 + 43 y 0 + . . . + 4n y 0 . (11)
1 2 3

2.2 Backward Differences


The differences y1 − y0 , y2 − y1 , y3 − y2 , . . . , yn − yn−1 are called first backward differences if
they are denoted by ∇y1 , ∇y2 , ∇Y3 , . . . , ∇yn , respectively. So that
∇y1 = y1 − y0 ,
∇y2 = y2 − y1 ,
∇y3 = y3 − y2 , . . .
∇yn = yn − yn−1 ,

where ∇ is the backward difference operator.


Now, the second backward differences are defined as the differences of the first differences, i.e
∇2 y2 = ∇(∇y2 ) = ∇(y2 − y1 ) = ∇y2 − ∇y1 = (y2 − y1 ) − (y1 − y0 ) = y2 − 2y1 + y0 .
∇2 y3 = ∇(∇y3 ) = ∇(y3 − y2 ) = ∇y3 − ∇y2 = (y3 − y2 ) − (y2 − y1 ) = y3 − 2y2 + y1 .
In general,
∇n = ∇n−1 yk − ∇n−1 yk−1 . (12)
The backward difference table is given as

17
x y = f (x) ∇ ∇2 ∇3 ∇4 ∇5
x0 y0
x1 y1 ∇y1
x2 y2 ∇y2 ∇2 y2
x3 y3 ∇y3 ∇2 y3 ∇3 y3
x4 y4 ∇y4 ∇2 y4 ∇3 y4 ∇4 y4
x5 y5 ∇y5 ∇2 y5 ∇3 y5 ∇4 y5 ∇5 y5
In function notation, these are written as

∇f (x) = f (x) − f (x − h),


∇f (x + h) = f (x + h) − f (x),
2
∇ f (x + 2h) = f (x + 2h) − f (x + h) + f (x),
∇3 f (x + 3h) = f (x + 3h) − 3f (x + 2h) + 3f (x + h) − f (x).

And so on, where h is the interval of differencing.


Properties:
• ∇(f (x) ± g(x)) = ∇f (x) ± ∇g(x), i.e ∇ is a linear operator.
• ∇(αf (x)) = α∇f (x), α being a constant.
• ∇m ∇n f (x) = ∇m+n f (x), m and n being positive integer.
• ∇(f (x).g(x)) 6= [∇f (x).g(x)].

2.3 Central Differences


The central difference operator δ is defined by the relations

y1 − y0 = δy 1 ,
2
y2 − y1 = δy 3 ,
2
y3 − y2 = δy 5 , . . .
2
yn − yn−1 = δyn− 1 .
2

For the higher order central differences, we have

δy 3 − δy 1 = δ 2 y1 ,
2 2

δy 5 − δy 3 = δ 2 y2 , . . .
2 2

δ 2 y2 − δ 2 y1 = δ 3 y 3 , and so on.
2

The central differences are tabulated below.


x y = f (x) δ δ2 δ3 δ4 δ5
x0 y0
x1 y1 δy 1
2
x2 y2 δy 3 δ 2 y1
2
x3 y3 δy 5 δ 2 y2 δ3y 3
2 2
x4 y4 δy 7 δ 2 y3 δ3y 5 δ 4 y2
2 2
x5 y5 δy 9 δ 2 y4 δ3y 7 δ 4 y3 δ5y 5
2 2 2

18
We can see from the table that central differences on the same horizontal line have the same
suffix. Also, all odd differences have a fractional suffix, and the even differences have an integer
suffix.

Note 1: From the three tables, we can see that only the notation changes, not the differences.
For example,
y1 − y0 = 4y0 = ∇y1 = δy 1 .
2

Note 2: If we write y = f (x) as y = fx or y = yx , then the entries corresponding to x, x +


h, x + 2h, . . . , are yx , yx+h , yx+2h , . . . , respectively, and

4yx = yx+h − yx , 42 yx = 4yx+h − 4yx , and so on.

Similarly,

∇yx = yx − yx−h ,
δyx = yx+ h − yx− h , and so on.
2 2

Example 7. Construct a forward difference table from the following data


x 0 1 2 3 4
y 1 1.5 2.2 3.1 4.6

Evaluate 43 y1 , yx , and y5 .
Solution: The forward difference table is given below.
x y 4 42 43 44
x0 = 0 y0 = 1
x1 = 1 y1 = 1.5 4y0 = 0.5
x2 = 2 y2 = 2.2 4y1 = 0.7 42 y0 = 0.2
x3 = 3 y3 = 3.1 4y2 = 0.9 42 y1 = 0.2 43 y0 = 0
x4 = 4 y4 = 4.6 4y3 = 1.5 42 y2 = 0.6 43 y1 = 0.4 44 y0 = 0.4

Now, 43 y1 = y4 − 3y3 + 3y2 − y1 = 42 y2 − 42 y1 = 4.6 − 3(3.2) + 3(2.2) − 1.5 = 0.4


We known that
       
x x 2 x 3 x
yx = y0 + 4y0 + 4 y0 + 4 y0 + 44 y 0 ,
1 2 3 4
x! x! x! x!
yx = y0 + 4y0 + 42 y 0 + 43 y 0 + 44 y 0 ,
(x − 1)!1! 2!(x − 1)! 3!(x − 3)! 4!(x − 4)!
1 1 1
yx = 1 + x(0.5) + x(x − 1)(0.2) + x(x − 1)(x − 2)(0) + x(x − 1)(x − 2)(x − 3)(0.4)
2 3! 4!
x 1 2 1 4
yx = 1 + + (x − x) + (x − 6x3 + 11x2 − 6x)
2 10 60
1  4
x − 6x3 + 17x2 + 18x + 60

∴ yx =
60
Therefore,
1  4
(5) − 6(5)3 + 17(5)2 + 18(5) + 60 = 7.5.

y5 =
60

19
Example 8. : (Forward differences)
Find the polynomial of degree three which has the values equal to 1, 15, 85 and 259 corresponding
to the values 0, 2, 4 and 6 of the argument.

Solution: Let the variables be x and y. Then we have the following forward difference
table.
x y 4 42 43
0 1
2 15 14
4 85 70 56
6 259 174 104 48
x−x0
Here, h = 2. To use the formulae, we take x0 = 0. Then x = x0 + ph i.e (p = h
) gives
p = x2 , 4y0 = 14, 42 y0 = 56, 43 y0 = 48.

x x x 1 x x x 1
y(x) = 1 + (14) + ( − 1) (56) + ( − 1)( − 2) (48) = x3 + x2 + x + 1
2 2 2 2 2 2 2 6

EXERCISE II.1:
1. Prove the following results:

• 4∇ = ∇4 = 4 − ∇δ 2
4 ∇
• 4+∇= ∇
− 4

2. Tabulate the forward differences for the given data


x 1 2 3 4 5 6 7 8 9
y 1 8 27 64 125 216 343 512 729

3. Form a backward differences table of the function f (x) = x3 − 3x2 − 5x − 7 for x =


−1, 0, 1, 2, 3, 4, 5.

4. Show that

• y3 = y2 + 4y1 + 42 y0 + 43 y0 .

• 42 y8 = y8 − 2y7 + y6 .

5. If y0 = 3, y1 = 12, y2 = 81, y3 = 2000, y4 = 100 show that 44 y0 = −7459.

20

You might also like