Gauss-Legendre quadrature seems quite spectacular at first sight, perfectly integrating polynomials of degree 2n-1 after sampling only n points. however, because the quadrature scheme chooses n abscissae and n weights, on further thought it's not too surprising that it can recover the 2n free parameters of a polynomial of degree 2n-1.
digression: because the scheme only evaluates interior points, it has a fighting chance at working all right when an endpoint is a singularity. how well does it work in practice? of course this will depend on the function.
we derive and attempt to verify the quadrature scheme for 5 through 9 points in Mathematica, following https://pomax.github.io/bezierinfo/legendre-gauss.html .
5-point Gauss-Legendre quadrature
the exact expressions of abscissae and weights for 5 points are also published elsewhere.
LegendreP[5,x]
(15*x - 70*x^3 + 63*x^5)/8
solve Legendre polynomial for x.
roots[n_] := x /. Solve[LegendreP[n,x]==0, Cubics->True, Quartics->True]
for n=5, this requires solving a quadratic equation.
roots[5]
{0, -Sqrt[5 - 2*Sqrt[10/7]]/3, Sqrt[5 - 2*Sqrt[10/7]]/3, -Sqrt[5 + 2*Sqrt[10/7]]/3, Sqrt[5 + 2*Sqrt[10/7]]/3}
legendrederivative[n_,a_] := D[LegendreP[n,x],x] /. x->a
legendrederivative[5,x]
(15 - 210*x^2 + 315*x^4)/8
weightfunction[n_,x_] := 2/((1-x^2)*legendrederivative[n,x]^2)
the hash symbol (number sign) and ampersand together create a lambda function, called pure anonymous functions in Mathematica documentation:
weights[n_] := Map[weightfunction[n,#]&,roots[n]]
weights[5]
{128/225, (322 + 13*Sqrt[70])/900, (322 + 13*Sqrt[70])/900, (322 - 13*Sqrt[70])/900, (322 - 13*Sqrt[70])/900}
create a general polynomial of degree 2n-1 :
f[n_,x_] := FromDigits[Array[a,2*n],x]
f[5,x]
x^9*a[1] + x^8*a[2] + x^7*a[3] + x^6*a[4] + x^5*a[5] + x^4*a[6] + x^3*a[7] + x^2*a[8] + x*a[9] + a[10]
here is the correct answer:
Integrate[f[5,x],{x,-1,1}]
(2*a[2])/9 + (2*a[4])/7 + (2*a[6])/5 + (2*a[8])/3 + 2*a[10]
test if quadrature gets the same answer:
g[n_] := Dot[weights[n],Map[f[n,#]&,roots[n]]]
g[5] - Integrate[f[5,x],{x,-1,1}] // Simplify
0
5 point quadrature can exactly integrate a polynomial of degree 9; what happens if we try a 10th degree?
ff[x_] := FromDigits[Array[a,11],x]
ff[x]
x^10*a[1] + x^9*a[2] + x^8*a[3] + x^7*a[4] + x^6*a[5] + x^5*a[6] + x^4*a[7] + x^3*a[8] + x^2*a[9] + x*a[10] + a[11]
Integrate[ff[x],{x,-1,1}]
(2*a[1])/11 + (2*a[3])/9 + (2*a[5])/7 + (2*a[7])/5 + (2*a[9])/3 + 2*a[11]
Dot[weights[5],Map[ff,roots[5]]] -Integrate[ff[x],{x,-1,1}] //Simplify
(-128*a[1])/43659
not only is there error, but there is guaranteed to be error, because a[1] must be nonzero in a 10th degree polynomial.
6-point Legendre-Gauss quadrature
6 and 7 point quadrature require solving a cubic equation, which is possible but messy.
LegendreP[6,x]
(-5 + 105*x^2 - 315*x^4 + 231*x^6)/16
roots[6]
here's what Mathematica says if Cubics->False, Quartics->False :
{-Sqrt[Root[-5 + 105*#1 - 315*#1^2 + 231*#1^3 & , 1, 0]],
Sqrt[Root[-5 + 105*#1 - 315*#1^2 + 231*#1^3 & , 1, 0]],
-Sqrt[Root[-5 + 105*#1 - 315*#1^2 + 231*#1^3 & , 2, 0]],
Sqrt[Root[-5 + 105*#1 - 315*#1^2 + 231*#1^3 & , 2, 0]],
-Sqrt[Root[-5 + 105*#1 - 315*#1^2 + 231*#1^3 & , 3, 0]],
Sqrt[Root[-5 + 105*#1 - 315*#1^2 + 231*#1^3 & , 3, 0]]}
and now Cubics->True, Quartics->True :
{-((-1)^(3/4)*Sqrt[(105*I - ((7*I)*3^(1/6)*5^(2/3)*(-3*I + Sqrt[3]))/ ((3 + (11*I)*Sqrt[6])/7)^(1/3) + 3^(5/6)*7^(2/3)* (15 + (55*I)*Sqrt[6])^(1/3) - I*7^(2/3)*(45 + (165*I)*Sqrt[6])^(1/3))/ 231]), (-1)^(3/4)* Sqrt[(105*I - ((7*I)*3^(1/6)*5^(2/3)*(-3*I + Sqrt[3]))/ ((3 + (11*I)*Sqrt[6])/7)^(1/3) + 3^(5/6)*7^(2/3)* (15 + (55*I)*Sqrt[6])^(1/3) - I*7^(2/3)*(45 + (165*I)*Sqrt[6])^(1/3))/ 231], -(((-1)^(1/4)*Sqrt[((7*I)*3^(1/6)*5^(2/3)*(3*I + Sqrt[3]))/ ((3 + (11*I)*Sqrt[6])/7)^(1/3) + 3^(5/6)*7^(2/3)* (15 + (55*I)*Sqrt[6])^(1/3) + I*(-105 + 7^(2/3)*(45 + (165*I)*Sqrt[6])^(1/3))])/Sqrt[231]), ((-1)^(1/4)*Sqrt[((7*I)*3^(1/6)*5^(2/3)*(3*I + Sqrt[3]))/ ((3 + (11*I)*Sqrt[6])/7)^(1/3) + 3^(5/6)*7^(2/3)* (15 + (55*I)*Sqrt[6])^(1/3) + I*(-105 + 7^(2/3)*(45 + (165*I)*Sqrt[6])^(1/3))])/Sqrt[231], -Sqrt[(105 + (14*15^(2/3))/((3 + (11*I)*Sqrt[6])/7)^(1/3) + 2*7^(2/3)*(45 + (165*I)*Sqrt[6])^(1/3))/231], Sqrt[(105 + (14*15^(2/3))/((3 + (11*I)*Sqrt[6])/7)^(1/3) + 2*7^(2/3)*(45 + (165*I)*Sqrt[6])^(1/3))/231]}
even though we can, doesn't mean we should. finding roots numerically to any desired precision with Newton's method is likely better practically. nevertheless, charging onward.
legendrederivative[6,x]
(210*x - 1260*x^3 + 1386*x^5)/16
weights[6]
{(117128*7^(2/3)*(3 + (11*I)*Sqrt[6])^(1/3)*(-3*I + 11*Sqrt[6])^5)/ (135*(7*3^(1/6)*5^(2/3)*(1275547677 - 2235092904*Sqrt[2] + (425182559*I)*Sqrt[3] + (2235092904*I)*Sqrt[6]) + 27970*7^(2/3)*(3 + (11*I)*Sqrt[6])^(1/3)*(-856707*I + 564839*Sqrt[6]) - 35*105^(1/3)*(3 + (11*I)*Sqrt[6])^(2/3)*(-41261489*I + (41781234*I)*Sqrt[2] + 41261489*Sqrt[3] + 13927078*Sqrt[6]))), (117128*7^(2/3)*(3 + (11*I)*Sqrt[6])^(1/3)*(-3*I + 11*Sqrt[6])^5)/ (135*(7*3^(1/6)*5^(2/3)*(1275547677 - 2235092904*Sqrt[2] + (425182559*I)*Sqrt[3] + (2235092904*I)*Sqrt[6]) + 27970*7^(2/3)*(3 + (11*I)*Sqrt[6])^(1/3)*(-856707*I + 564839*Sqrt[6]) - 35*105^(1/3)*(3 + (11*I)*Sqrt[6])^(2/3)*(-41261489*I + (41781234*I)*Sqrt[2] + 41261489*Sqrt[3] + 13927078*Sqrt[6]))), (-117128*7^(2/3)*(3 + (11*I)*Sqrt[6])^(1/3)*(-3*I + 11*Sqrt[6])^5)/ (135*(7*3^(1/6)*5^(2/3)*(1275547677 + 2235092904*Sqrt[2] - (425182559*I)*Sqrt[3] + (2235092904*I)*Sqrt[6]) - 27970*7^(2/3)*(3 + (11*I)*Sqrt[6])^(1/3)*(-856707*I + 564839*Sqrt[6]) + 35*105^(1/3)*(3 + (11*I)*Sqrt[6])^(2/3)*(-41261489*I - (41781234*I)*Sqrt[2] - 41261489*Sqrt[3] + 13927078*Sqrt[6]))), (-117128*7^(2/3)*(3 + (11*I)*Sqrt[6])^(1/3)*(-3*I + 11*Sqrt[6])^5)/ (135*(7*3^(1/6)*5^(2/3)*(1275547677 + 2235092904*Sqrt[2] - (425182559*I)*Sqrt[3] + (2235092904*I)*Sqrt[6]) - 27970*7^(2/3)*(3 + (11*I)*Sqrt[6])^(1/3)*(-856707*I + 564839*Sqrt[6]) + 35*105^(1/3)*(3 + (11*I)*Sqrt[6])^(2/3)*(-41261489*I - (41781234*I)*Sqrt[2] - 41261489*Sqrt[3] + 13927078*Sqrt[6]))), (58564*7^(2/3)*(3 + (11*I)*Sqrt[6])^(1/3)*(-3*I + 11*Sqrt[6])^5)/ (135*(7*3^(1/6)*5^(2/3)*(2235092904*Sqrt[2] - (425182559*I)*Sqrt[3]) + 13985*7^(2/3)*(3 + (11*I)*Sqrt[6])^(1/3)*(-856707*I + 564839*Sqrt[6]) + 35*105^(1/3)*(3 + (11*I)*Sqrt[6])^(2/3)*(-41261489*I + 13927078*Sqrt[6]))), (58564*7^(2/3)*(3 + (11*I)*Sqrt[6])^(1/3)*(-3*I + 11*Sqrt[6])^5)/ (135*(7*3^(1/6)*5^(2/3)*(2235092904*Sqrt[2] - (425182559*I)*Sqrt[3]) + 13985*7^(2/3)*(3 + (11*I)*Sqrt[6])^(1/3)*(-856707*I + 564839*Sqrt[6]) + 35*105^(1/3)*(3 + (11*I)*Sqrt[6])^(2/3)*(-41261489*I + 13927078*Sqrt[6])))}
the weights above are real numbers. the presence of the imaginary unit I is casus irreducibilis.
f[6,x]
x^11*a[1] + x^10*a[2] + x^9*a[3] + x^8*a[4] + x^7*a[5] + x^6*a[6] + x^5*a[7] + x^4*a[8] + x^3*a[9] + x^2*a[10] + x*a[11] + a[12]
Integrate[f[6,x],{x,-1,1}]
(2*a[2])/11 + (2*a[4])/9 + (2*a[6])/7 + (2*a[8])/5 + (2*a[10])/3 + 2*a[12]
Mathematica creaks and moans but is able to prove equality.
Timing[Simplify[g[6] - Integrate[f[6,x],{x,-1,1}]]]
Simplify::time: Time spent on a transformation exceeded 300. seconds, and the transformation was aborted. Increasing the value of TimeConstraint option may improve the result of simplification.
(326.626 seconds)
0
Timing[FullSimplify[g[6] == Integrate[f[6,x],{x,-1,1}]]]//InputForm
(1845 seconds, with or without Cubics->True, Quartics->True)
True
7-point Legendre-Gauss quadrature
LegendreP[7,x]
(-35*x + 315*x^3 - 693*x^5 + 429*x^7)/16
roots[7]
Cubics->False, Quartics->False
{0,
-Sqrt[Root[-35 + 315*#1 - 693*#1^2 + 429*#1^3 & , 1, 0]],
Sqrt[Root[-35 + 315*#1 - 693*#1^2 + 429*#1^3 & , 1, 0]],
-Sqrt[Root[-35 + 315*#1 - 693*#1^2 + 429*#1^3 & , 2, 0]],
Sqrt[Root[-35 + 315*#1 - 693*#1^2 + 429*#1^3 & , 2, 0]],
-Sqrt[Root[-35 + 315*#1 - 693*#1^2 + 429*#1^3 & , 3, 0]],
Sqrt[Root[-35 + 315*#1 - 693*#1^2 + 429*#1^3 & , 3, 0]]}
Cubics->True, Quartics->True
{0, -((-1)^(3/4)*Sqrt[(9*3^(1/3)*77^(2/3)*(-I + Sqrt[3]) + (231*I)*(-11 + (13*I)*Sqrt[110])^(1/3) - 3*3^(1/6)*77^(1/3)* (-11 + (13*I)*Sqrt[110])^(2/3) - I*77^(1/3)*(-33 + (39*I)*Sqrt[110])^ (2/3))/(429*(-11 + (13*I)*Sqrt[110])^(1/3))]), (-1)^(3/4)*Sqrt[(9*3^(1/3)*77^(2/3)*(-I + Sqrt[3]) + (231*I)*(-11 + (13*I)*Sqrt[110])^(1/3) - 3*3^(1/6)*77^(1/3)* (-11 + (13*I)*Sqrt[110])^(2/3) - I*77^(1/3)*(-33 + (39*I)*Sqrt[110])^ (2/3))/(429*(-11 + (13*I)*Sqrt[110])^(1/3))], -(((-1)^(1/4)*Sqrt[-231*I + (9*77^(2/3)*(I + Sqrt[3]))/ ((-11 + (13*I)*Sqrt[110])/3)^(1/3) - 3*3^(1/6)*(77*(-11 + (13*I)*Sqrt[110]))^(1/3) + I*3^(2/3)*(77*(-11 + (13*I)*Sqrt[110]))^(1/3)])/Sqrt[429]), ((-1)^(1/4)*Sqrt[-231*I + (9*77^(2/3)*(I + Sqrt[3]))/ ((-11 + (13*I)*Sqrt[110])/3)^(1/3) - 3*3^(1/6)*(77*(-11 + (13*I)*Sqrt[110]))^(1/3) + I*3^(2/3)*(77*(-11 + (13*I)*Sqrt[110]))^(1/3)])/Sqrt[429], -Sqrt[(231 + (18*77^(2/3))/((-11 + (13*I)*Sqrt[110])/3)^(1/3) + 2*3^(2/3)*(77*(-11 + (13*I)*Sqrt[110]))^(1/3))/429], Sqrt[(231 + (18*77^(2/3))/((-11 + (13*I)*Sqrt[110])/3)^(1/3) + 2*3^(2/3)*(77*(-11 + (13*I)*Sqrt[110]))^(1/3))/429]}
legendrederivative[7,x]
(-35 + 945*x^2 - 3465*x^4 + 3003*x^6)/16
weights[7]
{512/1225, (359411624*(-11 + (13*I)*Sqrt[110])^(1/3)*(-1679*I + 26*Sqrt[110]))/ (147*(3*3^(1/6)*77^(1/3)*(-11 + (13*I)*Sqrt[110])^(2/3)* (69836087 - (1435135*I)*Sqrt[110]) + 11342298*(-11 + (13*I)*Sqrt[110])^(1/3)*(-1679*I + 26*Sqrt[110]) + 11^(1/6)*21^(1/3)*((-3*I)*7^(1/3)*(-I + Sqrt[3])*(114465923*Sqrt[10] - (184448941*I)*Sqrt[11]) + (69836087*I)*3^(1/3)*11^(1/6)* (-11 + (13*I)*Sqrt[110])^(2/3) + 1435135*3^(1/3)*Sqrt[10]* (-121 + (143*I)*Sqrt[110])^(2/3)))), (359411624*(-11 + (13*I)*Sqrt[110])^(1/3)*(-1679*I + 26*Sqrt[110]))/ (147*(3*3^(1/6)*77^(1/3)*(-11 + (13*I)*Sqrt[110])^(2/3)* (69836087 - (1435135*I)*Sqrt[110]) + 11342298*(-11 + (13*I)*Sqrt[110])^(1/3)*(-1679*I + 26*Sqrt[110]) + 11^(1/6)*21^(1/3)*((-3*I)*7^(1/3)*(-I + Sqrt[3])*(114465923*Sqrt[10] - (184448941*I)*Sqrt[11]) + (69836087*I)*3^(1/3)*11^(1/6)* (-11 + (13*I)*Sqrt[110])^(2/3) + 1435135*3^(1/3)*Sqrt[10]* (-121 + (143*I)*Sqrt[110])^(2/3)))), (359411624*(-11 + (13*I)*Sqrt[110])^(1/3)*(-1679*I + 26*Sqrt[110]))/ (147*(3*3^(1/6)*77^(1/3)*(-11 + (13*I)*Sqrt[110])^(2/3)* (-69836087 + (1435135*I)*Sqrt[110]) + 11342298*(-11 + (13*I)*Sqrt[110])^(1/3)*(-1679*I + 26*Sqrt[110]) + 11^(1/6)*21^(1/3)*(3*7^(1/3)*(I + Sqrt[3])*((114465923*I)*Sqrt[10] + 184448941*Sqrt[11]) + (69836087*I)*3^(1/3)*11^(1/6)* (-11 + (13*I)*Sqrt[110])^(2/3) + 1435135*3^(1/3)*Sqrt[10]* (-121 + (143*I)*Sqrt[110])^(2/3)))), (359411624*(-11 + (13*I)*Sqrt[110])^(1/3)*(-1679*I + 26*Sqrt[110]))/ (147*(3*3^(1/6)*77^(1/3)*(-11 + (13*I)*Sqrt[110])^(2/3)* (-69836087 + (1435135*I)*Sqrt[110]) + 11342298*(-11 + (13*I)*Sqrt[110])^(1/3)*(-1679*I + 26*Sqrt[110]) + 11^(1/6)*21^(1/3)*(3*7^(1/3)*(I + Sqrt[3])*((114465923*I)*Sqrt[10] + 184448941*Sqrt[11]) + (69836087*I)*3^(1/3)*11^(1/6)* (-11 + (13*I)*Sqrt[110])^(2/3) + 1435135*3^(1/3)*Sqrt[10]* (-121 + (143*I)*Sqrt[110])^(2/3)))), (((16336892*I)/147)*(-11 + (13*I)*Sqrt[110])^(1/3)*(11*I + 13*Sqrt[110])^2)/ (-5671149*(-11 + (13*I)*Sqrt[110])^(1/3)*(-1679*I + 26*Sqrt[110]) + 11^(1/6)*21^(1/3)*(3*7^(1/3)*(-114465923*Sqrt[10] + (184448941*I)*Sqrt[11]) + (69836087*I)*3^(1/3)*11^(1/6)* (-11 + (13*I)*Sqrt[110])^(2/3) + 1435135*3^(1/3)*Sqrt[10]* (-121 + (143*I)*Sqrt[110])^(2/3))), (((16336892*I)/147)*(-11 + (13*I)*Sqrt[110])^(1/3)*(11*I + 13*Sqrt[110])^2)/ (-5671149*(-11 + (13*I)*Sqrt[110])^(1/3)*(-1679*I + 26*Sqrt[110]) + 11^(1/6)*21^(1/3)*(3*7^(1/3)*(-114465923*Sqrt[10] + (184448941*I)*Sqrt[11]) + (69836087*I)*3^(1/3)*11^(1/6)* (-11 + (13*I)*Sqrt[110])^(2/3) + 1435135*3^(1/3)*Sqrt[10]* (-121 + (143*I)*Sqrt[110])^(2/3)))}
f[7,x]
x^13*a[1] + x^12*a[2] + x^11*a[3] + x^10*a[4] + x^9*a[5] + x^8*a[6] + x^7*a[7] + x^6*a[8] + x^5*a[9] + x^4*a[10] + x^3*a[11] + x^2*a[12] + x*a[13] + a[14]
Integrate[f[7,x],{x,-1,1}]
(2*a[2])/13 + (2*a[4])/11 + (2*a[6])/9 + (2*a[8])/7 + (2*a[10])/5 + (2*a[12])/3 + 2*a[14]
curiously, proving correctness of 7 points is faster than 6 points.
Timing[Simplify[g[7] - Integrate[f[7,x],{x,-1,1}]]]
(6.78219 seconds)
0
8-point Legendre-Gauss quadrature
LegendreP[8,x]
(35 - 1260*x^2 + 6930*x^4 - 12012*x^6 + 6435*x^8)/128
roots[8]
Cubics->False, Quartics->False
{-Sqrt[Root[35 - 1260*#1 + 6930*#1^2 - 12012*#1^3 + 6435*#1^4 & , 1, 0]],
Sqrt[Root[35 - 1260*#1 + 6930*#1^2 - 12012*#1^3 + 6435*#1^4 & , 1, 0]],
-Sqrt[Root[35 - 1260*#1 + 6930*#1^2 - 12012*#1^3 + 6435*#1^4 & , 2, 0]],
Sqrt[Root[35 - 1260*#1 + 6930*#1^2 - 12012*#1^3 + 6435*#1^4 & , 2, 0]],
-Sqrt[Root[35 - 1260*#1 + 6930*#1^2 - 12012*#1^3 + 6435*#1^4 & , 3, 0]],
Sqrt[Root[35 - 1260*#1 + 6930*#1^2 - 12012*#1^3 + 6435*#1^4 & , 3, 0]],
-Sqrt[Root[35 - 1260*#1 + 6930*#1^2 - 12012*#1^3 + 6435*#1^4 & , 4, 0]],
Sqrt[Root[35 - 1260*#1 + 6930*#1^2 - 12012*#1^3 + 6435*#1^4 & , 4, 0]]}
Cubics->True, Quartics->True
{-Sqrt[7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2], Sqrt[7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2], -Sqrt[7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2], Sqrt[7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2], -Sqrt[7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2], Sqrt[7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2], -Sqrt[7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2], Sqrt[7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2]}
legendrederivative[8,x]
(-2520*x + 27720*x^3 - 72072*x^5 + 51480*x^7)/128
weights[8]
(151.66717 seconds)
{32768/((8/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)* (2520*Sqrt[7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2] - 27720*(7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(3/2) + 72072*(7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(5/2) - 51480*(7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(7/2))^2), 32768/((8/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)* (2520*Sqrt[7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2] - 27720*(7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(3/2) + 72072*(7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(5/2) - 51480*(7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(7/2))^2), 32768/((8/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)* (2520*Sqrt[7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2] - 27720*(7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(3/2) + 72072*(7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(5/2) - 51480*(7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(7/2))^2), 32768/((8/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)* (2520*Sqrt[7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2] - 27720*(7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(3/2) + 72072*(7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(5/2) - 51480*(7/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) - 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(7/2))^2), 32768/((8/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)* (2520*Sqrt[7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2] - 27720*(7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(3/2) + 72072*(7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(5/2) - 51480*(7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(7/2))^2), 32768/((8/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)* (2520*Sqrt[7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2] - 27720*(7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(3/2) + 72072*(7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(5/2) - 51480*(7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(7/2))^2), 32768/((8/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)* (2520*Sqrt[7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2] - 27720*(7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(3/2) + 72072*(7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(5/2) - 51480*(7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(7/2))^2), 32768/((8/15 - (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 - Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)* (2520*Sqrt[7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2] - 27720*(7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(3/2) + 72072*(7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(5/2) - 51480*(7/15 + (2*Sqrt[(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))/143])/15 + Sqrt[896/2925 - (16*14^(2/3))/(39*(165*(42 + I*Sqrt[546]))^(1/3)) - (16*(588 + (14*I)*Sqrt[546])^(1/3))/(39*165^(2/3)) + 896/(225*Sqrt[143*(308 + (5*2310^(2/3))/(42 + I*Sqrt[546])^(1/3) + 5*(2310*(42 + I*Sqrt[546]))^(1/3))])]/2)^(7/2))^2)}
f[8,x]
x^15*a[1] + x^14*a[2] + x^13*a[3] + x^12*a[4] + x^11*a[5] + x^10*a[6] + x^9*a[7] + x^8*a[8] + x^7*a[9] + x^6*a[10] + x^5*a[11] + x^4*a[12] + x^3*a[13] + x^2*a[14] + x*a[15] + a[16]
Integrate[f[8,x],{x,-1,1}]
(2*a[2])/15 + (2*a[4])/13 + (2*a[6])/11 + (2*a[8])/9 + (2*a[10])/7 + (2*a[12])/5 + (2*a[14])/3 + 2*a[16]
Timing[Simplify[g[8] - Integrate[f[8,x],{x,-1,1}], TimeConstraint->14400]]
without the TimeConstraint, Mathematica fails to Simplify to zero. with the TimeConstraint, Mathematica gives up, mysteriously exiting without an error or status code. Mathematica also mysteriously gives up on the following:
Timing[FullSimplify[g[8] == Integrate[f[8,x],{x,-1,1}]]]
trying again without specifying Cubics->True, Quartics->True
roots[n_] := x /. Solve[LegendreP[n,x]==0]
then we do succeed, though it's mysterious why. how do you do algebra on Root[] expressions?
Timing[FullSimplify[g[8] == Integrate[f[8,x],{x,-1,1}]]]
{254.274571, True}
we also demonstrate quadrature working on a polynomial carefully designed to have a pretty answer:
nf[n_,y_]:=D[7*(x^(2*n+1)-1)/(x-1) /. x-> (x+1)*5,x] /. x -> y
nf[8,x]//Factor//Expand
21028518676760 + 310587882995600*x + 2141341567039500*x^2 + 9141668677330000*x^3 + 27025499381125000*x^4 + 58604206983000000*x^5 + 96296700916718750*x^6 + 122092097881250000*x^7 + 120424152515625000*x^8 + 92403046093750000*x^9 + 54706981054687500*x^10 + 24542027343750000*x^11 + 8075361328125000*x^12 + 1839892578125000*x^13 + 259552001953125*x^14 + 17089843750000*x^15
Integrate[nf[8,x],{x,-1,1}]
77777777777777770
gn[n_]:=Dot[weights[n],Map[nf[n,#]&,roots[n]]]
N[gn[8],25] //InputForm
7.777777777777777`25.15051499783199*^16 + 0``8.259659467257055*I
N[Integrate[nf[8,x],{x,-1,1}],25] //InputForm
7.777777777777777`25.*^16
9-point Legendre-Gauss quadrature
LegendreP[9,x]
(315*x - 4620*x^3 + 18018*x^5 - 25740*x^7 + 12155*x^9)/128
roots[9]
Cubics->False, Quartics->False
{0,
-Sqrt[Root[315 - 4620*#1 + 18018*#1^2 - 25740*#1^3 + 12155*#1^4 & , 1, 0]],
Sqrt[Root[315 - 4620*#1 + 18018*#1^2 - 25740*#1^3 + 12155*#1^4 & , 1, 0]],
-Sqrt[Root[315 - 4620*#1 + 18018*#1^2 - 25740*#1^3 + 12155*#1^4 & , 2, 0]],
Sqrt[Root[315 - 4620*#1 + 18018*#1^2 - 25740*#1^3 + 12155*#1^4 & , 2, 0]],
-Sqrt[Root[315 - 4620*#1 + 18018*#1^2 - 25740*#1^3 + 12155*#1^4 & , 3, 0]],
Sqrt[Root[315 - 4620*#1 + 18018*#1^2 - 25740*#1^3 + 12155*#1^4 & , 3, 0]],
-Sqrt[Root[315 - 4620*#1 + 18018*#1^2 - 25740*#1^3 + 12155*#1^4 & , 4, 0]],
Sqrt[Root[315 - 4620*#1 + 18018*#1^2 - 25740*#1^3 + 12155*#1^4 & , 4, 0]]}
Cubics->True, Quartics->True
{0, -Sqrt[9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2], Sqrt[9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2], -Sqrt[9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2], Sqrt[9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2], -Sqrt[9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2], Sqrt[9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2], -Sqrt[9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2], Sqrt[9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2]}
legendrederivative[9,x]
(315 - 13860*x^2 + 90090*x^4 - 180180*x^6 + 109395*x^8)/128
weights[9]
(90.535658 seconds)
{32768/99225, 32768/ ((8/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2)* (315 - 13860*(9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^ (1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^ (1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^ (1/3)])]/2) + 90090*(9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^ (2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/ 3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^2 - 180180* (9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^3 + 109395* (9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^4)^2), 32768/ ((8/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2)* (315 - 13860*(9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^ (1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^ (1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^ (1/3)])]/2) + 90090*(9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^ (2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/ 3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^2 - 180180* (9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^3 + 109395* (9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^4)^2), 32768/ ((8/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2)* (315 - 13860*(9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^ (1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^ (1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^ (1/3)])]/2) + 90090*(9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^ (2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/ 3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^2 - 180180* (9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^3 + 109395* (9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^4)^2), 32768/ ((8/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2)* (315 - 13860*(9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^ (1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^ (1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^ (1/3)])]/2) + 90090*(9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^ (2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/ 3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^2 - 180180* (9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^3 + 109395* (9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) - 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^4)^2), 32768/ ((8/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2)* (315 - 13860*(9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^ (1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^ (1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^ (1/3)])]/2) - 180180*(9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^ (2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/ 3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^3 + 90090* (-9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^2 + 109395* (-9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^4)^2), 32768/ ((8/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2)* (315 - 13860*(9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^ (1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^ (1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^ (1/3)])]/2) - 180180*(9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^ (2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/ 3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^3 + 90090* (-9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^2 + 109395* (-9/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^4)^2), 32768/ ((8/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2)* (315 - 13860*(9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^ (1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^ (1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^ (1/3)])]/2) + 90090*(9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^ (2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/ 3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^2 - 180180* (9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^3 + 109395* (9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^4)^2), 32768/ ((8/17 + (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 - Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/2)* (315 - 13860*(9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^ (1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^ (1/3))/143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^ (1/3)])]/2) + 90090*(9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^ (2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/ 17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ (85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/ 3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^2 - 180180* (9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^3 + 109395* (9/17 - (2*Sqrt[(12 + (17*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/143^(2/3) + (17*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3))/5])/17 + Sqrt[384/1445 - (16*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/(85*143^(2/3)) - (16*42^(2/3))/(85*(143*(66 + (5*I)*Sqrt[66]))^(1/3)) + 384/(3757*Sqrt[60 + (85*(42*(66 + (5*I)*Sqrt[66]))^(1/3))/ 143^(2/3) + (85*42^(2/3))/(143*(66 + (5*I)*Sqrt[66]))^(1/3)])]/ 2)^4)^2)}
f[9,x]
x^17*a[1] + x^16*a[2] + x^15*a[3] + x^14*a[4] + x^13*a[5] + x^12*a[6] + x^11*a[7] + x^10*a[8] + x^9*a[9] + x^8*a[10] + x^7*a[11] + x^6*a[12] + x^5*a[13] + x^4*a[14] + x^3*a[15] + x^2*a[16] + x*a[17] + a[18]
Integrate[f[9,x],{x,-1,1}]
(2*a[2])/17 + (2*a[4])/15 + (2*a[6])/13 + (2*a[8])/11 + (2*a[10])/9 + (2*a[12])/7 + (2*a[14])/5 + (2*a[16])/3 + 2*a[18]
Timing[FullSimplify[g[9] == Integrate[f[9,x],{x,-1,1}]]]
no result after 6.25 days, manually aborted.
again, omitting "Cubics->True, Quartics->True" mysteriously results in success:
Timing[FullSimplify[g[9] == Integrate[f[9,x],{x,-1,1}]]]
{1164.994788, True}
numeric evaluation of a selected polynomial:
nf[9,x]//Factor//Expand
592470169067385 + 9934306144714350*x + 78404769301414500*x^2 + 386827215552330000*x^3 + 1336214342154562500*x^4 + 3429447712842375000*x^5 + 6771888741932343750*x^6 + 10508444636943750000*x^7 + 12973535419605468750*x^8 + 12815684906445312500*x^9 + 10129468943945312500*x^10 + 6369659214843750000*x^11 + 3147586469726562500*x^12 + 1196633593750000000*x^13 + 337997589111328125*x^14 + 66838378906250000*x^15 + 8261871337890625*x^16 + 480651855468750*x^17
Integrate[nf[9,x],{x,-1,1}]
7777777777777777770
N[gn[9],25] //InputForm
7.77777777777777777`25.15051499783199*^18 + 0``6.259659467257056*I
N[Integrate[nf[9,x],{x,-1,1}],25] //InputForm
7.77777777777777777`25.*^18
No comments :
Post a Comment