In common real-life situations, the differential equation that models the problem is toocomplicated to solve exactly, so the approach is taken to approximate the solution.. Once the appr
Trang 1NUMERICAL SOLUTIONS FOR ORDINARY
DIFFERENTIAL EQUATIONS
E LECTRONIC VERSION OF LECTURE
Dr Lê Xuân Đại
HoChiMinh City University of Technology Faculty of Applied Science, Department of Applied Mathematics
Email: ytkadai@hcmut.edu.vn
HCMC — 2019.
Trang 21 I NITIAL -V ALUE P ROBLEMS
2 B OUNDARY -V ALUE P ROBLEMS
Trang 3Differential equations are used to modelproblems in science and engineering thatinvolve the change of some variable withrespect to another.
Most of these problems require the solution
(
y0(x) = f (x,y(x)), a É x É b, y(a) = y0
(1)
y(x) at x = a.
Trang 4In common real-life situations, the differential equation that models the problem is too
complicated to solve exactly, so the approach is taken to approximate the solution.
The approximation methods give more accurate results and realistic error information.
points, in the interval[a, b].
Once the approximate solution is obtained at the points, the approximate solution at other points
in the interval can be found by interpolation.
Trang 5We divide [a, b] into n subinterval of equal
x0= a, x k = x0+ kh, k = 0, 1, 2, , n, x n = b. The
Trang 6y(x k+1) =
y(x k ) + y0(x k )(x k+1 − x k ) + y00(ξ k)(x k+1 − x k)2
where ξ k ∈ (x k , x k+1). Since y = y(x) satisfies
Trang 7GEOMETRIC MEANING OF EULER’S METHOD
tangent line to the curve, which intercepts the line
x = x k+1aty k+1 that is the approximate value of the
Trang 8EXAMPLE 1.1
Using Euler’s method to approximate the
solution to the initial-value problem
Trang 9With n = 10 we have
h = 2 − 0
10 = 0.2, x k = 0.2k, y0 = 0.5. Using Euler’smethod, we have
Trang 11where the coefficientsA1, A2, , A n;α2 ,α3 , ,α n;β21 ,β31 , ,β n,n−1
are defined by the following method Let
Trang 12Runge-Kutta methods have the high-orderlocal truncation error of the Taylor methodsbut eliminate the need to compute and
Trang 13EXAMPLE 1.2
Use the Runge-Kutta method of order 4 with
h = 0.2,n = 10 to obtain approximations to the solution of the initial-value problem
Trang 14Withn = 10we haveh = 2 − 0
10 = 0.2, x k = 0.2k, y0 = 0.5 Moreover,K1k = hf (x k , y k ) = 0.2(y k − 0.04k2+ 1),
Trang 18In this lecture, we study how to
approximate the solution to
boundary-value problems, differentialequations with conditions imposed atdifferent points
For first-order differential equations,
only one condition is specified, so there
is no distinction between initial-valueand boundary-value problems We will
be considering second-order equationswith two boundary values
Trang 19The two-point boundary-value problems inthis lecture involve a second-order
differential equation of the following formtogether with the boundary conditions
Trang 20We divide the interval [a, b] into n
subinterval by the mesh points
x0= a, x k = x0+ kh, k = 1, 2, , n − 1, x n = b
n .
formula
y0(x k) ≈ y(x k+1 ) − y(x k−1)
2h
Trang 21y00(x k) ≈ y(x k+1 ) − 2y(x k ) + y(x k−1)
= y k+1 − 2y k + y k−1
h2
The use of centripetal difference
formulas results in the equation
p k y k+1 − 2y k + y k−1
h2 + q k
y k+1 − y k−1 2h + r k y k = f k,
∀k = 1, 2, , n − 1 where
p k = p(x k ), q k = q(x k ), r k = r(x k) and f k = f (x k).
Trang 22With the boundary conditionsy0= α, y n = β,we can the define the system of linear equations
Trang 23Y = [y1, y2, , y n−1]Tand
Trang 24Matrix Ais the tridiagonal matrix In order
to solve this system, we can use LU
Trang 25The Doolittle method gives us
Trang 26·
Trang 27We can have the linear system
Trang 29THANK YOU FOR YOUR ATTENTION