Tribhuwan University

Institute of Science and Technology

2078

Bachelor Level / Second Year / Third Semester / Science

B.Sc in Computer Science and Information Technology (CSC212)

(Numerical Method)

Full Marks: 60

Pass Marks: 24

Time: 3 Hours

Candidates are required to give their answers in their own words as for as practicable.

The figures in the margin indicate full marks.

Section A

Long Answers Questions

Attempt any TWO questions.
[2*10=20]
1.
How can Horner’s rule be used to evaluate the f(x) and f(x) of a polynomial at a given point? Explain. Write an algorithm and program to calculate a real root of a polynomial using Horner’s rule. [10]
2.
Write matrix factorization? How can be used to solve a system of linear equations? Factorize the given matrix A and solve the system of equations Ax = b for given b using L and U matrices.
A=[123281132236],b=[41228]A = \begin{bmatrix} 1 & 2 & 3 \\ 2 & 8 & 11 \\ 3 & 22 & 36 \end{bmatrix}, \quad b = \begin{bmatrix} 4 \\ 12 \\ 28 \end{bmatrix}
[10]
3.
What is a higher-order differential equation? How can you solve the higher-order differential equation? Explain. Solve the following differential equation for 1 ≤ x ≥ 2, taking h = 0.25
d2ydx2+3dydx+5y=0, with y(1)=1 and y(1)=2\frac{d^2y}{dx^2} + 3 \frac{dy}{dx} + 5y = 0, \text{ with } y(1) = 1 \text{ and } y'(1) = 2
[10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
How the half-interval method can be estimate a root of a non-linear equation? Find a real root of the following equation using the half-interval method to correct up to two decimal places.
x2exx=1x^2 - e^{-x} - x = 1
[5]
5.
Calculate the real root of the given equation using fixed point iteration correct up to 3 significant figures.
2x32x=52x^3 - 2x = 5
[5]
6.
What is Newton’s interpolation? Obtain the divided difference table from the following data set and estimate the f(x) at x = 2 and x = 5.
x3.22.71.04.85.6f(x)22.017.814.238.351.7\begin{array}{c|ccccc} x & 3.2 & 2.7 & 1.0 & 4.8 & 5.6 \\ \hline f(x) & 22.0 & 17.8 & 14.2 & 38.3 & 51.7 \end{array}
[5]
7.
What is linear regression? Fit the linear function to the following data.
x1.01.21.41.61.82.02.22.4f(x)2.02.63.96.09.315.020.630.4\begin{array}{c|cccccccc} x & 1.0 & 1.2 & 1.4 & 1.6 & 1.8 & 2.0 & 2.2 & 2.4 \\ \hline f(x) & 2.0 & 2.6 & 3.9 & 6.0 & 9.3 & 15.0 & 20.6 & 30.4 \end{array}
[5]
8.
What are the problems with polynomial interpolation for a large number of data set? How such problems are addressed? Explain with an example. [5]
9.
Evaluate the following integration using Romberg integration.
01sin2xxdx\int_{0}^{1} \frac{\sin^2 x}{x} dx
[5]
10.
Solve the following set of linear equations using the Gauss-Jordan method.
x2+2x3+3x4=9x_2 + 2x_3 + 3x_4 = 9
7x1+6x2+5x3+4x4=337x_1 + 6x_2 + 5x_3 + 4x_4 = 33
8x1+9x2+x4=278x_1 + 9x_2 + x_4 = 27
2x1+5x2+4x3+3x4=232x_1 + 5x_2 + 4x_3 + 3x_4 = 23
[5]
11.
Solve the following differential equation for 1x21 \leq x \leq 2, taking h=0.25h = 0.25 using Heun’s method.
y(x)+x2y=3x, with y(1)=1y'(x) + x^2y = 3x, \text{ with } y(1) = 1
[5]
12.
Consider a metallic plate of size 90cm by 90cm. The two adjacent sides of the plate are maintained at a temperature of 100C100^\circ C and the remaining two adjacent sides are held at 200C200^\circ C. Calculate the steady-state temperature at interior points assuming a grid size of 30 cm by 30 cm. [5]