Code: AE-07            Subject: NUMERICAL ANALYSIS & COMPUTER PROGRAMMING Flowchart: Alternate Process: JUNE 2007

Time: 3 Hours                                                                                                     Max. Marks: 100

                                                                 

 

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 initial value problem  is given. An approximation to  by Taylor series method of second order with h = 0.2, is given by

                                                                                                                                             

       (A)  1.22.                                          (B)  1.2.

(C) 0.98.                                            (D) 1.42. 

 

b.      The integration formula  is exact for .  The values of a, b respectively are

 

(A)    .                                      (B)  .

(C) .                                       (D) .                                                             

            

             c.   In the numerical differentiation formula

                    , the value of a is

                                                                                                                                                                                                                                                                                                                                                                                                       

(A)    3.                                                 (B)  –1.                

(C)  –3.                                               (D)  1.

 

d.    The linear least squares approximation to the following data is

                                                                      

 

(A)    .                                    (B) 

(C)  .                                      (D)  .

 

             e.   The polynomial p(x) of degree 2 satisfying  the data  is                     

 

(A)     .                                     (B)  .       

(C)  .                               (D) . 

            

 

             f.    The first divided difference  is approximately equal to                 

 

(A)     .                                              (B)  .

(C)  .                                             (D)  .

 

             g.   What is the output of the following C program

#include<stdio.h>

                        main()

                        {

                                    int a, b = 1, c = 3 ;

                                    a = 2*b + c;

                                    b = 2*a + b/3;

                                    c /= 2;

                                    a = b + c + a ;

                                    printf ("\n b = % d \ c = % d \ a = % d \ n", b, c, a );

                   }                                                                                      

 

(A)     .                     (B)  .             

(C)  .                   (D)  . 

 

             h.   The body of a  C program is as follows

main()

                        {

                                    int sum = 0, digit;

                                    long number, a;

                                    clrscr();

                                    printf ( "\nEnter positive integer number\n " );

                                    scanf (" %ld", &number );

                                    a = number;

                                    while (a>0)

                                    {

                                                digit = a%10;

                                                a/= 10;

                                                sum+= digit;

                                    }

                        printf ( "\n Result of %ld = %d \n", number, sum );

                        }

                  If the input is 5276, then output is : Result of 5276 = ? . The value of ?   is

                                                    

(A)    16.                                               (B) 20.         

(C) 26.                                                (D) 52.

 

             i.    If the if statement does not have associated else, then what happens if the condition is false.

 

(A)   gives an error message.                

(B)   Control is passed to the beginning of the program.

(C)   Control is passed to the next statement after the if statement.  

(D)  Control is passed to return.

 

             j.    A root of  is being determined by the Regula-Falsi method. It was found that it lies in the interval (1.8385, 2 ). In the next iteration, the root lies in

 

                   (A)  (1.8385, 1.8536).                        (B)  (1.8465, 2).

(C)  (1.8536, 2).                                 (D) (1.8465, 1.8536).

 

 

 

Answer any FIVE Questions out of EIGHT Questions.

Each question carries 16 marks.

  Q.2     a.   A positive root of the equation    lies in the interval (2, 3).        

                   (i)   Starting with this interval, apply bisection method two times.

                   (ii) Taking the mid-point of the last interval obtained in (i) as initial approximation, refine the root using two iterations of Newton-Raphson method.                                                                              (9)       

 

 

             b.   Find the rate of convergence of the secant method for finding a simple root of the equation .                                                                     (7)

  Q.3     a.   Find the inverse of the matrix  using the LU decomposition method.                     (8)

 

 

             b.   The system of equations  has one solution near . Obtain the approximation to the solution using two iterations of Newton’s method.     (8)       

 

 

  Q.4     a.   Perform three iterations of Gauss-Jacobi method for the solution of the system of equations

                  

                   taking the initial approximations as .         (6)

 

 

             b.  Obtain the iteration matrix of the Gauss-Jacobi method for the problem in (a). Hence, find the rate of convergence of the method.                        (10)

 

 

Q.5      a.   Use divided differences to fit a polynomial for the data

                                                                          (6)

 

            b.   If  , then find the values of a and b.                              (3)

 

             c.   Write a C program for finding a simple root of  using Regula-Falsi method. Input the end points of the interval (a, b) in which the root lies, maximum number of iterations allowed (n), and the error tolerance tol. Output the value of the root and number of iterations taken. If number of iterations n is not sufficient, the program should output the same. Assume that                         (7)

 

 

 

  Q.6     a.   Construct the forward difference table for the data

 

                          

                   and hence find the value of f (0.3)                                                                       (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 approximation to the data

                                                                                      (9)

 

  Q.7     a.   Define a differentiation rule as  .  Using Taylor series expansions, show that   and write the expressions for . Using the above formula, compute approximations to  with step lengths h = 0.2 and 0.1 from the following table of values.

                                                                      (9)                                                                                   

             b.   The error in the composite trapezoidal rule for evaluating  is bounded by   Composite trapezoidal rule is being used to compute . Using the above error estimate, find h such that.           (7)

 

  Q.8     a.   Write a C program to evaluate  by Simpson’s rule of integration based on  points. Input the values of the limits a, b and n. Write  as a function program. Output all the data and the computed value.                                                                                            (7)

                                      

               b. Evaluate the integral   using Simpson’s rule with 2, 4 and 8 subintervals.  Hence, obtain a better estimate using Romberg integration (extrapolation).                                                              (9)

 

Q.9   a.  Evaluate the integral  using the Gauss-Legendre two point formula.        (8)          

             b.   Given the initial value problem  estimate y(1.4) with   h = 0.2, using the Heun’s method.                                                                                                             (8)