On Oct 1, 4:17 am, "ma...@mendelu.cz" <ma...@mendelu.cz> wrote:
> On 30 zář, 22:17, "ma...@mendelu.cz" <ma...@mendelu.cz> wrote:
>
>
>
>
>
> > Hello all, I am looking for the possibility how to simplify each term
> > in an expression separately.
>
> > Consider
> > A=x/((x^2/y^2 + 1)*y) + arctan(x/y)
>
> > I wish to get x*y/(x^2+y^2)+atan(x/y) , which can be produced in
> > Maxima by map(fullratsimp, A)
>
> > * simplify(A) gives A - no simplification
>
> > * A.simplify_full() gives one fraction: (x^2*arctan(x/y) + y^2*arctan
> > (x/y) + x*y)/(x^2 + y^2)
>
> > * perhaps map(lambda x: x.simplify_full(),A.operands()) -- this gives
> > [x*y/(x^2 + y^2), arctan(x/y)] -- but it is too complicated and
> > returns a list and not a sum
>
> > Which command in Sage simplifies my expression into x*y/(x^2+y^2)+atan
> > (x/y) ??
>
> I wil answer my own question :) seems that the following function does
> the job
>
> def map_simplify_full(x):
> return maxima.map('fullratsimp',x).sage()
> map_simplify_full(A)
>
> I thought that Maxima computations were replaced by sympy (or
> something in Python) in last months. Is it O.K. to continue to use
> Maxima inside Sage? Will Maxima be present also in future in Sage? And
> is there a way to get function like map_simplify_full without calling
> Maxima?
>
Maxima ain't goin' nowhere, at least not for quite a while.
Integration, (most?) simplification, limits, are all handled by
Maxima. You can do them in Sympy, too, usually, or Maple or Mma if
you have them installed. However, the Pynac fork of Ginac now handles
basic symbols and symbolic functions, so that Maxima isn't called for
things like f(x)=x^2.
There are several wrappers for simplify routines of Maxima's in Sage -
try
sage: x.simplify_[tab]
to see them. They are not global methods. For instance,
sage: x.simplify_rational
wraps fullratsimp. We don't have all of them wrapped, but it wouldn't
be hard to do so.
Hope this helps,
- kcrisman
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---