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

November 2012 Bachelor of Computer Application (BCA) - Semester 3 BC0043 - Computer Oriented Numericalmethods - 4 Credits

The document provides definitions and examples for various types of errors that can occur in numerical methods and computations: - Data error arises from limitations in measurement instruments and occurs when data is obtained experimentally and is of limited accuracy. Conversion error occurs due to limitations in how computers store data in binary format. - Numerical error occurs during implementation of numerical methods and includes round-off error from storing values with finite precision and truncation error from approximating infinite sums with a finite number of terms. - The document then provides examples of applying numerical methods like bisection, Regula-falsi, and iteration to find roots of equations and computing the adjoint and inverse of a matrix.

Uploaded by

Chandan Kumar
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)
186 views5 pages

November 2012 Bachelor of Computer Application (BCA) - Semester 3 BC0043 - Computer Oriented Numericalmethods - 4 Credits

The document provides definitions and examples for various types of errors that can occur in numerical methods and computations: - Data error arises from limitations in measurement instruments and occurs when data is obtained experimentally and is of limited accuracy. Conversion error occurs due to limitations in how computers store data in binary format. - Numerical error occurs during implementation of numerical methods and includes round-off error from storing values with finite precision and truncation error from approximating infinite sums with a finite number of terms. - The document then provides examples of applying numerical methods like bisection, Regula-falsi, and iteration to find roots of equations and computing the adjoint and inverse of a matrix.

Uploaded by

Chandan Kumar
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

November 2012 Bachelor of Computer Application (BCA) Semester 3 BC0043 Computer oriented numericalmethods 4 Credits

(Book ID: B0804) Total Marks: 60 Marks

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

(i)Data error : (also known as empirical error) arises when data for a problem are obtained by some experimental means and are, therefore, of limited accuracy and precision. This may be due to some limitations ml instrumentation and reading, and therefore may be unavoidable. A physical measurement, such as a distance, a voltage, or a time period cannot be exact. To remember that there is use in performing arithmetic operations to, say, four decimal when the original data themselves are only correct to two decimal places. For instance, the scale reading in a weighing machine may be accurate to only one decimal place.

(ii) Conversion error : (also known as representation errors) arise due to the limitations of the computer to store the data exactly. We know that the floating point representation retains only a specified number of digits. The digits that are not retained constitute the round off error.

(iii) Numerical error :Numerical errors are introduced during the process of implementation of a numerical method. They come in two forms, round off errors andtruncation errors. The total numerical error is the summation of these two errors. The total error can be reduced by devising suitable techniques for implementing the solution. We shall see in this section the magnitude of these errors.

(iv) Round off error: Every computer has a finite word length and therefore it is possible to store only a fixed number of digits of a given input number. Since computers store information in binary form, storing an exact decimal number in its binary form into the computer memory gives an error. This error is computer dependent. Also, at the end of computation of a particular problem, the final results in the computer, which is obviously in binary form, should be converted into decimal form a form understandable to the user before their print out. Therefore, an additional error is committed at this stage too. This error is called local roundoff error. It is clear that (0.7625)10 = (0.11000011 (00l1))2. If a particular computer system has a word length of 12 bits only, then the decimal number0.7625 is stored in the computer

memory in binary form as 0.110000110011. However, it is equivalent to 0.76245. Thus, in storing the number 0.7625, we have committed an error equal to 0.00005, which is the round-off error; inherent with the computer system considered.

(v) Truncation error : Truncation errors arise from using an approximation in place of an exact mathematical procedure. Typically, it is the error resulting from the truncation of the numerical process. We often use some finite number of terms to estimate the sum of an infinite series. For example,

S =

is replaced by the finite sum

Consider the following infinite series: sin x = x + .

When we calculate the sine of an angle using this series, we cannot use all the terms in the series for computation. We usually terminate the process after a certain term is calculated. The terms "truncated" introduce an error which is called truncation error. Many of the iterative procedures used in numerical computing are infinite and, therefore, a knowledge of this error is important. Truncation error can be reduced by using a better numerical model which usually increases the number of arithmetic operations. In numerical integration, the truncation error can be reduced by increasing the number of points at which the function is integrated. But care should be exercised to see that the roundoff error which is bound to increase due to increase in arithmetic operations does not off-set the reduction in truncation error.

