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

Optimal. Leaf size=27 \[ -3+e^x+\frac {17}{x}+2 x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x} \]

________________________________________________________________________________________

Rubi [A]  time = 1.10, antiderivative size = 26, normalized size of antiderivative = 0.96, number of steps used = 14, number of rules used = 4, integrand size = 87, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.046, Rules used = {6742, 2194, 14, 2551} \begin {gather*} 2 x+e^x+\frac {17}{x}+\frac {\log \left (x-2 e^{-2 x}\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^x + 17/x + 2*x + Log[-2/E^(2*x) + x]/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 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 2551

Int[Log[u_]*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[((a + b*x)^(m + 1)*Log[u])/(b*(m + 1)), x] - Dist[1/
(b*(m + 1)), Int[SimplifyIntegrand[((a + b*x)^(m + 1)*D[u, x])/u, x], x], x] /; FreeQ[{a, b, m}, x] && Inverse
FunctionFreeQ[u, x] && NeQ[m, -1]

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 \left (e^x+\frac {2 (1+2 x)}{x^2 \left (-2+e^{2 x} x\right )}+\frac {-16+2 x^2-\log \left (-2 e^{-2 x}+x\right )}{x^2}\right ) \, dx\\ &=2 \int \frac {1+2 x}{x^2 \left (-2+e^{2 x} x\right )} \, dx+\int e^x \, dx+\int \frac {-16+2 x^2-\log \left (-2 e^{-2 x}+x\right )}{x^2} \, dx\\ &=e^x+2 \int \left (\frac {1}{x^2 \left (-2+e^{2 x} x\right )}+\frac {2}{x \left (-2+e^{2 x} x\right )}\right ) \, dx+\int \left (\frac {2 \left (-8+x^2\right )}{x^2}-\frac {\log \left (-2 e^{-2 x}+x\right )}{x^2}\right ) \, dx\\ &=e^x+2 \int \frac {1}{x^2 \left (-2+e^{2 x} x\right )} \, dx+2 \int \frac {-8+x^2}{x^2} \, dx+4 \int \frac {1}{x \left (-2+e^{2 x} x\right )} \, dx-\int \frac {\log \left (-2 e^{-2 x}+x\right )}{x^2} \, dx\\ &=e^x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x}+2 \int \left (1-\frac {8}{x^2}\right ) \, dx+2 \int \frac {1}{x^2 \left (-2+e^{2 x} x\right )} \, dx+4 \int \frac {1}{x \left (-2+e^{2 x} x\right )} \, dx-\int \frac {-4-e^{2 x}}{x \left (2-e^{2 x} x\right )} \, dx\\ &=e^x+\frac {16}{x}+2 x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x}+2 \int \frac {1}{x^2 \left (-2+e^{2 x} x\right )} \, dx+4 \int \frac {1}{x \left (-2+e^{2 x} x\right )} \, dx-\int \left (\frac {1}{x^2}+\frac {2 (1+2 x)}{x^2 \left (-2+e^{2 x} x\right )}\right ) \, dx\\ &=e^x+\frac {17}{x}+2 x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x}+2 \int \frac {1}{x^2 \left (-2+e^{2 x} x\right )} \, dx-2 \int \frac {1+2 x}{x^2 \left (-2+e^{2 x} x\right )} \, dx+4 \int \frac {1}{x \left (-2+e^{2 x} x\right )} \, dx\\ &=e^x+\frac {17}{x}+2 x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x}+2 \int \frac {1}{x^2 \left (-2+e^{2 x} x\right )} \, dx-2 \int \left (\frac {1}{x^2 \left (-2+e^{2 x} x\right )}+\frac {2}{x \left (-2+e^{2 x} x\right )}\right ) \, dx+4 \int \frac {1}{x \left (-2+e^{2 x} x\right )} \, dx\\ &=e^x+\frac {17}{x}+2 x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.29, size = 26, normalized size = 0.96 \begin {gather*} e^x+\frac {17}{x}+2 x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 29, normalized size = 1.07 \begin {gather*} \frac {2 \, x^{2} + x e^{x} + \log \left ({\left (x e^{\left (2 \, x\right )} - 2\right )} e^{\left (-2 \, x\right )}\right ) + 17}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.31, size = 24, normalized size = 0.89 \begin {gather*} \frac {2 \, x^{2} + x e^{x} + \log \left (x e^{\left (2 \, x\right )} - 2\right ) + 17}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [C]  time = 0.16, size = 218, normalized size = 8.07




method result size



risch \(-\frac {2 \ln \left ({\mathrm e}^{x}\right )}{x}+\frac {i \pi \mathrm {csgn}\left (i {\mathrm e}^{x}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{2 x}\right )-2 i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{2 x}\right )^{2}+i \pi \mathrm {csgn}\left (i {\mathrm e}^{2 x}\right )^{3}-i \pi \,\mathrm {csgn}\left (i \left (x \,{\mathrm e}^{2 x}-2\right )\right ) \mathrm {csgn}\left (i {\mathrm e}^{-2 x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-2 x} \left (x \,{\mathrm e}^{2 x}-2\right )\right )+i \pi \,\mathrm {csgn}\left (i \left (x \,{\mathrm e}^{2 x}-2\right )\right ) \mathrm {csgn}\left (i {\mathrm e}^{-2 x} \left (x \,{\mathrm e}^{2 x}-2\right )\right )^{2}+i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-2 x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-2 x} \left (x \,{\mathrm e}^{2 x}-2\right )\right )^{2}-i \pi \mathrm {csgn}\left (i {\mathrm e}^{-2 x} \left (x \,{\mathrm e}^{2 x}-2\right )\right )^{3}+4 x^{2}+2 \,{\mathrm e}^{x} x +2 \ln \left (x \,{\mathrm e}^{2 x}-2\right )+34}{2 x}\) \(218\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/x*ln(exp(x))+1/2*(I*Pi*csgn(I*exp(x))^2*csgn(I*exp(2*x))-2*I*Pi*csgn(I*exp(x))*csgn(I*exp(2*x))^2+I*Pi*csgn
(I*exp(2*x))^3-I*Pi*csgn(I*(x*exp(2*x)-2))*csgn(I*exp(-2*x))*csgn(I*exp(-2*x)*(x*exp(2*x)-2))+I*Pi*csgn(I*(x*e
xp(2*x)-2))*csgn(I*exp(-2*x)*(x*exp(2*x)-2))^2+I*Pi*csgn(I*exp(-2*x))*csgn(I*exp(-2*x)*(x*exp(2*x)-2))^2-I*Pi*
csgn(I*exp(-2*x)*(x*exp(2*x)-2))^3+4*x^2+2*exp(x)*x+2*ln(x*exp(2*x)-2)+34)/x

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.50, size = 24, normalized size = 0.89 \begin {gather*} 2\,x+{\mathrm {e}}^x+\frac {\ln \left (x-2\,{\mathrm {e}}^{-2\,x}\right )}{x}+\frac {17}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(2*x)*(16*x - 2*x^3) - 4*x + 2*x^2*exp(x) + log(exp(-2*x)*(x*exp(2*x) - 2))*(x*exp(2*x) - 2) - x^3*ex
p(3*x) + 4*x^2 - 34)/(x^3*exp(2*x) - 2*x^2),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.41, size = 26, normalized size = 0.96 \begin {gather*} 2 x + e^{x} + \frac {\log {\left (\left (x e^{2 x} - 2\right ) e^{- 2 x} \right )}}{x} + \frac {17}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________