Module 3 Finite Differences

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Numerical Analysis can be defined as the development and implementation of techniques to find

numerical solutions to mathematical problems.

The basic approach to solve problems in numerical analysis is the Algorithm.

Algorithm is a complete, well-defined procedure for obtaining numerical answer to a given


mathematical problem. It is the essential ingredient of a numerical analysis problem.

Finite Differences
The theory of finite differences is the discrete analog of the derivative.
The name “finite differences” indicates that mathematical analysis proceeds by finite interval rather
than the infinitesimally small intervals in calculus.

The first difference of a function, f (x), denoted found by subtracting two successive functional values
and is defined by
∆ f ( x ) =f ( x+ 1 )−f (x)
The formula assumes that the functional values are tabulated one unit apart.

The more general formula


∆ f ( x ) =f ( x+ h )−f (x )
h
the value of h is called the interval of differencing. Unless otherwise stated, it is assumed that the
interval of differencing is equal to one. It is also assumed that h> 0 and negative intervals of differencing
has no meaning.

The symbol ∆ is not a number but an operator, which when applied to a function changes it into some
other function.

The operator ∆ is often called the forward difference operator or the advancing difference operator

Difference Table
The difference table is the standard format for displaying finite differences.

xo yo
∆ yo
x1 y1
∆ y1
x2 y2
∆ y2
x3 y3
∆ y3
x4 y4
Example: Find ∆ f (x ) if f ( x )=x 2 FOR x={0 ,1 , 2 ,3 , 4 }

Using the formula


∆ f ( x ) =f ( x+ 1 )−f (x)
2 2
∆ f ( 0 )=f ( 0+1 )−f ( 0 )=1 −0 =1
∆ f ( 0 )=f ( 1+1 )−f ( 1 )=22 −12=3
∆ f ( 0 )=f ( 2+ 1 )−f ( 2 ) =32−22=5
∆ f ( 0 )=f ( 3+1 )−f ( 3 )=4 2−32 =7
2 2
∆ f ( 0 )=f ( 4+ 1 )−f ( 4 ) =5 −4 =9

In table
x f (x) ∆ f (x )
0 0
1
1 1
3
2 4
5
3 9
7
4 16

Find the first difference of the function y=2 x−3 for x={0 ,1 , 2 ,3 , 4 } and exhibit the difference table.
∆ f ( x ) =f ( x+ 1 )−f (x)
¿ [ 2 ( x +1 )−3 ] −[ 2 x −3 ]
∆ f ( x ) =2

Thus, ∆ f ( x ) =2 for any value of x .

x f (x) ∆ f (x )
0 −3
2
1 −1
2
2 1
2
3 3
2
4 5

Find the first difference of the function f ( x )=ax


∆ f ( x ) =f ( x+ 1 )−f (x)
∆ ax =( a x+1 )−ax
x x
∆ a =a ( a−1)

Formula: ∆ c y k =c ∆ y k analogous to the differentiation of the function f (cx )


∆ c y k =cy k+1−cy k
¿ c ( y k +1− y k )
∆ c y k =c ∆ y k

Difference formulas
Theorem 4.1 The difference of a constant is zero
∆ c=0

Theorem 4.2 The difference of constant multiplied by a function is


∆ c y k =c ∆ y k

Theorem 4.3 The difference of a sum of two function uk and v k is


∆ ( u k +v k ) =∆ u k + ∆ v k

∆ ( u k +v k ) =(u ¿ ¿ k +1+v k +1)−(u ¿ ¿ k+ v k )¿ ¿


¿ ( u k+1−uk ) +( v k+1−v k )
∆ ( u k +v k ) =∆ u k + ∆ v k

Theorem 4.4 The difference of a product uk v k


∆ (u ¿ ¿ k v k )=u k ∆ v k + v k+1 ∆ uk ¿
∆ (u ¿ ¿ k v k )=u k+1 v k +1−uk v k ¿
¿ uk +1 v k+1−u k v k+1 +uk v k+1−u k v k
¿ v k+1 ( u k+1−u k ) +uk (v k+1 −v k )
∆ (u ¿ ¿ k v k )=u k ∆ v k + v k+1 ∆ uk ¿

Theorem 4.5 The difference of a quotient uk and v k

∆ ( )
uk v k ∆ uk −u k ∆ v k
vk
=
v k +1 v k

∆ ( )
uk u k+1 uk
=
v k v k+1 v k

u v −u v
¿ k+1 k k k+ 1
v k+1 v k
u v −u v +u v −u v
¿ k+1 k k k k k k k +1
v k +1 v k
v k ( uk +1−uk ) +u k (v k −v k +1)
¿
v k+1 v k
v k ∆ uk −uk ∆ v k
¿
v k+1 v k
Example
k
Show that if y k =2 , then ∆ y k = y k
k
∆ y k =∆ 2
k+ 1 k
¿ 2 −2
k
¿ 2 ( 2−1 )
k
∆ y k =2
∆ y k= yk

