On Sat, 02 Dec 2006 09:20:51 -0800, David Joyner <[EMAIL PROTECTED]>  
wrote:

> Okay, sin was a bad example. How would you make the following work?
>
> sage: f = exp(x)*sin(exp(x))
> sage: integrate(f)
> - cos(exp(x))
>
> The first line fails.

I would make it work by implementing it.  It's not implemented yet.
In particular there is no formal version of exp implemented
in SAGE.  There is a formal version of cosine:

sage: f = cos(x)*sin(cos(x))
sage: f
(cos(x)*sin(cos(x)))

Then to do integrate(f), I would internall do:

   (1) g = maxima(f)    # currently doesn't give the right thing, but it  
could
   (2) g.integrate('x')
   (3) parse the result (which in this case is simply the formal integral,
       since maxima can't integrate it; same for maple).
   (4) return the answer again as a native SAGE function.

Steps 1-3 could also be done behind the scenes using maple or
mathematica if available, or all three, and one can compare the results.

Actually, formal exp is implemented in SAGE, but it's not available by  
default yet:

sage: from sage.functions.functions import expo as exp
sage: f = exp(x)*sin(exp(x))
sage: f
(expo(x)*sin(expo(x)))

Don't be put off by the outer parenthesis, since that's just cosmetic and  
can
be easily fixed.

  -- William

--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to