0
$\begingroup$

For example I give wolfram alpha the equations $a^2=b, b^2 = c, c^2 = a$ to solve, and I get the following as answers. what wolfram alpha gave me

However, I want $a,b,c$ to be the three roots of a degree $3$ polynomial, is there anyway to utilize the process so I don't have to type each set of solutions in manually?

(This is my first time asking a question, hopefully I have made myself clear)

$\endgroup$
2
  • 1
    $\begingroup$ Not clear, how are you going to get the 7-root from a 3rd degree polynomial? $\endgroup$
    – yarchik
    Mar 7 '20 at 8:39
  • 2
    $\begingroup$ If a, b, and c are the roots of the polynomial then the polynomial is just Times @@ (x - {a, b, c}) $\endgroup$
    – Bob Hanlon
    Mar 7 '20 at 15:58
3
$\begingroup$

This site is about Mathematica and the Wolfram language, not WolframAlpha.

eqns = {a^2 == c, b^2 == a, c^2 == b};

The solutions are

solns = Solve[eqns, {a, b, c}]

enter image description here

Verifying the solutions

(And @@ eqns) /. solns

(* {True, True, True, True, True, True, True, True} *)

The polynomials (with duplicates removed)

(polys = Times @@ (x - {a, b, c}) /. solns // 
    DeleteDuplicates) // TraditionalForm

enter image description here

For alternate representations

polys // Expand // FullSimplify // TraditionalForm

enter image description here

The real solutions are

solnsR = Solve[eqns, {a, b, c}, Reals]

(* {{a -> 0, b -> 0, c -> 0}, {a -> 1, b -> 1, c -> 1}} *)

(polysR = Times @@ (x - {a, b, c}) /. solnsR) // TraditionalForm

enter image description here

$\endgroup$
2
$\begingroup$

This is doable in a much more compact way than the previous answer:

Collect[x^3 + C[2] x^2 + C[1] x + C[0] /. 
        SolveAlways[{x^3 + C[2] x^2 + C[1] x + C[0] == (x - a) (x - b) (x - c),
                     a^2 == b, b^2 == c, c^2 == a}, x], x, FullSimplify] // Union
   {x^3, -1 + 3 x - 3 x^2 + x^3,
    -1 - 1/2 I (-I + Sqrt[7]) x + 1/2 (1 - I Sqrt[7]) x^2 + x^3,
    -1 + 1/2 I (I + Sqrt[7]) x + 1/2 (1 + I Sqrt[7]) x^2 + x^3}

and to pick out real solutions,

Select[%, VectorQ[Im[CoefficientList[#, x]], PossibleZeroQ] &] // Factor
   {x^3, (-1 + x)^3}
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.