Ass2 Solution 14
Ass2 Solution 14
Ass2 Solution 14
1) (4 marks)
pg. 54. 6) c)
Use the Bisection method to find p4 for solving x2 4x+lnx=0 for 1 x 2 and 2 x 4
Thus p4 =1.4375.
Thus p4 =3.125.
|a1 b1 |
105
2n
|0.5 1.5|
105
2n
1
105
2n
n = log2 (105 )
n = 16.60
1
MATH 3241 Suggested solution to Assignment 2
2) (2 marks)
Find p3 with p0 = 1.8 using the fixed point iteration method to solve x4 3x2 3 = 0 on [1,2].
x4 3x2 3 = 0
x4 = 3x2 + 3
4
x = 3x2 + 3
Thus applying the fixed point iteration with p0 = 1.8 scheme we attain:
3) (5 marks)
Compute p3 using p0 = 2
3
to find the fixed point of x = 2x in [ 13 , 1]. Show the fixed point is convergent.
g(x) from [ 13 , 1] is into [ 13 , 1], and we can further check and see that g 0 (x) = 2x ln 2, which decreases and
satisfies the |g 0 (x)| < k < 1. Thus by Theorem, we know the fixed point scheme is convergent.
Thus solving for the fixed point we attain:
4) (4 marks)
a) Use Newtons Method to compute p2 of f (x) = x3 cos x using p0 = 1. Can we use p0 = 0.
We cannot use p0 = 0, because f 0 (x) = 3x2 + sin x evaluated at 0 gives f 0 (0) = 0. Thus the New-
tons Method cannot be performed.
Using p0 = 1, we attain the following values:
Thus our approximation for p2 = 0.8657.
b) Using the secant method, we attain the following vales:
Thus our approximation for p3 = 1.2521.
2
MATH 3241 Suggested solution to Assignment 2
5) (5 marks)
Construct a code to solve for the roots of f (x) = 4x cos(3x) + (x 2)2 2 = 0.
Running the code, we attain the following results. There are five roots. You also need to hand in your
running procedure and solutions.