3.52.6 \(\int \frac {-32-16 x+64 x^2+32 x^3+4 x^4+e^4 (-32 x^2-16 x^3-2 x^4)+e^x (16 x^2+8 x^3+x^4)}{16 x^2+8 x^3+x^4} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.49, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 6, integrand size = 75, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {1594, 27, 6742, 2194, 44, 43} \begin {gather*} -2 e^4 x+4 x+e^x-\frac {2}{x+4}+\frac {2}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 1594

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

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 6742

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.17, size = 25, normalized size = 1.00 \begin {gather*} e^x+\frac {2}{x}+4 x-2 e^4 x-\frac {2}{4+x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.72, size = 45, normalized size = 1.80 \begin {gather*} \frac {4 \, x^{3} + 16 \, x^{2} - 2 \, {\left (x^{3} + 4 \, x^{2}\right )} e^{4} + {\left (x^{2} + 4 \, x\right )} e^{x} + 8}{x^{2} + 4 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.16, size = 49, normalized size = 1.96 \begin {gather*} -\frac {2 \, x^{3} e^{4} - 4 \, x^{3} + 8 \, x^{2} e^{4} - x^{2} e^{x} - 16 \, x^{2} - 4 \, x e^{x} - 8}{x^{2} + 4 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.09, size = 22, normalized size = 0.88




method result size



risch \(-2 x \,{\mathrm e}^{4}+4 x +\frac {8}{x \left (4+x \right )}+{\mathrm e}^{x}\) \(22\)
default \({\mathrm e}^{x}-\frac {2}{4+x}+\frac {2}{x}+4 x -2 x \,{\mathrm e}^{4}\) \(24\)
norman \(\frac {8+\left (-2 \,{\mathrm e}^{4}+4\right ) x^{3}+\left (-64+32 \,{\mathrm e}^{4}\right ) x +{\mathrm e}^{x} x^{2}+4 \,{\mathrm e}^{x} x}{\left (4+x \right ) x}\) \(41\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^4+8*x^3+16*x^2)*exp(x)+(-2*x^4-16*x^3-32*x^2)*exp(4)+4*x^4+32*x^3+64*x^2-16*x-32)/(x^4+8*x^3+16*x^2),x
,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -2 \, {\left (x - \frac {16}{x + 4} - 8 \, \log \left (x + 4\right )\right )} e^{4} - 16 \, {\left (\frac {4}{x + 4} + \log \left (x + 4\right )\right )} e^{4} + 4 \, x + \frac {{\left (x^{2} + 8 \, x\right )} e^{x}}{x^{2} + 8 \, x + 16} - \frac {16 \, e^{\left (-4\right )} E_{2}\left (-x - 4\right )}{x + 4} + \frac {4 \, {\left (x + 2\right )}}{x^{2} + 4 \, x} + \frac {32 \, e^{4}}{x + 4} - \frac {4}{x + 4} - 32 \, \int \frac {e^{x}}{x^{3} + 12 \, x^{2} + 48 \, x + 64}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*(x - 16/(x + 4) - 8*log(x + 4))*e^4 - 16*(4/(x + 4) + log(x + 4))*e^4 + 4*x + (x^2 + 8*x)*e^x/(x^2 + 8*x +
16) - 16*e^(-4)*exp_integral_e(2, -x - 4)/(x + 4) + 4*(x + 2)/(x^2 + 4*x) + 32*e^4/(x + 4) - 4/(x + 4) - 32*in
tegrate(e^x/(x^3 + 12*x^2 + 48*x + 64), x)

________________________________________________________________________________________

mupad [B]  time = 0.13, size = 23, normalized size = 0.92 \begin {gather*} {\mathrm {e}}^x+\frac {8}{x^2+4\,x}-x\,\left (2\,{\mathrm {e}}^4-4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.19, size = 19, normalized size = 0.76 \begin {gather*} x \left (4 - 2 e^{4}\right ) + e^{x} + \frac {8}{x^{2} + 4 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________