# WBUT Question Papers EC

## Numerical Methods And Programming B Tech Third Sem 2010-11

Time Allotted : 3 Hours

Full Marks: 70

The figures in the margin indicate full marks.

Candidates are required to give their answers in their own words

as far as practicable.

GROUP-A ( Multiple Choice Type Questions )

1. Choose the correct alternatives for any ten of the following:  10×1 = 10

i)         The Newton-Raphson method is used to find the root of the equation x2 – 2 = 0. If the iteration started from – 1, the iteration will

a) converges to – 1 b) converges to V2

c) converges to – V2 d) not convergent.

x 9

ii)       Consider the sequence xn+1 = — +    (n a 0), x0 = 0 • 2

2       8xn

obtained from Newton-Raphson method. The sequence converges to

a) 1-5              b) a/2 ■’

c) 1-6               d) 1-4.

What is the output of the following code ?

#iriclude<stdio.h>

void main ( )

{ ’ int x = 2;x = x «5; printf(“%d”,x);         .

}

a)      5  b) 2

c)     32 d) none of these.

When Gauss elimination method is used to solve AX = B, A is transformed to a/an

a)        null matrix

b)        upper triangular matrix

c)        identity matrix

d)        diagonally dominant matrix.

vi)      The kind of error occurs when ji approximated by 3-14 is

a)   truncation error  b)

c)    inherent error    d)

vii)     The convergence condition for Gauss-Seidel iterative method for solving a system of linear equation is

a)        the coefficient matrix is singular

b)        the coefficient matrix has rank zero

c)        the coefficient matrix must be strictly diagonally dominant

d)        none of these.

viii)   Recursive function may call          . a) another function b) itself

c) both (a) & (b)    d) none of these.

ix)      Which of the following is a multistep method ?

a)        Euler’s method

b)        Predictor-corrector method

c)        Taylor’s series method –

d)        None of these.

x)        The rate of convergence of the Fixed point iteration method for solving / ( x ) = 0 is

c) cubic            d) linear.

xi)      The value of x after execution of the following statements :

int x, y = 12;

x = (y<14)? (y+l):(y-l);

is

/

a)        10               b) 15

c)        12               d) 13.

xii)     Output of the following programme code

{ •

int a = 5, b = 3;       ‘

a = a + b; b = a – b; a = a – b; printf (“a=%d, b=%d”, a, b);

}

is

a)      a = 5, b = 3     b) a = 0, b = 5

c)    a = 3, b = 5     d) none of these.

GROUP-B (Short Answer Type Questions )

Answer any three of the following.

3 x 5 = 15

Find the inverse of the following matrix by Gauss elimination method :

2 1

3         2 1 4

a)        Explain “closing a file” with the help of small programme segment in C.

b)        Write a user defined recursive function to calculate factorial of n, where n is any integer number.       2 + 3

CS/B.Tech (EE-NEW)/SEM-3/CS-312/2010-11 5. From the following table find the polynomial / ( x ) by Newton’s divided difference interpolation formula :

 x : – 1 0 3 6 7 fix): 3 -6 ‘ 39 822 1611

5

A’ ‘ 2 2

1. Using Runge-Kutta method to fourth order solve — = —7 *

dx y+x

with y ( 0 ) = 1 at x = 0-2.

GROUP -C ( Long Answer Type Questions )

Answer any three of the following. 3x 15 = 45

1. a) Find a real root of the equation f(x) = x3 -2x-5 = 0
2. using Regula falsi method corrrect to 3 decimal places.

b)       Prove that n2 =1/4 (S2 +4), where n = mean operator and 5 = central difference operator.          7 + 8

1. a) Find the value of y at x = 6 from the following data,
using Newton’s divided difference formula.                 7

 x : 3 7 ‘ 9 10 y ■ 168 120 72 63

b)        Find the values of y at x = 01 using Taylor’s series method of the third order, given that dy/dx = l/(x + y), y(0) = 2.     5

c)        Write difference between Euler’s method and R.K. method.    3

1. a) Prove that Newton-Raphson method has a quadratic

convergence.

b)        Use Gauss elimination method to solve the following equations :

2x + y + z = 10

3x + 2y + 3z = 18

x + 4y + 9z = 16                      6 + 9

1. a) Evaluate f?x2 log x dx by using Trapezoidal rule taking

J 3

rt = 4.

b) Find the missing term in the following table :

 x : 0 l 2 3 4 y ■ i 3 9 . — 81

Explain why the result differs from 33 = 27.

> • (

c)        Write a program in C to solve the equation

x3+x2+x+7 = 0 within ( – 3, – 2 ) by Bisection method.

.4+4+7

1. a) Derive Simpson’s one-third rule from Newton-Cote’s quadrature formula.

b)        Solve the equation dy/dx^x + y with initial condition y ( 0 ) = 1*0 and h = 0-1, using predictor-corrector method, to find y ( 0-2 ).

/’

c)        Write a program using recursive function to calculate the sum of all digits of any number.          6 + 5 + 4