Or use polynomial variables rather than symbolic variables.
```
sage: R. = PolynomialRing(QQ)
sage: f = 1/(a-b) + 2/(b-c) + 3/(c-a)
sage: f
(-2*a^2 + 4*a*b - 3*b^2 + 2*b*c - c^2)/(-a^2*b + a*b^2 + a^2*c - b^2*c -
a*c^2 + b*c^2)
sage: g = f*(a-b)*(b-c)*(c-a)
sage: g
-2*a^2 + 4*a*b - 3*b^2 + 2*b*c
On Fri, Nov 26, 2021 at 7:19 PM Ricardo Fodra wrote:
>
> So I tried to do:
>
> var('a b c')
> f = 1/(a-b) + 2/(b-c) + 3/(c-a)
> # get rid of the denominators
> g = f*(a-b)*(b-c)*(c-a)
> g.expand()
>
> And I was hoping to get something like:
>
> -a*b + a*c + b*c - c^2 - 2*a - 2*b - c
>
> and instea
So I tried to do:
var('a b c')
f = 1/(a-b) + 2/(b-c) + 3/(c-a)
# get rid of the denominators
g = f*(a-b)*(b-c)*(c-a)
g.expand()
And I was hoping to get something like:
-a*b + a*c + b*c - c^2 - 2*a - 2*b - c
and instead I got:
-a^2*b/(a - b) + 3*a^2*b/(a - c) - 2*a^2*b/(b - c) + a*b^2/(a - b) -
Possibly related:
- Sage Trac ticket 31890
simplify_hypergeometric is unstable
https://trac.sagemath.org/ticket/31890
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an
Not on my machine. I even tried something like P=plot(something)
followed by P.save('filename'). The assignment works fine, but when it
tries to save the Sage kernel crashes.
The only workaround I have found is using SageCell. But that is not very
convenient if I need to save the result.
Fer
On Fri, 26 Nov 2021, 17:20 Kai Weber, wrote:
> Hi, I do have the same problem. I can't use plot() - not even a plot(1)
> with a constant . I am running Sage 9.3 on Windows 11 and Surface Book 3. I
> understand that the problem will not be solved until Sage 9.5. But I need
> the plot() function no
Hi, I do have the same problem. I can't use plot() - not even a plot(1)
with a constant . I am running Sage 9.3 on Windows 11 and Surface Book 3. I
understand that the problem will not be solved until Sage 9.5. But I need
the plot() function now. Is there a workaround or another way to plot data
I think this illustrates the problem more clearly; possibly related to a
complaint that I got bounced on :)
def H(n,k): return hypergeometric([-k, -n + k], [-k], -1)
def Ha(n,k): return hypergeometric([ -n + k], [], -1)
def T(n,k): return int(H(n,k).n())
def Ta(n,k): return int(Ha(n,k).n())
def
Please consider
def H(n,k): return hypergeometric([-k, -n + k], [-k], -1)
def T(n,k): return int(H(n,k).n())
def S(n,k): return H(n,k).simplify_hypergeometric()
for n in range(8):
print([T(n, k) for k in range(n+1)])
print([S(n, k) for k in range(n+1)])
The re