Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
0

Factor a quadratic in a quartic polynomial

asked 7 years ago

Sha gravatar image

updated 7 years ago

Hi, I have done this calculation using a very tedious way and have checked that it is correct. Can I possibly perform this using Sage only.

I have a polynomial :

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

where

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

and

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).

I have checked using multiple software that the factorization of D using the quartic in p

v^2= p^4-2*p^3+5*p^2+8*p+4 gives

[M-((A+2*F*v)/(4*p^4))]*[M-((A-2*F*v)/(4*p^4))] where

F=9*p^8-18*p^7-7*p^6+45*p^5-21*p^4-74*p^3-18*p^2+6*p-2.

Can someone help me obtain the same result by using Sage only. Thank you.

Preview: (hide)

Comments

  1. Could you fix the formatting of your question (i. e. closing your displayed math by another pair of dollars) ? It is difficult to read you...

    1. What is M ?

    2. Could you clarify your question ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 7 years ago )

@emmanuel sorry for the poor display. I have corrected it. M is a rational. My question is that I want to factorize D using v so that I get [M-((A+2*F*v)/(4*p^4))]*[M-((A-2*F*v)/(4*p^4))]

Sha gravatar imageSha ( 7 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 7 years ago

dan_fulea gravatar image

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: (81)p8(p42p3+5p2+8p+4)(p82p779p6+5p573p4749p32p2+23p29)2 . (Use the 81=92 for the squared factor to get the posted F.)

Preview: (hide)
link

Comments

This is great. Exactly what I was looking for except that mine is done 3 pages long (hand written). Thank you so much.

Sha gravatar imageSha ( 7 years ago )

Thank you for this command too : latex( D.discriminant().factor() ). Never knew Sage could do this. I learned a lot about Sage from this page. It is so helpful.

Sha gravatar imageSha ( 7 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 7 years ago

Seen: 505 times

Last updated: Dec 27 '17