Help explore parametric system in SageMath

129 Views Asked by At

i could use some help in presenting a good solution for this problem :
Problem
Assume the system of equations in $x, y, z, t$
$ax+y+z+t=1$
$x+ay+z+t=b$
$x+y+az+t=b^2$
$x+y+z+at=b^3$
where $a, b$ are integer parameters. Determine the values of $a$ and $b$ for which the system has infinitely many solutions and the values of $a$ and $b$ for which the system has no solutions.

I have solved the equations and then for the values of $a$ that make the denominator equal to zero, i solved the numerators for $b$. I found the pairs of $a$ and $b$ that make the system impossible, or to have infinite solutions but i was wondering if there is a more "programming" way in SageMath. Thank you in advance.

Edit 1: I 've gone so far but now i can't manage to extract my last columns and create equations $= 0$ to solve as $b$.
my solution so far
I am trying to create the equations this way but it returns False, False, False.
What is the difference with that way of creating equations?

1

There are 1 best solutions below

0
On BEST ANSWER

Your second way of solving the problem looks promising, from Sagemath's point of view.

sage: var('t x y z')
(t, x, y, z)
sage: var('a b', domain=ZZ)
(a, b)
sage: eq = [a*x + y + z + t == 1, x + a*y + z + t == b, x + y + a*z + t == b^2, x + y + z + a*t == b^3]
sage: solve(eq, x, y, z, t)
[[x == -(b^3 + b^2 - a + b - 2)/(a^2 + 2*a - 3), y == -(b^3 - a*b + b^2 - 2*b + 1)/(a^2 + 2*a - 3), z == (a*b^2 - b^3 + 2*b^2 - b - 1)/(a^2 + 2*a - 3), t == (a*b^3 + 2*b^3 - b^2 - b - 1)/(a^2 + 2*a - 3)]]

You should be able to answer your questions from here.