| Bill Allombert on Fri, 27 Feb 2026 18:30:22 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: question on recovering numerical factors from rational polynomials |
On Fri, Feb 27, 2026 at 09:21:52AM -0800, American Citizen wrote: > K=(25*x^2 + 100*y*x + 100*y^2)/(49*x^2 - 98*y*x + 49*y^2) > ? factor(K) > %9 = > [ x - y -2] > > [x + 2*y 2] > > why isn't this > > [ 5 2] > > [ 7 -2] > > [ x-y -2] > > [x+2y 2] > > using content on the rational poly can sometimes lead to problems if a > variable is in common with the terms. > > how do I recover the rational number (5/7)^2 ? Probably the most robust way if you are going to factor K anyway is K=(25*x^2 + 100*y*x + 100*y^2)/(49*x^2 - 98*y*x + 49*y^2) ? F=factor(K) %17 = [x-y,-2;x+2*y,2] ? simplify(K/factorback(F)) %19 = 25/49 Cheers, Bill.