Tribhuwan University

Institute of Science and Technology

2079

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 secant method can approximate the root of a non-linear equation? Explain with necessary derivation. Estimate a real root of following equation using secant method. Assume error precision of 0.01.
x3+2xcos(x)=4x^3 + 2x - \cos(x) = 4
[10]
2.
How spline interpolation differs with the Langrage's interpolation? Estimate the value of f(0) and f(4) using cubic spline interpolation from the following data.
x1123f(x)1021486\begin{array}{c|cccc} x & -1 & 1 & 2 & 3 \\ \hline f(x) & -10 & -2 & 14 & 86 \end{array}
[10]
3.
What is pivoting? Why is it necessary? Write an algorithm and program to solve the set of n linear equations using Gaussian elimination method. [10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
Calculate a real root of the following function using bisection method correct upto 3 significant figures.
x2ex=3x^2 - e^x = 3
[5]
5.
What is fixed point iteration method? How can it converge to the root of a non-linear equation? Also explain the diverging cases with suitable examples. [5]
6.
Write down the program for solving ordinary differential equation using Heun's method. [5]
7.
Fit the quadratic function for the data given below using least square method.
x1.01.52.02.53.03.54.0f(x)2.74.05.88.311.215.019.0\begin{array}{c|ccccccc} x & 1.0 & 1.5 & 2.0 & 2.5 & 3.0 & 3.5 & 4.0 \\ \hline f(x) & 2.7 & 4.0 & 5.8 & 8.3 & 11.2 & 15.0 & 19.0 \end{array}
[5]
8.
Estimate the integral value of following function from x = 1.2 to 2.4 using Simpson's 1/3 rule.
x1.01.21.41.61.82.02.22.42.6f(x)1.532.253.184.325.677.238.9810.9413.08\begin{array}{c|cccccccc} x & 1.0 & 1.2 & 1.4 & 1.6 & 1.8 & 2.0 & 2.2 & 2.4 & 2.6 \\ \hline f(x) & 1.53 & 2.25 & 3.18 & 4.32 & 5.67 & 7.23 & 8.98 & 10.94 & 13.08 \end{array}
[5]
9.
What is Gaussian integration formula? Evaluate the following integration using Gaussian integration three ordinate formula.
01sinxxdx\int_{0}^{1} \frac{\sin x}{x} dx
[5]
10.
Solve the following set of equations using Gauss Siedal method.
x+2y+3z=4x + 2y + 3z = 4
6x+4y+5z=166x + 4y + 5z = 16
5x+2y+3z=125x + 2y + 3z = 12
[5]
11.
Solve the following differential equation for 0x10 \leq x \leq 1 taking h=0.5h=0.5 using Runge Kutta 4th order method.
y(x)+y=3x with y(0)=2y'(x) + y = 3x \text{ with } y(0) = 2
[5]
12.
Solve the Poisson's equation 2f=3x2y\nabla^2 f = 3x^2y over the square domain 0x30 \leq x \leq 3, 0y30 \leq y \leq 3 with f=0f=0 on the boundary and h=1h=1. [5]