\(\int \frac {72-18 x^2+e^{16-32 x^2+24 x^4-8 x^6+x^8} (-4+x^2) (774 x^8-1344 x^{10}+864 x^{12}-240 x^{14}+24 x^{16})}{-4 x^7+x^9} \, dx\) [583]

   Optimal result
   Rubi [C] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 73, antiderivative size = 21 \[ \int \frac {72-18 x^2+e^{16-32 x^2+24 x^4-8 x^6+x^8} \left (-4+x^2\right ) \left (774 x^8-1344 x^{10}+864 x^{12}-240 x^{14}+24 x^{16}\right )}{-4 x^7+x^9} \, dx=3 \left (\frac {1}{x^6}+e^{\left (-2+x^2\right )^4} \left (-4+x^2\right )\right ) \]

[Out]

3*exp(ln(x^2-4)+(x^2-2)^4)+3/x^6

Rubi [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 0.66 (sec) , antiderivative size = 99, normalized size of antiderivative = 4.71, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.096, Rules used = {1607, 6820, 6847, 2258, 2239, 2240, 2250} \[ \int \frac {72-18 x^2+e^{16-32 x^2+24 x^4-8 x^6+x^8} \left (-4+x^2\right ) \left (774 x^8-1344 x^{10}+864 x^{12}-240 x^{14}+24 x^{16}\right )}{-4 x^7+x^9} \, dx=\frac {3}{x^6}-6 e^{\left (x^2-2\right )^4}+\frac {3 \left (2-x^2\right )^5 \Gamma \left (\frac {5}{4},-\left (2-x^2\right )^4\right )}{\left (-\left (2-x^2\right )^4\right )^{5/4}}+\frac {3 \left (2-x^2\right ) \Gamma \left (\frac {1}{4},-\left (2-x^2\right )^4\right )}{4 \sqrt [4]{-\left (2-x^2\right )^4}} \]

[In]

Int[(72 - 18*x^2 + E^(16 - 32*x^2 + 24*x^4 - 8*x^6 + x^8)*(-4 + x^2)*(774*x^8 - 1344*x^10 + 864*x^12 - 240*x^1
4 + 24*x^16))/(-4*x^7 + x^9),x]

[Out]

-6*E^(-2 + x^2)^4 + 3/x^6 + (3*(2 - x^2)*Gamma[1/4, -(2 - x^2)^4])/(4*(-(2 - x^2)^4)^(1/4)) + (3*(2 - x^2)^5*G
amma[5/4, -(2 - x^2)^4])/(-(2 - x^2)^4)^(5/4)

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 2239

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_)), x_Symbol] :> Simp[(-F^a)*(c + d*x)*(Gamma[1/n, (-b)*(c + d
*x)^n*Log[F]]/(d*n*((-b)*(c + d*x)^n*Log[F])^(1/n))), x] /; FreeQ[{F, a, b, c, d, n}, x] &&  !IntegerQ[2/n]

Rule 2240

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[(e + f*x)^n*(
F^(a + b*(c + d*x)^n)/(b*f*n*(c + d*x)^n*Log[F])), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

Rule 2250

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[(-F^a)*((e +
f*x)^(m + 1)/(f*n*((-b)*(c + d*x)^n*Log[F])^((m + 1)/n)))*Gamma[(m + 1)/n, (-b)*(c + d*x)^n*Log[F]], x] /; Fre
eQ[{F, a, b, c, d, e, f, m, n}, x] && EqQ[d*e - c*f, 0]

Rule 2258

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*(u_), x_Symbol] :> Int[ExpandLinearProduct[F^(a + b*(c + d*
x)^n), u, c, d, x], x] /; FreeQ[{F, a, b, c, d, n}, x] && PolynomialQ[u, x]

Rule 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rule 6847

Int[(u_)*(x_)^(m_.), x_Symbol] :> Dist[1/(m + 1), Subst[Int[SubstFor[x^(m + 1), u, x], x], x, x^(m + 1)], x] /
; FreeQ[m, x] && NeQ[m, -1] && FunctionOfQ[x^(m + 1), u, x]

