ES-341: Numerical Analysis: Dr. Mazhar Ali Mehboob Ul Haq (TA)
ES-341: Numerical Analysis: Dr. Mazhar Ali Mehboob Ul Haq (TA)
ES-341: Numerical Analysis: Dr. Mazhar Ali Mehboob Ul Haq (TA)
Numerical
Analysis
Pseudo Codes
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 1/7
ES-341:
Numerical
Analysis
Pseudo Codes
1 Pseudo Codes
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 2/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 3/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 3/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 3/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 3/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 3/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 3/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 3/7
ES-341:
Numerical Fixed Point Algorithmic procedure for solving f (x) = 0
Analysis
Pseudo Codes
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 4/7
ES-341:
Numerical Fixed Point Algorithmic procedure for solving f (x) = 0
Analysis
Dr. Mazhar Ali We start with x0 and compute g (x0 ). Later we choose the second guess
Mehboob ul Haq
(TA) as x1 = g (x0 )
Pseudo Codes
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 4/7
ES-341:
Numerical Fixed Point Algorithmic procedure for solving f (x) = 0
Analysis
Dr. Mazhar Ali We start with x0 and compute g (x0 ). Later we choose the second guess
Mehboob ul Haq
(TA) as x1 = g (x0 ) continue until we reach the fixed point p such that
Pseudo Codes
p = g (p).
Algorithmic steps
1 Formulate problem f (x) = 0 as fixed point problem x = g (x).
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 4/7
ES-341:
Numerical Fixed Point Algorithmic procedure for solving f (x) = 0
Analysis
Dr. Mazhar Ali We start with x0 and compute g (x0 ). Later we choose the second guess
Mehboob ul Haq
(TA) as x1 = g (x0 ) continue until we reach the fixed point p such that
Pseudo Codes
p = g (p).
Algorithmic steps
1 Formulate problem f (x) = 0 as fixed point problem x = g (x).
2 Check convergence condition i.e., max |g ′ (x)| ≤ k < 1
x∈[a,b]
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 4/7
ES-341:
Numerical Fixed Point Algorithmic procedure for solving f (x) = 0
Analysis
Dr. Mazhar Ali We start with x0 and compute g (x0 ). Later we choose the second guess
Mehboob ul Haq
(TA) as x1 = g (x0 ) continue until we reach the fixed point p such that
Pseudo Codes
p = g (p).
Algorithmic steps
1 Formulate problem f (x) = 0 as fixed point problem x = g (x).
2 Check convergence condition i.e., max |g ′ (x)| ≤ k < 1
x∈[a,b]
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 4/7
ES-341:
Numerical Fixed Point Algorithmic procedure for solving f (x) = 0
Analysis
Dr. Mazhar Ali We start with x0 and compute g (x0 ). Later we choose the second guess
Mehboob ul Haq
(TA) as x1 = g (x0 ) continue until we reach the fixed point p such that
Pseudo Codes
p = g (p).
Algorithmic steps
1 Formulate problem f (x) = 0 as fixed point problem x = g (x).
2 Check convergence condition i.e., max |g ′ (x)| ≤ k < 1
x∈[a,b]
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 4/7
ES-341:
Numerical Fixed Point Algorithmic procedure for solving f (x) = 0
Analysis
Dr. Mazhar Ali We start with x0 and compute g (x0 ). Later we choose the second guess
Mehboob ul Haq
(TA) as x1 = g (x0 ) continue until we reach the fixed point p such that
Pseudo Codes
p = g (p).
Algorithmic steps
1 Formulate problem f (x) = 0 as fixed point problem x = g (x).
2 Check convergence condition i.e., max |g ′ (x)| ≤ k < 1
x∈[a,b]
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 4/7
ES-341:
Numerical Fixed Point Algorithmic procedure for solving f (x) = 0
Analysis
Dr. Mazhar Ali We start with x0 and compute g (x0 ). Later we choose the second guess
Mehboob ul Haq
(TA) as x1 = g (x0 ) continue until we reach the fixed point p such that
Pseudo Codes
p = g (p).
Algorithmic steps
1 Formulate problem f (x) = 0 as fixed point problem x = g (x).
2 Check convergence condition i.e., max |g ′ (x)| ≤ k < 1
x∈[a,b]
|xi+1 − xi | ≤ ϵ
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 4/7
ES-341:
Numerical Fixed Point Algorithmic procedure for solving f (x) = 0
Analysis
Dr. Mazhar Ali We start with x0 and compute g (x0 ). Later we choose the second guess
Mehboob ul Haq
(TA) as x1 = g (x0 ) continue until we reach the fixed point p such that
Pseudo Codes
p = g (p).
Algorithmic steps
1 Formulate problem f (x) = 0 as fixed point problem x = g (x).
2 Check convergence condition i.e., max |g ′ (x)| ≤ k < 1
x∈[a,b]
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 4/7
ES-341:
Numerical Fixed Point Algorithmic procedure for solving f (x) = 0
Analysis
Dr. Mazhar Ali We start with x0 and compute g (x0 ). Later we choose the second guess
Mehboob ul Haq
(TA) as x1 = g (x0 ) continue until we reach the fixed point p such that
Pseudo Codes
p = g (p).
Algorithmic steps
1 Formulate problem f (x) = 0 as fixed point problem x = g (x).
2 Check convergence condition i.e., max |g ′ (x)| ≤ k < 1
x∈[a,b]
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 4/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 5/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 5/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 5/7
ES-341:
Numerical
Analysis
|xi − xi−1 | ≤ ϵ
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 5/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 5/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 6/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 6/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 6/7
ES-341:
Numerical
Analysis
|xi − xi−1 | ≤ ϵ
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 6/7
ES-341:
Numerical
Analysis
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 6/7
ES-341:
Numerical
Analysis
Pseudo Codes
1 Let us consider f ∈ C 2 [a, b],
2 Calculate f ′ ∈ C [a, b] and f ′′ ∈ C [a, b].
3 Consider an initial guess x0
Start iteration i = 1
f (xi−1 )f ′ (pi−1 )
xi = xi−1 −
(f ′ (xi−1 ))2 − f (xi−1 )f ′′ (xi−1 )
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 7/7
ES-341:
Numerical
Analysis
Pseudo Codes
1 Let us consider f ∈ C 2 [a, b],
2 Calculate f ′ ∈ C [a, b] and f ′′ ∈ C [a, b].
3 Consider an initial guess x0
Start iteration i = 1
f (xi−1 )f ′ (pi−1 )
xi = xi−1 −
(f ′ (xi−1 ))2 − f (xi−1 )f ′′ (xi−1 )
|xi − xi−1 | ≤ ϵ
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 7/7
ES-341:
Numerical
Analysis
Pseudo Codes
1 Let us consider f ∈ C 2 [a, b],
2 Calculate f ′ ∈ C [a, b] and f ′′ ∈ C [a, b].
3 Consider an initial guess x0
Start iteration i = 1
f (xi−1 )f ′ (pi−1 )
xi = xi−1 −
(f ′ (xi−1 ))2 − f (xi−1 )f ′′ (xi−1 )
Dr. Mazhar Ali Mehboob ul Haq (TA) (GIKI) ES-341: Numerical Analysis 30th March 2022 7/7