Tribhuwan University

Institute of Science and Technology

2075

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.
What is non-linear equation? Derive the required expression to calculate the root of non-linear equation using secant method. Using this expression find a root of following equation.

$x^2 + \cos(x) - e^{-x} - 2 = 0$
[10]
2.
What is matrix factorization? Factorize the given matrix A into LU using Doolittle algorithm and also solve Ax = b for given b using L and U matrices.

$A = \begin{bmatrix} 2 & 4 & -4 & 0 \\ 1 & 5 & -5 & -3 \\ 2 & 3 & 1 & 3 \\ 1 & 4 & -2 & 2 \end{bmatrix}, \quad b = \begin{bmatrix} 12 \\ 18 \\ 8 \\ 8 \end{bmatrix}$
[10]
3.
What is initial value problem and boundary value problem? Write an algorithm and program to solve the boundary value problem using shooting method.[10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
Calculate a real negative root of following equation using Newton’s method for polynomial.

$x^4 + 2x^3 + 3x^2 + 4x = 5$
[5]
5.
What is least squares approximation of fitting a function? How does it differ with polynomial interpolation? Explain with suitable example. [5]
6.
Find the lowest degree polynomial, which passes through the following points. Using this polynomial estimate f(x) at x = 0.

$\begin{array}{c|ccccccc} X & -2 & -1 & 1 & 2 & 3 & 4 \\ \hline F(x) & -19 & 0 & 2 & -3 & -4 & 5 \end{array}$
[5]
7.
The fit function of type y = a + bx for the following points using the least square method.

$\begin{array}{c|ccccc} X & -1 & 1.2 & 2 & 2.7 & 3.6 & 4 \\ \hline F(x) & 1 & 20 & 27 & 33 & 41 & 45 \end{array}$
[5]
8.
Calculate the integral value of the function given below from x = 1.8 to x = 3.4 using Simpson’s 1/3 rule.

$\begin{array}{c|cccccccc} X & 1.8 & 2.0 & 2.2 & 2.4 & 2.6 & 2.8 & 3.0 & 3.4 \\ \hline F(x) & 0.003 & 0.778 & 1.632 & 2.566 & 3.579 & 4.672 & 7.097 & 8.429 \end{array}$
[5]
9.
Evaluate the following integration using Romberg integration.

$\int_{0}^{1} \frac{\sin x}{x} dx$
[5]
10.
Solve the following set of equations using Gauss Seidel method.

$x + 2y + 3z = 4$

$6x - 4y + 5z = 10$

$5x + 2y + 2z = 25$
[5]
11.
From the following differential equation estimate y(1) using RK 4th order method.

$\frac{dy}{dx} + 2x^2y = 4 \quad \text{with} \quad y(0) = 1$

$[\text{Take} \; h = 0.5]$
[5]
12.
Solve the Poisson's equation over the square domain $0 \leq x \leq 1.5$, $0 \leq y \leq 1.5$ with $f = 0$ on the boundary and $h = 0.5$. [5]