\(\int \frac {-e^4+e^x (-1+x)-4 x^2+3072 x^4}{4 x^2} \, dx\) [6445]

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

Optimal result

Integrand size = 30, antiderivative size = 24 \[ \int \frac {-e^4+e^x (-1+x)-4 x^2+3072 x^4}{4 x^2} \, dx=-2+\frac {e^4+e^x}{4 x}-x+256 x^3 \]

[Out]

-2+1/4*(exp(x)+exp(4))/x+256*x^3-x

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.21, number of steps used = 6, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {12, 14, 2228} \[ \int \frac {-e^4+e^x (-1+x)-4 x^2+3072 x^4}{4 x^2} \, dx=256 x^3-x+\frac {e^x}{4 x}+\frac {e^4}{4 x} \]

[In]

Int[(-E^4 + E^x*(-1 + x) - 4*x^2 + 3072*x^4)/(4*x^2),x]

[Out]

E^4/(4*x) + E^x/(4*x) - x + 256*x^3

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2228

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[g*u^(m + 1)*(F^(c*v)/(b*c*
e*Log[F])), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{4} \int \frac {-e^4+e^x (-1+x)-4 x^2+3072 x^4}{x^2} \, dx \\ & = \frac {1}{4} \int \left (\frac {e^x (-1+x)}{x^2}+\frac {-e^4-4 x^2+3072 x^4}{x^2}\right ) \, dx \\ & = \frac {1}{4} \int \frac {e^x (-1+x)}{x^2} \, dx+\frac {1}{4} \int \frac {-e^4-4 x^2+3072 x^4}{x^2} \, dx \\ & = \frac {e^x}{4 x}+\frac {1}{4} \int \left (-4-\frac {e^4}{x^2}+3072 x^2\right ) \, dx \\ & = \frac {e^4}{4 x}+\frac {e^x}{4 x}-x+256 x^3 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00 \[ \int \frac {-e^4+e^x (-1+x)-4 x^2+3072 x^4}{4 x^2} \, dx=\frac {e^4+e^x-4 x^2+1024 x^4}{4 x} \]

[In]

Integrate[(-E^4 + E^x*(-1 + x) - 4*x^2 + 3072*x^4)/(4*x^2),x]

[Out]

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

Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.88

method result size
parallelrisch \(\frac {1024 x^{4}-4 x^{2}+{\mathrm e}^{4}+{\mathrm e}^{x}}{4 x}\) \(21\)
default \(-x +256 x^{3}+\frac {{\mathrm e}^{4}}{4 x}+\frac {{\mathrm e}^{x}}{4 x}\) \(24\)
norman \(\frac {-x^{2}+256 x^{4}+\frac {{\mathrm e}^{4}}{4}+\frac {{\mathrm e}^{x}}{4}}{x}\) \(24\)
risch \(-x +256 x^{3}+\frac {{\mathrm e}^{4}}{4 x}+\frac {{\mathrm e}^{x}}{4 x}\) \(24\)
parts \(-x +256 x^{3}+\frac {{\mathrm e}^{4}}{4 x}+\frac {{\mathrm e}^{x}}{4 x}\) \(24\)

[In]

int(1/4*((-1+x)*exp(x)-exp(4)+3072*x^4-4*x^2)/x^2,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.83 \[ \int \frac {-e^4+e^x (-1+x)-4 x^2+3072 x^4}{4 x^2} \, dx=\frac {1024 \, x^{4} - 4 \, x^{2} + e^{4} + e^{x}}{4 \, x} \]

[In]

integrate(1/4*((-1+x)*exp(x)-exp(4)+3072*x^4-4*x^2)/x^2,x, algorithm="fricas")

[Out]

1/4*(1024*x^4 - 4*x^2 + e^4 + e^x)/x

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.79 \[ \int \frac {-e^4+e^x (-1+x)-4 x^2+3072 x^4}{4 x^2} \, dx=256 x^{3} - x + \frac {e^{x}}{4 x} + \frac {e^{4}}{4 x} \]

[In]

integrate(1/4*((-1+x)*exp(x)-exp(4)+3072*x**4-4*x**2)/x**2,x)

[Out]

256*x**3 - x + exp(x)/(4*x) + exp(4)/(4*x)

Maxima [C] (verification not implemented)

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

Time = 0.22 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.12 \[ \int \frac {-e^4+e^x (-1+x)-4 x^2+3072 x^4}{4 x^2} \, dx=256 \, x^{3} - x + \frac {e^{4}}{4 \, x} + \frac {1}{4} \, {\rm Ei}\left (x\right ) - \frac {1}{4} \, \Gamma \left (-1, -x\right ) \]

[In]

integrate(1/4*((-1+x)*exp(x)-exp(4)+3072*x^4-4*x^2)/x^2,x, algorithm="maxima")

[Out]

256*x^3 - x + 1/4*e^4/x + 1/4*Ei(x) - 1/4*gamma(-1, -x)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.83 \[ \int \frac {-e^4+e^x (-1+x)-4 x^2+3072 x^4}{4 x^2} \, dx=\frac {1024 \, x^{4} - 4 \, x^{2} + e^{4} + e^{x}}{4 \, x} \]

[In]

integrate(1/4*((-1+x)*exp(x)-exp(4)+3072*x^4-4*x^2)/x^2,x, algorithm="giac")

[Out]

1/4*(1024*x^4 - 4*x^2 + e^4 + e^x)/x

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.92 \[ \int \frac {-e^4+e^x (-1+x)-4 x^2+3072 x^4}{4 x^2} \, dx=\frac {\frac {{\mathrm {e}}^4}{4}+\frac {{\mathrm {e}}^x}{4}}{x}-x+256\,x^3 \]

[In]

int(-(exp(4)/4 - (exp(x)*(x - 1))/4 + x^2 - 768*x^4)/x^2,x)

[Out]

(exp(4)/4 + exp(x)/4)/x - x + 256*x^3