0% found this document useful (0 votes)
14 views14 pages

Project 1

Uploaded by

rayoonah282
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views14 pages

Project 1

Uploaded by

rayoonah282
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

UNIVERSITY OF NIZWA COLLEGE OF ARTS AND SCIENCES DEPARTMENT

OF MATHMATICAL AND PHYSICAL SCIENCES MATHEMTICS DIVISION

Finite differential method for solving system of


differential equations.
A project
Applied to the University of Nizwa in partial fulfillment of the requirements
for the degree of Bachelor of Education in Mathematics
By
ISSA ALHARTHY 15432133
MALIK ALGHADANI
RAYA ALSINAIDI
ZAINAB ALBUSAIDI
THIKRA AL-AMRI
SUPERVISER BY
DR. DHANANJAY YADAV
2024
Abstract
The finite difference method (FDM) is a numerical technique commonly used to solve
differential equations, including systems of differential equations. It's particularly useful
when analytical solutions are difficult or impossible to obtain, the whole work is presented
in 4 chapters. Chapter 1 is introductory, and it contains a brief outline of the finite difference
method. Chapter 2 consists of the finite difference solution of boundary value problems in
ordinary differential equations. In Chapter 3, the finite difference solution for some partial
differential equation is made with initial and boundary conditions (Laplace, Heat and Wave
.equations). Final thesis ends with chapter 4 conclusions and references
.

acknowledgements
Firstly, we acknowledgements to God for helping us during our whole study at university of
Nizwa.
.
It is our great pleasure to express our profound sense of gratitude and veneration to Dr.
Dhananjay Yadav, Department of Mathematical and physical Sciences, University of Nizwa, for
his indispensable guidance and enthusiastic attitude throughout the period of project work.
We are privileged to have worked under his expert supervision and it is keen interest, which
has enabled us to present the work in this form. We are highly indebted to him for his gentle
behavior and selfless support during my whole project work.

We cannot miss to sincere thanks to faculty of DMPS for his precious suggestions and support
during my study in Mathematics section.
Sciences and & Also, we want to give special thanks to the University of Nizwa, College of Arts
.to all staff members for their assistance and support during our study
Content
Chapter 1: Introduction……………………………………………………………………………..……... 5

Chapter 2: Boundary Value Problems in Ordinary Differential Equations………..…...10

.2.1Derivation of finite difference method to Solve ODEs…………………,,,,,,,,…..…….10

.2.2Example 1……………………………………………………………………………….………….…….….12

.2.3Example 1………………………………………………………………………………………..….……….15

Chapter 3: Initial and Boundary Value Problems in Partial Differential Equations….18

.3.1Derivation of finite difference method to Solve Laplace Equation: …………………20

.3.2Derivation of finite difference method to Solve Heat Equation…………….....……..25

.3.3Derivation of finite difference method to Solve Wave Equation……...........……..28

Chapter 4: Conclusions……………………………………………………………………..…….…...……34

References…………………………………………………………………………….……………………………35
CHAPTER 1: INTRODUCTION
Introduction:

What is The finite difference method (FDM)?

The finite difference method (FDM) is a widely used numerical method for solving
systems of differential equations. In this article, we'll dig deeper into the concept of
FDM and explore its applications in solving systems of differential equations.
Describes the basic principles, differentiation process, and solution steps used in
FDM.
1. Basic principle of finite difference method:
To understand the finite difference method, you need to understand the concept of
using finite differences to approximate derivatives. FDM divides a continuous field
into a discrete grid of points and replaces the derivatives of differential equations with
difference approximations. This transformation converts differential equations into a
system of algebraic equations that can be solved numerically. To understand the basic
principles of FDM, refer to the following resources.
2. Discretization Process:
The discretization process is a crucial step in applying FDM to systems of differential
equations. It involves dividing the spatial and temporal domains into discrete
intervals. The spatial domain is typically divided into a set of equally spaced nodes or
grid points, while the temporal domain is divided into a sequence of time steps. The
derivatives in the original equations are then approximated using finite difference
formulas, such as forward, backward, or central differences. For a detailed
understanding of the discretization process, the following resource can be helpful.

3. Algebraic equation system:


After approximating the derivatives, the system of differential equations is
transformed into a system of algebraic equations. Each equation corresponds to a
specific grid point and time step. The unknowns in these equations are the values of
the dependent variable at each grid point and at each time step. Various numerical
techniques can be used to solve this system of algebraic equations. For more
information on authorization steps, see the following resources

4. Stability and convergence:


Stability and convergence are important aspects of FDM. Stability refers to the ability
of a method to produce an unambiguous solution, while convergence means that the
numerical solution approaches the exact solution when optimizing the mesh size.
Stability and convergence analysis often includes techniques such as von Neumann
stability analysis and consistency analysis. To fully understand stability and
convergence in FDM, please refer to the following resources:

