The correct option is
D f(x)=⎧⎨⎩x3−2x2−5x+6x−1,ifx≠1−6,ifx=1 on
[−2,3]Option A, f(x)={x,0≤x<10,x=1 on [0,1]
We will check continuity at x=1
LHL=limx→1−f(x)=limh→0f(1−h)=1
Also, f(1)=0
Since, LHL≠f(1)
f(x) is discontinuous at x=1
So, Rolle's theorem does not hold for option A.
Option B,f(x)=⎧⎨⎩sinxx,−π≤x<00,x=0 on [−π,0]
We know that limx→0sinxx=1
Also, f(0)=0
f(x) is discontinuous at x=0
So, Rolle's theorem does not hold for option B.
Option C, f(x)=x2−x−6x−1 on [−2,3]
f(x)=(x−3)(x+2)x−1 on [−2,3]
f(x) is not defined at x=1
So, Rolle's theorem does not hold for option C.
f(x)=⎧⎨⎩x3−2x2−5x+6x−1,ifx≠1−6,ifx=1 on [−2,3]
⇒f(x)=(x−3)(x+2) at x≠1
Polynomial functions are continuous and differentiable everywhere.
Also, f(−2)=f(3)=0
So, Rolle's theorem holds for option D.