NOTE: There are 9 Questions in all.
· Question 1 is compulsory and carries 20 marks. Answer to Q. 1. must be written in the space provided for it in the answer book supplied and nowhere else.
· Out of the remaining EIGHT Questions answer any FIVE Questions. Each question carries 16 marks.
· Any required data not explicitly given, may be suitably assumed and stated.
Q.1 Choose the correct or best alternative in the following: (2x10)
a.
The
positive root of the equation lies in the interval
(A) (0, 1). (B) (1, 2).
(C) (2, 3). (D) (3, 4).
b.
Newton-Raphson method, when applied to find a
root of the equation , has given the formula
. If the
iteration converges, then the quantity that is being determined is
(A)
. (B)
.
(C) . (D)
.
c. The bound for error in linear interpolation is given by . The value of A is
(A)
. (B)
.
(C) . (D)
.
d. The following data is given An
approximate value of using forward differences is given
by
(A) 1.6836. (B) 1.3832.
(C) 1.7836. (D) 1.3772.
e. The value of the integral evaluated by the
trapezoidal rule with h = 1, is obtained as
(A) 0.1868. (B) 0.0868.
(C) 0.1736. (D) 0.0846.
f. For the initial value problem , an approximation to y(0.1) by Taylor series method of second order with h = 0.1, is
(A) 2.52. (B) 2.73.
(C) 2.93. (D) 3.03.
g. What will be the output of the following program?
main( ) {
static int a[5] = { 1,2,3,4,5 };
int *b,i ;
b = a;
for ( i = 0; i<5; i ++ ) {
printf(“%d”,*b);
b++ ; }
}
(A) Undefined Output. (B) 1 2 3 4 5.
(C) Error. (D) 5 4 3 2 1.
h. What will be the output of the following program?
void main( ) {
int arr[ ] = {10, 11, 12, 13, 14};
int i, *p;
for (p=arr, i=0; p+i<=arr+4; p++, i++)
printf(“%d”, *(p+i)); }
(A) 10 11 12 13 14 (B) 10 11 12
(C) 11 13 (D) 10 12 14
i. What will be the output of the following programme?
enum month { Illegal month, Jan, Feb, March, April, May, June, July, Aug, Sep, Oct, Nov, Dec, };
main ( ) {
enum month mname;
mname = Nov;
printf(“%s\n”, mname);
}
(A) Nov. (B) Undefined Output.
(C) 11. (D) Error.
j. What will be the output of the following programme segment?
int m, n=10;
m = n++ * n++;
printf(“%d %d %d %d %d”, m, n, m++, m--, --m);
(A) 100, 12, 100, 101, 99 (B) 100, 12, 100, 111, 109
(C) 110, 12, 110, 111, 109 (D) 110, 11, 100, 101, 99
Answer any FIVE Questions out of EIGHT Questions.
Each question carries 16 marks.
Q.2 a. A root of the equation is to be
determined. Obtain an interval of unit length, in which the root lies. Find
this root correct to 4 decimals using the Secant method. (work with 6 places of
decimals). (8)
b. Write a C program to
find a simple root of by the Secant method. Input (i) a,
b (two initial approximations), (ii) n (maximum number of
iterations) and (iii) error tolerance “tol”. Output (i) approximate
root, (ii) number of iterations taken. If the inputted value of n is not
sufficient, the program should write “Iterations are not sufficient”. Write the
subprogram for
as
. (8)
Q.3 a.
The system of
equations has
a solution near x =1.3, y = 1.6. Perform two iterations to
improve the solution, using the Newton’s method. (9)
b. Find the Cholesky factorization of the matrix.
(7)
Q.4 a. Using Gauss elimination, determine whether the following system of equations has a solution. If it has, then find all the solutions. (8)
b. Solve the following system of equations using the Gauss-Seidel method
Assume the initial solution
vector as and
obtain the result correct to 2 decimal places. (8)
Q.5 a. For the function , a table of
equispaced data values is to be constructed. If quadratic interpolation is
proposed to be used, find the step length h such that
. (7)
b. If , then find the values of a
and b. (3)
c. Write a C program for estimating the value of a function f(x) using Lagrange interpolation with 10 data values. Input the value of x as xin and output the value of y as yout. (6)
Q.6 a. Construct the forward difference table for the data
Hence, approximate f(0.3) using forward differences. (7)
b. A given data is to be approximated by the quadratic polynomial. Derive the
normal equations using the least squares approximation. Hence, find the least
squares approximation to the data
(3+6)
Q.7 a. The
following data for the function is given.
Find
and
using quadratic
interpolation. Compare with the exact solution. Obtain the bound on the
truncation error. (9)
b. Find the approximate value of
I=
using trapezoidal rule. Obtain a bound for the errors. (7)
Q.8 a. Write a C program to evaluate by Simpson’s
rule of integration based on 2n+1 points. Input the values of the limits a,
b and n. Write
as a function program. Output all
the data and the computed value. (8)
b. Evaluate the integral using
Composite Simpson’s rule with 2, 4 and 8 equal subintervals. (8)
Q.9 a. Find the value of the integral
using Gauss-Lagendre two and three point integration rules. (8)
b. Given the initial value Problem
with h=0.2 on the interval [0, 0.4] use the fourth order classical Runge-Kutta Method to calculate y(0.4). (8)