# solve with 2 unknows types

HI I would like SageMath will give me the solution [x_00=0,x_10=-2,x_20=0] is there a way to do that with 9.2 or should I wait for 9.3 ?

uV=var('x_00, x_10, x_20',domain='integer')
#xyzV=var('x,y, z', domain='real')
xyzV=var('x,y, z', domain='complex')
solve(x^2*x_00 + x*x_10*y + x_20*y^2 == -2*x*y,[x_00 , x_10 , x_20])

solve(x^2*x_00 + x*x_10*y + x_20*y^2 == -2*x*y,[x_00 , x_10 , x_20])


edit retag close merge delete

I put the code delimiter on the first code ,it is displayed ok but when I click on save the code is displayed as text !

( 2021-05-04 12:28:49 +0100 )edit

( 2021-05-04 12:31:17 +0100 )edit

ok , I just corrected it

( 2021-05-04 13:19:51 +0100 )edit

Sort by ยป oldest newest most voted

A polynomial vanishes ift each of its coefficients vanish, so you can work with polynomials as follows:

sage: var('x_00, x_10, x_20')
(x_00, x_10, x_20)
sage: R.<x,y,z> = SR[]
sage: R
Multivariate Polynomial Ring in x, y, z over Symbolic Ring
sage: P = x^2*x_00 + x*x_10*y + x_20*y^2 - -2*x*y
sage: P
x_00*x^2 + (x_10 + 2)*x*y + x_20*y^2
sage: solve([p == 0 for p in P.coefficients()], [x_00 , x_10 , x_20])
[[x_00 == 0, x_10 == -2, x_20 == 0]]


For more algebraic tasks, instead of SR[x,y,z]It is also possible to work in the ring ZZ[x_00, x_10, x_20][x,y,z], but you get the idea.

more

Thank you @tmonteil

( 2021-05-04 13:15:59 +0100 )edit