5. Application:
Difference methods are used in various fields of science and technology. It is
commonly used in computational fluid dynamics, heat transfer analysis, structural
analysis, and many other fields where systems of differential equations occur. FDM
allows researchers and engineers to model and analyze complex physical phenomena
that are difficult to solve analytically. To further explore the applications of FDM, see
the following resources.

6. Advantages and limitations:


FDM has many advantages, including ease of implementation and computational
efficiency for simple geometry problems. However, it has limitations and may not be
suitable for problems with irregular geometry or discontinuities. The accuracy of
FDM depends on the mesh size, with finer meshes requiring more computational
resources but yielding more accurate results. To further explore the pros and cons of
FDM, the following resources may be helpful.

Conclusion:
The finite difference method is a powerful numerical method for solving systems of
differential equations. FDM provides a means to obtain numerical solutions to
complex problems by differentiating fields, approximating derivatives, and solving
the resulting systems of algebraic equations. There are many resources available to
learn more about FDM, but the recommended resources provide a solid foundation
and detailed understanding of FDM principles, techniques, and applications in solving
systems of differential equations.

Why we use The finite difference method (FDM)?

Advantages of finite difference method:


A. Simple and intuitive implementation:
One of the main advantages of the finite difference method is its simplicity and ease
of implementation. The method is based on explicit difference formulas that can be
easily applied to differentiate differential equations. This simplicity makes it
accessible to a wide range of users, including scientists, engineers, and researchers
who may not have extensive experience in numerical analysis.

B. Versatility and wide application:


Finite difference methods are general-purpose and can be applied to a wide range of
problems. It can handle different types of differential equations, including ordinary
differential equations (ODEs) and partial differential equations (PDEs). Furthermore,
it supports a variety of boundary conditions, allowing simulation of complex physical
systems with various constraints.

C. Computational efficiency:
Analytical solutions for systems of differential equations are often unavailable or very
difficult to obtain. Finite difference methods provide a computationally efficient
alternative by converting continuous problems into discrete problems. The resulting
system of algebraic equations can be solved using powerful numerical algorithms
such as matrix factorization.

Advantages of the finite difference method (continued)


Accuracy and convergence:
When properly applied, finite difference methods can provide accurate
approximations to the solutions of systems of differential equations. Accuracy
depends on the choice of grid spacing and the position of the difference formula used.
By optimizing the network and using higher-order difference formulas, the
approximation accuracy can be significantly improved. The convergence theorem
ensures that as the mesh improves, the numerical solution approaches the exact
solution of the continuous problem.

Stability and durability:


Finite difference methods have stability properties that ensure that the numerical
solution remains finite and does not exhibit excessive fluctuations or changes.
Stability analysis is important in numerical methods to ensure the reliability and
stability of the design solution. By choosing an appropriate identification scheme and
time step size, we can maintain stability over a wide range of task types and parameter
values.

Flexible manipulation of complex geometries:


Another advantage of finite difference methods is their flexibility when dealing with
complex geometries. This method can cover irregular or non-rectangular areas by
using non-uniform mesh or adaptive mesh optimization techniques. This feature is
particularly useful when modeling physical systems with complex shapes, such as
fluid flow with complex shapes or heat transfer with irregular shapes.

One of the earliest and most straightforward techniques for solving differential
equations is the use of finite difference approximations for derivatives.
Around 1768, L. Euler (1707–1783) discovered it in one dimension of space,
and C. Runge (1856–1927) most likely expanded it to a second dimension
around 1908. Finite difference approaches were first used in numerical
applications in the early 1950s, and the development of these techniques was
aided by the introduction of computers, which provided a practical framework
for addressing complicated scientific and technological issues. For partial
differential equations, theoretical results about the finite difference method's
accuracy, stability, and convergence have been obtained over the past fifty
years. The numerical approaches used to solve ordinary differential equations
are similar to the principle of finite difference methods (cf. Appendix C). It
entails employing differential quotients to replace the derivatives in the
equation in order to approximate the differential operator. The domain is
divided into time and space segments, and for each time or space segment,
approximations of the solution are computed. The mistake made when
switching from a differential operator to a difference operator determines the
discrepancy between the numerical solution and the exact solution. The term
"truncation error" or "discretization error" describes this error. The
approximation uses a finite section of a Taylor series, which is reflected in the
term truncation error. To keep things simple, we will

The quotient on the right-hand side provides a "good" approximation of the derivative
when h tends to 0 without vanishing. A good approximation is when the error
committed tends towards zero when h tends to zero, quantified using a Taylor
expansion.

