KMU255Programming_8thClass_IterationJacobiParachutist

# KMU255Programming_8thClass_IterationJacobiParachutist - KMU...

This preview shows pages 1–6. Sign up to view the full content.

KMU 255 Computer Programming Hacettepe University Department of Chemical Engineering Fall Semester Iterating methods Selis Önel, PhD

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Review of iteration Various iterative techniques to solve equations Jacobi iteration Least squares method What are we going to learn today?
1. Initial guess values are used to calculate new guess values 2. New estimates of x are calculated 3. Iteration continues until convergence is satisfied, i.e. f(x) < ε ε : convergence criteria (tolerance) 3 Selis Önel, PhD A x = y Solution by Iteration: Convergence Start Read x0 ( ) 0 f x x x  x End x x0=x

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Jacobi (Simple) Iteration (1) a 1,1 x 1 + a 1,2 x 2 + …+ a 1,n x n = y 1 (2) a 2,1 x 1 + a 2,2 x 2 + …+ a 2,n x n = y 2 .. (n) a n,1 x 1 + a n,2 x 2 + …+ a n,n x n = y n , , , 11 , 1 , , , where 1,2,. .., . Extracting yields 1 Solving for gives: 1 Consequently, the iterative scheme should be nn i j j i i i i i i j j i jj ji n i i i i j j j ii i a x y i n x a x a x y x x y a x a x a       , 1 n i i j j j y a x Selis Önel, PhD 4
Jacobi (Simple) Iteration Cycle 1. Choose a starting vector x0 (Initial guesses) 2. If a good guess for solution is not available, choose x randomly 3. Use with x j =x0 to recompute each value of x 4. Check if |x-x0|<ε (tolerance), if so x=x0 5. If |x-x0|>ε, assign new values to x0 6. Repeat this cycle until changes in x between successive iteration cycles become sufficiently small, i.e, |x-x0|<ε , 1 , 1 n i i i j j j ii ji x y a x a     5 Selis Önel, PhD

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 17

KMU255Programming_8thClass_IterationJacobiParachutist - KMU...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online