You are on page 1of 9

BC0043- Computer Oriented Numerical methods

Question 1: 1. Explain the following terms in five sentences each


(i) Data error (ii) Conversion error (iii) Numerical error (iv) Round off error (v) Truncation error (vi) Significant digits Answer:

Absolute Errors: Definition Absolute error is the numerical difference between its true value of a quantity and its approximate value. If X is the true quantity and Xa is its approximate value then the absolute error Ea is given by : such that | X absolute error and is said to measure absolute accuracy. Relative Errors: Definition The relative error is the absolute error divided by the true value of the quantity and this is denoted by Er

the relative accurancy. Percentage Errors: Definition The percentage error Ep is given by 2

Observation: 1. The relative and percentage errors are independent of the units used while absolute error is expressed in terms of there units. 2. if number X is rounded to N decimal places, then Xis the absolute accuracy.

Question2:Find the real root of the equation x3 4x 9 = 0 using the


Bisectionmethod. Answer:

Question3 Find a real root of the equation x3 2x 5 = 0 by the method


of regula-falsi position, correct to three decimal places. Answer: Let f (x) = x3 2x 5 Then f (1) = 1 2 5 = 6 < 0 f (2) = 8 4 5 = 1 < 0 f (3) = 276 5 = 16 > 0 Hence a root lies between 2 and 3.

Take x1= 2, x2= 3, f (x1) = 1, f (x2) = 16, in the method of false position, we get

X3=x1-

=2-

==2+ I/17=2.0588

Now f(x3) = f(2.0588) = (2.0588)3 2 2.0588 5 = 0.3908 < 0.Since f(2.0588) < 0 we have that root lies between 2.0588 and 3.0.Replacex1by x3, and generate the next approximation using the formula,x4= x3 = 2.0588 = 2.0813.Repeating this process, the successive approximations are x5= 2.0862,x6= 2.0915, x7= 2.0934, x8= 2.0941, x9= 2.0943 etc.Hence the root x = 2.094 correct to three decimal places.

Question4: Find a real root of the transcendental equation cosx 3x + 1 = 0, correct to four decimal places using the method of iteration. Answer: Let f(x) = cos x 3x + 1.
Now f(0) = cos 0 0 + 1 = 2 > 0 and f+ 1 < 0. Therefore a root lies between 0 and f . Rewriting the given equation cos x 3x + 1 = 0 as (i)

(x) = (1 + cos x) (say)

Differentiate with respect to c on both sides we get:

x1 x2 x3 x4 x5

0)

= = = = =

(1+ cos 0) = 0.6667 (1+ cos 0.6667) = 0.5953 (1+ cos 0.5953) = 0.6093 (1+ cos 0.6093) = 0.6067 (1+ cos 0.6067) = 0.6072

1)

2)

3)

4)

x6 5) = (1+ cos 0.6072) = 0.6071 x7 6) = (1+ cos 0.6071) = 0.6071 Hence we take the solution as x = 0.6071 correct to 4 decimal place

Question5: 5. Compute the adjoint as well as the inverse of the matrix A=1 2 3
ele
a11 = 1

min = 9 16 = 7

cof (1)1+1 (7) = 7

134 143

a12 = 2

= 3 4 = 1

(-1)1+2 (1) = 1

a13 = 3

=43=1

(1)1+3 1 = 1

a21 =1

= 6 12 = 6

(1)2+1 (6) = 6 (1)2+2 0 = 0

a22 = 3

=33=0

A23 = 4

=42=2

(1)2+3 (2) = 2

A31 = 1

= 8 9 = 1

(1)3+1 (1) = 1

A32 = =4

=43=1

(1)3+1 (1) = 1

a33 = 3

=32=1

(1)3+3 1 = 1.

The adjoint of a square matrix is the transpose of the matrix obtained by replacing each element of A by its co-factor in A.

A-1 is, A1 = Observations: i) Inverse of a matrix is unique. ii) (AB)1 = B1 A1 iii) AA1 = A1A = I .

Question6: 6. Find the rank of the matrix


1345 2351 1232 using elementary row transformation Answer: The rank of A min {3, 4} = 3.

A=

Firstly we use the leading entry in the first row 1 to make the leading entries in second and third rows to zero.

The above matrix is in the echelon form having two non-zero rows. Hence the rank of A is 2.