Question
The secant method is used to find the root of an equation . It is started from two distinct estimates and for the root. It is an iterative procedure involving linear interpolation to a root. The iteration stops if is very small and then is the solution. The procedure is given below. Observe that there is an expression which is missing and is marked by ?. Which is the suitable expression that is to be put in place of ? so that it follows all steps of the secant method?
Secant
Initialize: x_a, x_b, eps, N // eps = convergence indicator
// N = maximum no. of iterations
f_b = f(x_b)
i = 0
while (i < N and |f_b| > eps) do
i = i + 1 // update counter
x_t = ? // missing expression for intermediate value
x_a = x_b // reset x_a
x_b = x_t // reset x_b
f_b = f(x_b) // function value at new x_b
end while
if |f_b| > eps then // loop is terminated with i=N
write "Non-convergence"
else
write "return x_b"
end ifOfficial answer and solution
- Official answer
- C
- From
- Official GATE 2015 answer key
Solution
Recall the geometric derivation of the secant method linear interpolation formula.
The secant method approximates the tangent of Newton's method with the secant line passing through two points and where .
The equation of the secant line is:
Setting to find the x-intercept :
This matches option C.
C
Inverting the slope fraction in option A.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2015 Computer Science and Information Technology (CS) Session 2
- Question
- 49 of 65, printed as CS Q.39
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.