The Gateway to Computer Science Excellence
+7 votes
1.7k views

The secant method is used to find the root of an equation $f(x)=0$. It is started from two distinct estimates $x_a$ and $x_b$ for the root. It is an iterative procedure involving linear interpolation to a root. The iteration stops if $f(x_b)$ is very small and then $x_b$ 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?

$\textbf{Secant}$

Initialize $x_a, x_b, \varepsilon, N$ // $\varepsilon$ = convergence integer
// N = maximum no. iterations
$f_b=f(x_b)$
i=0
while ( i < N and $|f_b| > \varepsilon)$ 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| > \varepsilon$ then // loop is terminated with i=N
     write "Non-convergence"
else
     write "return $x_b$"
end if

  1. $x_b - (f_b-f(x_a)) f_b / (x_b-x_a)$
  2. $x_a - (f_a-f(x_a)) f_a / (x_b-x_a)$
  3. $x_b - (x_b-x_a) f_b / (f_b-f(x_a)) $
  4. $x_a - (x_b-x_a) f_a / (f_b-f(x_a)) $
in Numerical Methods by
edited by | 1.7k views

2 Answers

+5 votes

C. 

Also, $x_b - (x_b-x_a) f_b / (f_b-f(x_a)) $ = $(x_a f_b - x_b f(x_a)) / (f_b-f(x_a)) $

Ref: https://www.math.ohiou.edu/courses/math3600/lecture6.pdf

by
0
arjun sir, the following code seem to produce same output with both c and d option. Can you please check.

http://www.dailyfreecode.com/code/secant-method-2388.aspx
0

Choice D will be equivalent to C if we assume fa = f(xa). But if we see the code, this is not explicitly said while for fb, it is explicitly said. 

0
Is this in syllabus now ?
0
No. It has been removed in 2016 as far as I know.
0
So can there be a possibilty that this method will be asked in 2020 gate ?
+1
If it comes in GATE 2020, then everyone, let's make a pact that we will leave it. xD
+2 votes

I think it can either c or d according to the algorithm 

by
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,345 questions
60,487 answers
201,817 comments
95,291 users