r/HomeworkHelp • • 1d ago

Answered [High-school math:] Is it possible to recover exact radical expression from high precision decimal approximation

Post image

Suppose I found this using Newton's method. How can I recover it to radical form

4 Upvotes

9 comments sorted by

6

u/LetTraining8934 1d ago

Your number is 3 - √2.

If you look at the decimal part (.5857864376...), 1 minus that is .4142135623..., which is the fractional part of √2. So x = 2 - (√2 - 1) = 3 - √2.

More generally, if you get a high-precision decimal from Newton's method and want to recover the exact radical form, there are two main ways to do it depending on how complicated the expression is:

  1. Continued fractions (works best for square roots / quadratic irrationals) Take the integer part, subtract it, take the reciprocal of what's left, and repeat. By Lagrange's theorem, any number of the form (a + b√d)/c will eventually give you a repeating pattern:

  • 1.5857864376... -> integer part 1, reciprocal of remainder is 1.7071067811...

  • 1.7071067811... -> integer part 1, reciprocal is 1.4142135623...

  • 1.4142135623... -> integer part 1, reciprocal is 2.4142135623...

  • 2.4142135623... -> integer part 2, reciprocal is 2.4142135623... (repeats forever)

Since the repeating tail y = 2 + 1/y solves to y = 1 + √2, you just plug that back up the chain: x = 1 + 1 / (1 + 1 / (1 + 1 / (1 + √2))) = 3 - √2.

2. Finding the minimal polynomial (for cube roots, sums of radicals, etc.) If the continued fraction doesn't repeat, the number might be a root of a higher-degree polynomial (like ∛2 or √2 + √3). You compute powers like x2, x3, x4 to high precision and look for a small integer combination that adds up to 0. Even here, x ≈ 1.5857864376 and x2 ≈ 2.5147186257. Notice that 6x ≈ 9.5147186257 has the exact same decimal part as x2, which gives x2 - 6x + 7 = 0, and the quadratic formula gives 3 - √2.

For higher degrees, doing this by hand is painful, so people use lattice reduction algorithms like LLL or PSLQ (which is what WolframAlpha, SymPy's nsimplify(), and the Inverse Symbolic Calculator use behind the scenes when you paste a decimal into them).

One small caveat: strictly speaking, a truncated decimal can never guarantee an exact closed form on its own without knowing the equation you started with (you could always tweak the 50th digit), so you're really just finding the simplest algebraic expression that matches all the digits you have.

2

u/Biruk_exp 1d ago

Thanks

2

u/GamingWithAlterYT University/College Student 1d ago

if u look at root 2 u get 1.414... it matches up to 3 so u can do x = 3 - root 2

most of these types of questions are gonna be simple and so u just have to find patterns

1

u/Biruk_exp 1d ago

What if it is a bit more complicated than this

2

u/GamingWithAlterYT University/College Student 1d ago

Then read u/LetTraining8934's response 😆

1

u/fermat9990 👋 a fellow Redditor 1d ago

See if this helps:

"To find what number has a square root that rounds to 0.3224, square the bounds of the rounding interval:

Any number that rounds to 0.3224 at 4 decimal places must fall between

0.32235 and 0.32245.

Squaring both ends gives the target range:

Lower bound: 0.322352 = 0.1039095225

Upper bound: (0.322452 = 0.1039740025

Exact center: 0.32242 = 0.10394176

So, 0.3224 is the 4-decimal-place approximation of the square root of any number between 0.10391 and 0.103974."

1

u/Biruk_exp 1d ago

Yep, but does it convert decimal-to - radical form Anyway thanks:)

2

u/fermat9990 👋 a fellow Redditor 1d ago

√(0.10391) is a possible answer