Determine the total number of real values of x satisfying this equation:
⌊x⌋ + 2 {x} = 3x
Notes:
• ⌊N⌋ is floor of N, which is equal to the greatest integer less than or equal to N.
{N} = N  ⌊N⌋.
• Computer program/excel solver assisted solutions are welcome, but a semianalytic (hand calculator and p&p) methodology is preferred.
Analytic solution then computer verification.
Let x = i + f
where i is ⌊x⌋ and f is {x}
Case 1: x = 0; 0 is a solution
Case 2: x > 0
⌊x⌋ + 2{x} = 3x becomes
i + 2*(1f) = 3i + 3f
2 = 2i + 5f > i=0, f=2/5
x = 0.4
Case 3: x < 0
x=(i+f), ⌊x⌋=(i+1), {x}=f
(i+1) + 2f = 3(i+f)
1 = 2i  5f
if i=0, f=0.2
x = (i+f) = 0.2
Solutions: 0.2, 0, 0.4

import math
epsilon = .00000001
for i in range(100000,100000):
n = i/1000
if abs(math.floor(n) + 2*((n)%1)  3*n) < epsilon:
print(n)
Output:
0.2
0.0
0.4

Posted by Larry
on 20230914 11:27:25 