3
$\begingroup$

If I input:

Factor[x^2 + x + 1, Extension -> Sqrt[-3]]

Mathematica returns:

1/4 (-I + Sqrt[3] - 2 I x) (I + Sqrt[3] + 2 I x)

The coefficients in the factorization are not in $Q(\sqrt{-3})$. I was expecting something like:

$$ (x - z_3)*(x - (z_3)^2) $$

where $z_3$ is a primitive third root of unity.

$\endgroup$
  • 1
    $\begingroup$ A similar output is produced by Factor[x^2 + 2, Extension -> Sqrt[-2]]. Interestingly, the output of Factor[x^2 + 1, Extension -> Sqrt[-1]] is of the form you were originally expecting. $\endgroup$ – Michael Seifert Mar 15 '16 at 13:53
8
$\begingroup$

Mathematica uses FactorTerms to remove content from factors. Since Sqrt[-3] evaluates to I Sqrt[3], I gets factored out as "content".

FactorTerms[1 + I Sqrt[3] + 2 x]

I (-I + Sqrt[3] - (2 I) x)

You can use AlgebraicNumber to make extension generators atomic.

Factor[x^2 + x + 1, Extension -> AlgebraicNumber[I Sqrt[3], {0, 1}]]

((2 x + AlgebraicNumber[I Sqrt[3], {1, -1}])
(2 x + AlgebraicNumber[I Sqrt[3], {1, 1}])) / 4

ToRadicals[%]//InputForm

((1 - I*Sqrt[3] + 2*x)*(1 + I*Sqrt[3] + 2*x))/4
$\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.