Mathematics Exam  >  Mathematics Notes  >  Mathematics for IIT JAM, GATE, CSIR NET, UGC NET  >  Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences

Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET PDF Download

Finite Difference Methods for Partial Differential Equations

As you are well aware, most differential equations are much too complicated to be solved by an explicit analytic formula. Thus, the development of accurate numerical approximation schemes is essential for both extracting quantitative information as well as achieving a qualitative understanding of the behavior of their solutions. Even in cases, such as the heat and wave equations, where explicit solution formulas (either closed form or infinite series) exist, numerical methods still can be profitably employed. Indeed, the lessons learned in the design of numerical algorithms for “solved” examples are of inestimable value when confronting more challenging problems. Furthermore, one has the ability to accurately test a proposed numerical algorithm by running it on a known solution.

Basic numerical solution schemes for partial differential equations fall into two broad categories. The first are the finite difference methods , obtained by replacing the derivatives in the equation by the appropriate numerical differentiation formulae. However, there is no guarantee that the resulting numerical scheme will accurately approximate the true solution, and further analysis is required to elicit bona fide, convergent numerical algorithms.

We thus start with a brief discussion of simple finite difference formulae for numerically approximating low order derivatives of functions. The ensuing sections establish some of the most basic finite difference schemes for the heat equation, first order transport equations, and the second order wave equation. As we will see, not all finite difference approximations lead to accurate numerical schemes, and the issues of stability and convergence must be dealt with in order to distinguish valid from worthless methods. In fact, inspired by Fourier analysis, the basic stability criterion for a finite difference scheme is based on how the scheme handles complex exponentials.

We will only introduce the most basic algorithms, leaving more sophisticated variations and extensions to a more thorough treatment, which can be found in numerical analysis texts, e.g., [ 5, 7, 29 ].

11.1. Finite Differences.

In general, to approximate the derivative of a function at a point, say f ′(x) or f ′′(x), one constructs a suitable combination of sampled function values at nearby points. The underlying formalism used to construct these approximation formulae is known as the calculus of finite differences . Its development has a long and influential history, dating back to Newton. The resulting finite difference numerical methods for solving differential equations have extremely broad applicability, and can, with proper care, be adapted to most problems that arise in mathematics and its many applications.

Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET

The simplest finite difference approximation is the ordinary difference quotient

Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET

used to approximate the first derivative of the function u(x). Indeed, if u is differentiable at x, then u′ (x) is, by definition, the limit, as h → 0 of the finite difference quotients.
Throughout our discussion, h, the step size , which may be either positive or negative, is assumed to be small: | h | << 1. When h > 0, (11.1) is referred to as a forward difference , while h < 0 gives a backward difference . Geometrically, the difference quotient equals the slope of the secant line through the two points Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET on the graph of the function. For small h, this should be a reasonably good approximation to the slope of the tangent line, u′ (x), as illustrated in the first picture in Figure 11.1.

How close an approximation is the difference quotient? To answer this question, we assume that u(x) is at least twice continuously differentiable, and examine the first order Taylor expansion

Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET

We have used the Cauchy form for the remainder term, [ 2], in which ξ represents some point lying between x and x + h. The error or difference between the finite difference formula and the derivative being approximated is given by

Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET

Since the error is proportional to h, we say that the finite difference quotient (11.3) is a first order approximation. When the precise formula for the error is not so important, we will write

Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET

The “big Oh” notation O(h) refers to a term that is proportional to h, or, more rigorously, bounded by a constant multiple of h as h → 0.

Example 11.1. Let u(x) = sin x. Let us try to approximate u′ (1) = cos 1 = .5403023 . . . by computing finite difference quotients

Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET

The result for different values of h is listed in the following table.

h1.1.01.001.0001
approximation.067826.497364.536086.539881.540260
error−.472476−.042939−.004216 −.000421−.000042


We observe that reducing the step size by a factor of 110 reduces the size of the error by approximately the same factor. Thus, to obtain 10 decimal digits of accuracy, we anticipate needing a step size of about h = 10−11 . The fact that the error is more of less proportional to the step size confirms that we are dealing with a first order numerical approximation.

To approximate higher order derivatives, we need to evaluate the function at more than two points. In general, an approximation to the nth order derivative u(n) (x) requires at least n + 1 distinct sample points. For simplicity, we shall only use equally spaced points, leaving the general case to the exercises.

For example, let us try to approximate u′′ (x) by sampling u at the particular points x, x + h and x − h. Which combination of the function values u(x − h), u(x), u(x + h) should be used? The answer to such a question can be found by consideration of the relevant Taylor expansions

Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET

where the error terms are proportional to h4 . Adding the two formulae together gives

u(x + h) + u(x − h) = 2 u(x) + u′′(x) h2 + O(h4).

Rearranging terms, we conclude that

Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET

The result is known as the centered finite difference approximation to the second derivative of a function. Since the error is proportional to h2 , this is a second order approximation.

Example 11.2.Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET Let us approximate u′′ (1) = 6 e = 16.30969097 . . . by using the finite difference quotient (11.6):

Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET

