# Elementary Number Theory and Its Application, 6th Edition by Kenneth H. Rosen Exercises 1.1.12

12. Show that [x] + [x + 1/2] = [2x] whenever x is a real number.

Solution:  We have to prove the following equation
[x]+[x+1/2]=[2x]….(1)

Where x is a real number

Let us consider the LHS of the above equation.

We define

x=[x]+{x}….(2)

Where [x] is the integral part and {x} is the fractional part of x

Now, substituting (2) in (1) will give us
LHS=[[x]+{x}]+[[x]+{x}+1/2]
=[x]+[{x}]+[x]+[{x}+1/2]
We have used the fact that [[x]]=[x] as [x] is itself an integer.

Proceeding forward gives us
LHS=2[x]+[{x}]+[{x}+1/2]
=2[x]+0+[{x}+1/2]
This is because the greatest integer value of any fractional value is zero.

Consider two following cases.

Case 1

We assume that [{x}+1/2]=0

So,
LHS=2[x]+0
=2[x]
=[2x]
This is because 2 is an integer value and can be including in the greatest integer part.

Case 2
We assume that [{x}+1/2]=1

So,
LHS=2[x]+1
=2[x]+[2{x}]
=[[2x]]+[2{x}]
=[2[x]+2{x}]
Therefore,
LHS=[2([x]+{x})]
=[2x]
This we get from (2)

Hence, we have proved the equation (1)