Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I don't think Sage has a routing for that, and furthermore such quasi-polynomials may not form a UFD. So, our best shot could be using the method of undetermined coefficients and solving the resulting system of polynomial equations. For example, thinking of nontrivial factorizations as one in which degrees of polynomials is strictly smallest that the corresponding ones in the given expression, we can try something like this:

R = PolynomialRing(QQ,3*4,'c') # polynomial ring of undetermined coefficients
c = R.gens()
K.<x> = R[]  # ring of polynomials in x
f1 = K(c[:3])
f2 = K(c[3:6]) 
g1 = K(c[6:9])
g2 = K(c[9:])
# define the system of equations as an ideal:
J = R.ideal( (f1*g1 + f2*g2*(x^2+1) - (-x^3 + 5*x^2 + 3*x + 3)).coefficients() + (f1*g2 + f2*g1 - 2*x^3 + x^2 + 3).coefficients() )
print( J.variety() )     # solving

I don't think Sage has a routing for that, and furthermore such quasi-polynomials may not form a UFD. So, our best shot could be using the method of undetermined coefficients and solving the resulting system of polynomial equations. For example, thinking of nontrivial factorizations as one in which degrees of polynomials is strictly smallest that the corresponding ones in the given expression, we can try something like this:

R = PolynomialRing(QQ,3*4,'c') # polynomial ring of undetermined coefficients
c = R.gens()
K.<x> = R[]  # ring of polynomials in x
f1 = K(c[:3])
f2 = K(c[3:6]) 
g1 = K(c[6:9])
g2 = K(c[9:])
# define the system of equations as an ideal:
J = R.ideal( (f1*g1 + f2*g2*(x^2+1) - (-x^3 + 5*x^2 + 3*x + 3)).coefficients() + (f1*g2 + f2*g1 - 2*x^3 (2*x^3 + x^2 + 3).coefficients() 3)).coefficients() )
print( J.variety() )     # solving

I don't think Sage has a routing for that, and furthermore such quasi-polynomials may not form a UFD. So, our best shot could be using the method of undetermined coefficients and solving the resulting system of polynomial equations. For example, thinking of nontrivial factorizations as one in which degrees of polynomials is strictly smallest that smaller than the corresponding ones in the given expression, we can try something like this:

R = PolynomialRing(QQ,3*4,'c') # polynomial ring of undetermined coefficients
c = R.gens()
K.<x> = R[]  # ring of polynomials in x
f1 = K(c[:3])
f2 = K(c[3:6]) 
g1 = K(c[6:9])
g2 = K(c[9:])
# define the system of equations as an ideal:
J = R.ideal( (f1*g1 + f2*g2*(x^2+1) - (-x^3 + 5*x^2 + 3*x + 3)).coefficients() + (f1*g2 + f2*g1 - (2*x^3 + x^2 + 3)).coefficients() )
print( J.variety() )     # solving

I don't think Sage has a routing for that, and furthermore such quasi-polynomials may not form a UFD. So, our best shot could be using the method of undetermined coefficients and solving the resulting system of polynomial equations. For example, thinking of nontrivial factorizations as one in which degrees of polynomials is strictly smaller than the corresponding ones in the given expression, we can try something like this:

R = PolynomialRing(QQ,3*4,'c') # polynomial ring of undetermined coefficients
c = R.gens()
K.<x> = R[]  # ring of polynomials in x
f1 = K(c[:3])
K(c[:3])      # = c2*x^2 + c1*x + c0
f2 = K(c[3:6]) 
g1 = K(c[6:9])
g2 = K(c[9:])
# define the system of equations as an ideal:
J = R.ideal( (f1*g1 + f2*g2*(x^2+1) - (-x^3 + 5*x^2 + 3*x + 3)).coefficients() + (f1*g2 + f2*g1 - (2*x^3 + x^2 + 3)).coefficients() )
print( J.variety() )     # solving

I don't think Sage has a routing for that, and furthermore such quasi-polynomials may not form a UFD. So, our best shot could be using the method of undetermined coefficients and solving the resulting system of polynomial equations. For example, thinking of nontrivial factorizations a "nontrivial factorization" as one in which with the degrees of polynomials is in factors strictly smaller than the corresponding ones those in the given expression, we can try something like this:

R = PolynomialRing(QQ,3*4,'c') # polynomial ring of undetermined coefficients
c = R.gens()
K.<x> = R[]  # ring of polynomials in x
f1 = K(c[:3])      # = c2*x^2 + c1*x + c0
f2 = K(c[3:6]) 
g1 = K(c[6:9])
g2 = K(c[9:])
# define the system of equations as an ideal:
J = R.ideal( (f1*g1 + f2*g2*(x^2+1) - (-x^3 + 5*x^2 + 3*x + 3)).coefficients() + (f1*g2 + f2*g1 - (2*x^3 + x^2 + 3)).coefficients() )
print( J.variety() )     # solving

I don't think Sage has a routing for that, and furthermore such quasi-polynomials may not form a UFD. So, our best shot could be using the method of undetermined coefficients and solving the resulting system of polynomial equations. For example, thinking of a "nontrivial factorization" as one with the degrees of polynomials in factors strictly smaller than those in the given expression, we can try something like this:

R = PolynomialRing(QQ,3*4,'c') # polynomial ring of undetermined coefficients
c = R.gens()
K.<x> = R[]  # ring of polynomials in x
f1 = K(c[:3])      # = c2*x^2 + c1*x + c0
f2 = K(c[3:6]) 
g1 = K(c[6:9])
g2 = K(c[9:])
# define the system of equations as an ideal:
J = R.ideal( (f1*g1 + f2*g2*(x^2+1) - (-x^3 + 5*x^2 + 3*x + 3)).coefficients() + (f1*g2 + f2*g1 - (2*x^3 + x^2 + 3)).coefficients() + [c[0]-1] )
print( J.variety() )     # solving

I don't think Sage has a routing routine for that, and furthermore such quasi-polynomials may not form a UFD. So, our best shot could be using the method of undetermined coefficients and solving the resulting system of polynomial equations. For example, thinking of a "nontrivial factorization" as one with the degrees of polynomials in factors strictly smaller than those in the given expression, we can try something like this:

R = PolynomialRing(QQ,3*4,'c') # polynomial ring of undetermined coefficients
c = R.gens()
K.<x> = R[]  # ring of polynomials in x
f1 = K(c[:3])      # = c2*x^2 + c1*x + c0
f2 = K(c[3:6]) 
g1 = K(c[6:9])
g2 = K(c[9:])
# define the system of equations as an ideal:
J = R.ideal( (f1*g1 + f2*g2*(x^2+1) - (-x^3 + 5*x^2 + 3*x + 3)).coefficients() + (f1*g2 + f2*g1 - (2*x^3 + x^2 + 3)).coefficients() + [c[0]-1] )
print( J.variety() )     # solving