(vi) Significant digits: The digits that are used to express a number are called significant digits or significant figures. The significant figures of a number are defined as follows:
Rule 1: (Numbers without decimal point): If the number does not have any decimal point, the significant figures of the number are the digits counted from the first non-zero digit on the left to the last non-zero digit on the right. Therefore, the number 12040 has four significant figures. Rule 2: (Numbers with decimal point): If the number has a decimal point, the significant figures of the number are the digits counted from the first non-zero digit on the left to the last digit on the right side (irrespective of whether it is zero or non-zero). Therefore, the number,2100.4, has five significant figures, and the number 0.015, has two significant figures.

Thus each of the numbers 3.1416, 0.60125 and 4.0002 contain five significant digits while the numbers 0.00386, 0.000587 and 0.00205 contain only three significant digits, since zeros only help to fix the position of the decimal point.

2. Find the real root of the equation x3 4x 9 = 0 using the Bisection method.
Solution: Let f(x) = x3 4x 9 f(1) = 1 4 9 = 12 < 0 f(2) = 8 8 9 = 9 < 0 f(3) = 27 12 9 = + 6 > 0 Since f(2) is negative and f(3) is positive, a root lies between 2 and 3. Therefore the first approximation to the root is x1 =
3

= 2.5

Then f(x1) = f (2.5) = 2.5 4 2.5 9 = 3.375 < 0. Hence the root lies between 2.5 and 3. Since f(2.5) < 0 and f(3) > 0, we have the second approximation to the root is x2 = = = 2.75

Then f(x2) = f(2.75) = (2.75)3 4 2.75 9 = 0.7969 > 0.

Therefore conclude that the root lies between 2.5 and 2.75 and so the third approximation to the root is x3 = = 2.625

Also f (x3) = f (2.625) = 1.4121 < 0. Now since f (x3) < 0 and f(x2) > 0, we have that root lies between x2 and x3. Thus the fourth approximation to the root is x4 = = 2.6875

The procedure is repeated and the successive approximations are x 5 = 2.703125, x6 = 2.7109375, x7 = 2.70703125, x8 = 2.7051 etc. Therefore x = x8 = 2.7051 is the approximate root. 3

3. Find a real root of the equation x 2x 5 = 0 by the method of Regula-falsi position, correct to three decimal places. Solution: 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 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. Replace x1 by x3, and generate the next approximation using the formula, x4 = x3
( )( ) ) ( ( )
( )( ( ) ( ( ) =2 ) )( ( ) = =2+ )

= 2.0588

= 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.


Observation: The Regula-falsi method is intended to produce faster convergence to the solution. However, it does not always do so. Sometimes, the values of x new do not improve quickly. One reason for the slow convergence can be the departure from the basic premises on which the false position method is built.

4. Find a real root of the transcendental equation cos x 3x + 1 = 0, correct to four decimal places using the method of iteration. Solution:
Let f(x) = cos x 3x + 1. Now f(0) = cos 0 0 + 1 = 2 > 0 and f between 0 and .

( )

= cos +

+1= -

+1 < 0. Therefore a root lies

Rewriting the given equation cos x 3x + 1 = 0 as x = (1 + cos x) = (x) (x) = (i)

(1 + cos x) (say)

Differentiate with respect to x on both the sides, (x) = and

Since|sinx| 1, we have | ( ) =

|
).

|
.

<1.

Therefore | (x) | < 1 for all x in (0,

Hence the iteration method can be applied to the equation (i) and we start with x 0 = 0 x in the interval (0, x1 = (x0) x2 = (x1) x3 = (x2) x4 = (x3) x5 = (x4) x6 = (x5) x7 = (x6) )

]
= = = = = = = (1+ cos x0) = (1+ cos x0) = (1+ cos x0) = (1+ cos x0) = (1+ cos x0) = (1+ cos x0) = (1+ cos x0) = (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+ cos 0.6072) = 0.6071 (1+ cos 0.6071) = 0.6071

or any choice of

Hence we take the solution as x = 0.6071 correct to 4 decimal place.

5. Compute the adjoint as well as the inverse of the matrix A =[ Solution:

].

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. Adj A =[ det A = =|

] =[

] and

| = = 7 + 2 + 3 = 2. Therefore,

A is, A

-1

= [ ]

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

6. Find the rank of the matrix [ Solution:


The rank of A A= min {3, 4} = 3.

] using elementary row transformation.

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

rows to zero].

Perform,R2 R3

R2 -2R1, then A R3 R1

Perform, R2

(-1)R2 then A

Perform, R3

R3 R2, then A

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

You might also like