Analysis of Algorithms NP & NP-Complete Prof. Muhammad Saeed.
Prof. Muhammad Saeed ( Ordinary Differential Equations )
-
Upload
andrew-johnston -
Category
Documents
-
view
216 -
download
0
Transcript of Prof. Muhammad Saeed ( Ordinary Differential Equations )
Prof. Muhammad Saeed
( Ordinary Differential Equations )
2M.Sc. Physics
1.1.Solution of ODEs Solution of ODEs 1.1. Initial Value ProblemsInitial Value Problems
ODEs of the form:
Euler’s MethodIt can be derived from Taylor Series
2
2)(:1)0(,2 xexysolutionAnalyticalyxyy
x
dx
dy
ODESample
M.Sc. Physics 3
Runge-Kutta Methodsi) 2nd Order R-K
ii) 3rd Order R-K
Modified Euler’s Method
M.Sc. Physics 4
iii) 4th Order R-K
M.Sc. Physics 5
iii) 5th Order R-K
M.Sc. Physics 6
)ˆ(,55
2
50
1
75240
2197
4275
128
360
1
)()55
2
50
9
56430
28561
12825
6656
135
16(
)()5
1
4104
2197
2565
1408
216
25(ˆ
),40
11
4104
1859
2565
35442
27
8,2
(
),4104
845
513
36808
216
439,(
),2197
7296
2197
7200
2197
1932,
13
12(
),32
9
32
3,
8
3(
),4
1,
4
1(
),,(
1165431
6654311
554311
543216
43215
3214
213
12
1
nn
nn
nn
nn
nn
nn
nn
nn
nn
yykkkkkError
hOkkkkkyy
hOkkkkyy
kkkkkyh
xhfk
kkkkyhxhfk
kkkyhxhfk
kkyhxhfk
kyhxhfk
yxhfk
iii) Runge-Kutta-Fehlberg
M.Sc. Physics 7
)()51623(12
4211 hOfff
hyy nnnnn
)()242(3
:
)()22(3
4
:
51111
52131
hOfffh
yy
corrector
hOfffh
yy
predictor
nnnnn
nnnnn
Adam’s Method
Milne’s Method
M.Sc. Physics 8
)()5199(24
:
)()9375955(24
:
52111
53211
hOffffh
yy
corrector
hOffffh
yy
predictor
nnnnnn
nnnnnn
Adam-Moulton Method
M.Sc. Physics 9
2.2. Higher Order Initial Value ProblemsHigher Order Initial Value Problems
Transform the equation into the first order equations. Apply any previous method on the equations simultaneously.
3.3. System of ODEsSystem of ODEs
Lower Order Conversion
Finite Difference MethodReplace all derivatives by difference formulas and form a matrix for function (y) values.
M.Sc. Physics 10
4.4. Boundary Value ProblemsBoundary Value Problems
Shooting Method
Finite Difference Method
5.5. Partial Differential EquationsPartial Differential Equations Finite Difference
Method
Guess derivative’s initial value and compare the boundary values.
Solution of Laplace Equation.
M.Sc. Physics 11