Closed NAThompson closed 1 week ago
I'm also having this problem. For your case, semipolynomial_form
seems to work:
julia> @variables x y;
julia> d = semipolynomial_form(3x + 2*x*y, [x, y], Inf)
(Dict{Any, Any}(x*y => 2, x => 3), 0)
julia> d[1][x*y]
2
However, it doesn't work when the power is also a variable, as in
@variables x y a b
poly = 3x^a + 2*x^b * y^a
@yuvalwas : My report was actually a simplification of a case where the power was also a variable, so thanks for looking into this. . .
I've fixed the original issue in pull request #1240, though I haven't covered the case where the power is also a variable.
To reproduce:
Of course the answer should be 2. . .
Julia version 1.10.0, latest released Symbolics.