On Oct 18, 7:37 am, Urs Hackstein <
urs.hackst...@googlemail.com>
wrote:
> Let f be an element of the quotient field of the polynomial ring (in
> one variable) over the complex numbers.
> Our goal is to find representatives a and b in the polynomial ring
> over the complex numbers such that f=a/b. Can sage do this for me?
> (Simple commands like simplify or expand don' t work.)
If you know bounds on the degrees of a,b it becomes a simple
interpolation/linear algebra problem. If a,b are guaranteed to exist
of degree <= d then just choose n=2*d+2 evaluation points
z_1,z_2,...,z_n and consider the equations
a(z_i)-f(z_i)*b(z_i) = 0 (for i=1,...,n)
That gives you n equations that are linear homogeneous in the
coefficients of a,b. Just solve for those [you can write down a matrix
representation of that system with about as much effort as introducing
sufficient variables and letting sage figure out what system to
solve].
You get a high degree of confidence that your candidate function is
correct when you ensure your system is overdetermined (i.e., pick n
larger). If you use floats you may have to settle for a least squares
solution and verify that the match is very good.
Once you have a candidate function, you can try and see if sage can
simplify b(z)*f(z)-a(z) to 0. However, if you're working with floats
that is virtually guaranteed to not work or produce garbage.