work hw2 csci3656
work hw2 csci3656
2 Fixed-Point Iteration
Problem 1
1: g1 (x) = (3 + x − 2x2 )1/4
Substitute g1 (x) = x:
x = (3 + x − 2x2 )1/4
Raise both sides to the fourth power:
x4 = 3 + x − 2x2
Rearrange:
x4 + 2x2 − x − 3 = 0
Thus, f (x) = 0 is satisfied.
1/2
x+3−x4
2: g2 (x) = 2
Substitute g2 (x) = x:
1/2
x + 3 − x4
x=
2
Square both sides:
x + 3 − x4
x2 =
2
Multiply through by 2:
2x2 = x + 3 − x4
Rearrange:
x4 + 2x2 − x − 3 = 0
Thus, f (x) = 0 is satisfied.
x+3 1/2
3: g3 (x) = x2 +2
Substitute g3 (x) = x:
1/2
x+3
x=
x2 + 2
Square both sides:
x+3
x2 =
x2 + 2
Multiply through by x2 + 2:
x4 + 2x2 = x + 3
Rearrange:
x4 + 2x2 − x − 3 = 0
Thus, f (x) = 0 is satisfied.
1
3x4 +2x2 +x−3
4: g4 (x) = 4x3 +4x−1
Substitute g4 (x) = x:
3x4 + 2x2 + x − 3
x=
4x3 + 4x − 1
Multiply through by 4x3 + 4x − 1:
2
Problem 2:
1: Four Iterations
We are given p0 = 1 and pn+1 = g(pn ), for n = 0, 1, 2, 3. Perform four iterations
for each function g:
1/2
x+3−x4
g2 (x) = 2
p0 = 1
1/2
1 + 3 − 14
1/2
p1 = g2 (p0 ) = = (1.5) ≈ 1.2247
2
p2 = g2 (p1 ) ≈ 1.1194
p3 = g2 (p2 ) ≈ 1.1610
p4 = g2 (p3 ) ≈ 1.1455
1/2
x+3
g3 (x) = x2 +2
p0 = 1
1/2 1/2
1+3 4
p1 = g3 (p0 ) = 2
= ≈ 1.1547
1 +2 3
p2 = g3 (p1 ) ≈ 1.1534
p3 = g3 (p2 ) ≈ 1.1536
p4 = g3 (p3 ) ≈ 1.1536
p0 = 1
4 2
3(1) + 2(1) + 1 − 3 3+2+1−3 3
p1 = g4 (p0 ) = = = ≈ 0.4286
4(1)3 + 4(1) − 1 4+4−1 7
p2 = g4 (p1 ) ≈ 1.0897
p3 = g4 (p2 ) ≈ 1.1574
p4 = g4 (p3 ) ≈ 1.1502
3
2: Best Approximation
The function g3 (x) converges most rapidly and provides the best approximation
to the solution, as it stabilizes at approximately 1.1536.
4
Problem 7: Fixed-Point Iteration Method
We are solving x4 − 3x2 − 3 = 0 on the interval [1, 2] using fixed-point iteration,
starting with p0 = 1. The tolerance is 10−2 .
Performing Iterations
p0 = 1
p
4
√
4
p1 = g(p0 ) = 3(1)2 + 3 = 6 ≈ 1.5651
p √
4
p2 = g(p1 ) = 4 3(1.5651)2 + 3 ≈ 10.3466 ≈ 1.8171
p √
4
p3 = g(p2 ) = 4 3(1.8171)2 + 3 ≈ 13.8972 ≈ 1.9188
p √
4
p4 = g(p3 ) = 4 3(1.9188)2 + 3 ≈ 15.0544 ≈ 1.9512
Check Convergence
The difference |p4 −p3 | ≈ |1.9512−1.9188| = 0.0324, which is less than 10−2 .
Solution
The solution is approximately:
x ≈ 1.951
5
Problem 8: Fixed-Point Iteration Method
We are solving x3 − x − 1 = 0 on the interval [1, 2] using fixed-point iteration,
starting with p0 = 1. The tolerance is 10−2 .
Perform Iterations
p0 = 1
√ √
3
p1 = g(p0 ) = 3 1 + 1 = 2 ≈ 1.2599
√ √
3
p2 = g(p1 ) = 3 1.2599 + 1 = 2.2599 ≈ 1.2970
√ √
3
p3 = g(p2 ) = 3 1.2970 + 1 = 2.2970 ≈ 1.3048
√ √
3
p4 = g(p3 ) = 3 1.3048 + 1 = 2.3048 ≈ 1.3075
Check Convergence
The difference |p4 −p3 | ≈ |1.3075−1.3048| = 0.0027, which is less than 10−2 .
Solution
x ≈ 1.308
6
Problem 10
We are analyzing g(x) = 2−x on [1/3, 1].
Iterations
Start with p0 = 0.5. Iterate using pn+1 = g(pn ) = 2−pn until |pn+1 − pn | <
10−4 .
p0 = 0.5
p1 = g(p0 ) = 2−0.5 ≈ 0.7071
p2 = g(p1 ) = 2−0.7071 ≈ 0.6152
p3 = g(p2 ) = 2−0.6152 ≈ 0.6518
p4 = g(p3 ) = 2−0.6518 ≈ 0.6374
p5 = g(p4 ) = 2−0.6374 ≈ 0.6434
The difference |p5 − p4 | ≈ 0.006, achieving the desired tolerance.
Estimate of Iterations
x ≈ 0.643
7
Solutions to Question 2.3
Problem 5
Use Newton’s method to find solutions accurate to within 10−4 for the following
problems.
1. x3 − 2x2 − 5 = 0, [1, 4]
• Define f (x) = x3 − 2x2 − 5 and f ′ (x) = 3x2 − 4x.
• Initial guess: x0 = 3.
f (xn )
• Iterative formula: xn+1 = xn − f ′ (xn ) .
• Steps:
8
Next:
9
Problem 7
Repeat Exercise 5 using the Secant Method to find solutions accurate to
within 10−4 for the following problems.
10.375 · (3.5 − 3)
x2 = 3.5 − = 2.8.
10.375 − 4
Next:
10
Continuing:
−0.3776 · (0.5 − 0)
x2 = 0.5 − = 0.7181.
−0.3776 − (−1)
Next:
11
Question 2.4
0.1 Problem 11:
Error Analysis
|b0 − a0 |
|bn − an | = ,
2n
where [a0 , b0 ] is the initial interval and n is the iteration number.
The midpoint cn satisfies:
|b0 − a0 |
|cn − c| ≤ ,
2n+1
where c is the exact root of the equation f (x) = 0, and the error
bound is halved at each step.
Convergence Analysis
|b0 − a0 |
en ≤ .
2n+1
This implies:
1
en+1 = en .
2
Therefore, the sequence of errors decreases by a fixed factor q = 21 at
each step, where q ∈ (0, 1).
This shows that the Bisection Algorithm converges linearly, with a
rate of convergence q = 12 .
Conclusion
12
Question 2.5
0.2 Problem 2
Consider the function
f (pn )
pn+1 = pn − ,
f ′ (pn )
Deriving of f (x)
Iterative Calculation
i. Start with p0 = 0.
ii. Compute pn+1 using the Newton’s method formula:
f (pn )
pn+1 = pn − .
f ′ (pn )
13
Convergence Improvement
Conclusion.
14