# 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
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 2 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 3
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 3 Explanation:
Because integral is a polynomial of 3rd degree so Simpson's rule will give error free answer.
 Question 4
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 5
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 5 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 6
Consider the equation $\frac{\mathrm{d} u}{\mathrm{d} t}=3t^{2}+1$ with u=0 at t=0. This is numerically solved by using the forward Euler method with a step size $\Delta t= 2$. The absolute error in the solution at the end of the first time step is_________
 A 0.25 B 6 C 4 D 8
GATE CE 2017 SET-1   Engineering Mathematics
Question 6 Explanation:
\begin{aligned} \frac{\mathrm{d} u}{\mathrm{d} t}&=3t^{2}+1 \\ f\left ( u,\: t \right )&=3t^{2}+1 \\ u_{0}&=0 \\ t_{0}&=0 \\ \Delta t&=2\\ &\text{By Euler's method} \\ u_{1}&=u_{0}+hf\left ( u_{0}t_{0} \right ) & t_{1}&=t_{0}+h \\ &=u_{0}+h\left ( 3t^{2}_{0}+1 \right ) & &=0+2 \\ &=0+2\left ( 3\left ( 0 \right )^{2}+1 \right ) & &=2 \\ &=2 \end{aligned}
After first iteration u=0 when t=2,
\begin{aligned} \frac{\mathrm{d} u}{\mathrm{d} t}&=3t^{2}+1 \\ du&=\left ( 3t^{2}+1 \right )dt \\ \int du&=\int_{0}^{2}\left ( 3t^{2}+1 \right )dt \\ u&=\left.\begin{matrix} \left ( 3\frac{t^{3}}{3}+t \right ) \end{matrix}\right|_{0}^{2} \\ &=8+2=10 \end{aligned}
Absolute error = Exact value - approx value
$=10-2 =8$
 Question 7
Newton-Raphson method is to be used to find root of equation $3x-e^{x}+\sin x=0$. If the initial trial value for the root is taken as 0.333, the next approximation for the root would be _________
 A 0.33 B 0.54 C 0.36 D 0.76
GATE CE 2016 SET-1   Engineering Mathematics
Question 7 Explanation:
According to Newton-Raphson Method:
\begin{aligned} x_{N+1}&=X_{N}-\frac{f\left ( X_{N} \right )}{{F}'\left ( X_{N} \right )} \\ f\left ( x \right )&=3x-e^{x}+\sin x \\ {f}'\left ( x \right )&=3-e^{x}+\cos x \\ \Rightarrow \;\; X_{1}&=X_{0}-\frac{f\left ( 0.333 \right )}{{f}'\left ( 0.333 \right )} \\ &=0.333-\frac{3\times 0.333-e^{0.333}+\sin 0.333}{3-e^{0.333}+\cos 0.333} \\ \therefore \;\; X_{1}&=0.36 \end{aligned}
 Question 8
For step-size, $\Delta x=0.4$, the value of following integral using Simpson's 1/3 rule is _________.
$\int_{0}^{0.8}(0.2+25x-200x^{2}+675x^{3}-900x^{4}+400x^{5})dx$
 A 0.64 B 0.86 C 1.36 D 1.64
GATE CE 2015 SET-2   Engineering Mathematics
Question 8 Explanation:
$a=0, b=0.8, \Delta x=0.4$
$f\left ( x \right )=0.2+25x-200x^{2}+675x^{3}-900x^{4}+400x^{5}$

By Simpson's 1/3 Rule,
\begin{aligned} y\left ( x \right )&=\int_{0}^{0.8}\left ( 0.2+25x-200x^{2}+675x^{3}-900x^{4}+400x^{5} \right )dx \\ &=\frac{4}{3}\left [ y_{0}+4y_{1}+y_{2} \right ] \\ y_{0}&=y\left ( 0 \right )=0.2 \\ y_{1}&=y\left ( 0.4 \right )=2.456 \\ y_{2}&=y\left ( 0.8 \right )=0.232 \\ y\left ( n \right )&=\frac{0.4}{3}\left ( 0.2+4\times 2.456+0.232 \right ) \\ &=1.367 \end{aligned}
 Question 9
In Newton-Raphson iterative method, the initial guess value ( $x_{ini}$) is considered as zero while finding the roots of the euation:$f(x)=-2+6x-4x^{2}+0.5x^{3}$. The correction, $\Delta x$, to be added to $x_{ini}$ in the first iteration is____________.
 A 0.5 B 0.33 C 0.8 D 0.2
GATE CE 2015 SET-2   Engineering Mathematics
Question 9 Explanation:
\begin{aligned} f\left ( x \right )&=-2+6x-4x^{2}+0.5x^{3} \\ {f}'\left ( x \right )&=6-8x+1.5x^{2} \\ x_{ini}&=0\\ \text{By Newton }&\text{Raphson Method,}\\ x_{1}&=x_{ini}-\frac{f\left ( x_{ini} \right )}{{f}'\left ( x_{ini} \right )} \\ &= 0-\frac{-2}{6} \\ \Rightarrow \;\;x_{1}&=\frac{1}{3} \\ \therefore \;\; \Delta x&=x_{1}-x_{ini}=\frac{1}{3} \end{aligned}
 Question 10
The quadratic equation $x^{2}-4x+4=0$ is to be solved numerically, starting with the initial guess $x_0=3$. The Newton-Raphson method is applied once to get a new estimate and then the Secant method is applied once using the initial guess and this new estimate. The estimated value of the root after the application of the Secant method is __________.
 A 2.12 B 2.33 C 2.66 D 5.22
GATE CE 2015 SET-1   Engineering Mathematics
Question 10 Explanation:
\begin{aligned} f\left ( x \right )&=x^{2}-4x+4 \\ {f}'\left ( x \right )&=2x-4 \\ x_{0}&=3 \\ f\left ( 3 \right )&=1, {f}'\left ( 3 \right )=2 \\ \text{By Newton } & \text{Rapshon method,}\\ x_{1}&=x_{0}-\frac{f\left ( x_{0} \right )}{{f}'_{x_{0}}} \\ &=3-\frac{1}{2}=\frac{5}{2} \\ f\left ( \frac{5}{2} \right )&=\frac{25}{4}-10+4=\frac{1}{4} \\ & \text{By Secant method,}\\ x_{2}&=x_{1}-\frac{\left ( x_{1}-x_{0} \right )f\left ( x_{1} \right )}{f\left ( x_{1} \right )-f\left ( x_{0} \right )} \\ &=\frac{f_{1}x_{0}-f_{0}x_{1}}{f_{1}-f_{0}} \\ &=\frac{\left ( \frac{1}{4}\times 3 \right )-\left ( 1\times \frac{5}{2} \right )}{\frac{1}{4}-1} \\ &=\frac{7}{3}=2.33 \end{aligned}
There are 10 questions to complete.