# Numerical Methods

 Question 1
Numerically integrate, $f(x)=10 x-20 x^{2}$ from lower limit a=0 to upper limit b=0.5. Use Trapezoidal rule with five equal subdivisions. The value (in units,round off to two decimal places) obtained is ____________
 A 0.78 B 0.65 C 0.4 D 0.56
GATE CE 2021 SET-2   Engineering Mathematics
Question 1 Explanation:
\begin{aligned} y&=10 x-20 x^{2} \\ a&=0, b=0.5, n=5 \\ \text { So, } \qquad \qquad \qquad h&=\frac{b-a}{n}=0.1 \end{aligned}
And

\begin{aligned} I &=\int_{0}^{0.5} f(x) d x=\frac{h}{2}\left[y_{0}+y_{5}+2\left(y_{1}+y_{2}+y_{3}+y_{4}\right)\right] \\ &=\frac{0.1}{2}[0+0+2(0.8+1.2+1.2+0.8)] \\ &=0.40 \end{aligned}
 Question 2
Value of $\int_{4}^{5.2}\ln x \; dx$ using Simpson's one-third rule with interval size 0.3 is
 A 1.83 B 1.6 C 1.51 D 1.06
GATE ME 2021 SET-2   Engineering Mathematics
Question 2 Explanation:
\begin{aligned} \text { Here } \qquad f(x)&=\log x\\ a=4, \quad b=5.2, h=0.3\\ \text { So, } \qquad n&=\frac{b-a}{h}=\frac{5.2-4}{0.3}=4\\ \end{aligned}
$\begin{array}{cccccc} \hline x & 4 & 4.3 & 4.6 & 4.9 & 5.2 \\ \hline y & \log 4 & \log 4.3 & \log 4.6 & \log 4.9 & \log 5.2 \\ \hline & y_{0} & y_{1} & y_{2} & y_{3} & y_{4} \end{array}$
As per Simpson's $1 / 3^{\text {rd }}$ rule
\begin{aligned} \int_{4}^{5.2} \log x d x &=\frac{h}{3}\left[y_{0}+y_{4}+4\left(y_{1}+y_{3}\right)+2\left(y_{2}\right)\right] \\ &=1.8272 \simeq 1.83 \end{aligned}
 Question 3
The value of $\int_{0}^{1} e^{x} d x$ using the trapezoidal rule with four equal subintervals is
 A 1.718 B 1.727 C 2.192 D 2.718
GATE CE 2021 SET-1   Engineering Mathematics
Question 3 Explanation:
Let $\int_{a}^{b}f(x)dx=\int_{0}^{1}e^x \; dx \text{ and }n=4$
Then $a=0,b=1,f(x)=e^x \text{ and }h=\frac{b-a}{n}=\frac{1-0}{4}=0.25$
$\begin{array}{|c|c|c|c|c|c|} \hline x&0&0.25&0.50&0.75&1\\ \hline y=f(x=e^x)&1&1.284&1.649&2.117&2.718\\ \hline \end{array}$
The formula of trapezoidal rule to the given data is given by
$\int_{a}^{b}f(x)dx\simeq \int_{a}^{b}p(x)dx=\frac{h}{2}\left \{ (y_0+y_n)+2(y_1+y_2+y_3) \right \}$
$\int_{0}^{1}e^x \; dx\simeq \int_{0}^{1}p(x)dx=\frac{0.25}{2}\left \{ (1+2.718)+2(1.284+1.640+2.117) \right \}$
$\int_{0}^{1}e^x \; dx\simeq \int_{0}^{1}p(x)dx=\frac{0.25}{2}\left \{ (3.718)+2(5.03) \right \}=1.727$
 Question 4
For the integral $\int_{0}^{\pi/2}(8+4 \cos x)dx$, the absolute percentage error in numerical evaluation with the Trapezoidal rule, using only the end points, is ________. (round off to one decimal place).
 A 15.7 B 85.9 C 0.859 D 5.2
GATE ME 2020 SET-2   Engineering Mathematics
Question 4 Explanation:
True value
\begin{aligned} \int_{0}^{\pi / 2}(8+4 \cos x) d x &=[8 x+(4 \sin x)]_{0}^{\pi / 2} \\ &=4 \pi+4=16.566 \end{aligned}
By trapezoidal rule, (single step)

\begin{aligned} h&=\frac{\pi}{2} \\ \text{Approx.} \qquad I&=\frac{\pi}{4}[12+8]=5 \pi=15.707 \end{aligned}
Absolute error = |True value - Approximate value|
\begin{aligned} &=|16.566-15.707|=0.859 \\ \text { Absolute percentage error } &=\frac{0.859}{16.566} \times 100=5.18 \% \approx 5.2 \% \end{aligned}
 Question 5
The integral
$\int_{0}^{1}(5x^3+4x^2+3x+2)dx$

is estimated numerically using three alternative methods namely the rectangular, trapezoidal and Simpson's rules with a common step size. In this context, which one of the following statement is TRUE?
 A Simpsons rule as well as rectangular rule of estimation will give NON-zero error. B Simpson's rule, rectangular rule as well as trapezoidal rule of estimation will give NON-zero error. C Only the rectangular rule of estimation will given zero error. D Only Simpson's rule of estimation will give zero error.
GATE CE 2020 SET-2   Engineering Mathematics
Question 5 Explanation:
Because integral is a polynomial of 3rd degree so Simpson's rule will give error free answer.
 Question 6
The evaluation of the definite integral $\int_{-1}^{1.4}x|x|dx$ by using Simpson's $1/3^{rd}$ (one-third) rule with step size h = 0.6 yields
 A 0.914 B 1.248 C 0.581 D 0.592
