Here [t] denotes the greatest integer less than or equal to t (the floor function). For every real number x we can write x=[x]+{x}, where {x}=x−[x] is the fractional part of x and satisfies 0≤{x}<1. Hence, for every x,
f(x)={x}andg(x)=1−{x}.
Because 0≤{x}<1, it follows that
0≤f(x)<1,0<g(x)≤1,f(x)+g(x)=1.
Let us examine the behaviour of f(x) and g(x) on a typical integral interval. Fix an integer n; then for every x in the half-open interval n≤x<n+1 we have [x]=n and hence
f(x)=x−n,g(x)=1−(x−n)=1−f(x).
Inside this interval f(x) increases linearly from 0 up to 1− while g(x) decreases linearly from 1 down to 0+.
Now we find where the two graphs meet. We solve
f(x)=g(x)⟹x−n=1−(x−n)⟹2(x−n)=1⟹x=n+21.
So the only point of intersection in the interval [n,n+1) is at x=n+21, where both f and g take the value 21. Therefore, in that interval
Thus, on each integral interval [n,n+1) the graph of h is a “V”-shaped line: it rises with slope +1 from 0 up to 21 and then falls with slope −1 back to 0. Next we study continuity.
Continuity at interior points of an interval (n,n+1).
Inside (n,n+1) the formula for h is linear, so h is continuous there.
Continuity at the midpoint n+21.
The left-hand limit equals the common value 21, the right-hand limit also equals 21, and h(n+21)=21. Hence the function is continuous at the midpoint.
Continuity at an integer n.
Approaching n from the left we are in the interval (n−21,n) where h(x)=g(x)=1−(x−n)=n+1−x.
Taking the limit as x→n− gives x→n−limh(x)=1−(n−n)=0.
Approaching n from the right we are in the interval (n,n+21) where h(x)=f(x)=x−n.
Taking the limit as x→n+ gives x→n+limh(x)=n−n=0.
The value of the function at the integer itself is
h(n)=min{f(n)=0,g(n)=1}=0.
Since the left-hand limit, the right-hand limit and the value are all equal, h is continuous at every integer.
Because the above discussion covers every point in the domain, we conclude that h(x) is continuous on the whole closed interval [−2,2].
Now we analyse differentiability. We first compute the derivative in the open sub-intervals where the formula is linear.
For n<x<n+21,h(x)=x−n⟹h′(x)=1.
For n+21<x<n+1,h(x)=1−x+n⟹h′(x)=−1.
Thus, inside each linear segment the derivative exists and equals ±1. Possible points of non-differentiability are therefore the junction points, namely
• all midpoints x=n+21,
• all integers x=n.
Let us check each of these.
At a midpoint n+21.
Left-hand derivative h−′=1, right-hand derivative h+′=−1.
Since the one-sided derivatives are unequal, h is not differentiable here.
At an integer n.
Left-hand derivative (coming from the segment with slope −1) equals −1,
right-hand derivative (coming from the segment with slope +1) equals +1.
Again the derivatives are unequal, so h is not differentiable here either.
Within the open interval (−2,2) the integers that occur are −1,0,1 (three points). The midpoints that occur are
−1.5,−0.5,0.5,1.5
(four points). Hence, inside (−2,2) the total number of non-differentiable points is
3+4=7,
which is certainly “more than four.”
Combining the two conclusions we have:
• h is continuous on [−2,2].
• h fails to be differentiable at seven points of (−2,2).
This description matches exactly Option A, which states “continuous in [−2,2] but not differentiable at more than four points in (−2,2).”