here is a presentation that I have presented on a webinar. in this presentation, I mainly focused on the application of numerical analysis to Boundary Value problems. I described one of the most useful traditional methods called the finite difference method. those who are interested to do research in applied mathematics, CFD, Numerical analysis may go through it for the basic ideas.
2. MOTIVATION
β’ We all know some basics about Numerical Analysis.
β’ What you could think when you first heard about its application to
Boundary Value Problems.
β’ We first know about Boundary Value Problems.
β’ Then we must figure out where is the discrepancy for which
Numerical methods came into existence in BVP (Boundary Value
Problems).
β’ Then we will see how Numerical methods are applicable to BVP,
what are the techniques and what happens to the solutions of BVP.
4. β’ In the field of Differential Equations, a BVP is a Differential Equation
together with a set of additional constraints, called the boundary
conditions. And boundary value problem has conditions specified at
the extremes ("boundaries") of the independent variable in the
equation.
β’ An example of BVP (in one Spatial dimension)
π¦β²β²
π₯ + π¦ π₯ = 0
B.C., π¦ 0 = 0, π¦
π
2
= 2.
β’ A solution to BVP, is a solution to the DE which also satisfies the
boundary conditions.
β’ To be useful in applications, a BVP should be well posed.
β’ By well posed we mean that given the input to the problems there
exists a unique solution, which depends continuously on the input.
7. Problem: The conservation of heat can be used to develop a heat balance for a long, thin rod. A
non-insulated uniform rod positioned between two bodies of constant but different temperature.
For this case π1 > π2 and π2 > ππ
And the heat (temperature) distribution in the rod is governed by the equation
β 2π
β π₯2 + ββ² ππ β π = 0 (1)
where ββ²
is a heat transfer coefficient (πβ2
) that parameterizes the rate of heat dissipation to the
surrounding air and ππ is the temperature of the surrounding air (in Celsius, C).
To obtain a solution for Eq. (1), there must be appropriate boundary conditions. A simple case is
where the temperatures at the ends of the bar are held at fixed values. These can be expressed
mathematically as
π 0 = π1, π L = π2
With these conditions. Eq. (1) can be solved analytically using calculus. For a 10 m rod with
ππ = 20, π1 = 40, π2 = 200, and ββ² = 0.01, the solution is
π = 73.4523π0.1π₯
β 53.4523πβ0.1π₯
+ 20 (2)
8. β’ So in real life we have the DE which describe the Physical Systems. Example:
Fluid dynamics, aerodynamics, Biological System and many more.
β’ And that DE in most cases does not have the closure form of solution or
Analytical solution.
β’ Example in fluid dynamics most of the DE which describes fluid flows
doesnβt have closure form of solution.
β’ In such cases what we have to do?
β’ Approximate these solution of the governing equations for the physical
system Numerically.
β’ Now numerically we mean approximate the solutions at discrete points in the
Domain of the problem.
β’ So today I will explain one such numerical method namely Finite Difference
Method (FDM).
β’ This completes motivation.
10. β’ The finite difference method is one of the traditional technique to reduce the
given Differential Equation to Difference Equation.
π·πΈ
π·ππ ππππ‘ππ§ππ‘πππ
π΄π·πΈ
Differential Equation ο Algebraic Difference Equation
β’ The process by which we are transforming the DE to ADE it is called the
Discretization.
β’ There are other different traditional methods to convert this DE to Difference
Equation, namely
β’ Finite Volume Method (FVM), Finite Element Method (FEM), Boundary
Element Method (BEM) etc.
12. β’ Taylorβs Theorem: If the function π its first (n+1) derivatives are continuous on an
interval containing a and x, then the value of the function at x is given by
β’ π π₯ = π π + πβ² π π₯ β π +
πβ²β² π
2!
(π₯ β π)2+ . . . +
πn π
n!
(π₯ β π)π+π π --(3)
where π π = π
π₯ (π₯βπ‘)π
n!
π(n+1) π‘ ππ‘ --- (4)
β’ An alternate formulation for remainder π π can be derived on the basis of the integral
mean value theorem. We get
π π =
π(n+1) π
(n+1)!
(π₯ β π)(π+1)
----(5)
β’ A useful way to gain insight into the Taylor series is to build it term by term. For
example the first term in the series is
π π₯π+1 β π π₯π --- (6)
β’ This relationship, (6) is called the zero-order approximation, indicates that the value
of π at the new point is same as its value at old.
β’ Equation (6) provides a perfect estimate if the function being approximated is, in fact,
a constant.
13. β’ Similarly, by adding one and two, more term to get the first-order and second order
approximation respectively. i.e.,
π π₯π+1 β π π₯π + πβ²
π₯π π₯π+1 β π₯π and
π π₯π+1 β π π₯π + πβ²
π₯π π₯π+1 β π₯π +
πβ²β² π₯π
2!
(π₯π+1 β π₯π)2
β’ In a similar manner, additional terms can be included to develop the complete Taylor series
expansion:
π π₯π+1 = π π₯π + πβ²
π₯π π₯π+1 β π₯π +
πβ²β² π₯π
2!
π₯π+1 β π₯π
2
+ . . . +
πn π₯π
n!
(π₯π+1 β π₯π)π
+π π
where, π π =
π(n+1) π
(n+1)!
(π₯π+1 β π₯π)(π+1)
(6.1)
β’ It is often convenient to simplify the Taylor series by defining a step size β = π₯π+1 β π₯π and
expressing as
π π₯π+1 = π π₯π + πβ²
π₯π β +
πβ²β² π₯π
2!
β2
+ . . . +
πn π₯π
n!
βπ
+ π π --(7)
where the remainder term is now, π π =
π(n+1) π
(n+1)!
βπ+1
--(8)
β’ In general, the nth-order Taylor series expansion will be exact for an nth-order polynomial.
For other differentiable and continuous functions, such as exponentials and sinusoids, a
finite number of terms will not yield an exact estimate. Each additional term will contribute
some improvement, however slight, to the approximation.
14. β’ The assessment of how many terms are required to get βclose enoughβ is based on the
remainder term of the expansion.
β’ This relationship (8) has two major drawbacks. First, π is not known exactly but
merely lies somewhere between π₯π and π₯π+1. Second, to evaluate Eq. (8), we need to
determine the (n + 1) th derivative of π π₯ . To do this, we need to know π π₯ .
However, if we knew π π₯ , there would be no need to perform the Taylor series
expansion in the present context!
β’ Despite this dilemma, Eq. (8) is still useful for gaining insight into truncation errors.
This is because we do have control over the term h in the equation. In other words,
we can choose how far away from x we want to evaluate π π₯ , and we can control
the number of terms we include in the expansion. Consequently, Eq. (8) is usually
expressed as
π π = π(βπ+1) (10)
β’ Where the nomenclature π(βπ+1
) means that the truncation error is of the order of βπ+1
.
That is, the error is proportional to the step size h raised to the (n + l)th power. Although this
approximation implies nothing regarding the magnitude of the derivatives that multiply βπ+1,
it is extremely useful in judging the comparative error of numerical methods based on Taylor
series expansions. For example, if the error is O(h), halving the step size will halve the error.
On the other hand, if the error is O(β2), halving the step size will quarter the error.
15. β’ Now using the Taylor Series we will Estimate Truncation Errors.
β’ Let v(t) some function which can be expanded in a Taylor series:
π£ π‘π+1 = π£ π‘ + π£β² π‘π π‘π+1 β π‘π +
π£β²β²
π‘π
2!
π‘π+1 β π‘π
2+ . . . +π π
β’ Now let us truncate the series after the first derivative term:
π£ π‘π+1 = π£ π‘ + π£β²
π‘π π‘π+1 β π‘π + π 1
ππ, π£β²
π‘π =
π£ π‘π+1 β π£ π‘π
π‘π+1 β π‘π
β
π 1
π‘π+1 β π‘π
(11)
1st order-approx. Truncation error
β’ because of the Taylor series approach, we have now obtained an estimate of the truncation
error associated with this approximation of the derivative. Using Eqs. (6.1) and (11) yields
π 1
π‘π+1 β π‘π
=
π£β²β²
π
2!
π‘π+1 β π‘π 12
ππ,
π 1
π‘π+1 β π‘π
= π π‘π+1 β π‘π 13
β’ In other words, the error of our derivative approximation should be proportional to the step
size. Consequently, if we halve the step size, we would expect to halve the error of the
derivative.
17. β’ Equation (11) is given a formal label in numerical methodsβit is called a finite divided
difference. It can be represented generally as.
πβ² π₯π =
π π₯π+1 β π π₯π
π₯π+1 β π₯π
+ π π₯π+1 β π₯π 14
πβ²
π₯π =
βππ
β
+ π β (15)
β’ where βππ is referred to as the first forward difference and h is called the step size, that is, the
length of the interval over which the approximation is made. It is termed a βforwardβ
difference because it utilizes data at i and i + 1 to estimate the derivative (Fig a). The entire
term
βππ
β
is referred to as a first finite divided difference.
β’ This forward divided difference is but one of many that can be developed from the Taylor
series to approximate derivatives numerically. For example, backward and central difference
approximations of the first derivative can be developed in a fashion similar to the derivation of
Eq. (11).
18. β’ Backward Difference Approximation of the First Derivative: The Taylor series can be
expanded backward to calculate a previous value on the basis of a present value, as in
π π₯πβ1 = π π₯π β πβ² π₯π β +
πβ²β² π₯π
2!
β2β . . . (16)
β’ Truncating this equation after the first derivative and rearranging yields
πβ²
π₯π β
π π₯π β π π₯πβ1
β
=
π»ππ
β
(17)
β’ where the error is O(h), and π»ππ is referred to as the first backward difference. See Fig. b for a
graphical representation.
19. β’ Central Difference Approximation of the First Derivative: A third way to approximate the
first derivative is to subtract Eq. (16) from the forward Taylor series expansion:
π π₯π+1 = π π₯π + πβ² π₯π β +
πβ²β² π₯π
2!
β2+ . . . (17.1)
β’ To yield
π π₯π+1 β π π₯πβ1 = 2πβ² π₯π β +
2π3
π₯π
3!
β3+ . . .
β’ Which can be solved for
πβ² π₯π =
π π₯π+1 β π π₯πβ1
2β
β
π3
π₯π
6
β2+ . .
ππ, πβ²
π₯π =
π π₯π+1 β π π₯πβ1
2β
β π β2
(18)
β’ Equation (18) is a centered difference representation of the first derivative. Notice that the
truncation error is of the order of β2
in contrast to the forward and backward approximations
that were of the order of β. Consequently, the Taylor series analysis yields the practical
information that the centered difference is a more accurate representation of the derivative. See
(Fig. c). For example, if we halve the step size using a forward or backward difference, we
would approximately halve the truncation error, whereas for the central difference, the error
would be quartered.
20.
21. β’ Finite Difference Approximations of Higher Derivatives: Besides first
derivatives, the Taylor series expansion can be used to derive numerical estimates of
higher derivatives. To do this, we write a forward Taylor series expansion for
π π₯π+2 in terms of π π₯π :
π π₯π+2 = π π₯π + πβ² π₯π 2β +
πβ²β² π₯π
2!
2β 2+ . . . 19
β’ Equation (17.1) can be multiplied by 2 and subtracted from Eq. (19) to give
π π₯π+2 β 2π π₯π+1 = βπ π₯π + πβ²β²
π₯π β2
+ πβ²β²β²
π₯π β3
+ . . .
β’ Which can be solved for
πβ²β² π₯π =
π π₯π+2 β 2π π₯π+1 + π π₯π
β2
+ π β 20
β’ Similar manipulations can be employed to derive a backward and central version
πππππ€πππ, πβ²β²
π₯π =
π π₯π β 2π π₯πβ1 + π π₯πβ2
β2
+ π β (21)
ππππ‘πππ, πβ²β² π₯π =
π π₯π+1 β 2π π₯π + π π₯πβ1
β2
+ π β2 (22)
β’ As was the case with the first-derivative approximations, the centered case is more
accurate.
22.
23. Figure 2: Backward finite-divided difference Formulas: two versions are presented
for each derivative. The latter version incorporates more terms of the Taylor series
expansion and is, consequently, more accurate.
24. Figure 2: Backward finite-divided difference Formulas: two versions are presented
for each derivative. The latter version incorporates more terms of the Taylor series
expansion and is, consequently, more accurate.
26. Problem: The conservation of heat can be used to develop a heat balance for a long, thin rod. A
non-insulated uniform rod positioned between two bodies of constant but different temperature.
For this case π1 > π2 and π2 > ππ
And the heat (temperature) distribution is governed by the equation
β 2π
β π₯2 + ββ² ππ β π = 0 (1)
where ββ²
is a heat transfer coefficient (πβ2
) that parameterizes the rate of heat dissipation to the
surrounding air and ππ is the temperature of the surrounding air (in Celsius, C).
To obtain a solution for Eq. (1), there must be appropriate boundary conditions. A simple case is
where the temperatures at the ends of the bar are held at fixed values. These can be expressed
mathematically as
π 0 = π1, π L = π2
With these conditions. Eq. (1) can be solved analytically using calculus. For a 10 m rod with
ππ = 20, π1 = 40, π2 = 200, and ββ² = 0.01, the solution is
π = 73.4523π0.1π₯
β 53.4523πβ0.1π₯
+ 20 (2)
27. β’ Finite-Difference Methods:
β’ In these techniques, finite divided differences are substituted for the derivatives in the
original equation. Thus, a linear differential equation is transformed into a set of
simultaneous algebraic equations that can be solved using different known numerical
methods
β’ Now we have this governing equation
β 2
π
β π₯2
+ ββ²
ππ β π = 0 (24)
β’ the finite-divided-difference approximation for the second derivative is
β 2
π
β π₯2 =
ππ+1 β 2ππ + ππβ1
βπ₯2
β’ This approximation can be substituted into Eq. (24) to give
ππ+1 β 2ππ + ππβ1
βπ₯2 β ββ² ππ β ππ = 0
β’ Collecting terms gives
βππβ1 + 2 + ββ²
βπ₯2
ππ β ππ+1 = ββ²
βπ₯2
ππ
β’ This equation applies for each of the interior nodes of the rod. The first and last interior
nodes, ππβ1 and ππ+1, respectively, are specified by the boundary conditions. Therefore,
the resulting set of linear algebraic equations will be tridiagonal.
28. β’ Problem Statement: Use the finite-difference approach to solve the same problem as in
above, For a 10 m rod with ππ = 20, π(0) = 40, π(10)= 200, and ββ² = 0.01 , Using
four interior nodes with a segment length of βπ₯ = 2π
β’ Using βππβ1 + 2 + ββ²βπ₯2 ππ β ππ+1 = ββ²βπ₯2ππ we have
2.04 β1 0 0
β1 2.04 β1 0
0 β1 2.04 β1
0 0 β1 2.04
π1
π2
π3
π4
=
40.8
0
0
200.8
β’ There are several numerical techniques to solve above system of linear equations, name
Tri-Diagonal Matrix Algorithm (TDMA) {Gauss elimination}, Gauss seidel, LU
decompositions etc.
β’ which can be solved for π π‘ = 65.9698 93.7785 124.5382 159.4795
29. β’ Comparison of the exact analytical solution with the finite difference methods.
Exact analytical solution is given by π = 73.4523π0.1π₯ β 53.4523πβ0.1π₯ + 20
x True Finite Difference
0 40 40
2 65.9518 65.9698
4 93.7478 93.7785
6 124.5036 124.5382
8 159.4534 159.4795
10 200 200
30. β’ Similarly we can solve
β’ Laplace equation (steady state with two spatial dimensions)
π2π
ππ₯2 +
π2π
ππ¦2 = 0
β’ Heat conduction equation (time variable with one spatial dimension)
ππ
ππ‘
= πβ²
π2
π
ππ₯2
β’ Wave equation (time variable with one spatial dimension)
π2
π¦
ππ₯2
=
1
π2
π2
π¦
ππ‘2
β’ There are several different schemes for Finite Difference Method, Namely,
β’ FTFS (Forward Time Forward Space), FTCS (Forward Time Central Space), CTCS(
Central Time Central Space) etc.
β’ Depending upon the governing Equation given in problem and their Consistency,
Stability analysis and convergence criteria we use them appropriately.
31. β’ Consistency: when, βπ, βπ β π then
Numerical solutions β Exact solution
β’ Error should not be magnified
ππ+π β€ ππ
β’ Convergence Criteria
Error β€ ππβπ
32. Conclusions
β’ Most of the physical system application is governed by some DE.
β’ All of them do not have closed form/analytical for of solution or difficult to
solve analytically.
β’ Numerical approximation approaches to BVP are being used nowadays.
β’ Taylorβs Theorem has a significant role in writing DE in Algebraic difference
equation form.
β’ Discretization is the process by which we convert DE to ADE.
β’ We can have different order of accuracy for same order derivative depending
upon different Newton Difference Formula.
β’ We can increase the order of accuracy by decreasing step size.
β’ According to Stability analysis for the governing equation of the problem
through different FDM schemes we choose which one to be use to solve the
problem.
β’ So this is the one way that, how NA is applicable to BVP.