0% found this document useful (0 votes)
66 views5 pages

Assignment 1 Numerical Methods

This document appears to be an assignment submission for a numerical methods course. It contains the student's solutions to 4 questions involving computations done with varying levels of precision. For each calculation, the student provides the exact solution, the 3-digit rounded solution, and calculates the relative error between the two. The overall results show that rounding to 3 digits of precision leads to relative errors in the 10^-3 range. Increasing the number of digits of rounding would likely further reduce errors.

Uploaded by

engryasirchishti
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views5 pages

Assignment 1 Numerical Methods

This document appears to be an assignment submission for a numerical methods course. It contains the student's solutions to 4 questions involving computations done with varying levels of precision. For each calculation, the student provides the exact solution, the 3-digit rounded solution, and calculates the relative error between the two. The overall results show that rounding to 3 digits of precision leads to relative errors in the 10^-3 range. Increasing the number of digits of rounding would likely further reduce errors.

Uploaded by

engryasirchishti
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

ABDUL REHMAN CHISHTI

SP-11-EE-028

COURSE: NUMERICAL METHODS

ASSIGNMENT: 1

DISTANCE LEARNER STUDENT

QUESTION: 1: Perform the following computations (i) exactly, (ii) using three digit
chopping arithmetic and (iii) using three digit rounding arithmetic. Compute the relative
errors in part (ii) and part (iii).
(a).

4/5 + 1/3

Solution:
(i)

Exact: (4/5) + (1/3) = 17/15= 1.133333

(ii)

3-digit Chopping = 1.13

(iii)

3-digit Rounding = 1.13

(iv)

Relative error = (exact- observed)/exact

For part (ii)


Relative error = ((17/15) 1.13)/ (17/15) = 2.94 x 10-3
For part (iii)
Relative error = ((17/15) 1.13)/ (17/15) = 2.94 x 10-3
b).

(4/5).(1/3)

(i)

Exact: (4/5) . (1/3) = 4/15= 0.266666

(ii)

3-digit Chopping = 0.266

(iii)

3-digit Rounding = 0.267

(iv)

Relative error = (exact- observed)/exact

For part (ii)


Relative error = ((4/15) 0.266)/ (4/15) = 2.5 x 10-3
For part (iii)
Relative error = ((4/15) 0.267)/ (4/15) = 1.24 x 10-3

c).

(1/3 3/11) + 3/20

(i)

Exact: (1/3 3/11) + 3/20= 139/660 = 0.210606

(ii)

3-digit Chopping = 0.210

(iii)

3-digit Rounding = 0.211

(iv)

Relative error = (exact- observed)/exact

For part (ii)


Relative error = |(139/660) 0.210)/ (139/660) |= 2.87x10-3
For part (iii)
Relative error = |(139/660) 0.211)/ (139/660) |= 1.87 x10-3

d).

(1/3 + 3/11) + 3/20

(i)

Exact: (1/3 + 3/11) + 3/20= 499/660= 0.756060

(ii)

3-digit Chopping = 0.756

(iii)

3-digit Rounding = 0.756

(iv)

Relative error = (exact- observed)/exact

For part (ii)


Relative error = |(499/660) 0.756)/ (499/660) |= 0.0801x10-3
For part (iii)
Relative error = |(499/660) 0.756)/ (499/660) |= 0.0801x10-3

QUESTION: 2
(a). x2 2 +1/ x2 for x = 1.473

x
Exact
3-digit- rounding
Exact equation =
Rounding off

x2

1/x2

1.473 2.169729 0.460887


1.47
2.17
0.461
0.630616
0.631

Exact= f(1.473) = (1.473)2 -2 + 1/(1.473)2 = 0.63061


Error = |(0.630616 0.631)/(0.630616)| = 0.00061

(b). x4 3.17x3 + 5.29x 17.3 for x = 5.12

exact
3-digit round
Exact equation
Round off

x
x3
x4
5.12 134.2177 687.1948
5.12
134
687
271.5094
271

Exact= f(5.12) = (5.12)4 3.17(5.12)3 + 5.29(5.12) 17.3 = 271.509


Round off = 271
Error = |(271.5094 271)/( 271.5094)| = 1.87x10-3

** If the rounding off is increased from 3 digit rounding arithmetic to more than three may be 4,5 ,6 then
there will be significant reduction in the error.

QUESTION -3

tan-1(x) = x 1/3 * x3 + (1/5)*x5


Putting x = 1/2
tan-1(1/2) = (1/2) -(1/3)*((1/2)^3) + (1/5) *((1/2)^5) = 0.464583
Putting x = 1/3
tan-1(1/3) = (1/3) -(1/3)*((1/3)^3) + (1/5) *((1/3)^5) = 0.321810
putting in given
= 4[arctan(1/ 2) + arctan(1/ 3)]
Calculated pi = 4 (0.464583 + 0.321810) = 3.14557
Original value of pi = 3.141593
Absolute error = |3.141593 -3.14557| = 3.93 x 10 -3
Relative error = |(3.141593 -3.14557)/ 3.141593 | = 1.26 x 10-3

You might also like