Professional Documents
Culture Documents
AML 702
(APPLIED COMPUTATIONAL METHODS)
Submitted by
ANANTH KISHORE (2018AMX5503)
ARPIT TRIVEDI (2018AMX5504)
RAHUL THAKUR (201AMX5517)
Vamsi K Chalamalla
Assistant Professor
MAY 2019
1
TABLE OF CONTENT
02. Introduction 4
05. References 13
2
ABSTRACT
3
CHAPTER 1
INTRODUCTION
NUMERICAL SOLUTIONS
Numerical methods for ordinary differential equations are methods used to
find numerical approximations to the solutions of ordinary differential
equations (ODEs). Their use is also called as "numerical integration.
Many differential equations cannot be solved using symbolic
computation ("analysis"). For practical purposes, such as in engineering – a
numeric approximation to the solution is often sufficient.
The algorithms studied here can be used to compute such an approximation.
Ordinary differential equations occur in many scientific disciplines, for
instance in physics, chemistry, biology, and economics. In addition, some
methods in numerical partial differential equations convert the partial
differential equation into an ordinary differential equation, which must then
be solved.
Example:
Numerical integration of y’=y at x0 = 0 and y0 =1
By three different methods and results were plotted as shown in figure.
Most of the numerical methods used to solve ode are based directly (or
indirectly) on truncated Taylor series expansion such as:
a) Taylor series methods
b) Runge-kutta methods
dy h 2 d2 y h n dn y
y(x0 + h) ≈ y(x0 ) + h |x=x , + | +. . . + |
dx 0 2! dx 2 x=x0 , n! dx n x=x0 ,
y=y0 y=y0 y=y0
dy
Notation: xn = x0 + nh, yn = y(xn ), | = f(xi , yi )
dx x=xi ,
y=yi
5
HIGH ORDER TAYLOR SERIES METHODS
Higher order Taylor series methods include higher order derivatives that
provides much more accuracy as compared to first order but the solving of
these derivatives is a tedious task as shown:
Nth order Taylor series as earlier
dy h2 d2 y h n dn y
yi+1 = yi + h + 2
+. . . . + n
+ O(hn+1 )
dx 2! dx n! dx
These derivatives have to be derived analytically-
d2 y d3 y dn y
, ,.....,
dx 2 dx 3 dx n
To solve this problem we use methods like Runge Kutta which don’t require
calculating higher order derivatives.
RUNGE-KUTTA METHODS:
This approach is to formula involving unknown coefficients then determines
these coefficients to match as many terms of the Taylor series expansion as
possible for better accuracy. In this report we will deal with RK 4, RK 5 and
RK 6 methods for solving given set of ODE’s.
Let an initial value problem be specified as follows:
dy
= f(t, y), y(t 0 ) = y0
dt
Then, the RK4 method for this problem is given by the following equations:
1
y(n+1) = yn + h (k1 +2k2 +2 k3 + k4)
6
tn+1 = tn + h
where yn+1 is the RK4 approximation of y(tn+1), and
k1 = f (tn, yn),
k2= f (tn + 0.5h, yn +0.5 hk1),
k3= f (tn + 0.5h, yn +0.5 hk2),
6
k4= f (tn + h, yn +hk3)
Thus, the next value (yn+1) is determined by the present value (yn) plus the
product of the size of the interval (h) and an estimated slope.
The RK4 method is a fourth-order method, meaning that the error per step
is on
the order of h5, while the total accumulated error has order h4.
This method is valid for both scalar and vector valued functions.
Similarly the 5th order Runge-Kutta method (RK5) for the same problem is
given by the following equations:
k1 = f (tn, yn),
k2= hf (tn + 0.5h, yn +0.5 k1),
ℎ 3k1+k2
k3= hf (tn + , yn + ),
4 16
k3
k4= hf (tn + 0.5h, yn + ),
2
3ℎ −3k2+6k3+9k4
k5= hf (tn + , yn + ),
4 16
k1+4k2+6k3−12k4+8k5
k6= hf (tn +h, yn + ),
2
7k1 +32k3 +12k4 + 32k5+7k6
and y(n+1) = yn + h ( )
90
7
Similarly, RK 6 method is given as:
yn+1 = yn + {9k1 + 64k2 + 49k5 + 49k6 + 9k7}/180
k1 = f (tn, yn),
k2= hf (tn + vh, yn +v k1),
ℎ (4𝑣−1)k1+k2
k3= hf (tn + , yn + ),
2 8𝑣
k3
k4= hf (tn + 0.5h, yn + ),
2
3ℎ −3k2+6k3+9k4
k5= hf (tn + , yn + ),
4 16
k1+4k2+6k3−12k4+8k5
k6= hf (tn +h, yn + ),
2
8
CHAPTER 2
PROBLEM DEFINITION
9
CHAPTER 3
From the given set of equations calculating the eigen value of the jacobian
matrix:
−0.04 0 1
J = [ 0.04 −600 −1 ]
0 600 0
The eigen values are λ= -598.99, 0, -0.0104.
The stability region of the RK4, RK5 and RK6 are therefore plotted here using
a MATLAB algorithm which finds the roots for each of the method’s stability
equation.
10
From the figure, the stability conditions are:
2.79
a) RK4: h≤ i.e. h ≤ 0.00466
⎹λmax⎹⎸
3.2
b) RK5: h≤ i.e. h ≤ 0.00534
⎹λmax⎹⎸
3.5
c) RK6: h≤ i.e. h ≤ 0.00584
⎹λmax⎹⎸
Using the limiting value of h for all three methods we know compare the
running time and errors of RK4, RK5 and RK6. Since, in this case the true
values are not known hence we assume the values obtained from RK6 as
the true solution. The system of ODE is evaluated at various time steps using
MATLAB and the results are tabulated below.
RK 4 RK 5 RK6
RESULTS
11
CONCLUSION
It is therefore evident from the table that the no significant accuracy is
obtained by using RK5 and RK6 as compared to their running time. Hence,
it can be said that RK4 gives us the best balance between accuracy and
computational cost.
12
CHAPTER 4
REFERENCES
13