Question

The bisection method is applied to compute a zero of the function f(x)=x4−x3−x2−4f(x) = x^4 - x^3 - x^2 - 4 in the interval [1,9][1, 9]. The method converges to a solution after ----- iterations.

Choose one option
Official answer and solution
Official answer
B
From
Official GATE 2012 answer key

Solution

Trace the iterations of the bisection method on interval [1, 9] for f(x) = x^4 - x^3 - x^2 - 4.

  1. Given function f(x)=x4−x3−x2−4f(x) = x^4 - x^3 - x^2 - 4 on [a1,b1]=[1,9][a_1, b_1] = [1, 9]:
  • f(1)=1−1−1−4=−5<0f(1) = 1 - 1 - 1 - 4 = -5 < 0
  • f(9)=94−93−92−4=6561−729−81−4=5747>0f(9) = 9^4 - 9^3 - 9^2 - 4 = 6561 - 729 - 81 - 4 = 5747 > 0
  1. Iteration 1:
  • Midpoint m1=(1+9)/2=5m_1 = (1 + 9) / 2 = 5.
  • f(5)=54−53−52−4=625−125−25−4=471>0f(5) = 5^4 - 5^3 - 5^2 - 4 = 625 - 125 - 25 - 4 = 471 > 0.
  • Since f(1)<0f(1) < 0 and f(5)>0f(5) > 0, root lies in [1,5][1, 5].
  1. Iteration 2:
  • Midpoint m2=(1+5)/2=3m_2 = (1 + 5) / 2 = 3.
  • f(3)=34−33−32−4=81−27−9−4=41>0f(3) = 3^4 - 3^3 - 3^2 - 4 = 81 - 27 - 9 - 4 = 41 > 0.
  • Since f(1)<0f(1) < 0 and f(3)>0f(3) > 0, root lies in [1,3][1, 3].
  1. Iteration 3:
  • Midpoint m3=(1+3)/2=2m_3 = (1 + 3) / 2 = 2.
  • Evaluate f(2)f(2):
f(2)=24−23−22−4=16−8−4−4=0f(2) = 2^4 - 2^3 - 2^2 - 4 = 16 - 8 - 4 - 4 = 0
  1. Since f(2)=0f(2) = 0 exactly, the algorithm has converged to the exact root at the 3rd iteration.
Final answer

B

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2012 Computer Science and Information Technology (CS)
Question
28 of 65, printed as CS Q.28
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.