0% found this document useful (0 votes)
41 views

Assignment 1

This document contains a student's assignment submission for MA341. It includes [1] questions and solutions regarding logarithmic functions, rationalizing formulas, and Newton's method, [2] using Newton's method to find the square root of a number, and [3] deriving an interpolation polynomial and estimating the error. The student provides work and reasoning for each question posed in the assignment.

Uploaded by

Iareto Arabwati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Assignment 1

This document contains a student's assignment submission for MA341. It includes [1] questions and solutions regarding logarithmic functions, rationalizing formulas, and Newton's method, [2] using Newton's method to find the square root of a number, and [3] deriving an interpolation polynomial and estimating the error. The student provides work and reasoning for each question posed in the assignment.

Uploaded by

Iareto Arabwati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

2023

ASSIGNMENT 1 MA341

STUDENT ID= S11164201


IARETO. ARABWATI
QUESTION 1

A.

−𝑓(𝑥) = −ln⁡(𝑥 + √𝑥 2 + 1)
−1
−𝑓(𝑥) = ln (𝑥 + √𝑥 2 + 1)

1
−𝑓(𝑥) = ln⁡( )
𝑥 + √𝑥 2 + 1

1 𝑥 − √𝑥 2 + 1 𝑥 − √𝑥 2 + 1 𝑥 − √𝑥 2 + 1 𝑥 − √𝑥 2 + 1
= ln ( ⁡×⁡ )=( 2) =( ) =
𝑥 + √𝑥 2 + 1 𝑥 − √𝑥 2 + 1 𝑥 2 − (√𝑥 2 + 1) 𝑥2 − 𝑥2 − 1 −1

= −𝑥 + √𝑥 2 + 1

= −𝑓(𝑥) = (−1) + √(−1)2 + 1 = 𝑓(−𝑥)⁡

𝑇ℎ𝑒𝑟𝑒𝑓𝑜𝑟𝑒 = −𝑓(𝑥) = 𝑓(−𝑥)


B.

Applying Rationalize so, first we inverse the function. After that we rationalize the function. For
−𝑏±√𝑏2 −4𝑎𝑐
example;𝑎𝑥 2 + 𝑏𝑥 + 𝑐 = 0 the quadratic formula gives two solutions 𝑥 = 2𝑎
so, a=1,
b=200, c=-0.00015: 𝑥 2 + 200𝑥 − 0.00015 = 0 we used the quadratic formula and it gives two
solutions which is negative value and positive value.
QUESTION 2

a.

b. interval = [0.6,0.8] ∈ =0.001


𝑏−𝑎 0.8 − 0.6 0.2
ln⁡( ∈ ) ln⁡( 0.001 ) ln⁡(0.001)
𝑛≥ = = = 7.6439
𝑙𝑛2 𝑙𝑛2 𝑙𝑛2
The step is 8 steps
c.

𝑦 = 𝑒 −𝑥 ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑦 = ln(1 + 𝑥 2 ) ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑦 = 𝑦

ln(1 + 𝑥 2 ) − 𝑒 −𝑥

n 𝑎𝑛 𝑏𝑛 𝑐𝑛 𝑏𝑛 − 𝑐𝑛 𝑓(𝑎𝑛 )𝑓(𝑐𝑛 )
1 0.6 0.8 0.7 0.1 + ve
2 0.7 0.8 0.75 0.05 +ve
3 0.75 0.8 0.775 0.025 -ve
4 0.75 0.775 0.7625 0.0125 +ve
5 0.7625 0.775 0.76875 6.25× 10−3 -ve
6 0.7625 0.76875 0.765625 3.125× 10−3 +ve
7 0.765625 0.76875 0.7671875 1.5625× 10−3 +ve
8 0.7671875 0.76875 0.76796875 7.8125 × 10−3 STOP

The Root corrects in (3 decimal places) is 0.768


QUESTION 3

