> However, when I look at the difference between foo and
> foo.full_simplify(), all I see is that the square root gets factored and
> split into two:
>
> sqrt(x^6*y^2 + x^6 + 2*x^5 - 7*x^4 + 6*x^3 - 2*(x^6 + x^5 - 2*x^4 +
> x^3)*y + 2*x^2 - 4*x + 1)
>
> becomes, after full_simplify(),
>
> sqrt(x^3*y - x^3 + x^2 - 1)*sqrt(x^3*y - x^3 - 3*x^2 + 4*x - 1)
>
> and indeed, if you factor what's under the first square root, you get
> the two factors in the second pair of roots.

Dan,

This is because full_simplify() calls lots of things, in particular
simplify_radical(), which is Maxima's radcan().

DETAILS: This uses the Maxima radcan() command. From the Maxima
        documentation: "All functionally equivalent forms are mapped
into a
        unique form. For a somewhat larger class of expressions,
produces a
        regular form. Two equivalent expressions in this class do not
        necessarily have the same appearance, but their difference can
be
        simplified by radcan to zero. For some expressions radcan is
quite
        time consuming. This is the cost of exploring certain
relationships
        among the components of the expression for simplifications
based on
        factoring and partial fraction expansions of exponents."

Whenever you multiply two square roots to one square root, weird
things can happen if the inputs aren't all positive - we've seen this
on the Sage list with questions as well as the Maxima list.

> What is going on? Is taylor() unreliable? Or is it full_simplify()?

>From the Maxima taylor doc:


`taylor (<expr>, <x>, <a>, <n>)' expands the expression <expr> in
     a truncated Taylor or Laurent series in the variable <x> around
     the point <a>, containing terms through `(<x> - <a>)^<n>'.

which is also essentially in Sage's doc.  So maybe those square roots
by themselves over x^3-x^2 somehow are done individually and that
causes the problem?  You should try smaller versions of your function
in Maxima directly to debug this.

- kcrisman

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to