Conversion of a system of equations containing floor function to a single function

43 Views Asked by At

I have a system of equations: $y=\left\lfloor \log_2 x \right\rfloor + \frac{x}{2^{\left\lfloor \log_2 x \right\rfloor}}$ and $yz=x$ where I would like to make $y$ a function of $z$. I tried substituting the equations ($y=yz*2^{-\left\lfloor \frac{\log{yz}}{\log{2}} \right\rfloor} + \left\lfloor \frac{\log (yz)}{\log 2} \right\rfloor$), but keep getting stuck on the floor function. Tried a couple different methods for the last couple hours (including programs such as Mathematica), to no avail. Even a discrete solution would be ok as I just need certain points, yet I have been unable to find this. How would I go about solving this? The equations are reproduced below for convenience.

$y=x*2^{-\left\lfloor \frac{\log{x}}{\log{2}} \right\rfloor} + \left\lfloor \frac{\log (x)}{\log 2} \right\rfloor$

$yz=x$

1

There are 1 best solutions below

0
On BEST ANSWER

I think that the easiest way is to consider that you have a parametric equation $$y(x)=x\,\, 2^{-\left\lfloor \frac{\log (x)}{\log (2)}\right\rfloor }+\left\lfloor \frac{\log (x)}{\log (2)}\right\rfloor$$ $$z(x)=\frac{x}{x \,\,2^{-\left\lfloor \frac{\log (x)}{\log (2)}\right\rfloor }+\left\lfloor \frac{\log (x)}{\log (2)}\right\rfloor }$$ and, using Mathematica, you will easily generated the plot of $y(z)$ or generate the tables you need.

For sure, this generate rational numbers $$\left( \begin{array}{ccc} x & z & y \\ 1 & 1 & 1 \\ 2 & 1 & 2 \\ 3 & \frac{6}{5} & \frac{5}{2} \\ 4 & \frac{4}{3} & 3 \\ 5 & \frac{20}{13} & \frac{13}{4} \\ 6 & \frac{12}{7} & \frac{7}{2} \\ 7 & \frac{28}{15} & \frac{15}{4} \\ 8 & 2 & 4 \\ 9 & \frac{24}{11} & \frac{33}{8} \\ 10 & \frac{40}{17} & \frac{17}{4} \\ 11 & \frac{88}{35} & \frac{35}{8} \\ 12 & \frac{8}{3} & \frac{9}{2} \\ 13 & \frac{104}{37} & \frac{37}{8} \\ 14 & \frac{56}{19} & \frac{19}{4} \\ 15 & \frac{40}{13} & \frac{39}{8} \\ 16 & \frac{16}{5} & 5 \\ 17 & \frac{272}{81} & \frac{81}{16} \\ 18 & \frac{144}{41} & \frac{41}{8} \\ 19 & \frac{304}{83} & \frac{83}{16} \end{array} \right)$$

For large values of $x$, $y(z)$ is quite close to a power law.