GATE ME 2020 SET-1   Engineering Mathematics
Question 6 Explanation:
$\int_{-1}^{1.4} x|x| d x \text { step size } h=0.6$

Simpson's $1 / 3^{\text {rd }}$ rule
\begin{aligned} \int_{-1}^{1.4} x|x| d x &=\frac{0.6}{3}[(-1+1.96)+4(-0.16+0.64)+2(0.04)] \\ &=0.2[0.96+1.92+0.08]=0.592 \end{aligned}
 Question 7
The value of the function f(x) is given at n distinct values of x and its value is to be interpolated at the point $x^*$, using all the n points. The estimate is obtained first by the Lagrange polynomial, denoted by $I_L$, and then by the Newton polynomial, denoted by $I_N$. Which one of the following statements is correct?
 A $I_L$ is always greater than $I_N$ B $I_L \; and \; I_N$ are always equal C $I_L$ is always less than $I_N$ D No definite relation exists between $I_L \; and \; I_N$
GATE CE 2019 SET-2   Engineering Mathematics
 Question 8
Evaluation of $\int_{2}^{4}x^3 dx$ using a 2-equal-segment trapezoidal rule gives a value of______
 A 32 B 88 C 63 D 42
GATE ME 2019 SET-1   Engineering Mathematics
Question 8 Explanation:
\begin{aligned} &\text { Let } y=f(x)=x^{3}\\ &\begin{array}{|c|c|c|c|} \hline \mathrm{x} & 2 & 3 & 4 \\ \hline \mathrm{y} & 8 & 27 & 64 \\ \hline \end{array} \end{aligned}
Given $n=2 \Rightarrow h=\frac{4-2}{2}=1$
By trapezoidal rule, we have
$\int_{2}^{4} x^{3} d x=\frac{h}{2}\left\{\left(y_{0}+y_{n}\right)+2\left(y_{1}+y_{2}+\ldots .+y_{n-1}\right)\right\}=\frac{1}{2}\{(8+64)+2(27)\}=63$
 Question 9
The quadratic equation $2x^{2}-3x+3=0$ is to be solved numerically starting with an initial guess as $x_{0}=2$ . The new estimate of x after the first iteration using Newton-Raphson method is ______
 A 0 B 1 C 2 D 3
GATE CE 2018 SET-2   Engineering Mathematics
Question 9 Explanation:
Given \begin{aligned} f\left ( x \right )&=2x^{2}-3x+3, x_{0}&=2 \\ {f}'\left ( x \right )&=4x-3 \end{aligned}
By Newton-Rapshon
\begin{aligned} x_{1}&=x_{0}-\frac{f\left ( x_{0} \right )}{{f}'\left ( x_{0} \right )} \\ &=2-\frac{2\left ( 2 \right )^{2}-3\left ( 2 \right )+3}{4\left ( 2 \right )-3} \\ &=2-\frac{5}{5}=1 \end{aligned}
 Question 10
An explicit forward Euler method is used to numerically integrate the differential equation
$\frac{\mathrm{d} y}{\mathrm{d} x}=y$
using a time step of 0.1. With the initial condition y(0) = 1, the value of y(1) computed by this method is ___________ (correct to two decimal places).
 A 2.59 B 1.54 C 2.24 D 3.67
GATE ME 2018 SET-1   Engineering Mathematics
Question 10 Explanation:
\begin{aligned} y_{1} &=y_{0}+h_{A}\left(t_{0}, y_{0}\right) \\ &=y_{0}+h y_{0} \\ &=1+0.1(1) \\ y_{1} &=1.1 \\ y_{2} &=y_{1}+h_{f}\left(t_{1}, y_{1}\right) \\ &=y_{1}+h . y_{1} \\ &=1.1+0.1(1.1) \\ y_{2} &=1.21 \\ y_{3} &=y_{2}+h f\left(t_{2,} y_{2}\right) \\ &=y_{2}+h . y_{2} \\ &=1.21+0.1 \times 1.21 \\ y_{3} &=1.331 \\ y_{4} &=y_{3}+h . f\left(t_{3}, y_{3}\right) \\ &=y_{3}+h . y_{3} \\ &=1.331+0.1 \times 1.331 \\ y_{4} &=1.4641 \\ y_{5} &=y_{4}+h . f\left(t_{4}, y_{4}\right) \\ &=y_{4}+h . y_{4} \\ &=1.4641+0.1 \times(1.4641) \\ &=1.61051 \\ y_{6} &=y_{5}+h . f\left(t_{5}, y_{5}\right) \\ &=y_{5}+h . y_{5} \\ &=1.61051+0.1 \times 1.61051 \end{aligned}
\begin{aligned} y_{6} &=1.771561 \\ y_{7} &=y_{6}+h . f\left(t_{6}, y_{6}\right) \\ &=y_{6}+h \times y_{6} \\ &=1.771561+0.1 \times 1.771561=1.9487 \\ y_{8} &=y_{7}+h . f\left(t_{7}, y_{7}\right) \\ &=y_{7}+h . y_{7} \\ &=1.9487+0.1 \times(1.9487) \\ y_{8} &=2.14357 \\ y_{9} &=y_{8}+h . f\left(t_{8}, y_{8}\right) \\ &=y_{8}+h . y_{8}=2.14357+0.1 \times 2.14357 \\ y_{9} &=2.3579 \\ y_{10} &=y_{9}+h . f\left(t_{9}, y_{9}\right)=y_{9}+h . y_{9} \\ &=2.3579+0.1 \times(2.3579) \\ y_{10} &=2.5937 \end{aligned}
There are 10 questions to complete.

Go the Full Course for Engineering Mathematics