How do you turn an irrational, non-transcendental number, like 1.618... back to its form of (a + sqrt(b))/c.

116 Views Asked by At

Looking at irrational numbers, I had an idea, as to computing square roots. Take the golden ratio. Numerically, it's 1.618.... but I can also write it like this: $\frac{1+ \sqrt{5}}{2}$

I want to figure an algorithm that can convert an irrational into the form $\frac{u+ \sqrt{v}}{w}$, where $u, v, w$ are natural numbers.(If it is possible. I'm only considering square roots for the answer.)

Now if you could, I would love it if you could complete my idea. I believe the given irrational can be a the root of a quadratic (not cubic or higher because I'm only considering square roots) by comparing the form $\frac{u+ \sqrt{v}}{w}$to the quadratic equation, if i let the number say, $n = \frac{u+ \sqrt{v}}{w}$, i think, if i take another number say $m = \frac{u- \sqrt{v}}{w}$ and keeping them as the roots off the quadratic, all the coefficients will be, natural numbers. (I'm not sure if this is 100% true, but I'm confident it is).

This said algorithm is to be coded into a computer, which will take a large number of digits as the input for accuracy.

Thank you.

2

There are 2 best solutions below

4
On

A quadratic irrational will have an eventually periodic continued fraction.

2
On

As asked the question has no solution. This is simply because, regardless of what numerical value you feed the computer, there will always exist infinitely many approximations to that numerical value of the form $(u+\sqrt v)/w$, $u,v,w\in\mathbb Z$ up to arbitrarily many digits. For example,

$$\frac{1+\sqrt5}{2}\approx \frac{10^n+\sqrt{5\cdot10^{2n}+1}}{2\cdot10^n}$$

where $n$ is a large positive integer. In fact, by making $n$ to be arbitrarily big, we can make this approximation to have infinite precision. There's nothing special about the base of the exponential; instead of $10$ it can be $2$ or $17$ or whatever number you like. We could also have in the square root, $5\cdot10^{2n}+2$, or $-1$, or $+7$ instead. We have so many approximations to the same number; even 100-digit precision won't suffice! One way to resolve this issue is to somehow make your program prioritize smaller $u,v,w$ in its numerical search, but this doesn't work perfectly.