f(x)={x2+1,0≤x<13−x,1<x≤2
f(x)=x2+1 , is a polynomial function. We know that polynomial functions are continuous everywhere.
So, f(x)=x2+1 is continuous for 0≤x<1
Again , f(x)=3−x , is a polynomial function. We know that polynomial functions are continuous everywhere.
So, f(x)=3−x is continuous for 1<x≤2
Now, we will check the continuity at x=1
LHL=limx→1−f(x)
=limh→0f(1−h)
=limh→0(1−h)2+1
=limh→01+h2−2h+1
⇒LHL=2
RHL=limx→1+f(x)
=limh→0f(1+h)
=limh→03−(1+h)
=limh→03−1−h
⇒RHL=2
Also, f(1)=12+1=2
Hence, LHL=RHL=f(1)
Hence, f(x) is continuous at x=1
Hence, f(x) is continuous in [0,2]
Now, we will check differentiability,
f′(x)={2x0≤x<1−1,1<x≤2
f(x) is differentiable in [0,2]
Now, f(0)=0+1=1
f(2)=3−2=1
⇒f(0)=f(2)
Hence , all the three conditions of Rolle's theorem holds. Hence Rolle's theorem is applicable