I solved this problem which is just an easy programming problem but my solution uses the fact that if $a,b,c,d$ are integers and if $\sqrt{b^2-c}$ and$\sqrt{a^2-d}$ are irrational numbers then $b \pm \sqrt{b^2-c}\neq a\pm \sqrt{a^2-d}$ if $(b,c)\neq(a,d)$ which I believe to be true but I have no idea how to prove that. Also my solution was right and got accepted so this must be true.
Asked
Active
Viewed 69 times
1
-
1Hint: If we have integers $A, B, C$ with $A, B$ not squares such that $ \sqrt{A} \pm \sqrt{B} = C$, then show that $ C = 0, A = B$. – Calvin Lin May 25 '23 at 15:09
-
1FWIW, if I did the algebra correctly, your equation is equivalent to $4(b-a)(db - ac) +c^2 +d^2=0$. – Dan May 25 '23 at 16:19
1 Answers
1
Lemma: If we have integers (or even just rational) $A, B, C$ with $A, B$ not perfect squares such that $ \sqrt{A} \pm \sqrt{B} = C$, then show that $ C = 0, A = B$.
Corollary: Per the conditions, $\sqrt{ b^2 - c} \pm \sqrt{ a^2 - d } = \pm ( a - b )$. Applying the lemma, $ a = b$, $b^2 -c = a^2 - d $ so $ c = d$.
Hint for lemma: Show that if $C \neq 0$, then $ \sqrt{A} \mp \sqrt{B}$ is rational, which implies $\sqrt{A}$ is rational, hence a contradiction.
Further hint: We use $ C \neq 0 $ by dividing by it.

Calvin Lin
- 68,864
-
Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. – Bill Dubuque May 25 '23 at 18:11
-
1@BillDubuque Seeking clarity on your comment. Why is this considered a duplicate? My solution uses the lemma for $\sqrt{a } \pm \sqrt{b} \in \mathbb{Q}$ as opposed to $ \sqrt{a} + \sqrt{b} + \sqrt{c}$ in the link. Granted the proof is not significantly different, but the conclusion is (we must have $ \sqrt{a} = \sqrt{b}$, as opposed to $a=b=0$.) $\quad$ In addition, that's just the lemma. Though there isn't much more work involved (which is why I initially just wrote the lemma as a comment hint) In that vein, should "simple applications of AM-GM" all be closed as a duplicate of AM-GM? – Calvin Lin May 26 '23 at 17:48