Let $p$ be an odd prime. Determine positive integers $x$ and $y$ for which $x \le y$ and $\sqrt{2p}-\sqrt{x}-\sqrt{y}$ is nonnegative and as small as possible.
Problem
Source:
Tags: inequalities, Miscellaneous Problems
25.05.2007 03:26
Peter wrote: Let $ p$ be an odd prime. Determine positive integers $ x$ and $ y$ for which $ x \le y$ and $ \sqrt{2p}-\sqrt{x}-\sqrt{y}$ is nonnegative and as small as possible. The following solution is my solution from MathLinks, slightly rewritten: Can anyone check my solution below? It looks very different from the proposed solution, it has less ugly computations than the proposed solution, and it uses the primality of p only at the very end (it wouldn't use it at all if we would replace "nonnegative" by "positive" in the condition of the problem), so I am wondering whether it can be correct... Problem. Let p be an odd prime. Determine the positive integers x and y with $ x\leq y$ for which the number $ \sqrt{2p}-\sqrt{x}-\sqrt{y}$ is nonnegative and as small as possible. Solution. We claim that the required integers x and y are $ x=\frac{p-1}{2}$ and $ y=\frac{p+1}{2}$. In other words, we claim that the number $ \sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$ is the smallest possible nonnegative value of the term $ \sqrt{2p}-\sqrt{x}-\sqrt{y}$ for positive integers x and y with $ x\leq y$, and this value is achieved only for $ x=\frac{p-1}{2}$ and $ y=\frac{p+1}{2}$. In order to prove this claim, we will verify the following two assertions: Assertion 1. The two numbers $ \frac{p-1}{2}$ and $ \frac{p+1}{2}$ are positive integers and satisfy $ \frac{p-1}{2}\leq\frac{p+1}{2}$, and the number $ \sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$ is nonnegative. Assertion 2. If $ x$ and $ y$ are positive integers satisfying $ x\leq y$ and $ 0\leq\sqrt{2p}-\sqrt{x}-\sqrt{y}\leq\sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$, then $ x=\frac{p-1}{2}$ and $ y=\frac{p+1}{2}$. Proof of Assertion 1. Note that $ \left(\sqrt{\frac{p-1}{2}}+\sqrt{\frac{p+1}{2}}\right)^{2}=\frac{p-1}{2}+\frac{p+1}{2}+2\cdot\sqrt{\frac{p-1}{2}}\cdot\sqrt{\frac{p+1}{2}}$ $ =p+\sqrt{\left(p-1\right)\left(p+1\right)}=p+\sqrt{p^{2}-1}$. Now, $ \frac{p-1}{2}$ and $ \frac{p+1}{2}$ are integers (since p is odd, and thus p - 1 and p + 1 are even) and obviously positive, and satisfy $ \frac{p-1}{2}\leq\frac{p+1}{2}$. Besides, $ \sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$ is indeed nonnegative (since this is equivalent to $ \sqrt{2p}\geq\sqrt{\frac{p-1}{2}}+\sqrt{\frac{p+1}{2}}\ \ \ \ \ \Longleftrightarrow\ \ \ \ \ 2p\geq\left(\sqrt{\frac{p-1}{2}}+\sqrt{\frac{p+1}{2}}\right)^{2}$ $ \Longleftrightarrow\ \ \ \ \ 2p\geq p+\sqrt{p^{2}-1}\ \ \ \ \ \Longleftrightarrow\ \ \ \ \ p\geq\sqrt{p^{2}-1}\ \ \ \ \ \Longleftrightarrow\ \ \ \ \ p^{2}\geq p^{2}-1$, what is true). Hence, Assertion 1 is proven. Proof of Assertion 2. Let $ x$ and $ y$ be positive integers with $ x\leq y$ and $ 0\leq\sqrt{2p}-\sqrt{x}-\sqrt{y}\leq\sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$. If we succeed to show that $ x=\frac{p-1}{2}$ and $ y=\frac{p+1}{2}$, then we will be done proving Assertion 2. The inequality chain $ 0\leq\sqrt{2p}-\sqrt{x}-\sqrt{y}\leq\sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$ rewrites as $ \sqrt{\frac{p-1}{2}}+\sqrt{\frac{p+1}{2}}\leq\sqrt{x}+\sqrt{y}\leq\sqrt{2p}$. We square this inequality (it's not the time to worry about positive and negative yet ): $ \left(\sqrt{\frac{p-1}{2}}+\sqrt{\frac{p+1}{2}}\right)^{2}\leq\left(\sqrt{x}+\sqrt{y}\right)^{2}\leq 2p$ $ \Longleftrightarrow\ \ \ \ \ p+\sqrt{p^{2}-1}\leq x+y+2\cdot\sqrt{x}\cdot\sqrt{y}\leq 2p$. Now, we have $ x+y<x+y+2\cdot\sqrt{x}\cdot\sqrt{y}=\left(\sqrt{x}+\sqrt{y}\right)^{2}\leq\left(\sqrt{2p}\right)^{2}=2p$, but the QM-AM inequality for the positive reals $ \sqrt{x}$ and $ \sqrt{y}$ yields $ x+y=\left(\sqrt{x}\right)^{2}+\left(\sqrt{y}\right)^{2}\geq 2\left(\frac{\sqrt{x}+\sqrt{y}}{2}\right)^{2}=\frac12\left(\sqrt{x}+\sqrt{y}\right)^{2}$ $ \geq\frac12\left(\sqrt{\frac{p-1}{2}}+\sqrt{\frac{p+1}{2}}\right)^{2}=\frac12\left(p+\sqrt{p^{2}-1}\right)$. Since $ \sqrt{p^{2}-1}>\sqrt{p^{2}-2p+1}=p-1$, this yields $ x+y>\frac12\left(p+\left(p-1\right)\right)=p-\frac12$, and thus, since x and y are integers, this entails $ x+y\geq p$. So we have $ p\leq x+y<2p$. Thus, x + y = p + s for some integer s satisfying $ 0\leq s\leq p-1$. Denoting x - y = k, we note that $ k\leq 0$ (since $ x\leq y$) and $ x=\frac{x+y}{2}+\frac{x-y}{2}=\frac{p+s}{2}+\frac{k}{2}$ and $ y=\frac{x+y}{2}-\frac{x-y}{2}=\frac{p+s}{2}-\frac{k}{2}$. Hence, $ p+\sqrt{p^{2}-1}\leq x+y+2\cdot\sqrt{x}\cdot\sqrt{y}\leq 2p$ becomes $ p+\sqrt{p^{2}-1}\leq p+s+2\cdot\sqrt{\frac{p+s}{2}+\frac{k}{2}}\cdot\sqrt{\frac{p+s}{2}-\frac{k}{2}}\leq 2p$ $ \Longleftrightarrow\ \ \ \ \ p+\sqrt{p^{2}-1}\leq p+s+\sqrt{\left(p+s+k\right)\left(p+s-k\right)}\leq 2p$ $ \Longleftrightarrow\ \ \ \ \ \sqrt{p^{2}-1}-s\leq\sqrt{\left(p+s+k\right)\left(p+s-k\right)}\leq p-s$ (we subtracted p + s from the last inequality chain) $ \Longleftrightarrow\ \ \ \ \ \sqrt{p^{2}-1}-s\leq\sqrt{\left(p+s\right)^{2}-k^{2}}\leq p-s$. Since $ \sqrt{p^{2}-1}>\sqrt{p^{2}-2p+1}=p-1\geq s$, the left hand side of this inequality, $ \sqrt{p^{2}-1}-s$, is positive; thus, we can square this inequality: $ \left(\sqrt{p^{2}-1}-s\right)^{2}\leq\left(p+s\right)^{2}-k^{2}\leq\left(p-s\right)^{2}$ $ \Longleftrightarrow\ \ \ \ \ \left(p^{2}-1\right)+s^{2}-2\sqrt{p^{2}-1}\cdot s\leq p^{2}+s^{2}+2ps-k^{2}\leq p^{2}+s^{2}-2ps$ $ \Longleftrightarrow\ \ \ \ \;-1-2\sqrt{p^{2}-1}\cdot s\leq 2ps-k^{2}\leq-2ps$ $ \Longleftrightarrow\ \ \ \ \ 1+2\sqrt{p^{2}-1}\cdot s\geq k^{2}-2ps\geq 2ps$ $ \Longleftrightarrow\ \ \ \ \ 1+2\sqrt{p^{2}-1}\cdot s+2ps\geq k^{2}\geq 4ps$. Since $ \sqrt{p^{2}-1}<\sqrt{p^{2}}=p$, this yields $ 1+2p\cdot s+2ps>k^{2}\geq 4ps\ \ \ \ \ \Longleftrightarrow\ \ \ \ \ 1+4ps>k^{2}\geq 4ps$. Since $ k^{2}$ is an integer, we thus have $ k^{2}=4ps$. Thus, $ p\mid k^{2}$, what, since p is prime, yields $ p\mid k$, so that $ p^{2}\mid k^{2}$. Thus, $ p^{2}\mid 4ps$, so that $ p\mid 4s$. Since p is odd, this yields $ p\mid s$. Since $ 0\leq s\leq p-1$, this leads to s = 0, and thus $ x=\frac{p+s}{2}+\frac{k}{2}=\frac{p}{2}+\frac{k}{2}$ and $ y=\frac{p+s}{2}-\frac{k}{2}=\frac{p}{2}-\frac{k}{2}$. Now, $ \left(\sqrt{\frac{p-1}{2}}+\sqrt{\frac{p+1}{2}}\right)^{2}\leq\left(\sqrt{x}+\sqrt{y}\right)^{2}$ $ \Longleftrightarrow\ \ \ \ \ \left(\sqrt{\frac{p-1}{2}}+\sqrt{\frac{p+1}{2}}\right)^{2}\leq\left(\sqrt{\frac{p}{2}+\frac{k}{2}}+\sqrt{\frac{p}{2}-\frac{k}{2}}\right)^{2}$ $ \Longleftrightarrow\ \ \ \ \ \left(\sqrt{p-1}+\sqrt{p+1}\right)^{2}\leq\left(\sqrt{p+k}+\sqrt{p-k}\right)^{2}$ $ \Longleftrightarrow\ \ \ \ \ \left(p-1\right)+\left(p+1\right)+2\cdot\sqrt{p-1}\cdot\sqrt{p+1}$ $ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \leq\left(p+k\right)+\left(p-k\right)+2\cdot\sqrt{p+k}\cdot\sqrt{p-k}$ $ \Longleftrightarrow\ \ \ \ \ 2p+2\sqrt{p^{2}-1}\leq 2p+2\sqrt{p^{2}-k^{2}}\ \ \ \ \ \Longleftrightarrow\ \ \ \ \ 1\geq k^{2}$. Since k is an integer and $ k\leq 0$, this yields either k = 0 or k = -1. For k = 0, we have $ x=\frac{p}{2}+\frac{k}{2}=\frac{p}{2}$, what is impossible, since p is odd and x must be an integer. Thus, k = -1, so that $ x=\frac{p}{2}+\frac{k}{2}=\frac{p-1}{2}$ and $ y=\frac{p}{2}-\frac{k}{2}=\frac{p+1}{2}$, and thus Assertion 2 is proven. Clearly, Assertion 2 yields: Assertion 3. Let $ x$ and $ y$ be positive integers such that $ x\leq y$ and such that $ \sqrt{2p}-\sqrt{x}-\sqrt{y}$ is nonnegative. If $ \left(x,y\right)\neq\left(\frac{p-1}{2},\frac{p+1}{2}\right)$, then $ \sqrt{2p}-\sqrt{x}-\sqrt{y}>\sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$. (In fact, otherwise we would have $ \sqrt{2p}-\sqrt{x}-\sqrt{y}\leq\sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$, and thus Assertion 2 would yield $ x=\frac{p-1}{2}$ and $ y=\frac{p+1}{2}$, which contradicts $ \left(x,y\right)\neq\left(\frac{p-1}{2},\frac{p+1}{2}\right)$.) Now, we claimed that the number $ \sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$ is the smallest possible nonnegative value of the term $ \sqrt{2p}-\sqrt{x}-\sqrt{y}$ for positive integers x and y with $ x\leq y$, and this value is achieved only for $ x=\frac{p-1}{2}$ and $ y=\frac{p+1}{2}$. We now see that this claim is true, since the number $ \sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$ is indeed the nonnegative value of the term $ \sqrt{2p}-\sqrt{x}-\sqrt{y}$ at $ \left(x,y\right)=\left(\frac{p-1}{2},\frac{p+1}{2}\right)$ (by Assertion 1), and any nonnegative value of the term $ \sqrt{2p}-\sqrt{x}-\sqrt{y}$ for positive integers $ x$ and $ y$ such that $ x\leq y$ is larger than $ \sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$ unless $ \left(x,y\right)=\left(\frac{p-1}{2},\frac{p+1}{2}\right)$ (by Assertion 3). Hence, the problem is solved. Oh dear, you are still reading this here? I apologize for being even more boring than usual, but I tried to write every single step to find a mistake. I don't see any. Do you? darij