0
$\begingroup$

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?

$\endgroup$
1
  • $\begingroup$ I understand that you wanted to see how you could use Sagemath for this problem. But have you noticed that this issue can be solved very easily "by hand" by adding your 4 equations which gives you $x+y+z+t=$ something ?Subtracting this equation to each other one gives at once the "values" of $x,y,z,t$ ? $\endgroup$
    – Jean Marie
    Commented Nov 5, 2023 at 8:39

1 Answer 1

1
$\begingroup$

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.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .