Visva-Bharati · Department of Mathematics
Paper
B.Sc. Mathematics · Semester VI2020
- 1 Write a Fortran program to calculate the monthly telephone bill at the following rates: \par First 300 calls : no charges \par Calls between 301 and 501: at the rate of 50p per call \par Calls between 501 and 1000: at the rate of 80p per call \par Calls more than 1000: at the rate of Rs. 1.5 per call \par and rental charges of Rs. 75 per month. [5]
- 2 A Fibonnaci sequence is defined as follows: \par $0,1,1,2,3,5,\ldots$ \quad ($T_{n+1}=T_n+T_{n-1},n\ge1$) \par Write a Fortran program to find all numbers of this sequence which are $\le200$. [5]
- 3 Draw a flow chart to find the inner product $x_1y_1+x_2y_2+\ldots+x_ny_n$ of two vectors X and Y, each containing n elements. [5]
- 4 Write a Fortran program to compute $\int_a^b f(x)\,dx=\frac h2[f(a)+2f(a+h)+\ldots+2f(b-h)+f(b)]$ \par $h=(b-a)/n$, $f(x)=\frac{x+\sin x}{x+e^x}$. [5]
- 5 Write a Fortran program to read the values of the n nodal points and the corresponding function values and to calculate the value of the nth degree Lagrange interpolating polynomial for a given value of x which is also to be read. [5]
- 6(a) Write a Fortran program to read values of the sides a,b,c of a triangle and to calculate and print the perimeter and area of the triangle. [3]
- 6(b) Given a series in geometric progression, with first term a and common ratio r. Write a Fortran program to find the sum of the first n terms of this series. [2]
- 7 Write a complete Fortran program to evaluate \par $\cos x=1-\frac{x^2}{2!}+\frac{x^4}{4!}-\ldots$ \par by direct summation of successive terms, neglecting the first term whose absolute value becomes lesser than EPS or adding M terms, which ever is earlier, for $x=0.1$ to 0.5 in steps of 0.05 ($x$ in radians) using DO statement. [5]
- 8 Write a Fortran program to arrange a sequence of $n$ real numbers ($n\le100$) in ascending order. [5]
- 9 Write a Fortran program to find the smallest positive root of an algebraic or transcendental equation using fixed point iteration method. [5]
- 10 Write a Fortran program to find the smallest positive root of an algebraic or transcendental equation using regula falsi method. [5]
- 11 Write a Fortran program to find the function value of y for a given value of x using Newton's forward interpolation formula. [5]
- 12 What will be the final values of the variables in the following sections of program after all the statements have been executed in each case? Also show the steps of evaluation of variables.
- 12(a) \begin{verbatim} INTEGER A,B A = -4 B = -2 \end{verbatim} \begin{verbatim} 50 IF (A-B) 20, 30, 30 20 A = A+5 GO TO 50 30 IF (A.LT.0) A = A+3 B = A + B IF (B .LE. 0) GO TO 50 B = A * B \end{verbatim} [3]
- 12(b) \begin{verbatim} A = 4 K = 1 ASSIGN 50 TO I 50 GO TO (30,30,40,20), K 20 ASSIGN 60 TO I 30 A = A + 2 40 K = K + 1 GO TO I, (50,60) 60 A = A-1 B = A + K. \end{verbatim} [2]