# Numerical Methods

 Question 1
Consider p(s) = $s^{3}+a_{2}s^{2}+a_{1}s+a_{0}$ with all real coefficients. It is known that its derivative ${p}'(s)$ has no real roots. The number of real roots of ${p}(s)$ is
 A 0 B 1 C 2 D 3
GATE EC 2018   Engineering Mathematics
Question 1 Explanation:
If p(s) has "r" real roots, then $p^{\prime}(s)$ will have atleast $"r-1^{\prime \prime}$ real roots.
 Question 2
Starting with x = 1, the solution of the equation $x^{3}+x=1$, after two iterations of Newton-Raphson's method (up to two decimal places) is _________.
 A 0.68 B 0.84 C 0.96 D 1
GATE EC 2017-SET-1   Engineering Mathematics
Question 2 Explanation:
\begin{aligned} f(x)&=x^{3}+x-1 \\ f(1)&=1 \\ f^{\prime}(x)&=3 x^{2}+1 \\ f(1)&=4 \end{aligned}
By Newton-Raphson method.
\begin{aligned} x_{i+1}&=x_{i}-\frac{f\left(x_{i}\right)}{f^{\prime}\left(x_{i}\right)}\\ \text{For }x_{0}&=1, \quad x_{1}=x_{0}-\frac{f\left(x_{0}\right)}{f^{\prime}\left(x_{0}\right)}=1-\frac{1}{4}=0.75 \\ \text{For }x_{1}&=0.75 \\ x_{2} &=x_{1}-\frac{f\left(x_{1}\right)}{f^{\prime}\left(x_{1}\right)}=0.75-\frac{f(0.75)}{f^{\prime}(0.75)} \\ &=0.75-\frac{0.171875}{2.6875}=0.686 \end{aligned}
 Question 3
Consider the first order initial value problem

$y'=y+2x-x^{2},y(0)=1,(0\leq x\leq \infty )$

with exact solution $y(x)=x^{2}+e^{x}$. For x = 0.1, the percentage difference between the exact solution and the solution obtained using a single iteration of the second-order Runge-Kutta method with step-size h = 0.1 is __________
 A 0.06 B 0.012 C 0.6 D 0.12
GATE EC 2016-SET-3   Engineering Mathematics
Question 3 Explanation:
\begin{aligned} \frac{d y}{d x} &=y+2 x-x^{2} \\ y(0) &=1 \quad \quad 0 \leq x \leq \infty \\ f(x, y) &=y+2 x-x^{2} \\ x_{0}=0 ; y_{0}=1 ; h &=0.1 \\ k_{1} &=h f\left(x_{0}, y_{0}\right) \\ &=0.1\left(1+2 \times 0-0^{2}\right)=0.1 \\ k_{3} &=h /\left(x_{0}+h_{1} y_{0}+k_{1}\right) \\ &=0.1\left(\left(y_{0}+k_{1}\right)+2\left(x_{0}+h\right)-\left(x_{0}+h\right)^{2}\right) \\ &\left.=0.1(11+0.1)+2(0.1)-(0.1)^{2}\right) \\ &=0.129\\ y_{1} &=y_{0}+\frac{1}{2}\left(k_{1}+k_{2}\right) \\ &=1+\frac{1}{2}(0.1+0.129) \\ &=1.1145 \\ \text { Exact solution } y(x) &=x^{2}+e^{x} \\ &=(0.1)^{2}+e^{0.1} \\ &=1.1152 \\ \text { Error } &=1.1152-1.1145=0.00069 \\ \% \text { error } &=0.06 \% \end{aligned}
 Question 4
The ordinary differential equation
$\frac{dx}{dt}=-3x+2, \; with \; x(0)=1$
is to be solved using the forward Euler method. The largest time step that can be used to solve the equation without making the numerical solution unstable is ________
 A 0.6 B 1.2 C 1.8 D 2.4
GATE EC 2016-SET-2   Engineering Mathematics
Question 4 Explanation:
$\frac{d y}{d x}=-3 y+2, \quad y(0)=1$
If $|1-3 h| \lt 1,$ then solution of differential equation is stable.
$\begin{array}{c} -1 \lt 1-3 h \lt 1 \\ -2 \lt -3 h \lt 0 \\ 0 \lt h \lt \frac{2}{3} \\ h_{\max }=\frac{2}{3}=0.66 \end{array}$
 Question 5
The Newton-Raphson method is used to solve the equation $f (x) = x^{3}- 5x^{2} + 6x- 8 = 0$. Taking the initial guess as x = 5, the solution obtained at the end of the first iteration is __________.
 A 2.05 B 2.5 C 4.29 D 5.25
