Ask Your Question
0

approximate real numbers by algebraic numbers

asked 2016-04-13 19:22:24 +0100

Dianbin Bao gravatar image

Hi

suppose I have a real number x in decimal digits, how do I find an approximate polynomial f(x) \in ZZ[x] with x a root?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-04-14 00:03:25 +0100

tmonteil gravatar image

You can use the algebraic_dependency method for that. Given an integer n as parameter, it finds a polynomial of degree (at most) n with small coefficients that is almost on you floating-point number a.

Here is an example on how you can find a good polynomial: loop over degrees and see if there are some levels:

sage: a = 3.146264369941973
sage: for n in range(10):
....:     print a.algebraic_dependency(n) 
1
5947484*x - 18712357
4113*x^2 - 17841*x + 15418
82*x^3 + 1380*x^2 - 6929*x + 5586
x^4 - 10*x^2 + 1
x^4 - 10*x^2 + 1
x^4 - 10*x^2 + 1
x^4 - 10*x^2 + 1
x^4 - 10*x^2 + 1
x^4 - 10*x^2 + 1

So, it seems that x^4 - 10*x^2 + 1 is a very good candidate.

edit flag offensive delete link more

Comments

Wow, I did not know about this! Thanks.

kcrisman gravatar imagekcrisman ( 2016-04-14 15:29:32 +0100 )edit
0

answered 2016-04-13 21:32:01 +0100

kcrisman gravatar image

There exists such software, and there is an open ticket for trying to add such capability (though it is much broader than just algebraic numbers, things like zeta function values usually are available as well). Such as RIES. But Sage does not currently have inverse symbolic calculation capability, as far as I know.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-04-13 19:22:24 +0100

Seen: 744 times

Last updated: Apr 14 '16