BC0043 Solved

11
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 : Ea | True Value - Approximate Value | = |X@Xa Let X be a number such that | X - Xa X, thenX is an upper limit on the magnitude of 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 Relative Error Er Absolute Error True Value fffffffffffffffffffffffffffffffffffffffffffffffffffffff fff Ea Xffffffff Similarly the quantity X |X| ffffffffffft X |Xa | ffffffffffffff measures the relative accurancy.

description

Assignment solved

Transcript of BC0043 Solved

Page 1: BC0043 Solved

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 : Ea | True Value - Approximate Value | = |X@Xa Let X be a number such that | X - Xa X, thenX is an upper limit on the magnitude of 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 Relative Error Er Absolute Error True Value ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff Ea Xffffffff Similarly the quantity X |X| ffffffffffft X |Xa | ffffffffffffff measures the relative accurancy. Percentage Errors: Definition The percentage error Ep is given by 2

Page 2: BC0043 Solved

EP EA XffffffffB 100 ErB 100 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 X 12ffffB10@N ,whereXis the absolute accuracy.

Page 3: BC0043 Solved

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

Answer:

Page 4: BC0043 Solved

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) = 27–6 –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.

Page 5: BC0043 Solved

Question4: Find a real root of the transcendental equation cosx – 3x + 1 = 0, correct to fourdecimal 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

x = (1 + cos x) = (x) – (i)

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

Differentiate with respect to c on both sides we get:

x1 = (x0) = (1+ cos 0) = 0.6667

x2 = (x1) = (1+ cos 0.6667) = 0.5953

x3 = (x2) = (1+ cos 0.5953) = 0.6093

x4 = (x3) = (1+ cos 0.6093) = 0.6067

x5 = (x4) = (1+ cos 0.6067) = 0.6072

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

Page 6: BC0043 Solved

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

a11 = 1 = 9 – 16 = –7 (–1)1+1 (–7) = – 7

a12 = 2 = 3 – 4 = –1 (-1)1+2 (–1) = 1

a13 = 3 = 4 – 3 = 1 (–1)1+3 1 = 1

a21 =1 = 6 – 12 = – 6 (–1)2+1 (–6) = 6

a22 = 3 = 3 – 3 = 0 (–1)2+2 0 = 0

A23 = 4 = 4 – 2 = 2 (–1)2+3 (2) = –2

A31 = 1 = 8 – 9 = –1 (–1)3+1 (–1) = –1

Page 7: BC0043 Solved

A32 = 4

= = 4 – 3 = 1 (–1)3+1 (–1) = –1

a33 = 3 = 3 – 2 = 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, A–1 =

Observations: i) Inverse of a matrix is unique. ii) (AB)–1 = B–1 A–1

iii) AA–1 = A–1A = I .

Page 8: BC0043 Solved

Question6: 6. Find the rank of the matrix1 3 4 52 3 5 11 2 3 2using 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.

Page 9: BC0043 Solved

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