b.
𝑥
𝑓(𝑥) = 𝑥 2 +1⁡⁡ 𝑥0 = 1.5⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑥1 = 2

𝑓(𝑥𝑛 )(𝑥𝑛 − 𝑥𝑛−1 )


𝑥𝑛+1 = 𝑥𝑛 −
𝑓(𝑥𝑛 ) − 𝑓(𝑥𝑛−1 )
1.5
( 2 ) (1.5 − 2) −0.23076923
= 1.5 − 1.5 +1 = 1.5 − = 5.249999988 ≈ 5.25
1.5 2 0.061538461
( 2 )−( 2 )
1.5 + 1 2 +1

Since our intending values are not converged to the foundation but diverging.

QUESTION 4

a.
√𝑎 ≈ 𝑥𝑛+1 ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑥 = √𝑎⁡⁡⁡
⁡⁡⁡𝑥 2 = 𝑎⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑥 2 − 𝑎⁡⁡⁡
𝑓(𝑥) = 𝑥 2 − 𝑎
𝑓 ′ (𝑥) = 2𝑥
Using Newton’s Method
𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 −
𝑓 ′ (𝑥𝑛 )
2 −𝑥 2 +𝑎
2𝑥𝑛
𝑥 2 𝑛 −𝑎 𝑛
= 𝑥𝑛 − cross multiply = 2𝑥𝑛 (𝑥𝑛 ) − ((𝑥𝑛2 − 𝑎)/2𝑥𝑛⁡ ) =
2𝑥𝑛 2𝑥𝑛
𝑥𝑛2 + 𝑎 1 𝑥𝑛2 𝑎 1 𝑎
𝑥𝑛+1 = = ( + ) = (𝑥𝑛 + )⁡
2𝑥𝑛 2 𝑥𝑛 𝑥𝑛 2 𝑥𝑛

b.
1 2
√𝑎 − 𝑥𝑛+1 = − 2𝑥 (√𝑎 − 𝑥𝑛 ) ⁡⁡⁡⁡⁡⁡⁡𝑙𝑒𝑡⁡⁡⁡⁡⁡𝑒𝑛 = √𝑎 − 𝑥𝑛
𝑛

Substituting the mechanic’s rule for 𝑒𝑛+1 into 𝑒𝑛 to find 𝑒𝑛+1, subtract the two equations to get

𝑒𝑛+1 = √𝑎 − 𝑥𝑛+1
1 𝑎 1 1 𝑎
= √𝑎 − (𝑥𝑛 + ) = (√𝑎 − 𝑥𝑛 ) − (√𝑎 − )
2 𝑥𝑛 2 2 𝑥𝑛
1 1 𝑎 1 𝑎
= − (√𝑎 − 𝑥𝑛 ) + ( − √𝑎) = − (√𝑎 − 𝑥𝑛 ) (1 − 2 )
2 2 𝑥𝑛 2 𝑥 𝑛
2
1 √𝑎 + 𝑥𝑛 1 (√𝑎 − 𝑥𝑛 )
= − (√𝑎 − 𝑥𝑛 ) ( 2 )=−
2 𝑥 𝑛 2 𝑥2𝑥
1 2
𝑒𝑛+1 = √𝑎 − 𝑥𝑛+1 = − (√𝑎 − 𝑥𝑛 )
2𝑥𝑛
c.
𝑎 ≈ √10 = 𝑎2 − 10⁡𝑜𝑟⁡𝑎 = 10⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑥0 = 3⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡4𝑑. 𝑝
1 𝑎
𝑥𝑛+1 = (𝑥𝑛 + ) , 𝑛 = 1,2,3, … …
2 𝑥𝑛
1 10 1 19
𝑥1 = (3 + ) = ( ) = 3.166667
2 3 2 3
1 10
𝑥2 = (3.166667 + ) = 3.162280702
2 3.166667
1 10
𝑥3 = (3.162280702 + ) = 3.160087719
2 3.162280702
1 10
𝑥4 = (3.160087719 + ) = 3.162278419
2 3.160087719
Thus the root correct is 3.162278419