The results are listed in the following table.

h1.1.01.001.0001
approximation5.1615863816.4828982316.3114126516.3097081916.30969115
error33.85189541.17320726.00172168.00001722.00000018


Each reduction in step size by a factor of 110 reduces the size of the error by a factor of 1/100 and results in a gain of two new decimal digits of accuracy, confirming that the finite difference approximation is of second order.

However, this prediction is not completely borne out in practice. If we take† h = .00001 then the formula produces the approximation 16.3097002570, with an error of .0000092863 — which is less accurate that the approximation with h = .0001. The problem is that round-off errors have now begun to affect the computation, and underscores the difficulty with numerical differentiation. Finite difference formulae involve dividing very small quantities, which can induce large numerical errors due to round-off. As a result, while they typically produce reasonably good approximations to the derivatives for moderately small step sizes, to achieve high accuracy, one must switch to a higher precision. In fact, a similar comment applied to the previous Example 11.1, and our expectations about the error were not, in fact, fully justified as you may have discovered if you tried an extremely small step size.

Another way to improve the order of accuracy of finite difference approximations is to employ more sample points. For instance, if the first order approximation (11.4) to the first derivative based on the two points x and x + h is not sufficiently accurate, one can try combining the function values at three points x, x + h and x − h. To find the appropriate combination of u(x − h), u(x), u(x + h), we return to the Taylor expansions (11.5). To solve for u′ (x), we subtract‡ the two formulae, and so

Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET

Rearranging the terms, we are led to the well-known centered difference formula

Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET

which is a second order approximation to the first derivative. Geometrically, the centered difference quotient represents the slope of the secant line through the two points Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET on the graph of u centered symmetrically about the point x. Figure 11.1 illustrates the two approximations; the advantages in accuracy in the centered difference version are graphically evident. Higher order approximations can be found by evaluating the function at yet more sample points, including, say, x + 2h, x − 2h, etc.

The document Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET is a part of the Mathematics Course Mathematics for IIT JAM, GATE, CSIR NET, UGC NET.
All you need of Mathematics at this link: Mathematics
556 videos|198 docs

FAQs on Finite Differences - Numerical Analysis, CSIR-NET Mathematical Sciences - Mathematics for IIT JAM, GATE, CSIR NET, UGC NET

1. What is Finite Differences in numerical analysis?
Ans. Finite Differences is a numerical method used in numerical analysis to approximate derivatives and solve differential equations. It involves approximating derivatives by using the values of a function at a discrete set of points. This method is particularly useful when analytical solutions are difficult or impossible to obtain.
2. How does Finite Differences work in numerical analysis?
Ans. In Finite Differences, the derivative of a function is approximated by taking the difference between function values at neighboring points. For example, the first derivative can be approximated using the forward difference formula as: f'(x) ≈ (f(x + h) - f(x)) / h where h is a small step size. Similarly, higher order derivatives can be approximated using central differences or higher order difference formulas.
3. What are the advantages of using Finite Differences in numerical analysis?
Ans. Finite Differences offer several advantages in numerical analysis: - It is a simple and straightforward method to approximate derivatives. - It can be applied to both equally spaced and non-equally spaced data points. - It can handle irregular domains and boundary conditions. - It is computationally efficient and can handle large-scale problems.
4. What are the limitations of Finite Differences in numerical analysis?
Ans. While Finite Differences have many advantages, they also have some limitations: - The accuracy of the approximation depends on the step size used. A smaller step size generally leads to a more accurate approximation, but it also increases computational cost. - Finite Differences may introduce errors due to truncation, especially when dealing with high-order derivatives. - The method may not work well for functions with discontinuities or sharp changes.
5. How is Finite Differences used in solving differential equations?
Ans. Finite Differences can be used to solve differential equations by approximating the derivatives in the given differential equation using difference formulas. The differential equation is then converted into a system of algebraic equations, which can be solved numerically. This approach is particularly useful for solving partial differential equations, where analytical solutions are often unavailable. The accuracy of the solution depends on the order of the difference formulas used and the step size chosen.
Explore Courses for Mathematics exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

UGC NET

,

Viva Questions

,

CSIR NET

,

past year papers

,

Finite Differences - Numerical Analysis

,

UGC NET

,

CSIR-NET Mathematical Sciences | Mathematics for IIT JAM

,

CSIR-NET Mathematical Sciences | Mathematics for IIT JAM

,

GATE

,

UGC NET

,

practice quizzes

,

Extra Questions

,

Summary

,

CSIR NET

,

Semester Notes

,

MCQs

,

Free

,

Exam

,

Finite Differences - Numerical Analysis

,

GATE

,

study material

,

shortcuts and tricks

,

Finite Differences - Numerical Analysis

,

CSIR NET

,

ppt

,

Objective type Questions

,

mock tests for examination

,

CSIR-NET Mathematical Sciences | Mathematics for IIT JAM

,

GATE

,

pdf

,

Important questions

,

Sample Paper

,

video lectures

,

Previous Year Questions with Solutions

;