6.1.2 Taylor series

Suppose the function u is C2 continuous in the neighborhood of x. For any h > 0 we


have:

(6.1)

where h1 is a number between 0 and h (i.e. x + h1 is point of] x, x + h [ ). For the


treatment of problems,

it is convenient to retain only the first two terms of the previous expression:
where the term O(h2) indicates that the error of

the approximation is proportional to h2. From the equation (6.1), we deduce that there
exists a constant C > 0, such that for h > 0 sufficiently small we

have:

𝑢(𝑥+ℎ)−𝑢(𝑥) |𝑢" (𝑦)|


| − 𝑢 ′ (𝑥)| ≤ 𝐶ℎ, 𝐶= sup ,
ℎ 𝑦∈[𝑥,𝑥+ℎ𝑜] 2

for h ≤ h0 (h0 > 0 given). The error committed by replacing the derivative u′(x) by the

differential quotient is of order h. The approximation of u′ at point x is said to be


consistent at the first order. This approximation is known as the forward difference

approximant of u′. More generally, we define an approximation at order p of the


derivative.

Approximation of the second derivative

Lemma 6.1 Suppose u is a C4 continuous function on an interval [x − h0, x + h0], h0


> 0. Then, there exists a constant C > 0 such that for every h ∈]0, h0[ we have:

The differential quotient is a consistent second-order

approximation of the second derivative u′′ of u at point x.

Proof. We use Taylor expansions up to the fourth order to achieve the result:
where ξ+ ∈]x, x + h[ and ξ− ∈]x − h, x[. Like previously, the intermediate value
theorem allows us to write:

where ξ ∈]x − h, x + h[. Hence, we deduce the relation (6.2) with the constant |

Remark 6.2 Likewise, the error estimate depends on the regularity of the function u. If

u is C3 con- tenuous, then the error is of order h only.

Finite difference formulation for a one-dimensional problem

We consider a bounded domain Ω =]0,1[⊂ R and u : Ω ̄ → R solving the non-


􏰈
homogeneous Dirichlet problem:

−u′′ (x) + c(x)u(x) = f (x) , x ∈]0, 1[ , u(0)=α, u(1)=β,


D (6.3)

where c and f are two given functions, defined on Ω ̄, c ≥ 0.

Variational theory and approximation

Since Chapter 4, we know that if c ∈ L∞(Ω) and f ∈ L2(Ω), then the solution u to this
problem exists. Furthermore, if c = 0, we have the explicit formulation of u as:

𝑢(𝑥) = ∫ 𝐺(𝑥, 𝑦)𝑓(𝑦)𝑑𝑦 + 𝛼 + 𝑥(𝛽 − 𝛼),


Ω

where 𝐺(𝑥, 𝑦) = 𝑥(1 − 𝑦) if 𝑦 ≥ 𝑥 and 𝐺(𝑥, 𝑦) = 𝑦(1 − 𝑥) 𝑖𝑓𝑦 < 𝑥. However,


when 𝑐 ≠0 there is no explicit formula giving the solution u. Thus, we should resign
to find an approximation of the solution.

The first step in deriving a finite difference approximation of the equation (6.3) is to
partition the unit interval into a finite number of subintervals. Here, is a fundamental
concept of the finite difference approximations: the numerical solution is not defined
on the whole domain Ω but at a finite number of points in Ω only.

We introduce the equidistributed grid points (𝑥𝑗)0 ≤ 𝑗 ≤ 𝑁 + 1 given by 𝑥𝑗 = 𝑗ℎ,


where N is an integer, and the spacing h is given by ℎ = 1/(𝑁 + 1). Typically, the
spacing is aimed at becoming very small as the number of grid points will become
very large. At the boundary of Ω, we have 𝑥0 = 0 and 𝑥𝑁 + 1 = 1. At each of
these points, we are looking for numerical value of the solution, uj = u(xj). We
impose 𝑢(𝑥0) = 𝛼 and 𝑢(𝑥𝑁 + 1) = 𝛽 and we use the differential quotient
introduced in the previous section to approximate the second order derivative of the
equation (6.3).

The unknowns of the discrete problem are all the values 𝑢(𝑥1), . . . , 𝑢(𝑥𝑁 ) and we
introduce the vector 𝑢ℎ ∈ 𝑅𝑁 of components uj, for 𝑗 ∈ {1, . . . , 𝑁}.

Finite difference schemes for time-dependent problems

We consider a time-dependent, first-order boundary value problem posed in a


bounded domain 𝛺 =]0, 1[:

Find 𝑢: [0, 𝑇] × 𝛺 → 𝑅 such that

𝜕𝑢 𝜕2𝑢
(𝑡, 𝑥) − 𝑣 2 (𝑡, 𝑥) = 𝑓(𝑡, 𝑥), ∀𝑡𝜖 ]0, 𝑇[ , ∀𝑥𝜖 ]0, 1[
𝜕𝑥 𝜕𝑥
𝑢(0, 𝑥) = 𝑢0 (𝑥), ∀𝑋𝜖 ]0, 1[
{ 𝑢(𝑡, 0) = 𝑢(𝑡, 1) = 0 , ∀𝑡𝜖 ]0, 𝑇[
where 𝑓(𝑡, 𝑥) is a given source term and 𝜈 ≥ 0. This equation is the well-know heat
equation that describes the distribution of heat in a given domain over time. It is the
prototypical parabolic partial differential equation. The function 𝑢(·,·), solution to this
equation, describes the temperature at a given location x in time. The analysis of this
equation has been pioneered by the French physicist J. Fourier (1768-1830) who
invented influential methods for solving partial differential equations.

The finite difference method (FDM) is an approximate method for solving partial
differential equations. It has been used to solve a variety of problems. They include
linear and non-linear, independent and time-dependent problems. This method can be
applied to problems with different boundary shapes, different types of boundary
conditions, and to a region containing a number of different materials. Although this
method was known to researchers such as Gauss and Boltzmann, it was not widely
used to solve engineering problems until the 1940s. The mathematical basis of this
method was known to Richardson in 1910
and many mathematical works such as references
have been published related to the finite difference method. Specific references
related to the treatment of electric and magnetic field problems .Applying FDM is not
difficult because it only involves simple arithmetic operations in deriving
discretization equations and writing corresponding programs. Between the 1950s and
1970s, FDM was the most important numerical method used to solve practical
problems .With the development of high-speed computers with large-scale storage
capabilities, many numerical solution techniques have emerged to solve partial
differential equations. However, because of the ease of application of the finite
difference method
Similar to other methods In others, the purpose of the finite difference method is to
replace a continuous field. The problem has infinite degrees of freedom because of a
discrete field with finite regular nodes. The partial derivative of the unknown function
is approximated by the difference quotient in a finite set of discrete points. The
original partial differential equation is then transformed into a set of algebraic
equations. The solutions of these simultaneous equations are approximate solutions of
the original limit value problem. In this chapter, the equations that discretize the
Poisson problem into translationally symmetric coordinates and axisymmetric
coordinates will be discussed. Solving the diffusion equation with linear and nonlinear
parameters is presented. Several specific discretization formulas for different types of
boundary conditions and interface conditions are developed. Introducing iterative
methods to solve matrix equations derived from FDM. Examples are given for solving
electrostatics and diffusion problems. Finally, the relationship between finite
difference equations and the variational principle, as well as weighted residual
approaches, will be discussed in the final section.
Finite Difference Method in Electromagnetism
The use of numerical finite difference method in electromagnetism became
widespread with the advent of fast digital computers equipped with high memory
space and the This method is now widely used. The finite difference method in
electromagnetism is a numerical procedure based on approximations for solving
partial differential equations. This method can be applied when solving linear,
nonlinear, time-independent, and time-independent problems. One of the main
application areas is electromagnetism, where the method can be used to solve
problems involving different shapes, boundary conditions, initial conditions and
regions related to matter. Is it inconsistent?

How the finite difference method works.


The finite difference method in electromagnetism uses simple arithmetic calculations
to solve complex equations in differential form. The approach to solving partial
differential equations using the finite difference method begins with discretization. In
the finite difference method, differential equations defined over a continuous three-
dimensional region of space are replaced by a set of discrete equations, called finite
difference equations. The region of interest in the problem is defined as regular grids
in the finite difference method, helping to achieve a stable, accurate and effective
solution .

Steps involved in the finite difference method.


There are three main steps involved in solving any partial differential equation using
the finite difference method. These are:

1- Discrete solution area – This is the process of converting the solution area into a
mesh of nodes. The solution area is divided into meshes with mesh points or nodes.
The nodes in the boundary region are called fixed nodes and the nodes in the interior
region are called free points.

2- Contrast differential equations to finite difference equations - At finite discrete


points, partial derivatives are approximated as a set of algebraic equations called
difference equations limited. These difference equations relate the dependent variable
of a node in the solution region to its neighboring nodes.

3- Solving difference equations - A set of finite difference equations that


simultaneously obey boundary conditions or initial conditions will obtain the general
solution of the problem.
Among the numerical methods used to solve electromagnetic problems, the finite
difference method is commonly used due to its simplicity. The finite difference
method in electromagnetism is a numerical method proposed to solve partial
differential equations when the solution region has a regular geometry.

You might also like