On Fri, Nov 26, 2021 at 7:19 PM Ricardo Fodra <ricardo.fo...@gmail.com> 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 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) - 
> 3*a*b^2/(a - c) + 2*a*b^2/(b - c) + a^2*c/(a - b) - 3*a^2*c/(a - c) + 
> 2*a^2*c/(b - c) - b^2*c/(a - b) + 3*b^2*c/(a - c) - 2*b^2*c/(b - c) - 
> a*c^2/(a - b) + 3*a*c^2/(a - c) - 2*a*c^2/(b - c) + b*c^2/(a - b) - 
> 3*b*c^2/(a - c) + 2*b*c^2/(b - c)
>
> Are those equivalent? Am I doing something wrong?

do the following:

sage: g.simplify_rational()
-2*a^2 + 4*a*b - 3*b^2 + 2*b*c - c^2

>
> --
> 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 
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/5d5f136d-637b-4dd9-9c9b-eb00b7609401n%40googlegroups.com.

-- 
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 email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAAWYfq1YxpECOyLnfeyZCvBMwdC0CJNXq3-Z5UZ9nCKsB5XWtQ%40mail.gmail.com.

Reply via email to