Rubi steps \begin{align*} \text {integral}& = \int \frac {72-18 x^2+e^{16-32 x^2+24 x^4-8 x^6+x^8} \left (-4+x^2\right ) \left (774 x^8-1344 x^{10}+864 x^{12}-240 x^{14}+24 x^{16}\right )}{x^7 \left (-4+x^2\right )} \, dx \\ & = \int \left (-\frac {18}{x^7}+6 e^{\left (-2+x^2\right )^4} x \left (129-224 x^2+144 x^4-40 x^6+4 x^8\right )\right ) \, dx \\ & = \frac {3}{x^6}+6 \int e^{\left (-2+x^2\right )^4} x \left (129-224 x^2+144 x^4-40 x^6+4 x^8\right ) \, dx \\ & = \frac {3}{x^6}+3 \text {Subst}\left (\int e^{(-2+x)^4} \left (129-224 x+144 x^2-40 x^3+4 x^4\right ) \, dx,x,x^2\right ) \\ & = \frac {3}{x^6}+3 \text {Subst}\left (\int \left (e^{(-2+x)^4}-8 e^{(-2+x)^4} (-2+x)^3+4 e^{(-2+x)^4} (-2+x)^4\right ) \, dx,x,x^2\right ) \\ & = \frac {3}{x^6}+3 \text {Subst}\left (\int e^{(-2+x)^4} \, dx,x,x^2\right )+12 \text {Subst}\left (\int e^{(-2+x)^4} (-2+x)^4 \, dx,x,x^2\right )-24 \text {Subst}\left (\int e^{(-2+x)^4} (-2+x)^3 \, dx,x,x^2\right ) \\ & = -6 e^{\left (-2+x^2\right )^4}+\frac {3}{x^6}+\frac {3 \left (2-x^2\right ) \Gamma \left (\frac {1}{4},-\left (2-x^2\right )^4\right )}{4 \sqrt [4]{-\left (2-x^2\right )^4}}+\frac {3 \left (2-x^2\right )^5 \Gamma \left (\frac {5}{4},-\left (2-x^2\right )^4\right )}{\left (-\left (2-x^2\right )^4\right )^{5/4}} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 0.44 (sec) , antiderivative size = 95, normalized size of antiderivative = 4.52 \[ \int \frac {72-18 x^2+e^{16-32 x^2+24 x^4-8 x^6+x^8} \left (-4+x^2\right ) \left (774 x^8-1344 x^{10}+864 x^{12}-240 x^{14}+24 x^{16}\right )}{-4 x^7+x^9} \, dx=\frac {3}{x^6}+3 \left (-2 e^{\left (-2+x^2\right )^4}-\frac {\left (-2+x^2\right ) \Gamma \left (\frac {1}{4},-\left (-2+x^2\right )^4\right )}{4 \sqrt [4]{-\left (-2+x^2\right )^4}}+\frac {\left (2-x^2\right )^5 \Gamma \left (\frac {5}{4},-\left (2-x^2\right )^4\right )}{\left (-\left (2-x^2\right )^4\right )^{5/4}}\right ) \]

[In]

Integrate[(72 - 18*x^2 + E^(16 - 32*x^2 + 24*x^4 - 8*x^6 + x^8)*(-4 + x^2)*(774*x^8 - 1344*x^10 + 864*x^12 - 2
40*x^14 + 24*x^16))/(-4*x^7 + x^9),x]

[Out]

3/x^6 + 3*(-2*E^(-2 + x^2)^4 - ((-2 + x^2)*Gamma[1/4, -(-2 + x^2)^4])/(4*(-(-2 + x^2)^4)^(1/4)) + ((2 - x^2)^5
*Gamma[5/4, -(2 - x^2)^4])/(-(2 - x^2)^4)^(5/4))

Maple [A] (verified)

Time = 10.44 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.10

method result size
risch \(\frac {3}{x^{6}}+\left (3 x^{2}-12\right ) {\mathrm e}^{\left (x^{2}-2\right )^{4}}\) \(23\)
default \(\frac {3}{x^{6}}+3 \,{\mathrm e}^{\ln \left (x^{2}-4\right )+x^{8}-8 x^{6}+24 x^{4}-32 x^{2}+16}\) \(36\)
parts \(\frac {3}{x^{6}}+3 \,{\mathrm e}^{\ln \left (x^{2}-4\right )+x^{8}-8 x^{6}+24 x^{4}-32 x^{2}+16}\) \(36\)
parallelrisch \(\frac {24+24 \,{\mathrm e}^{\ln \left (x^{2}-4\right )+x^{8}-8 x^{6}+24 x^{4}-32 x^{2}+16} x^{6}}{8 x^{6}}\) \(40\)