GATE EC 2015-SET-3   Engineering Mathematics
Question 5 Explanation:
\begin{aligned} f(x) &=x^{3}-5 x^{2}+6 x-8 \\ x_{0} &=5 \\ f^{\prime}(x) &=3 x^{2}-10 x+6 \\ x_{1} &=x_{0}-\frac{f\left(x_{0}\right)}{f^{\prime}\left(x_{0}\right)} \\ &=5-\frac{f(5)}{f^{\prime}(5)} \\ &=5-\frac{5^{3}-5 \times 5^{2}+6 \times 5-8}{3 \times 5^{2}-10 \times 5+6} \\ &=5-\frac{22}{31}=5-0.7097 \\ &=4.2903 \end{aligned}
 Question 6
Match the application to appropriate numerical method.
 A P1-M3, P2-M2, P3-M4, P4-M1 B P1-M3, P2-M1, P3-M4, P4-M2 C P1-M4, P2-M1, P3-M3, P4-M2 D P1-M2, P2-M1, P3-M3, P4-M4
GATE EC 2014-SET-3   Engineering Mathematics
 Question 7
A polynomial $f\left ( x \right )=a_{4}x^{4}+a_{3}x^{3}+a_{2}x^{2}+a_{1}x-a_{0}$ with all coefficients positive has
 A no real roots B no negative real root C odd number of real roots D at least one positive and one negative real root
GATE EC 2013   Engineering Mathematics
Question 7 Explanation:
Using R-H criterion
$\begin{array}{c|ccc} x^{4} & a_{4} & a_{2} & -a_{0} \\ x^{3} & a_{3} & a_{1} & \\ x^{2} & A & & \\ x^{1} & a_{1} & & \\ x^{0} & -a_{0} & & \end{array}$
$Where, A=\frac{a_{3} a_{2}-a_{1} a_{4}}{a_{3}}$
 Question 8
The maximum value of $\theta$ until which the approximation $\sin \theta \approx \theta$ holds to within 10% error is
 A $10^{\circ}$ B $18^{\circ}$ C $50^{\circ}$ D $90^{\circ}$
GATE EC 2013   Engineering Mathematics
Question 8 Explanation:
$10^{\circ}=\frac{10 \pi}{180}=0.1745$
$\sin 10^{\circ}=0.1736$
So, for $10^{\circ} \rightarrow \sin \cong \theta$ holds within 10 % error
\begin{aligned} 18^{\circ} &=\frac{18 \times \pi}{180}=0.3142 \\ \sin 18^{\circ} &=0.3090 \end{aligned}
So, for $18^{\circ} \rightarrow \sin \theta \equiv \theta$ holds within 10% error
$50^{\circ}=\frac{50 \times \pi}{180}=0.8727$
$\sin 50^{\circ}=0.766$
So, for $50^{\circ} \rightarrow \sin \theta \cong \theta$ does not hold within 10 % error
$90^{\circ}=\frac{90 \times \pi}{180}=1.571$
$\sin 90^{\circ}=1$
So, for $90^{\circ} \rightarrow \sin \theta \cong \theta$ does not hold within 10 % error.
So, the maximum value of \theta for the approximation
$\sin \theta \cong \theta \text{ holds to within } 10 \% \text{ error is } 18^{\circ}$
 Question 9
A numerical solution of the equation $f(x)=x + \sqrt{x}-3= 0$ can be obtained using Newton- Raphson method. If the starting value is $x = 2$ for the iteration, the value of $x$ that is to be used in the next step is
 A 0.306 B 0.739 C 1.694 D 2.306
GATE EC 2011   Engineering Mathematics
Question 9 Explanation:
\begin{aligned} x_{n+1} &=x_{n}-\frac{f\left(x_{n}\right)}{f^{\prime}\left(x_{n}\right)} \\ x=2,\quad f\left(x_{0}\right)&=2+\sqrt{2}-3=\sqrt{2}-1 \\ f(x)&=1+\frac{1}{2 \sqrt{x}} \\ \text { Then, } \quad x_{1}&=x_{0}-\frac{f\left(x_{0}\right)}{f^{\prime}\left(x_{0}\right)} \\ &=2-\frac{\sqrt{2}-1}{1+\frac{1}{2 \sqrt{2}}} \\ \Rightarrow \quad x_{1}&=1.694 \end{aligned}
 Question 10
Consider differential equation $\frac{dy(x)}{dx}-y(x)=x$, with the initial condition y(0)=0. Using Euler's first order method with a step size of 0.1, the value of y(0.3) is
 A 0.01 B 0.031 C 0.0631 D 0.1
GATE EC 2010   Engineering Mathematics
Question 10 Explanation:
Given that $\frac{d y}{d x}=x+y$
$\begin{array}{|c|c|c|c|} \hline x & y & \frac{d y}{d x} & y^{\prime}=y+\left(\frac{d y}{d x}\right) \times h \\ \hline 0 & 0 & 0 & 0 \\ 0.1 & 0 & 0.1 & 0.01 \\ 0.2 & 0.01 & 0.21 & 0.031 \\ 0.3 & 0.031 & & \\ \hline \end{array}$
From here $y(0.3) = 0.031$
There are 10 questions to complete.