3.43.18 \(\int \frac {4-x+e^{e^2-2 e x+x^2} (-2-2 e x+2 x^2)-2 \log (4)}{x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.11, antiderivative size = 60, normalized size of antiderivative = 3.00, number of steps used = 4, number of rules used = 3, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.079, Rules used = {14, 2288, 37} \begin {gather*} \frac {e^{x^2-2 e x+e^2} \left (e x-x^2\right )}{(e-x) x^3}-\frac {(-x+4-\log (16))^2}{2 x^2 (4-\log (16))} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(4 - x + E^(E^2 - 2*E*x + x^2)*(-2 - 2*E*x + 2*x^2) - 2*Log[4])/x^3,x]

[Out]

(E^(E^2 - 2*E*x + x^2)*(E*x - x^2))/((E - x)*x^3) - (4 - x - Log[16])^2/(2*x^2*(4 - Log[16]))

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 37

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

Rule 2288

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = (v*y)/(Log[F]*D[u, x])}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 25, normalized size = 1.25 \begin {gather*} \frac {-4+2 e^{(e-x)^2}+2 x+\log (16)}{2 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(4 - x + E^(E^2 - 2*E*x + x^2)*(-2 - 2*E*x + 2*x^2) - 2*Log[4])/x^3,x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.62, size = 23, normalized size = 1.15 \begin {gather*} \frac {x + e^{\left (x^{2} - 2 \, x e + e^{2}\right )} + 2 \, \log \relax (2) - 2}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x + e^(x^2 - 2*x*e + e^2) + 2*log(2) - 2)/x^2

________________________________________________________________________________________

giac [A]  time = 0.21, size = 34, normalized size = 1.70 \begin {gather*} \frac {{\left (x e + 2 \, e \log \relax (2) - 2 \, e + e^{\left (x^{2} - 2 \, x e + e^{2} + 1\right )}\right )} e^{\left (-1\right )}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x*e + 2*e*log(2) - 2*e + e^(x^2 - 2*x*e + e^2 + 1))*e^(-1)/x^2

________________________________________________________________________________________

maple [A]  time = 0.09, size = 26, normalized size = 1.30




method result size



norman \(\frac {x +2 \ln \relax (2)-2+{\mathrm e}^{{\mathrm e}^{2}-2 x \,{\mathrm e}+x^{2}}}{x^{2}}\) \(26\)
risch \(\frac {x +2 \ln \relax (2)-2}{x^{2}}+\frac {{\mathrm e}^{{\mathrm e}^{2}-2 x \,{\mathrm e}+x^{2}}}{x^{2}}\) \(29\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x+2*ln(2)-2+exp(exp(1)^2-2*x*exp(1)+x^2))/x^2

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 32, normalized size = 1.60 \begin {gather*} \frac {1}{x} + \frac {e^{\left (x^{2} - 2 \, x e + e^{2}\right )}}{x^{2}} + \frac {2 \, \log \relax (2)}{x^{2}} - \frac {2}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/x + e^(x^2 - 2*x*e + e^2)/x^2 + 2*log(2)/x^2 - 2/x^2

________________________________________________________________________________________

mupad [B]  time = 0.12, size = 21, normalized size = 1.05 \begin {gather*} \frac {x+{\mathrm {e}}^{x^2-2\,\mathrm {e}\,x+{\mathrm {e}}^2}+\ln \relax (4)-2}{x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.21, size = 29, normalized size = 1.45 \begin {gather*} - \frac {- x - 2 \log {\relax (2 )} + 2}{x^{2}} + \frac {e^{x^{2} - 2 e x + e^{2}}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(-x - 2*log(2) + 2)/x**2 + exp(x**2 - 2*E*x + exp(2))/x**2

________________________________________________________________________________________