QUESTION 5

a. Consider the function 𝑓(𝑥) = sin 𝑥

Substitute the value of x in 𝑓(𝑥) = sin 𝑥


𝑥 𝜋 0 𝜋 𝜋

6 6 2
𝑦 1 0 1 1

2 2

Next, we use 𝑎 + 𝑏𝑥 + 𝑐𝑥 2 + 𝑑𝑥 3

𝜋 1 𝜋 𝜋2 𝜋3 1
[− , ] = 𝑎 − ( ) 𝑏 − 𝑐 ( ) − ⁡ ( )𝑑 =
6 2 6 36 216 2

[0,0] = 𝑎 − 0𝑏 + 0𝑐 + 0𝑑 = 0

𝜋 1 𝜋 𝜋2 𝜋3 1
[ ,− ] = 𝑎 + ( ) × 𝑏 + ( )𝑐 − ( )×𝑑 =
6 2 6 36 216 2

𝜋 𝜋 𝜋2 𝜋3
[ , 1] = 𝑎 + ( ) × 𝑏 + ( ) × 𝑐 + ( ) × 𝑑 = 1
2 2 4 8

So,
2 −4
𝑎 = 0, 𝑏= ,⁡⁡⁡⁡⁡⁡⁡⁡𝑐 = 0,⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑑 = ⁡ 3
𝜋 𝜋
𝜋 𝜋
∴ the polynomial 𝑝(𝑥) that interpolates 𝑓:⁡𝑥0 = − 6 , 𝑥1 = 0,⁡⁡⁡𝑥2 = 6 ,⁡⁡
𝜋 2 4
⁡𝑎𝑛𝑑⁡𝑥3 = 2 is 𝑝(𝑥) = (𝜋) × 𝑥 − (𝜋3 ) × 𝑥 3

b.
𝜋 2 𝜋 4 𝜋3 1 4
c. 𝑝 ( 3 ) = (𝜋) × ( 3 ) − (𝜋3 ) × 3
= 2 − 27×𝜋2

𝜋 𝜋
Thus, the approximation of 𝑓 ( 3 ) ≈ 𝑝 3 ≈ 0.485

QUESTION 6
𝑛
1
𝑓(𝑥) − 𝑝(𝑥) = 𝑓 𝑛+1 (𝜉𝑥 ) ∏(𝑥 − 𝑥𝑖 )
(𝑛 + 1)!
𝑖=0

𝜉𝑥 ⁡𝑖𝑠⁡𝑖𝑛⁡𝑏𝑒𝑡𝑤𝑒𝑒𝑛⁡𝑥⁡𝑎𝑛𝑑⁡𝑥𝑛
The error formula is given for Newton’s Forward-Differences Interpolation is;
𝑠
=( ) ℎ𝑛+1 𝑓 (𝑛+1) (𝜉𝑥 )
𝑛+1
𝑠 𝑛+1
=⁡( ) (𝑥𝑗+1 − 𝑥𝑖 ) 𝑓 (𝑛+1) (𝜉𝑥 )
𝑛+1
Multiple of both side with (𝑛 + 1)!
𝑠 𝑛+1
= (𝑛 + 1)! 𝑥𝑛 (𝑥0 ) = (( ) (𝑥𝑗+1 − 𝑥𝑖 ) 𝑓 (𝑛+1) (𝜉𝑥 ))⁡(𝑛 + 1)!
𝑛+1
Organize the formula
𝑠
𝐸𝑛 (𝑥0 ) = ( ) (𝑥𝑛+1 − 𝑥𝑖 )𝑛+1 𝑓 (𝑛+1) (𝜉𝑥 )(𝑛 + 1)!
𝑛+1
Now compare with the error formula for the Lagrange interpolation

(𝑛 + 1)!
𝑠=
(𝑠 − 𝑛 − 1)!

You might also like