Group 16 - Forward, Backward and Central Differences
Group 16 - Forward, Backward and Central Differences
2
PRESENTATION OUTLINE
3
HISTORY TO FINITE DIFFERENCES
Finite difference approximations are one of the oldest and simplest methods
used to solve differential equations (Lu, 2009). L. Euler (1707-1783) ca. 1768
used finite approximations in one dimension of space, and was later extended
by C. Runge (1856-1927) ca. 1908 to two dimension (Lu, 2009). In the early
1950s, the dawn of finite difference techniques in numerical applications was
initiated. The development of the techniques was stimulated by the emergence
of computers that offered a convenient framework for dealing with complex
problems of science and technology (Lu, 2009). Finite difference method was
extended to 3D due to parallel computations by Frankel and Vidale in 1992 and
Osclen and Archuleta in 1996 (Lu, 2009).
4
APPLICATION OF FINITE DIFFERENCES
The electrical circuit structure includes components with concentrated and distributed
parameters. This creates difficulties in analyzing the dynamic processes, which are
described by differential equations, including those with partial derivations.
• Application of the finite difference method in seismic source and wave diffraction
simulation
6
ADVANTAGE AND DISADVANTAGE OF USING FINITE DIFFERENCES
• Advantage
The finite-difference method is defined dimension per dimension; this makes it
easy to increase the “element order” to get higher-order accuracy.
• Disadvantage
With the finite-difference method, you may easily run into problems handling
curved boundaries for the purpose of defining the boundary conditions.
7
FORWARD, BACKWARD, AND CENTRAL DIFFERENCE
FORMULAS FOR THE FIRST DERIVATIVE
8
FORWARD, BACKWARD, AND CENTRAL DIFFERENCE FORMULAS FOR
THE FIRST DERIVATIVE
9
Central difference is the slope of the line that connects points :
10
EXAMPLE 1
11
SOLUTION:
Analytical Differentation: The derivative of the function is f′ (x) =
()=27
Numerical Differentiation:
The Points Used for numerical differentiation are:
12
Using the derivatives using the forward, backward, and central finite
difference formulas are:
Forward Finite Difference:
= error=
Backward Finite Difference:
= error=
Central Finite Difference:
= error=
13
FINITE DIFFRENCE FORMULAS USING TAYLOR SERIES
EXPNASION
14
Finite Difference Formulas of First Derivative
Several formulas for approximating the first derivative at point based on the values of
the points near are derived by using the Taylor series expansion. All the formulas
derived in this section are for the case where the points are equally spaced.
Two-point forward difference formula for first derivative
The approximation in Eq.5 is the same as the forward difference formula in Eq. 1.1
Two-point backward difference formula for first derivative
The approximation in Eq.9 is the same as the forward difference formula in Eq. 1.2.
15
• Two-point central difference formula for first derivative
The approximation in Eq.13 is the same as the central difference formula Eq.1.3 for
equally spaced intervals.
16
• Three-point central difference formula for the second derivative
Central difference formulas for the second derivative can be developed using any
number of points on either side of the point , where the second derivative is to be
evaluated. The formulas are derived by writing the Taylor series expansion with a
remainder at points on either side of. in terms of the value of the function and its
derivatives at point .
An estimate for the second derivative can be obtained by solving Eq.16 for while
neglecting the remainder terms. This introduces a truncation error of the order of .
17
The table below lists difference formulas, of various accuracy, that can
be used for numerical evaluation of first, second, third, and fourth
derivatives.
18
19
QUESTION 2
20
SOLUTION:
The derivative can be calculated analytically as and its true
value at
The data that we need is
21
The forward difference of accuracy is computed as
22
The forward difference of accuracy is computed as
23
The backward difference of accuracy is computed as
24
The central difference of accuracy is computed as
25
The results show that the central finite difference formula gives a
more accurate approximation. This will be discussed further in the
next section. In addition, smaller separation between the points
gives a significantly more accurate approximation.
26
FINITE OPERATORS: FORWARD, BACKWARD AND CENTRAL
DIFFERENCES
• FORWARD DIFFERNCES
28
• BACKWARD DIFFERNCES
29
A second version of this arises, when considering a part to the left, so we can
approximate that:
If h < 0, say h = where , then:
=
Is called the first order or backward difference approximation of f (x) is
represented as:
30
• CENTRAL DIFFERENCES
31
By combining different Taylor series expansions, we can obtain approximations
of f’ (x) of various orders. For instance, substracting the two expansions:
Where is a number between
Where is a number between
The result is:
32
So that:
33
EXAMPLES……
34
QUESTION 3:
Determine the forward, backward, and
central differences using the forward,
backward, and central methods respectively,
to solve:
f (x) = 2
Where;
X=3
Δ x= 0.1 35
SOLUTION:
Forward method -
f‘ ( x ) f ( x + Δ x ) – f ( x ) ]/ Δ x
f‘ ( x ) = - =
= 291.36
36
Backward method
f‘ ( x ) [ f ( x ) – f ( x - Δ x ) ] / Δ x
f‘ ( x ) = - =
= 250.73
37
Central method
f‘ ( x ) f ( x + Δ x ) – f ( x + Δ x ) ] / 2(Δ x)
f‘ ( x ) = -
= = 271.05
38
Testing the solution
True error = True value – Δv
=2
Now, recall that,
= a.
And so we get; (1.5)2 where x= 3
= (1.5)2
= 3 = 270.05 True Value
39
Now:
ET = TV-ΔV
Forward method
270.5-291.36= -21.31
Backward method
270.5-250.73= 19.32
Central method
270.5-271.05= -1
42
Solution:
Using h as 0.1, we find the forward difference as
Forward: f’ (a) = =
=
= 0.32789823
43
Using h as 0.01, we find the forward difference as
Forward: f’ (a) = =
= 0.33277901
44
Using h as 0.1, we find the central difference as
Central: f’ (a) = =
= 0.33345687
45
Using h as 0.01, we find the central difference as
Central: f’ (a) = =
=
= 0.33333457
46
REFERENCES
Berzan, V. (2019, December 23). Retrieved from APPLICATION OF THE FINITE
DIFFERENCE METHOD TO CALCULATION OF DYNAMIC PROCESSES IN LONG
ELECTRICAL LINES: https://zenodo.org/record/3591586#.YMAV6_lKjIU
Hong, M. (1986, April 21). Retrieved from Application of the finite difference method in
seismic: https://watermark.silverchair.com/
Sjodin, B. (2016, April 18). Retrieved from What’s The Difference Between FEM, FDM,
and FVM?
47