ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 16 Mar 2018 16:45:18 +0100Simplifying rational expressionshttps://ask.sagemath.org/question/39111/simplifying-rational-expressions/I am working with a power series with coefficients being rational functions of several variables (everything over QQ). Is there any way to make sage automatically simplify the coefficients?
Here is an example of what is going on
k=RR.zero()+(-524288*x^2 - 1048576*x*y - 524288*y^2 + 524288*x*z + 524288*y*z)/(-1048576*z^2)
print k
print u
print u-k
print (simplify(u))
print u
print parent(u)
print parent(k)
print factor(u.numerator())/factor(u.denominator())
And results:
(1/2*x^2 + x*y + 1/2*y^2 - 1/2*x*z - 1/2*y*z)/z^2
(-524288*x^2 - 1048576*x*y - 524288*y^2 + 524288*x*z + 524288*y*z)/(-1048576*z^2)
0
(-524288*x^2 - 1048576*x*y - 524288*y^2 + 524288*x*z + 524288*y*z)/(-1048576*z^2)
(-524288*x^2 - 1048576*x*y - 524288*y^2 + 524288*x*z + 524288*y*z)/(-1048576*z^2)
Fraction Field of Multivariate Polynomial Ring in x, y, z over Rational Field
Fraction Field of Multivariate Polynomial Ring in x, y, z over Rational Field
(-1/2) * z^-2 * (-x - y + z) * (x + y)AntWed, 11 Oct 2017 06:20:26 +0200https://ask.sagemath.org/question/39111/Speed up simplify_full() on large expression via parallel?https://ask.sagemath.org/question/41586/speed-up-simplify_full-on-large-expression-via-parallel/ I have a rather long expression which was obtained from some calculations done by Sage. I am trying to apply different commands like simplify_full(), expand(), trig_reduce(), etc. on it but it is working very slowly. Is there a way to parallelize this operation? I think this should be possible because the operation is theoretically parallelizable. For example, if the expression has 10,000 terms, Sage might be able try to split it into 5 x 2000 term parts and run each one in 5 core (totally 5 cores from 8 cores on my CPU) and then in the end add up the simplified 5 parts and then try to simplify that again. I'm not sure if this is the proper way of doing it, so if there are easier ways, please tell me, I just want to manipulate my expression as quickly as possible. DanialBaghFri, 16 Mar 2018 16:45:18 +0100https://ask.sagemath.org/question/41586/simplify_full - is the mistake in the documentation or the source code?https://ask.sagemath.org/question/10939/simplify_full-is-the-mistake-in-the-documentation-or-the-source-code/Looking at the simplify_full documentation in Sage 6.0, it says that it
> Applies simplify_factorial,
> simplify_trig, simplify_rational,
> simplify_radical, simplify_log, and
> again simplify_rational to self (in
> that order).
However the source code is
def simplify_full(self):
x = self
x = x.simplify_factorial()
x = x.simplify_trig()
x = x.simplify_rational()
x = x.simplify_log('one')
x = x.simplify_rational()
return x
So where is the mistake? Should simplify_radical be added to the source code or removed from the documentation?brkirchFri, 17 Jan 2014 16:38:00 +0100https://ask.sagemath.org/question/10939/simplify_full developmenthttps://ask.sagemath.org/question/8684/simplify_full-development/Hi! Could someone elaborate on the status of the simplification routines in SAGE? I've noticed that the simplify_full can't exactly be said to compete with e.g. mathematica's corresponding FullSimplify...
I don't know if the simplify functions operate as replacement rules or such, but if they do, I might be able to contribute in the development (I'm not much of a programmer though).
So could someone please explain about how simplify_full and other simplification functions work, and how I and others can participate? This post could work as an info for all who want to take part!H. ArponenTue, 31 Jan 2012 11:03:17 +0100https://ask.sagemath.org/question/8684/