Thanks for the answer.

As the time goes, I get more understanding of the complexity of the
problem (much more than I expected at first).

On 19 Apr, 02:27, Carl Witty <carl.wi...@gmail.com> wrote:
> On Sat, Apr 18, 2009 at 2:46 PM, Maurizio <maurizio.gran...@gmail.com> wrote:
> > Could you be clearer? As I told, I'm not familiar with rings. I don't
> > even know the meaning of the argument of GF (I took the number 5 from
> > an example I see in sage-support group, I think). Do you think that QQ
> > [] could fit in this case? Moreover, what's the difference between QQ
> > and QQbar?
>
> GF(5) means the Galois field of characteristic 5, a.k.a. the integers
> modulo 5.  (So in GF(5), you have 2*3 = 1, 3+4 = 2, etc.)  It's
> probably quite irrelevant for computing integrals.
>

Thank you, I should probably have looked for it on the internet rather
than annoying you :)

> QQ is the rational numbers (fractions).  QQbar is the algebraic
> closure of QQ; this means it includes every complex number which is
> the root of a polynomial with rational coefficients.  So it includes
> things like sqrt(2) (which is a root of x^2-2), and sqrt(-1) (a root
> of x^2+1), as well as more exotic numbers like the roots of x^5-x-1,
> which can't be expressed using radicals (roots).  (QQbar does not
> include all complex numbers, though; for instance, it does not include
> pi or e, which are transcendental rather than algebraic.)
>

I understand. This means (as I was kind of suspecting) that QQbar
could have been a good candidate to try to work with (I am just trying
to solve examples 1.4 and 1.5 of that web page). Unfortunately, QQbar
doesn't provide resultant() yet, so it should jump in after the
resultant has been calculated over QQ[]. I think that is not really an
elegant solution (and probably very suboptimal...).

> > Now let's go to Carl's help...
>
> >> Taking a quick look at that page, it looks like they want the exact
> >> roots in CC of a polynomial with algebraic coefficients.  In Sage, we
> >> can get this with QQbar:
>
> >> sage: K.<x> = QQbar[]
> >> sage: (x^5-x-1).roots(ring=QQbar)
>
> > First problem with QQbar: it seems that resultant() doesn't like it,
> > because it is not able to convert it to a Singular ring (this is the
> > error, I'm not attaching all the output, tell me if you need it)
>
> > TypeError: no conversion of this ring to a Singular ring defined
>
> Looks like this hasn't been implemented yet.

Unfortunately...

>
> > On the contrary, QQ[] seems to work fine with resultant (but it
> > doesn't have roots() )
>
> Univariate polynomials over QQ definitely have roots(); were you using
> a multivariate polynomial ring?
>

Actually, I was using a multivariate polynomial ring to let SAGE
understand the expression:

tores = A - z*B.derivative(x)

(by the way...wasn't there a trac opened to let derivative syntax
unify to diff or something like that? it seems that singular doesn't
like B.diff(x) yet... but that's very off-topic)

if I don't define a ring containing x and z, how do I inject z into
the workspace? certainly not as a symbolic variable, so what else? I
know that at the very end this is a univariate polynomial ring root
finding problem, I'm just wondering how to correctly manage it.

> > Moreover, it seems that QQbar roots() is not working for multivariate
> > polynomials ring... is it true or am I just missing something else? In
> > that case, is possible to let it work in multivariate polynomials? As
> > you can imagine, I would like to think about this as a method of
> > solving integrals, so it is very likely to have a symbolic expression
> > with more than just a single symbolic variable.
>
> > Apart from this, is there another way to solve an equation (with more
> > than a single symbolic variable) obtaining exact roots? It seems that
> > maxima would do the work (with algebraic numbers...), is it possible
> > that it is the only symbolic equation solver within SAGE? What about
> > SymPy or anything else?
>
> What does this even mean?  .roots() gives a list of all the solutions
> of a univariate polynomial equation.  But a multivariate polynomial
> equation will usually have an infinite number of solutions; for
> instance, x^2+y^2-1=0 has an infinite number of solutions over the
> rationals (or the reals, or the algebraic reals, etc.)
>
> If you have a system of multivariate polynomial equations, then the
> system might have only finitely many solutions.
>

I understand, but let's consider the problem I'm coming from:
indefinite integral. I'm not using polynomials because I'm well aware
of the implications, rather because I found resultant() implemented
there :)
What I intended with my sentences was: imagine a polynomial like: x^2
+ a^2. The solutions of x^2 - a^2 = 0 with respect to x over any field
wouldn't always coincide with +/- a? That is the kind of reasoning I
would make to solve the indefinite integral, like when I work with
symbolic variables that have a precise meaning (i.e. they are not
really variables in the problem, it's just that I want to keep that
degree of freedom with respect to the solution, especially if I want
to see the effect of that value over the solution) into my problem.

> > Finally, I still would like to know which is the best way to translate
> > the output of a calculation with polynomial rings into a symbolic
> > expression, that can be carried on with maxima or pynac. Can you help
> > me?
>
> If p is a polynomial, then SR(p) is a symbolic expression.
>

Funny, the next minutes I spent, I recognized how to do that in this
same way :) By the way, is there a SR equivalent for the new pynac
symbolic? Something like NSR (new symbolic ring)? I can see that pynac
already has gcd implemented, although I can already (unfortunately)
see:
RuntimeError: gcd: arguments must be polynomials over the rationals

when I try to do a gcd over quantities containing square roots and
complex numbers... hopefully pynac gcd could be ported to work with
QQbar :) Jokes apart, I have seen a very long thread (which took place
around april 2008) about multivariate gcd, and it seems a VERY big
issue, in the sense that it is not trivial to get an algorithm for gcd
robust, fast, and working over fields like QQbar (and possibly over
functionals)...

Basically, my aim was to see whether we did already have the tools to
implement the most basic indefinite integrals of rational functions,
but it seems that I already need: resultant(), solve(), gcd() and
these three are not that trivial to get... (probably I wasn't paying
attention to how important this basic functions are, when I took them
for granted, working with MatLab [Maple]...)

> Carl

Thanks and keep up the good work!

Maurizio
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to