−2 x
Find ∆ y k if y k =3
−2 x
∆ y k =∆ 3
−2 (x+1) −2 x
¿3 −3
−2 x
3 −2 x
¿ −3
9
¿3
−2 x 1
9 ( )
−1
−8 −2 x
∆ y k= ∙3
9

Find ∆ u x v x if u x =2 x and v x =2 x−4


∆ u x v x =u x ∆ v x + v x+1 ∆u x

v x+1=2 ( x +1 )−4
v x+1=2 x−2

∆ u x =2 ( x+1 )−2 x
∆ u x =2

∆ v x =2 ( x +1 )−4−(2 x−4 )
∆ v x =2

∆ u x v x =2 x ( 2 )−( 2 x −2 ) 2
∆ u x v x =8 x −4

By definition
2
∆ u x v x =4 x −8 x
¿¿
∆ u x v x =8 x −4
2 2
If u x =x +1 and v x =−x +1 find
a. ∆ u x v x , and

b. ∆ ( ) ux
vx

Higher Order Differences


The higher order difference can be derived from lower-order differences
∆ 2 f ( x )=∆[∆ f ( x ) ]
¿∆¿¿
¿ ∆ f ( x +1 )−∆ f ( x)
¿ [ f ( x +2 )−f ( x +1 ) ]−[f ( x+ 1 )−f ( x ) ]
2
∆ f ( x ) ¿ f ( x +2 )−2 f ( x +1 ) +f (x)

Note that ∆ 2 does not mean the square of the quantity ∆ , but the process of differencing is to be
performed twice.
∆2 f (x ) ≠ ¿

The third difference of f ( x) is given by the following derivations


∆ 3 f ( x ) =∆2 [∆ f ( x ) ]
¿ ∆ [f ( x+2 )−2 f ( x+1 ) + f ( x ) ]
¿ ∆ f ( x +2 ) −2 ∆ f ( x+ 1 )+ ∆ f ( x ) ¿
¿ [ f ( x +3 )−f ( x+ 2 ) ] −2 [ f ( x+2 ) −f ( x +1 ) ]+[f ( x +1 )−f ( x ) ]
¿ f ( x +3 )−3 f ( x+2 ) +3 f ( x +1)−f (x )

It is important to note that any difference can be expressed in terms of functional values.

The difference of f ( x) are often arranged in tabular format. Such an array is called the difference table

x f (x) ∆ f (x ) ∆ 2 f (x) ∆ 3 f (x) ∆ 4 f (x )


0 f (0)
∆ f (0)
2
1 f (1) ∆ f (0)
∆ f ( 1 ) ∆3 f (0)
2 f ( 2 ) ∆2 f ( 1 ) ∆4 f (0)
3
∆ f ( 2 ) ∆ f (1)
3 f ( 3 ) ∆ 2 f (2)
∆ f (3)
4 f (4)
It should be noted that each column after f (x) is partitioned halfway between the entries in the
preceding column to clearly indicate which two values are subtracted to produce the difference

Each entry in the difference column is the difference of the nearest neighbor to the left.
∆ f ( 0 )=f ( 1 )−f ( 0 )
∆ 2 f ( 0 )=∆[∆ f ( 0 ) ]
¿ ∆ f (1 )−∆ f (0)
∆ f ( 0 )=∆2 f ( 1 )−∆ 2 f (0)
3

Example: verify that the third difference of the third-degree polynomial f ( x )=x 3 are constant
Using the formula ∆ 3 f ( x ) =f ( x+ 3 )−3 f ( x +2 )−3 f ( x +1 )−f (x )
Where f ( x )=x 3
f ( x +1 )=¿ ¿
f ( x +2 )=¿¿
f ( x +3 ) =¿ ¿
∆ f ( x ) =x3 +9 x 2 +27 x+ 27−3 ( x 3 +6 x 2+ 12 x +8 ) +3 ( x 3 +3 x 2+3 x +1 )−x 3
3

3
∆ f ( x ) =6

Difference table of f ( x )=x 3


x f (x) ∆ f (x ) ∆ 2 f (x) ∆ 3 f (x) ∆ 4 f (x )
0 0
1
1 1 6
76
2 8 12
19 6
3 27 18
37
4 64

By constructing a difference table, find the 6th and7th term of the sequence 8, 12, 19, 29, 42
x f (x) ∆ f (x ) ∆ 2 f (x) ∆ 3 f (x) ∆ 4 f (x )

1 8
4
2 123
7
3 19 3
10
4 29 3
13
5 42 3
16
6 58 3
19
7 77

Given the sequence of numbers 1, 8, 27, 64, 125, find n such that (a) ∆ n f (x) is a constant, and
(b) ∆ n f ( x ) =0
x f (x) ∆ f (x ) ∆ 2 f (x) ∆ 3 f (x) ∆ 4 f (x )

1 1
7
2 8 12
19 6
3 27 18 0
37 6
4 64 24
61
5 125

a) n=3
b) n=4

Compute the higher order differences of the following and find n such that ∆ n f ( x ) =0
a. f ( x )=2 x−1
b. f ( x )=x 2
c. f ( x )=x 4

You might also like