Interpolation Of: Course No: CEE137 Course Name: Numerical Analysis

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Course No: CEE137

Course Name: Numerical Analysis

Assignment on

Interpolation of 𝐬𝐢𝐧(𝟖𝟎°)

Submitted by: Submitted to:

Mishkat Ahmed Naoshad Khayrun Nahar Mitu


Reg No. 2019333076 Lecturer
1st Year, 2nd Semester, Department of
Department of Civil and Environmental Engineering,
Civil and Environmental Engineering, Shahjalal University of Science And
Shahjalal University of Science And Technology, Sylhet.
Technology, Sylhet.

Date of submission: 17/08/ 2020


Use the table to interpolate for 𝒔𝒊𝒏⁡(𝟖𝟎°)⁡

𝒙 𝐬𝐢𝐧(𝒙)
0 0.00000
15 0.25882
30 0.50000
45 0.70711
60 0.86603
75 0.96593
90 1.00000

Answer:
Linear Interpolation:
Considering a straight line equation,

sin(𝑥) = 𝑎𝑥 + 𝑏

At (75, 0.96593), 0.96593 = 75𝑎 + 𝑏 …⁡…⁡…⁡(1)

At (90, 1.00000),⁡1.00000 = 90𝑎 + 𝑏 … … … (2)


Solving these equations,

𝑎 = 2.271333 × 10−3

⁡𝑏 = 0.79558

So,⁡sin(𝑥) = 2.271333 × 10−3 𝑥 + 0.79558

At 𝑥 = 80°, ⁡sin(𝑥) = 0.97729.

Polynomial Interpolation:
Considering a second order polynomial,

sin(𝑥) = 𝑎1 + 𝑎2 𝑥 + 𝑎3 𝑥 2
Passing through 3 points (60, 0.86603), (75, 0.96593) and (90, 1.00000),

⁡𝑎1 + 60𝑎2 + 602 𝑎3 = 0.86603 … … … (1)

𝑎1 + 75𝑎2 + 752 𝑎3 = 0.96593 … … … (2)

𝑎1 + 90𝑎2 + 902 𝑎3 = 1.00000 … … … (3)


Solving these equations,
𝑎1 = −0.19187 ,

𝑎2 = 0.026409 ,

𝑎3 = −1.46289 × 10−4 .

Now, ⁡sin(𝑥) = −0.19187 + 0.026409𝑥 − 1.46289 × 10−4 𝑥 2

At 𝑥 = 80°, sin(𝑥) = 0.9846.

Finite Difference Method:


Consider,

sin(𝑥) = 𝑎1 + 𝑎2 (𝑥 − 𝑥1 ) + 𝑎3 (𝑥 − 𝑥1 )(𝑥 − 𝑥2 )

Taking 𝑥1 = 75 and ⁡𝑥2 = 90,

sin(𝑥) = 𝑎1 + 𝑎2 (𝑥 − 75) + 𝑎3 (𝑥 − 75)(𝑥 − 90)

When⁡𝑥 = 60°,

0.86603 = 𝑎1 + 𝑎2 (60 − 75) + 𝑎3 (60 − 75)(60 − 90)⁡

=> 0.86603 = 𝑎1 − 15𝑎2 + 450𝑎3 … … … (1)

When⁡𝑥 = 75°,

0.96593 = 𝑎1 + 𝑎2 (75 − 75) + 𝑎3 (60 − 75)(60 − 90)⁡

=> 0.96593 = 𝑎1 … … … (2)

When⁡𝑥 = 90°,

1.00000 = 𝑎1 + 𝑎2 (90 − 75) + 𝑎3 (90 − 75)(90 − 90)

=> 1.00000 = 𝑎1 + 15𝑎2 ⁡…⁡…⁡…⁡(3)


Solving equations (1), (2) and (3), we get,

𝑎1 = 0.96593,

𝑎2 = 2.27133 × 10−3 ,

𝑎3 = −1.46289 × 10−4 .⁡

So, sin(𝑥) = 0.96593 + 2.27133 × 10−3 (𝑥 − 75) − 1.46289 × 10−4 (𝑥 − 75)(𝑥 − 90)

At 𝑥 = 80°, sin(𝑥) = 0.9846.


Graphical Interpolation:

In the graph, at 𝑥 = 80°, sin(𝑥) = 0.98.

You might also like