3.3.66 \(\int (1+6 x-7 x^2+4 x^3-x^4)^n \, dx\) [266]

Optimal. Leaf size=52 \[ 3^n (-1+x) \operatorname {AppellF1}\left (\frac {1}{2},-n,-n,\frac {3}{2},-\frac {2 (-1+x)^2}{1+\sqrt {13}},\frac {2 (-1+x)^2}{-1+\sqrt {13}}\right ) \]

[Out]

3^n*(x-1)*AppellF1(1/2,-n,-n,3/2,2*(x-1)^2/(-1+13^(1/2)),-2*(x-1)^2/(1+13^(1/2)))

________________________________________________________________________________________

Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(115\) vs. \(2(52)=104\).
time = 0.08, antiderivative size = 115, normalized size of antiderivative = 2.21, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {1120, 1119, 440} \begin {gather*} (x-1) \left (\frac {2 (x-1)^2}{1-\sqrt {13}}+1\right )^{-n} \left (\frac {2 (x-1)^2}{1+\sqrt {13}}+1\right )^{-n} \left (-(x-1)^4-(x-1)^2+3\right )^n \operatorname {AppellF1}\left (\frac {1}{2},-n,-n,\frac {3}{2},-\frac {2 (x-1)^2}{1+\sqrt {13}},-\frac {2 (x-1)^2}{1-\sqrt {13}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + 6*x - 7*x^2 + 4*x^3 - x^4)^n,x]

[Out]

((3 - (-1 + x)^2 - (-1 + x)^4)^n*(-1 + x)*AppellF1[1/2, -n, -n, 3/2, (-2*(-1 + x)^2)/(1 + Sqrt[13]), (-2*(-1 +
 x)^2)/(1 - Sqrt[13])])/((1 + (2*(-1 + x)^2)/(1 - Sqrt[13]))^n*(1 + (2*(-1 + x)^2)/(1 + Sqrt[13]))^n)

Rule 440

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
 -q, 1 + 1/n, (-b)*(x^n/a), (-d)*(x^n/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rule 1119

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[a^IntPart[p]*(
(a + b*x^2 + c*x^4)^FracPart[p]/((1 + 2*c*(x^2/(b + q)))^FracPart[p]*(1 + 2*c*(x^2/(b - q)))^FracPart[p])), In
t[(1 + 2*c*(x^2/(b + q)))^p*(1 + 2*c*(x^2/(b - q)))^p, x], x]] /; FreeQ[{a, b, c, p}, x] && NeQ[b^2 - 4*a*c, 0
]

Rule 1120

Int[(P4_)^(p_), x_Symbol] :> With[{a = Coeff[P4, x, 0], b = Coeff[P4, x, 1], c = Coeff[P4, x, 2], d = Coeff[P4
, x, 3], e = Coeff[P4, x, 4]}, Subst[Int[SimplifyIntegrand[(a + d^4/(256*e^3) - b*(d/(8*e)) + (c - 3*(d^2/(8*e
)))*x^2 + e*x^4)^p, x], x], x, d/(4*e) + x] /; EqQ[d^3 - 4*c*d*e + 8*b*e^2, 0] && NeQ[d, 0]] /; FreeQ[p, x] &&
 PolyQ[P4, x, 4] && NeQ[p, 2] && NeQ[p, 3]

Rubi steps

\begin {gather*} \begin {aligned} \text {Integral} &=\text {Subst}\left (\int \left (3-x^2-x^4\right )^n \, dx,x,-1+x\right )\\ &=\left (\left (1-\frac {2 (-1+x)^2}{-1-\sqrt {13}}\right )^{-n} \left (1-\frac {2 (-1+x)^2}{-1+\sqrt {13}}\right )^{-n} \left (3-(-1+x)^2-(-1+x)^4\right )^n\right ) \text {Subst}\left (\int \left (1-\frac {2 x^2}{-1-\sqrt {13}}\right )^n \left (1-\frac {2 x^2}{-1+\sqrt {13}}\right )^n \, dx,x,-1+x\right )\\ &=-\left (1+\frac {2 (1-x)^2}{1-\sqrt {13}}\right )^{-n} \left (1+\frac {2 (1-x)^2}{1+\sqrt {13}}\right )^{-n} \left (3-(1-x)^2-(1-x)^4\right )^n (1-x) \operatorname {AppellF1}\left (\frac {1}{2},-n,-n,\frac {3}{2},-\frac {2 (1-x)^2}{1+\sqrt {13}},-\frac {2 (1-x)^2}{1-\sqrt {13}}\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [F]
time = 0.02, size = 0, normalized size = 0.00 \begin {gather*} \int \left (1+6 x-7 x^2+4 x^3-x^4\right )^n \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Integrate[(1 + 6*x - 7*x^2 + 4*x^3 - x^4)^n,x]

[Out]

Integrate[(1 + 6*x - 7*x^2 + 4*x^3 - x^4)^n, x]

________________________________________________________________________________________

Maple [F]
time = 0.00, size = 0, normalized size = 0.00 \[\int \left (-x^{4}+4 x^{3}-7 x^{2}+6 x +1\right )^{n}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-x^4+4*x^3-7*x^2+6*x+1)^n,x)

[Out]

int((-x^4+4*x^3-7*x^2+6*x+1)^n,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^4+4*x^3-7*x^2+6*x+1)^n,x, algorithm="maxima")

[Out]

integrate((-x^4 + 4*x^3 - 7*x^2 + 6*x + 1)^n, x)

________________________________________________________________________________________

Fricas [F]
time = 0.59, size = 24, normalized size = 0.46 \begin {gather*} {\rm integral}\left ({\left (-x^{4} + 4 \, x^{3} - 7 \, x^{2} + 6 \, x + 1\right )}^{n}, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^4+4*x^3-7*x^2+6*x+1)^n,x, algorithm="fricas")

[Out]

integral((-x^4 + 4*x^3 - 7*x^2 + 6*x + 1)^n, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (- x^{4} + 4 x^{3} - 7 x^{2} + 6 x + 1\right )^{n}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x**4+4*x**3-7*x**2+6*x+1)**n,x)

[Out]

Integral((-x**4 + 4*x**3 - 7*x**2 + 6*x + 1)**n, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^4+4*x^3-7*x^2+6*x+1)^n,x, algorithm="giac")

[Out]

integrate((-x^4 + 4*x^3 - 7*x^2 + 6*x + 1)^n, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int {\left (-x^4+4\,x^3-7\,x^2+6\,x+1\right )}^n \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((6*x - 7*x^2 + 4*x^3 - x^4 + 1)^n,x)

[Out]

int((6*x - 7*x^2 + 4*x^3 - x^4 + 1)^n, x)

________________________________________________________________________________________

Chatgpt [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {not solved} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

int((-x^4+4*x^3-7*x^2+6*x+1)^n,x)

[Out]

not solved

________________________________________________________________________________________