Maths WorkshopMaths problems with full solutions
Exercise 54Calculus › Single-variable calculus › Continuity › Continuous and discontinuous functionsL1Added 2 Nov 2026

Floor plus square root of the fractional part

#continuity#floor function#one-sided limits

Statement

For real xx, let ⌊x⌋\lfloor x\rfloor be the integer part and {x}=x−⌊x⌋∈[0,1)\{x\}=x-\lfloor x\rfloor\in[0,1) the fractional part. Study the continuity of
f(x)=⌊x⌋+{x}.f(x)=\lfloor x\rfloor+\sqrt{\{x\}}.

Hint

On each interval (n,n+1)(n,n+1) the integer part is constant. The only question is what happens at the integers: compute the left and right limits.

Show solutionHide solution

Solution

Inside (n,n+1)(n,n+1). Here ⌊x⌋=n\lfloor x\rfloor=n and {x}=x−n\{x\}=x-n, so f(x)=n+x−nf(x)=n+\sqrt{x-n}, which is continuous.

At an integer nn, from the right. For x→n+x\to n^+ (with x<n+1x<n+1), f(x)=n+x−n→n=f(n)f(x)=n+\sqrt{x-n}\to n=f(n).

At an integer nn, from the left. For x→n−x\to n^- (with x>n−1x>n-1), ⌊x⌋=n−1\lfloor x\rfloor=n-1 and {x}=x−(n−1)→1\{x\}=x-(n-1)\to1. So f(x)→(n−1)+1=n=f(n)f(x)\to(n-1)+\sqrt1=n=f(n).

Conclusion. The two one-sided limits equal f(n)f(n), so ff is continuous at every integer, hence on all of R\mathbb{R}.

Remark. The floor function alone jumps by 11 at each integer, and the square root of the fractional part climbs from 00 to 11 just in time to compensate. In fact ff is also strictly increasing.