On Thu, Oct 23, 2008 at 7:56 AM, John H Palmieri <[EMAIL PROTECTED]> wrote:
>
> The setup:
>
> sage: var('x y')
> sage: F = sin(x^2 + y^2) * cos(y) * exp(-0.5*(x^2+y^2))
> sage: G=F.derivative(x,x); G
> -3.00000000000000*x^2*e^(-(0.500000000000000*(y^2 +
> x^2)))*cos(y)*sin(y^2 + x^2) -
> 1.00000000000000*e^(-(0.500000000000000*(y^2 + x^2)))*cos(y)*sin(y^2 +
> x^2) - 4.00000000000000*x^2*e^(-(0.500000000000000*(y^2 +
> x^2)))*cos(y)*cos(y^2 + x^2) + 2*e^(-(0.500000000000000*(y^2 +
> x^2)))*cos(y)*cos(y^2 + x^2)
>
> Then the following takes a long time, between 5 and 10 seconds on my
> 2.4 GHz Intel iMac.
>
> sage: G(1.2, 1.2)
> 0.193703001636676
>
> (I tried using 'timeit(G(1.2, 1.2))' but got: AttributeError:
> 'SymbolicArithmetic' object has no attribute 'find'.)
>
> Why is it so slow, and are there any tricks I can use to speed it up?

Because (the way Sage uses!?) Maxima sucks.

For two months now several of us have been working on completely
replacing Sage's use of Maxima for symbolic manipulation with reliance
on a C++ library called Ginac.  This will make its first appearance as
a non-default option in Sage-3.2.

William

> I'd like to use these calculations in a class (graphing the degree 2
> Taylor approximation to a function in two variables), but if it takes
> minutes to compute all of the relevant first and second derivatives,
> it's annoying.  (If a student says, "Let's see what happens if we
> compute the Taylor polynomial at a different point", I'd like to be
> able to oblige them.)
>
>  John
>
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to