3
$\begingroup$

I'm trying to simplify equation

$$n = \Big\lceil\sqrt{2x +\frac14} - \frac12 \Big\rceil$$

into

$$n = \Big\lfloor\sqrt{2x} + \frac12 \Big\rfloor$$

where $x$ is an integer. Indeed, both equations seem to output the same result when testing for some values. Thus far, I've done:

\begin{align*} &n = \Big\lceil\sqrt{2x +\frac14} - \frac12 \Big\rceil \\ \implies &\sqrt{2x +\frac14} - \frac12 \leq n < \sqrt{2x +\frac14} + \frac12 \end{align*}

The left side easily reduces as follows:

\begin{align*} &\sqrt{2x +\frac14} - \frac12 \leq n \\ \implies &\sqrt{2x} - \frac12 < n \end{align*}

but I'm having trouble with the right side which I would wish to reduce as follows:

\begin{align*} &n < \sqrt{2x +\frac14} + \frac12 \\ \implies &\texttt{???} \\ \implies &n \leq \sqrt{2x} + \frac12 \end{align*}

so that I'm able to obtain my end result.

\begin{align*} &\sqrt{2x} - \frac12 < n \leq \sqrt{2x} + \frac12\\ \implies &n = \Big\lfloor\sqrt{2x} + \frac12 \Big\rfloor \end{align*}

$\endgroup$
4
  • $\begingroup$ Tip: $\lceil u-\frac 12\rceil$ and $\lfloor u+\frac 12\rfloor$ are both ways of writing "$u$ rounded to the nearest integer", with the only difference being what happens in the case where $u$ is a half-integer (i.e., an integer plus $\frac 12$). The square of a half-integer is always of the form $\text{integer}+\frac 14$, so there is never a half-integer strictly between $\sqrt{2x+\frac 14}$ and $\sqrt{2x}$; thus the only case where these roots don't necessarily round to the same integer is when one of them is exactly a half-integer. Analyze that case. $\endgroup$
    – tuna
    Commented Aug 6, 2021 at 17:16
  • 1
    $\begingroup$ Are you told that $\sqrt{2x}$ exists? If $-\frac 18 \le x < 0$ then $n = \Big\lceil\sqrt{2x +\frac14} - \frac12 \Big\rceil=0$ but $\sqrt{2x}$ does not exist and $n= 0 \ne \Big\lfloor\sqrt{2x} + \frac12 \Big\rfloor$ $\endgroup$
    – fleablood
    Commented Aug 6, 2021 at 17:19
  • 1
    $\begingroup$ fleablood, $x$ is stated to be an integer in the problem (and it better be a nonnegative integer at that!). $\endgroup$
    – tuna
    Commented Aug 6, 2021 at 17:21
  • 1
    $\begingroup$ Oh.... That makes things very different! $\endgroup$
    – fleablood
    Commented Aug 6, 2021 at 17:24

2 Answers 2

2
$\begingroup$

The first gives $$n-1<\sqrt{2x+\frac{1}{4}}-\frac{1}{2}\leq n$$ or $$\left(n-\frac{1}{2}\right)^2<2x+\frac{1}{4}\leq\left(n+\frac{1}{2}\right)^2$$ or $$\frac{n^2-n}{2}<x\leq\frac{n^2+n}{2}$$ and by the same way the second gives: $$n\leq\sqrt{2x}+\frac{1}{2}<n+1$$ or $$\frac{n^2-n}{2}+\frac{1}{8}\leq x<\frac{n^2+n}{2}+\frac{1}{8}$$ and since $x$ is an integer number, we obtain $$\frac{n^2-n}{2}<x\leq\frac{n^2+n}{2}$$ again.

$\endgroup$
0
0
$\begingroup$

Is it possible that that there is an integer $k$ so that $2x < k^2 < 2x +\frac 14$?

As $x$ and $k^2$ are integers the answer to that is obviously no.

Let's get a little tighter. Is it possible there is "half-integer" $\frac k2$ where $k\in \mathbb Z$ and $2x < (\frac k2)^2 < 2x+\frac 14$.

That is $8x < k^2 < 8x + 1$. Again as $8x, k^2, 8x+1$ are all integers the answer is no.

So we either have $(k-\frac 12)^2 < 2x < 2x + \frac 14 < k^2$ (strict inequalitys as $2x+\frac 14$ and $(k-\frac 12)^2$ are not integers) for some integer $k$ or $k^2 \le 2x < 2x+\frac 14\le (k+\frac 12)^2$ for some integer $k$.

Case 1:

$(k-\frac 12)^2 < 2x < 2x +\frac 14 < k^2$.

Then $k-\frac 12 < \sqrt{2x + \frac 14} < k$

$k-1 < \sqrt{2x + \frac 14} < k-\frac 12$

And $\lceil \sqrt{2x +\frac 14} \rceil = k$

And $k-\frac 12 < \sqrt{2x} < k$

$k < \sqrt{2x} +\frac 12 < k + \frac 12$

And so $\lfloor \sqrt{2x} +\frac 12 \rfloor = k =\lceil \sqrt{2x +\frac 14} \rceil$

Case 2:

$k^2 \le 2x < 2x+\frac 14\le (k+\frac 12)^2$

$k < \sqrt{2x +\frac 14} \le k+\frac 12$

$k-\frac 12 < \sqrt{2x +\frac 14}-\frac 12 \le k$ so

$\lceil \sqrt{2x +\frac 14} \rceil = k$

And $k \le \sqrt {2x} < k+\frac 12$ so

$k+\frac 12 \le \sqrt{2x}+\frac 12 < k+1$ so

$\lfloor \sqrt{2x} +\frac 12 \rfloor = k =\lceil \sqrt{2x +\frac 14} \rceil$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .