Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A possibility is to start with A, B, D and ask for the roots of D, condidered as a function of degree two in M. The code is:

var( 'p,M' )
A = 18*p^10 - 54*p^9 + 59*p^8 + 130*p^7 - 209*p^6 - 98*p^5 + 407*p^4 + 362*p^3 + 49*p^2 - 16*p + 8
B = 9 \
    * (p + 1)^2 \
    * (p^4 - 2*p^3 + 2*p^2 + 2*p + 1) \
    * (4*p^8 - 52*p^7 + 373*p^6 + 68*p^5 - 445*p^4 + 72*p^3 + 163*p^2 - 48*p+ 9)

D = M^2 - A/2/p^4*M + B/16/p^4
solutions = solve( D==0, M )
for sol in solutions:
    print sol

This gives:

M == 1/4*(18*p^10 - 54*p^9 + 59*p^8 + 130*p^7 - 209*p^6 - 98*p^5 + 407*p^4 + 362*p^3 + 49*p^2
          -
          2*(9*p^8 - 18*p^7 - 7*p^6 + 45*p^5 - 21*p^4 - 74*p^3 - 18*p^2 + 6*p - 2)
          *sqrt(p^4 - 2*p^3 + 5*p^2 + 8*p + 4) - 16*p + 8)/p^4
M == 1/4*(18*p^10 - 54*p^9 + 59*p^8 + 130*p^7 - 209*p^6 - 98*p^5 + 407*p^4 + 362*p^3 + 49*p^2
          +
          2*(9*p^8 - 18*p^7 - 7*p^6 + 45*p^5 - 21*p^4 - 74*p^3 - 18*p^2 + 6*p - 2)
          *sqrt(p^4 - 2*p^3 + 5*p^2 + 8*p + 4) - 16*p + 8)/p^4

(Result was manually broken.)

Alternatively, one can ask for the factorization of the discriminant of D, seen as a polynomial in M. The rest is applying the formula for the roots of an equation of degree two in the variable M. A possible code for this path is:

R0.<p> = PolynomialRing( QQ )
F0 = R0.fraction_field()

R.<M> = PolynomialRing( F0 )

A = 18*p^10 - 54*p^9 + 59*p^8 + 130*p^7 - 209*p^6 - 98*p^5 + 407*p^4 + 362*p^3 + 49*p^2 - 16*p + 8
B = 9 \
    * (p + 1)^2 \
    * (p^4 - 2*p^3 + 2*p^2 + 2*p + 1) \
    * (4*p^8 - 52*p^7 + 373*p^6 + 68*p^5 - 445*p^4 + 72*p^3 + 163*p^2 - 48*p+ 9)

D = M^2 - A/2/p^4*M + B/16/p^4

print D.discriminant().factor()
latex( D.discriminant().factor() )

This gives:

(81) * p^-8 * (p^4 - 2*p^3 + 5*p^2 + 8*p + 4) * (p^8 - 2*p^7 - 7/9*p^6 + 5*p^5 - 7/3*p^4 - 74/9*p^3 - 2*p^2 + 2/3*p - 2/9)^2

The discriminant has thus in its factorization the posted factors

  • v, simple factor,
  • and F, with the power two.

The latex print for the factorized discriminant is displayed here, also after some small change, as follows: $$\left(81\right) \cdot p^{-8} \cdot (p^{4} - 2 p^{3} + 5 p^{2} + 8 p + 4) \cdot \left(p^{8} - 2 p^{7} - \frac{7}{9} p^{6} + 5 p^{5} - \frac{7}{3} p^{4} - \frac{74}{9} p^{3} - 2 p^{2} + \frac{2}{3} p - \frac{2}{9} \right)^{2} \ .$$ (Use the $81=9^2$ for the squared factor to get the posted F.)