0% found this document useful (0 votes)
80 views15 pages

Class 26th Nov

1) The document discusses numerical methods for solving boundary value problems (BVPs) of second order ordinary differential equations (ODEs), including finite difference approximations. 2) It explains the concepts of local truncation error (LTE), which measures consistency, and global error (GE), which measures stability. 3) If a method is both consistent (LTE goes to 0 as the grid is refined) and stable (GE is bounded by LTE), then the method is convergent, meaning the error goes to 0 as the grid is refined.

Uploaded by

mileknz
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)
80 views15 pages

Class 26th Nov

1) The document discusses numerical methods for solving boundary value problems (BVPs) of second order ordinary differential equations (ODEs), including finite difference approximations. 2) It explains the concepts of local truncation error (LTE), which measures consistency, and global error (GE), which measures stability. 3) If a method is both consistent (LTE goes to 0 as the grid is refined) and stable (GE is bounded by LTE), then the method is convergent, meaning the error goes to 0 as the grid is refined.

Uploaded by

mileknz
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/ 15

numerical methods for

differential equations and


applications

Supervisor: Camile Fraga Delfino Kunz

November 26th, 2018


What do we have for today?

Boundary Value Problem (BVP);


Finite Differences approximation;
Local Truncation Error (LTE) - consistency;
Global Error (GE) - stability;
Convergence.
Second order ODE
Linear homogeneous case
A linear second order ODE can be written like:

ay 00 + by + cy = 0

and can be solved by setting y (t) = e rt and finding the values


of r that satisfies the characteristic polynomial

ar 2 + br + c = 0

and the general solution will be written like

y (t) = c1 e r1 t + c2 e r2 t

where c1,2 are determined by the initial (or boundary)


conditions. Observe that we need in this case two conditions.
Second order ODE

Example:
Solve y 00 − y = 0, y (0) = 2, y 0 (0) = −1.
Solution: y (t) = 12 e t + 32 e −t
Boundary Value Problem (BVP)

The Boundary Value Problems (BVP) are the ODEs which are
posed on an interval a < x < b and we have boundary
conditions at each end (or on one of the edges). Consider the
problem

u 00 (x) = f (u, x) , a < x < b

it can have the boundary conditions:


Dirichlet: u(a) = α, u(b) = β;
Neumann: u(a) = α, u 0 (a) = β; (IVP)
u(a) = α, u 0 (b) = β; (BVP)
Robin: c1 u(a) + c2 u 0 (a) = 0, d1 u(b) + d2 u 0 (b) = 0.
Finite Difference Method

Consider the problem

u 00 (x) = f (x) , 0 < x < 1


u(0) = α, u(1) = β

We divide the interval [0, 1] into m subintervals and


approximate the second derivative on each point xj by setting

(Uj−1 − 2Uj + Uj+1 )


u 00 (xj ) ≈ , j = 1, . . . , m − 1
h2
and U0 = α and Um = β.
So approximating the solution U = (U1 , . . . , Um−1 ) on the
discrete points can be done by solving a linear system AU = F .
Consistency
The method will be consistent with the ODE and boundary
conditions if the Local Truncation Error (LTE) τ satisfies
kτ k → 0 as h → 0

As we did before, the LTE is calculated by susbtituting the


exact solution on the finite difference equation, for the preview
example,
1
τj = 2 [u(xj−1 ) − 2u(xj ) + u(xj+1 )] − f (xj )
h
of course we don’t have the solution u(x), if we assume that it
is smooth, by Taylor expansion this becomes
1 2 0000
τj = h u (xj ) + o(h4 )
12
Consistency

Saying that
1 2 0000
τj = h u (xj ) + o(h4 )
12
means that the LTE τ = o(h2 ) as h → 0.
If we define τ to be the vector with components τj , then

τ = Aû − F

where û is the vector of true solutions on the discrete interval.


Global Error (GE)

If we write the exact solution vector on the discrete points


as û, the global error is E = U − û, which is also a vector.
Subtracting Aû = F + τ from AU = F we obtain the
expression for the global error

AE = −τ

which is the matrix form of the system


1
(Ej−1 − 2Ej + Ej+1 ) = −τ (xj ), for j = 1, 2, . . . , m − 1
h2
with boundary conditions E0 = Em = 0.
Global Error (GE)

From it we can interpret the linear system as a discretization


of the ODE

e 00 (x) = −τ (x) , for 0 < x < 1

with boundary conditions e(0) = 0 and e(1) = 0.


1 2 0000
Since τ (x) ≈ 12 h u (x), integrating twice shows that the
global error should be roughly
1 2 00 1
e(x) ≈ − h u (x) + h2 (u 00 (0) + x(u 00 (1) − u 00 (0)))
12 12
So the error is o(h2 ).
Stability

It is possible to prove, see [1], that there is a constant C such


that
kE k ≤ C kτ k

and it means that the error E goes to zero at least as fast as


the truncation error τ .
The constant C should satisfy kA−1 k ≤ C for all h
sufficiently small.
It means that the existence of C depends on the
conditioning of the matrix A.
The condition number of a matrix is defined by
κ(A) = kA−1 k.kAk, and measures “how much the output
value of the function can change for a small change in the
input argument”[3].
Convergence

A method is said to be convergent if kE k → 0 as h → 0.


We can see that a method can be consistent but not
stable; but if the method is stable, it is consistent;
Combining this ideas we can conclude that
consistency + stability ⇒ convergence
Neumann boudary conditions

Example:
Consider the BVP:

u 00 (x) = f (x) , 0 < x < 1


u 0 (0) = α
u(1) = β

How obtain an the solution at x = 0 if we have only the


derivative at this point?
Ill-posedness
Example:
Consider the BVP u 00 (x) = f (x), 0 < x < 1, with Neumann
boundary conditions u 0 (0) = α and u 0 (1) = β. We
approximate the solution through the discrete system

Image from [1].

The matrix of coefficients A is singular, and so we see that the


problem is ill-posed. If we attempt to solve the differential
equation by integrating it we would also find out that it has no
solution.
References

1. Leveque, R. J. Finite Difference Methods for Ordinary


and Partial Differential Equations. SIAM, 2007.

2. Boyce, W.E., DiPrima, R.C. Elementary Differential


Equations and Boundary Value Problems. John Wiley &
Sons,10th ed., 2012.
3. https://en.wikipedia.org/wiki/Condition number

You might also like