On 30 zář, 22:17, "[email protected]" <[email protected]> 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?

Thanks
Robert Marik

>
> Many thanks for all answers to many questions from me during the last
> two or three weeks.
>
> Robert
--~--~---------~--~----~------------~-------~--~----~
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