Discuss the continuity and differentiability of the function f(x) = |x|+|x-1| in the interval (-1,2).
Method 1: Since the continuity and differentiability of modulus function is doubtful at the corner points. So well shall check continuity and differentiability at the critical points x=0, 1 ϵ (-1,2).
Therefore, f(x) = |x|+|x-1|= −x−(x−1)=−2x+1,if x<0x−(x−1)=1,if 0≤x<1x+x−1=2x−1,if x≥1
Continuity at x=0 : We have f(0)=1.
LHL (at x=0): limx→0−(−2x+1)=−2×0+1=1
RHL (at x=1): limx→0+1=1
Since limx→1 f(x) = f(1) so f(x) is continuous at x=0.
Continuity at x=1: We have f(1)= 2(1)-1=1.
LHL (at x=1) :limx→1−=1
RHL (at x=1) : limx→1+2x−1=2×1−1=1
Since limx→1 f(x)= f(1) so f(x) is continuous at x=1.
Differentiability at x=0:
LHD (at x=1) : limx→0−|x|+|x−1|−1x−0=limx→0−−2x+1−1x=limx→0−−2xx=−2
RHD (at x=0): limx→0+1−1x−0=limx→0+0x=limx→0+0=0≠ LHD (at x=0)
∴ f(x) is not differentable at x=0.
Differentibility at x=1:
LHD (at x=1) : limx→1−1−1x−1=limx→1−0x−1=limx→1−0=0
RHD (at x=1): limx→1+x+x−1−1x−1=limx→1+2(x−1)x−1=2≠ LHD (at x=1)
∴ f(x) is not differentiable at x=1.
Method 2: Since the continuity and differentiability of modulus function is doubtful at the corner points. So well shall check continuity and differentiability at the critical points x =0, 1 ϵ (-1,2).
Continuity at x=0 : We have f(0)= |0|+|0-1|=1.
LHL (at x=0): limx→0−|x|+|x−1|=|0|+|0−1|=1
RHL (at x=0): limx→0+|x|+|x−1|=|0|+|0−1|=1
Since limx→0 f(x) = f(0) so f(x)is continous at x=0.
Continuity at x=1: We have f(1)= |1|+|1-1|=1. LHL (at x=1) : limx→1−|x|+|x−1|=|1|+|1−1|=1
RHL (at x =1): limx→11|x|+|x-1|=|1|+|1-1|=1
Since limx→1 f(x)= f(1) so f(x) is continuous at x=1.
Differentiability at x=0 :
LHD (at x=0): limx→0−|x|+|x−1|−1x−0=limx→0−−x−x+1−1x=limx→0−−2xx=−2
RHD (at x=0): limx→0+|x|+|x−1|−1x−0=limx→0+x−x+1−1x−1=limx→0+0x=0≠ LHD (at x=0)
∴ f(x) is not differentiable at x=0.
Differentiability at x=1 :
LHD (at x=1):limx→1−|x|+|x−1|−1x−1=limx→1−x−x+1−1x−1=limx→1−0x−1=0
RHD (at x=1): limx→1+|x|+|x−1|−1x−1=limx→1+x+x−1−1x−1=limx→1+2(x−1)x−1=2≠ LHD (at x=0)
∴ f(x)is not differentiable at x=1.