![]() |
|
|
#1 |
|
Jan 2018
538 Posts |
Dear All,
I am looking for the solution of equation x^0.5 - y^0.5 = z; where x and y are integers while z is any floating number.. If z is known, can x and y be directly calculated rather then brute force? |
|
|
|
|
|
#2 |
|
"Robert Gerbicz"
Oct 2005
Hungary
148410 Posts |
Because z is a floating point number this is a perfect solution, if you want a solution of absolute precision 2^(-b).
Code:
(10:34) gp > ff(z,b)={y=2^(2*b);x=round((2^b+z)^2);return([x,y])}
%1 = (z,b)->y=2^(2*b);x=round((2^b+z)^2);return([x,y])
(10:34) gp > ff(600.8,52)
%2 = [20282409603657081949259500034970, 20282409603651670423947251286016]
(10:34) gp > x=20282409603657081949259500034970;
(10:34) gp > y=20282409603651670423947251286016;
(10:34) gp > d=sqrt(x)-sqrt(y)
%5 = 600.79999999999999997335463576229321828
(10:35) gp > (d-600.8)*2^52
%6 = -0.12000005245208740234
(10:35) gp >
Last fiddled with by R. Gerbicz on 2018-11-20 at 09:47 |
|
|
|
|
|
#3 | |
|
Jan 2018
2B16 Posts |
Quote:
Could you please explain in simple english the solution of this equation for example: x^0.5-y^0.5=1.234567 Thanks again |
|
|
|
|
|
|
#4 |
|
Jun 2003
10011101110112 Posts |
Isn't this trying to map a countably infinite set to an uncountably infinite one?
|
|
|
|
|
|
#5 |
|
Apr 2010
Over the rainbow
23×52×13 Posts |
hmmm since X and Y are integer and different from 0, wouldn't that seriously reduce the number of solution?
|
|
|
|
|
|
#6 |
|
Dec 2012
The Netherlands
6A616 Posts |
|
|
|
|
|
|
#7 | |
|
Jan 2018
43 Posts |
Quote:
\(\sqrt{281475018135852}\) - \(\sqrt{281474976710656}\)=1.234567001 But there must be lower values of x and y for this.. For example if z=1.026, we have \(\sqrt{1050678}\)- \(\sqrt{1048576}\)=1.02585333 with formula but \(\sqrt{24}\)- \(\sqrt{15}\)=1.02599 would be a better approximation... Last fiddled with by MARTHA on 2018-11-20 at 13:51 |
|
|
|
|
|
|
#8 |
|
Romulan Interpreter
Jun 2011
Thailand
7×1,373 Posts |
You asked for solution not for approximation.
One way to see is if you amplify with the conjugate. \((\sqrt x -\sqrt y)(\sqrt x +\sqrt y)=z(\sqrt x +\sqrt y)\) then you have \(x-y=z(\sqrt x +\sqrt y)\). The left side is an integer, the right side is not, except very particular cases, like for example, z is irrational, and it has a common square free part with x and y, see \(\sqrt{75}-\sqrt{12}=3*\sqrt 3\). For z non-integer, rational, there is no solution with square free parts, as Nick said. Last fiddled with by LaurV on 2018-11-21 at 07:57 |
|
|
|
|
|
#9 | |
|
Feb 2017
Nowhere
110438 Posts |
Quote:
Trying to find small solutions -- that's been a real head-scratcher for me. I note that, if z is a positive integer k, x = (n + k)^2 and y = n^2 give exact integer solutions. If z is not an integer, the integer part of z pretty much pegs the difference between the integer parts of sqrt(x) and sqrt(y). |
|
|
|
|
|
|
#10 |
|
Jan 2018
538 Posts |
Thank you all for your precious time...
Its quite fascinating that even with Computers, there is still so much to be discovered in the field of MATH.. |
|
|
|
|
|
#11 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Quote:
|
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Spot the Difference | a1call | Miscellaneous Math | 34 | 2017-12-11 00:17 |
| Ring Square Roots in NFS | paul0 | Computer Science & Computational Number Theory | 4 | 2015-01-09 14:57 |
| V4 and V5 TF Reporting Difference | RMAC9.5 | PrimeNet | 2 | 2010-05-23 02:20 |
| difference between WZ1 and Wc1 in results.txt? | ixfd64 | Lounge | 2 | 2005-11-19 18:13 |
| Identifing perfect squares and calculating square roots.. | dsouza123 | Math | 2 | 2003-07-19 17:17 |