[In]

int(((24*x^16-240*x^14+864*x^12-1344*x^10+774*x^8)*exp(ln(x^2-4)+x^8-8*x^6+24*x^4-32*x^2+16)-18*x^2+72)/(x^9-4
*x^7),x,method=_RETURNVERBOSE)

[Out]

3/x^6+(3*x^2-12)*exp((x^2-2)^4)

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.81 \[ \int \frac {72-18 x^2+e^{16-32 x^2+24 x^4-8 x^6+x^8} \left (-4+x^2\right ) \left (774 x^8-1344 x^{10}+864 x^{12}-240 x^{14}+24 x^{16}\right )}{-4 x^7+x^9} \, dx=\frac {3 \, {\left (x^{6} e^{\left (x^{8} - 8 \, x^{6} + 24 \, x^{4} - 32 \, x^{2} + \log \left (x^{2} - 4\right ) + 16\right )} + 1\right )}}{x^{6}} \]

[In]

integrate(((24*x^16-240*x^14+864*x^12-1344*x^10+774*x^8)*exp(log(x^2-4)+x^8-8*x^6+24*x^4-32*x^2+16)-18*x^2+72)
/(x^9-4*x^7),x, algorithm="fricas")

[Out]

3*(x^6*e^(x^8 - 8*x^6 + 24*x^4 - 32*x^2 + log(x^2 - 4) + 16) + 1)/x^6

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.52 \[ \int \frac {72-18 x^2+e^{16-32 x^2+24 x^4-8 x^6+x^8} \left (-4+x^2\right ) \left (774 x^8-1344 x^{10}+864 x^{12}-240 x^{14}+24 x^{16}\right )}{-4 x^7+x^9} \, dx=\left (3 x^{2} - 12\right ) e^{x^{8} - 8 x^{6} + 24 x^{4} - 32 x^{2} + 16} + \frac {3}{x^{6}} \]

[In]

integrate(((24*x**16-240*x**14+864*x**12-1344*x**10+774*x**8)*exp(ln(x**2-4)+x**8-8*x**6+24*x**4-32*x**2+16)-1
8*x**2+72)/(x**9-4*x**7),x)

[Out]

(3*x**2 - 12)*exp(x**8 - 8*x**6 + 24*x**4 - 32*x**2 + 16) + 3/x**6

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 61 vs. \(2 (23) = 46\).

Time = 0.31 (sec) , antiderivative size = 61, normalized size of antiderivative = 2.90 \[ \int \frac {72-18 x^2+e^{16-32 x^2+24 x^4-8 x^6+x^8} \left (-4+x^2\right ) \left (774 x^8-1344 x^{10}+864 x^{12}-240 x^{14}+24 x^{16}\right )}{-4 x^7+x^9} \, dx=3 \, {\left (x^{2} e^{16} - 4 \, e^{16}\right )} e^{\left (x^{8} - 8 \, x^{6} + 24 \, x^{4} - 32 \, x^{2}\right )} - \frac {9 \, {\left (x^{2} + 2\right )}}{16 \, x^{4}} + \frac {3 \, {\left (3 \, x^{4} + 6 \, x^{2} + 16\right )}}{16 \, x^{6}} \]

[In]

integrate(((24*x^16-240*x^14+864*x^12-1344*x^10+774*x^8)*exp(log(x^2-4)+x^8-8*x^6+24*x^4-32*x^2+16)-18*x^2+72)
/(x^9-4*x^7),x, algorithm="maxima")

[Out]

3*(x^2*e^16 - 4*e^16)*e^(x^8 - 8*x^6 + 24*x^4 - 32*x^2) - 9/16*(x^2 + 2)/x^4 + 3/16*(3*x^4 + 6*x^2 + 16)/x^6

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 194 vs. \(2 (23) = 46\).

