TRIPURA MATHEMATICAL
ASSOCIATION
National Mathematical Webinar 2021
Numerical analysis and its application to Boundary
Value Problems
- Gobinda Debnath
(Research Scholar, MNNIT)
gobinda.2021rma02@mnnit.ac.in
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.
BOUNDARY VALUE
PROBLEM (BVP)
• 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.
A real life example of BVP
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)
• 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.
Finite Difference Method
• 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.
Discretization
• 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.
• 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.
• 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.
• 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.
Numerical
Differentiation
• 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).
• 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.
• 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.
• 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.
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.
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.
Application to BVP
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)
• 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.
• 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
• 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
• 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.
• Consistency: when, ∆𝒙, ∆𝒚 → 𝟎 then
Numerical solutions → Exact solution
• Error should not be magnified
𝝐𝒏+𝟏 ≤ 𝝐𝒏
• Convergence Criteria
Error ≤ 𝟏𝟎−𝟓
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.
Thank you
Numerical Analysis and Its application to Boundary Value Problems

Numerical Analysis and Its application to Boundary Value Problems

  • 1.
    TRIPURA MATHEMATICAL ASSOCIATION National MathematicalWebinar 2021 Numerical analysis and its application to Boundary Value Problems - Gobinda Debnath (Research Scholar, MNNIT) gobinda.2021rma02@mnnit.ac.in
  • 2.
    MOTIVATION • We allknow 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.
  • 3.
  • 4.
    • In thefield 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.
  • 6.
    A real lifeexample of BVP
  • 7.
    Problem: The conservationof 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 inreal 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.
  • 9.
  • 10.
    • The finitedifference 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.
  • 11.
  • 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, byadding 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 assessmentof 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 usingthe 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.
  • 16.
  • 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 DifferenceApproximation 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 DifferenceApproximation 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.
  • 21.
    • Finite DifferenceApproximations 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.
  • 23.
    Figure 2: Backwardfinite-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: Backwardfinite-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.
  • 25.
  • 26.
    Problem: The conservationof 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 ofthe 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 wecan 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 ofthe 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.
  • 33.