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

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

________________________________________________________________________________________

Rubi [A]  time = 1.32, antiderivative size = 21, normalized size of antiderivative = 0.78, number of steps used = 16, number of rules used = 5, integrand size = 75, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {6741, 6742, 6688, 77, 2548} \begin {gather*} x \log \left (\frac {(x+1) \left (-e^x x-x+1\right )}{x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 2548

Int[Log[u_], x_Symbol] :> Simp[x*Log[u], x] - Int[SimplifyIntegrand[(x*D[u, x])/u, x], x] /; InverseFunctionFr
eeQ[u, x]

Rule 6688

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

Rule 6741

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

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

________________________________________________________________________________________

Mathematica [A]  time = 0.19, size = 19, normalized size = 0.70 \begin {gather*} x \log \left (-\frac {(1+x) \left (-1+x+e^x x\right )}{x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 21, normalized size = 0.78 \begin {gather*} x \log \left (-\frac {x^{2} + {\left (x^{2} + x\right )} e^{x} - 1}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.14, size = 27, normalized size = 1.00




method result size



norman \(x \ln \left (\frac {\left (-x^{2}-x \right ) {\mathrm e}^{x}-x^{2}+1}{x}\right )\) \(27\)
risch \(x \ln \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )-x \ln \relax (x )-\frac {i \pi x \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )\right ) \mathrm {csgn}\left (\frac {i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )}{x}\right )}{2}+\frac {i \pi x \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )}{x}\right )^{2}}{2}-i \pi x \mathrm {csgn}\left (\frac {i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )}{x}\right )^{2}+\frac {i \pi x \,\mathrm {csgn}\left (i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )\right ) \mathrm {csgn}\left (\frac {i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )}{x}\right )^{2}}{2}+\frac {i \pi x \mathrm {csgn}\left (\frac {i \left (-1+\left ({\mathrm e}^{x}+1\right ) x^{2}+{\mathrm e}^{x} x \right )}{x}\right )^{3}}{2}+i \pi x\) \(217\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 25, normalized size = 0.93 \begin {gather*} x \log \left (-x e^{x} - x + 1\right ) + x \log \left (x + 1\right ) - x \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 4.48, size = 21, normalized size = 0.78 \begin {gather*} x\,\ln \left (-\frac {x^2+{\mathrm {e}}^x\,\left (x^2+x\right )-1}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.94, size = 42, normalized size = 1.56 \begin {gather*} \left (x + \frac {1}{6}\right ) \log {\left (\frac {- x^{2} + \left (- x^{2} - x\right ) e^{x} + 1}{x} \right )} - \frac {\log {\left (6 x + 6 \right )}}{6} - \frac {\log {\left (e^{x} + \frac {x - 1}{x} \right )}}{6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x + 1/6)*log((-x**2 + (-x**2 - x)*exp(x) + 1)/x) - log(6*x + 6)/6 - log(exp(x) + (x - 1)/x)/6

________________________________________________________________________________________