Time = 0.46 (sec) , antiderivative size = 194, normalized size of antiderivative = 9.24 \[ \int \frac {72-18 x^2+e^{16-32 x^2+24 x^4-8 x^6+x^8} \left (-4+x^2\right ) \left (774 x^8-1344 x^{10}+864 x^{12}-240 x^{14}+24 x^{16}\right )}{-4 x^7+x^9} \, dx=\frac {3 \, {\left ({\left (x^{2} - 4\right )}^{4} e^{\left ({\left (x^{2} - 4\right )}^{4} + 8 \, {\left (x^{2} - 4\right )}^{3} + 24 \, {\left (x^{2} - 4\right )}^{2} + 32 \, x^{2} - 112\right )} + 12 \, {\left (x^{2} - 4\right )}^{3} e^{\left ({\left (x^{2} - 4\right )}^{4} + 8 \, {\left (x^{2} - 4\right )}^{3} + 24 \, {\left (x^{2} - 4\right )}^{2} + 32 \, x^{2} - 112\right )} + 48 \, {\left (x^{2} - 4\right )}^{2} e^{\left ({\left (x^{2} - 4\right )}^{4} + 8 \, {\left (x^{2} - 4\right )}^{3} + 24 \, {\left (x^{2} - 4\right )}^{2} + 32 \, x^{2} - 112\right )} + 64 \, {\left (x^{2} - 4\right )} e^{\left ({\left (x^{2} - 4\right )}^{4} + 8 \, {\left (x^{2} - 4\right )}^{3} + 24 \, {\left (x^{2} - 4\right )}^{2} + 32 \, x^{2} - 112\right )} + 1\right )}}{{\left (x^{2} - 4\right )}^{3} + 12 \, {\left (x^{2} - 4\right )}^{2} + 48 \, x^{2} - 128} \]

[In]

integrate(((24*x^16-240*x^14+864*x^12-1344*x^10+774*x^8)*exp(log(x^2-4)+x^8-8*x^6+24*x^4-32*x^2+16)-18*x^2+72)
/(x^9-4*x^7),x, algorithm="giac")

[Out]

3*((x^2 - 4)^4*e^((x^2 - 4)^4 + 8*(x^2 - 4)^3 + 24*(x^2 - 4)^2 + 32*x^2 - 112) + 12*(x^2 - 4)^3*e^((x^2 - 4)^4
 + 8*(x^2 - 4)^3 + 24*(x^2 - 4)^2 + 32*x^2 - 112) + 48*(x^2 - 4)^2*e^((x^2 - 4)^4 + 8*(x^2 - 4)^3 + 24*(x^2 -
4)^2 + 32*x^2 - 112) + 64*(x^2 - 4)*e^((x^2 - 4)^4 + 8*(x^2 - 4)^3 + 24*(x^2 - 4)^2 + 32*x^2 - 112) + 1)/((x^2
 - 4)^3 + 12*(x^2 - 4)^2 + 48*x^2 - 128)

Mupad [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 61, normalized size of antiderivative = 2.90 \[ \int \frac {72-18 x^2+e^{16-32 x^2+24 x^4-8 x^6+x^8} \left (-4+x^2\right ) \left (774 x^8-1344 x^{10}+864 x^{12}-240 x^{14}+24 x^{16}\right )}{-4 x^7+x^9} \, dx=\frac {3}{x^6}-12\,{\mathrm {e}}^{x^8}\,{\mathrm {e}}^{16}\,{\mathrm {e}}^{-8\,x^6}\,{\mathrm {e}}^{24\,x^4}\,{\mathrm {e}}^{-32\,x^2}+3\,x^2\,{\mathrm {e}}^{x^8}\,{\mathrm {e}}^{16}\,{\mathrm {e}}^{-8\,x^6}\,{\mathrm {e}}^{24\,x^4}\,{\mathrm {e}}^{-32\,x^2} \]

[In]

int(-(exp(log(x^2 - 4) - 32*x^2 + 24*x^4 - 8*x^6 + x^8 + 16)*(774*x^8 - 1344*x^10 + 864*x^12 - 240*x^14 + 24*x
^16) - 18*x^2 + 72)/(4*x^7 - x^9),x)

[Out]

3/x^6 - 12*exp(x^8)*exp(16)*exp(-8*x^6)*exp(24*x^4)*exp(-32*x^2) + 3*x^2*exp(x^8)*exp(16)*exp(-8*x^6)*exp(24*x
^4)*exp(-32*x^2)