전체 글

(1)

PDE to Ax=b

Wanho Choi

(wanochoi.com)

(2)

y = f(x)

x y

0

(3)

h

x0 x1 x2 x3 xi−1 xi xi+1 xn−2 xn−1 xn

y = f(x)

(4)

h

x0 x1 x2 x3 xi−1 xi xi+1 xn−2 xn−1 xn

y = f(x)

y0 y1 y2 y3 yi−1 yi yi+1 yn−2 yn−1 yn

(5)

h x0 x1 x2 x3 xi−1 xi xi+1 xn−2 xn−1 xn y = f(x)

y0 y1 y2 y3 yi−1 yi yi+1 yn−2 yn−1 yn forward differentiation backward differentiation central differentiation

Finite Differencing for the i-th Point

y′(xi) = y(xi+1) − y(xi) h

y′(xi) = y(xi) − y(xi−1) h

y′(xi) = y(xi+1) − y(x2h i−1)

(6)

The 2nd Derivative for the i-th Point

y′′(xi) = y′(xi+0.5) − y′(xi−0.5)

h =

y(xi+1) − y(xi)

h

y(xi) − y(xi−1) h

h ∴ y′′ = y(xi−1) − 2y(xi) + y(xi+1)

h2

x0 x1 x2 x3 xi−1 xi xi+1 xn−2 xn−1 xn

y = f(x)

(7)

Taylor Expansion Series

y(xi + h) = y(xi) + y′(xi)h

1! + y′′(xi)h2 2! + y′′′(xi)h3 3! + ⋯ http://xaktly.com/TaylorSeries.html

(8)

Taylor Expansion Series

y(xi + h) = y(xi) + y′(xi)h

1! +

y′′(xi)h2

2! +

y′′′(xi)h3

3! + ⋯

(9)

Taylor Expansion Series

y(xi + h) = y(xi) + y′(xi)h

1! +

y′′(xi)h2

2! +

y′′′(xi)h3

3! + ⋯

y(xi − h) = y(xi) − y′(x1!i)h + y′′(x2!i)h2 − y′′′(x3!i)h3 + ⋯

(a)

(b)

(a)-(b): y′(xi) = y(xi + h) − y(xi − h)

2h + O(h3)

(a)+(b): y′′(xi) = y(xi − h) − 2y(xi) + y(xi − h)

(10)

A Simple PDE Problem

y′′ = f(x) on [0,1] with y(0) = y(1) = 0 y(xi) = ? (i = 0,1,2,⋯, n)

(11)

Finite Differencing

y′′ = f(x) on [0,1] with y(0) = y(1) = 0 y(xi) = ? (i = 0,1,2,⋯, n)

y(xi−1) − 2y(xi) + y(xi+1)

(12)

Finite Differencing

y′′ = f(x) on [0,1] with y(0) = y(1) = 0 y(xi) = ?

y(xi−1) − 2y(xi) + y(xi+1)

h2 ≈ y′′(xi) = fi

∴ y(xi−1) − 2y(xi) + y(xi+1) ≈ h2fi

(13)

For Every Point

y′′ = f(x) on [0,1] with y(0) = y(1) = 0 y(xi) = ? y−1 − 2y0 + y1 = h2f 0 y0 − 2y1 + y2 = h2f 1 y1 − 2y2 + y3 = h2f 2 yn−2 − 2yn−1 + yn = h2f n

(i = 0,1,2,⋯, n)

(14)

Linear System of Matrix Equation

y′′ = f(x) on [0,1] with y(0) = y(1) = 0

y(xi) = ? (i = 0,1,2,⋯, n) 2 −1 0 0 ! 0 0 0 0 −1 2 −1 0 ! 0 0 0 0 0 −1 2 −1 ! 0 0 0 0 0 0 −1 2 ! 0 0 0 0 " " " " # " " " " 0 0 0 0 ! 2 −1 0 0 0 0 0 0 ! −1 2 −1 0 0 0 0 0 ! 0 −1 2 −1 0 0 0 0 ! 0 0 −1 2 ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ y0 y1 y2 y3 ! yn−3 yn−2 yn−1 yn ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ = h2 f0 h2 f1 h2 f2 h2 f3 ! h2 fn−3 h2 fn−2 h2 fn−1 h2 fn ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥

(15)

Linear System of Matrix Equation

y′′ = f(x) on [0,1] with y(0) = y(1) = 0

y(xi) = ? (i = 0,1,2,⋯, n) 2 −1 0 0 ! 0 0 0 0 −1 2 −1 0 ! 0 0 0 0 0 −1 2 −1 ! 0 0 0 0 0 0 −1 2 ! 0 0 0 0 " " " " # " " " " 0 0 0 0 ! 2 −1 0 0 0 0 0 0 ! −1 2 −1 0 0 0 0 0 ! 0 −1 2 −1 0 0 0 0 ! 0 0 −1 2 ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ y0 y1 y2 y3 ! yn−3 yn−2 yn−1 yn ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ = h2 f0 h2 f1 h2 f2 h2 f3 ! h2 fn−3 h2 fn−2 h2 fn−1 h2 fn ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥

Ax

= b

(16)

수치

Updating...

참조

  1. wanochoi.com)
관련 주제 :