3.14.66 \(\int \frac {8 x^2+e^4 (64-32 x+4 x^2)}{4 x^4+e^8 (256-32 x^2+x^4)+e^4 (-64 x^2+4 x^4)} \, dx\) [1366]

Optimal. Leaf size=24 \[ \frac {x}{-\frac {2 x^2}{4-x}+e^4 (4+x)} \]

[Out]

x/(exp(4)*(4+x)-2*x^2/(4-x))

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 41, normalized size of antiderivative = 1.71, number of steps used = 4, number of rules used = 4, integrand size = 58, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {2019, 28, 1828, 8} \begin {gather*} -\frac {4 \left (4 e^4-\left (2+e^4\right ) x\right )}{\left (2+e^4\right ) \left (16 e^4-\left (2+e^4\right ) x^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(8*x^2 + E^4*(64 - 32*x + 4*x^2))/(4*x^4 + E^8*(256 - 32*x^2 + x^4) + E^4*(-64*x^2 + 4*x^4)),x]

[Out]

(-4*(4*E^4 - (2 + E^4)*x))/((2 + E^4)*(16*E^4 - (2 + E^4)*x^2))

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 28

Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/c^p, Int[u*(b/2 + c*x^n)^(2*
p), x], x] /; FreeQ[{a, b, c, n}, x] && EqQ[n2, 2*n] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 1828

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[P
olynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*
g - b*f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Dist[1/(2*a*(p + 1)), Int[(a + b*x^2)^(p + 1)*ExpandToS
um[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]

Rule 2019

Int[(Pq_)*(u_)^(p_.), x_Symbol] :> Int[Pq*ExpandToSum[u, x]^p, x] /; FreeQ[p, x] && PolyQ[Pq, x] && TrinomialQ
[u, x] &&  !TrinomialMatchQ[u, x]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {8 x^2+e^4 \left (64-32 x+4 x^2\right )}{256 e^8-32 e^4 \left (2+e^4\right ) x^2+\left (2+e^4\right )^2 x^4} \, dx\\ &=\left (2+e^4\right )^2 \int \frac {8 x^2+e^4 \left (64-32 x+4 x^2\right )}{\left (-16 e^4 \left (2+e^4\right )+\left (2+e^4\right )^2 x^2\right )^2} \, dx\\ &=-\frac {4 \left (4 e^4-\left (2+e^4\right ) x\right )}{\left (2+e^4\right ) \left (16 e^4-\left (2+e^4\right ) x^2\right )}+\frac {\left (2+e^4\right ) \int 0 \, dx}{32 e^4}\\ &=-\frac {4 \left (4 e^4-\left (2+e^4\right ) x\right )}{\left (2+e^4\right ) \left (16 e^4-\left (2+e^4\right ) x^2\right )}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 37, normalized size = 1.54 \begin {gather*} -\frac {4 \left (e^4 (-4+x)+2 x\right )}{\left (2+e^4\right ) \left (2 x^2+e^4 \left (-16+x^2\right )\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(8*x^2 + E^4*(64 - 32*x + 4*x^2))/(4*x^4 + E^8*(256 - 32*x^2 + x^4) + E^4*(-64*x^2 + 4*x^4)),x]

[Out]

(-4*(E^4*(-4 + x) + 2*x))/((2 + E^4)*(2*x^2 + E^4*(-16 + x^2)))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(172\) vs. \(2(23)=46\).
time = 0.14, size = 173, normalized size = 7.21

method result size
norman \(\frac {x^{2}-4 x}{x^{2} {\mathrm e}^{4}+2 x^{2}-16 \,{\mathrm e}^{4}}\) \(27\)
risch \(\frac {-4 x +\frac {16 \,{\mathrm e}^{4}}{2+{\mathrm e}^{4}}}{x^{2} {\mathrm e}^{4}+2 x^{2}-16 \,{\mathrm e}^{4}}\) \(34\)
gosper \(-\frac {4 \left (x \,{\mathrm e}^{4}-4 \,{\mathrm e}^{4}+2 x \right )}{\left (x^{2} {\mathrm e}^{4}+2 x^{2}-16 \,{\mathrm e}^{4}\right ) \left (2+{\mathrm e}^{4}\right )}\) \(39\)
default \(\frac {4 \left ({\mathrm e}^{8}+4 \,{\mathrm e}^{4}+4\right ) \left (-\frac {\left (4 \,{\mathrm e}^{8}+{\mathrm e}^{4} {\mathrm e}^{8}+4 \,{\mathrm e}^{4}\right ) x}{4 \left ({\mathrm e}^{8}+4 \,{\mathrm e}^{4}+4\right ) \left (2 \,{\mathrm e}^{4}+{\mathrm e}^{8}\right )}+\frac {{\mathrm e}^{4}}{{\mathrm e}^{8}+4 \,{\mathrm e}^{4}+4}\right )}{x^{2} {\mathrm e}^{4}+\frac {x^{2} {\mathrm e}^{8}}{4}+x^{2}-8 \,{\mathrm e}^{4}-4 \,{\mathrm e}^{8}}\) \(173\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((4*x^2-32*x+64)*exp(4)+8*x^2)/((x^4-32*x^2+256)*exp(4)^2+(4*x^4-64*x^2)*exp(4)+4*x^4),x,method=_RETURNVER
BOSE)

[Out]

4*(exp(8)+4*exp(4)+4)*((-1/4/(exp(8)+4*exp(4)+4)*(3*exp(4)^2+exp(4)*exp(8)+4*exp(4)+exp(8))/(2*exp(4)+exp(8))*
x+1/(exp(8)+4*exp(4)+4)*exp(4))/(x^2*exp(4)+1/4*x^2*exp(8)+x^2-8*exp(4)-4*exp(8))+(exp(4)^2-exp(8))/(16*exp(4)
+4*exp(8)+16)/(2*exp(4)+exp(8))/((exp(8)+4*exp(4)+4)*(2*exp(4)+exp(8)))^(1/2)*arctanh(1/4*(exp(8)+4*exp(4)+4)*
x/((exp(8)+4*exp(4)+4)*(2*exp(4)+exp(8)))^(1/2)))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 36, normalized size = 1.50 \begin {gather*} -\frac {4 \, {\left (x {\left (e^{4} + 2\right )} - 4 \, e^{4}\right )}}{x^{2} {\left (e^{8} + 4 \, e^{4} + 4\right )} - 16 \, e^{8} - 32 \, e^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((4*x^2-32*x+64)*exp(4)+8*x^2)/((x^4-32*x^2+256)*exp(4)^2+(4*x^4-64*x^2)*exp(4)+4*x^4),x, algorithm=
"maxima")

[Out]

-4*(x*(e^4 + 2) - 4*e^4)/(x^2*(e^8 + 4*e^4 + 4) - 16*e^8 - 32*e^4)

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 37, normalized size = 1.54 \begin {gather*} -\frac {4 \, {\left ({\left (x - 4\right )} e^{4} + 2 \, x\right )}}{4 \, x^{2} + {\left (x^{2} - 16\right )} e^{8} + 4 \, {\left (x^{2} - 8\right )} e^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((4*x^2-32*x+64)*exp(4)+8*x^2)/((x^4-32*x^2+256)*exp(4)^2+(4*x^4-64*x^2)*exp(4)+4*x^4),x, algorithm=
"fricas")

[Out]

-4*((x - 4)*e^4 + 2*x)/(4*x^2 + (x^2 - 16)*e^8 + 4*(x^2 - 8)*e^4)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 37 vs. \(2 (15) = 30\).
time = 0.31, size = 37, normalized size = 1.54 \begin {gather*} \frac {x \left (- 4 e^{4} - 8\right ) + 16 e^{4}}{x^{2} \cdot \left (4 + 4 e^{4} + e^{8}\right ) - 16 e^{8} - 32 e^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((4*x**2-32*x+64)*exp(4)+8*x**2)/((x**4-32*x**2+256)*exp(4)**2+(4*x**4-64*x**2)*exp(4)+4*x**4),x)

[Out]

(x*(-4*exp(4) - 8) + 16*exp(4))/(x**2*(4 + 4*exp(4) + exp(8)) - 16*exp(8) - 32*exp(4))

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 38, normalized size = 1.58 \begin {gather*} -\frac {4 \, {\left (x e^{4} + 2 \, x - 4 \, e^{4}\right )}}{{\left (x^{2} e^{4} + 2 \, x^{2} - 16 \, e^{4}\right )} {\left (e^{4} + 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((4*x^2-32*x+64)*exp(4)+8*x^2)/((x^4-32*x^2+256)*exp(4)^2+(4*x^4-64*x^2)*exp(4)+4*x^4),x, algorithm=
"giac")

[Out]

-4*(x*e^4 + 2*x - 4*e^4)/((x^2*e^4 + 2*x^2 - 16*e^4)*(e^4 + 2))

________________________________________________________________________________________

Mupad [B]
time = 0.16, size = 31, normalized size = 1.29 \begin {gather*} \frac {4\,x-\frac {16\,{\mathrm {e}}^4}{{\mathrm {e}}^4+2}}{16\,{\mathrm {e}}^4-x^2\,\left ({\mathrm {e}}^4+2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(4)*(4*x^2 - 32*x + 64) + 8*x^2)/(exp(8)*(x^4 - 32*x^2 + 256) - exp(4)*(64*x^2 - 4*x^4) + 4*x^4),x)

[Out]

(4*x - (16*exp(4))/(exp(4) + 2))/(16*exp(4) - x^2*(exp(4) + 2))

________________________________________________________________________________________