Sie sind auf Seite 1von 5

(BMCU 2072)

Appendix

SULIT

1. The Solution of Nonlinear Equations

xi 1 xi

Newton-Raphson method

f xi
f xi

2. The Solution of Linear Systems


i 1

Gauss-Seidel method

xi

k 1

bi a ij x j

k 1

j 1

j i 1

ij

xj

a ii

3. Interpolation

f n x b0 b1 x x0 ... bn x x0 x x1 ...x xn1


Newtons
interpolating
polynomials

where
bn f x n , x n1 ,..., x1 , x0

f xn , xn1 ,..., x1 , x0

f xn , xn 1 ,..., x1 f xn1 , xn2 ,..., x0


x n x0

f n x Li x f xi
i 0

Lagrange
interpolating
polynomials

where
N

Li x
j 0
j i

x xj
xi x j

-16SULIT

(BMCU 2072)
Appendix

SULIT

4. Curve Fitting
y a bx

where
Linear regression

n x i y i x i y i

n xi xi
a y bx

y a bx cx 2

Polynomial regression

Multiple linear regression

where
n

xi
x 2
i

a y i

3
i
i b x i y i
3
4
x i 2 y i
i
i c
y a0 a1 x1 a 2 x2 ... a m xm

where
n

x1i

x mi

x x
x x
x x
i
2

x
x

1i
2
1i

x1i x mi

x
x x

a0 yi

x1i y i

1i mi a1


2
x mi a m x mi y i
mi

-17SULIT

(BMCU 2072)
Appendix

SULIT

5. Numerical Differentiation

Forward difference
O(h)

Backward difference
O(h)

Centered difference
O(h2)

Finite difference approximations


f x h f x
f x
h
1
f x 2 f x 2 f x h f x 2h
h
f x f x h
f x
h
1
f x 2 f x 2h 2 f x h f x
h
f x h f x h
f x
2h
1
f x 2 f x h 2 f x f x h
h

Finite difference approximations: High accuracy differentiation


1
f x 2h 4 f x h 3 f x
f x
Forward
2h
difference
1
O(h2)
f x 2 f x 3h 4 f x 2h 5 f x h 2 f x
h
1
3 f x 4 f x h f x 2h
f x
Backward
2h
difference
1
O(h4)
f x 2 2 f x 5 f x h 4 f x 2h f x 3h
h
1
f x 2h 8 f x h 8 f x h f x 2h
f x
Centered
12h
difference
1
x
f x 2h 16 f x h 30 f x 16 f x h f x 2h
f
4
O(h )
12h 2

-18SULIT

(BMCU 2072)
Appendix

SULIT

6. Numerical Integration
Trapezoidal rule

xb

h
f x dx 2 f x 2 f x 2 f x 2 f x f x
0

n 1

xa

Simpsons 1

x2

h
f x dx 3 f x 4 f x f x
0

rule

x0

Simpsons 3

x3

rule

3
f x dx 8 h f x 3 f x 3 f x f x
0

x0

7. Eigen Values and Eigen Vectors

1
Av k
mk 1
where A is a square matrix
v k 1

Power method for eigen vector

8. Solution of Ordinary Differential Equations:


Eulers method
Heuns method

Ralstons second-order Runge-Kutta method

yn yn1 hf xn1 , yn1

f xi , yi f xi 1 , yi01
yi 1 yi
h
2
2
1
yi 1 yi k1 k 2 h
3
3
where
k1 f xi , yi
3
3

k 2 f xi h, yi k1h
4
4

1
yi 1 yi k1 2k 2 2k3 k 4 h
6
where
k1 f xi , yi
1
1

k 2 f xi h, yi k1h
2
2

1
1

k 3 f xi h, yi k 2 h
2
2

k 4 f xi h, yi k3 h

Classical fourth-order Runge-Kutta method

-19SULIT

(BMCU 2072)
Appendix

SULIT

9. Solution of Partial Differential Equations


ui 1, j ui , j
u

h
x i , j
ui , j ui 1, j
u

h
x i , j

First derivative in x dimension

ui 1, j ui 1, j
u

2h
x i , j

u
2u i , j u i 1, j
2u
2 i 1, j
h2
x i , j
u i , j 1 u i , j
u

k
y i , j

Second derivative in x dimension

u i , j u i , j 1
u

k
y i , j

First derivative in y dimension

u i , j 1 u i , j 1
u

2k
y i , j
u
2u i , j u i , j 1
2u
2 i , j 1
k2
y i , j

Second derivative in y dimension

-20SULIT

Das könnte Ihnen auch gefallen