3.41.31 \(\int \frac {-13 x-4 x^2+e^{x+x^2} (14+4 x-3 x^2-2 x^3)+(e^{x+x^2} (-1-2 x)+x+2 x^2) \log (-e^{x+x^2} x+x^2)}{3 e^{x+x^2}-3 x} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 1.95, antiderivative size = 49, normalized size of antiderivative = 1.58, number of steps used = 18, number of rules used = 6, integrand size = 84, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {6741, 12, 6742, 2548, 2551, 14} \begin {gather*} x^2-\frac {1}{3} x^2 \log \left (x^2-e^{x^2+x} x\right )-\frac {1}{3} x \log \left (x^2-e^{x^2+x} x\right )+5 x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

5*x + x^2 - (x*Log[-(E^(x + x^2)*x) + x^2])/3 - (x^2*Log[-(E^(x + x^2)*x) + x^2])/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 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 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 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 {-13 x-4 x^2+e^{x+x^2} \left (14+4 x-3 x^2-2 x^3\right )+\left (e^{x+x^2} (-1-2 x)+x+2 x^2\right ) \log \left (-e^{x+x^2} x+x^2\right )}{3 \left (e^{x+x^2}-x\right )} \, dx\\ &=\frac {1}{3} \int \frac {-13 x-4 x^2+e^{x+x^2} \left (14+4 x-3 x^2-2 x^3\right )+\left (e^{x+x^2} (-1-2 x)+x+2 x^2\right ) \log \left (-e^{x+x^2} x+x^2\right )}{e^{x+x^2}-x} \, dx\\ &=\frac {1}{3} \int \left (14+4 x-3 x^2-2 x^3-\frac {x (1+x)^2 (-1+2 x)}{e^{x+x^2}-x}-\log \left (-e^{x+x^2} x+x^2\right )-2 x \log \left (-e^{x+x^2} x+x^2\right )\right ) \, dx\\ &=\frac {14 x}{3}+\frac {2 x^2}{3}-\frac {x^3}{3}-\frac {x^4}{6}-\frac {1}{3} \int \frac {x (1+x)^2 (-1+2 x)}{e^{x+x^2}-x} \, dx-\frac {1}{3} \int \log \left (-e^{x+x^2} x+x^2\right ) \, dx-\frac {2}{3} \int x \log \left (-e^{x+x^2} x+x^2\right ) \, dx\\ &=\frac {14 x}{3}+\frac {2 x^2}{3}-\frac {x^3}{3}-\frac {x^4}{6}-\frac {1}{3} x \log \left (-e^{x+x^2} x+x^2\right )-\frac {1}{3} x^2 \log \left (-e^{x+x^2} x+x^2\right )-\frac {1}{3} \int \left (-\frac {x}{e^{x+x^2}-x}+\frac {3 x^3}{e^{x+x^2}-x}+\frac {2 x^4}{e^{x+x^2}-x}\right ) \, dx+\frac {1}{3} \int \frac {-2 x+e^{x+x^2} \left (1+x+2 x^2\right )}{e^{x+x^2}-x} \, dx+\frac {1}{3} \int \frac {x \left (-2 x+e^{x+x^2} \left (1+x+2 x^2\right )\right )}{e^{x+x^2}-x} \, dx\\ &=\frac {14 x}{3}+\frac {2 x^2}{3}-\frac {x^3}{3}-\frac {x^4}{6}-\frac {1}{3} x \log \left (-e^{x+x^2} x+x^2\right )-\frac {1}{3} x^2 \log \left (-e^{x+x^2} x+x^2\right )+\frac {1}{3} \int \frac {x}{e^{x+x^2}-x} \, dx+\frac {1}{3} \int \left (1+x+2 x^2+\frac {x \left (-1+x+2 x^2\right )}{e^{x+x^2}-x}\right ) \, dx+\frac {1}{3} \int \left (\frac {x^2 \left (-1+x+2 x^2\right )}{e^{x+x^2}-x}+x \left (1+x+2 x^2\right )\right ) \, dx-\frac {2}{3} \int \frac {x^4}{e^{x+x^2}-x} \, dx-\int \frac {x^3}{e^{x+x^2}-x} \, dx\\ &=5 x+\frac {5 x^2}{6}-\frac {x^3}{9}-\frac {x^4}{6}-\frac {1}{3} x \log \left (-e^{x+x^2} x+x^2\right )-\frac {1}{3} x^2 \log \left (-e^{x+x^2} x+x^2\right )+\frac {1}{3} \int \frac {x}{e^{x+x^2}-x} \, dx+\frac {1}{3} \int \frac {x \left (-1+x+2 x^2\right )}{e^{x+x^2}-x} \, dx+\frac {1}{3} \int \frac {x^2 \left (-1+x+2 x^2\right )}{e^{x+x^2}-x} \, dx+\frac {1}{3} \int x \left (1+x+2 x^2\right ) \, dx-\frac {2}{3} \int \frac {x^4}{e^{x+x^2}-x} \, dx-\int \frac {x^3}{e^{x+x^2}-x} \, dx\\ &=5 x+\frac {5 x^2}{6}-\frac {x^3}{9}-\frac {x^4}{6}-\frac {1}{3} x \log \left (-e^{x+x^2} x+x^2\right )-\frac {1}{3} x^2 \log \left (-e^{x+x^2} x+x^2\right )+\frac {1}{3} \int \frac {x}{e^{x+x^2}-x} \, dx+\frac {1}{3} \int \left (x+x^2+2 x^3\right ) \, dx+\frac {1}{3} \int \left (-\frac {x}{e^{x+x^2}-x}+\frac {x^2}{e^{x+x^2}-x}+\frac {2 x^3}{e^{x+x^2}-x}\right ) \, dx+\frac {1}{3} \int \left (-\frac {x^2}{e^{x+x^2}-x}+\frac {x^3}{e^{x+x^2}-x}+\frac {2 x^4}{e^{x+x^2}-x}\right ) \, dx-\frac {2}{3} \int \frac {x^4}{e^{x+x^2}-x} \, dx-\int \frac {x^3}{e^{x+x^2}-x} \, dx\\ &=5 x+x^2-\frac {1}{3} x \log \left (-e^{x+x^2} x+x^2\right )-\frac {1}{3} x^2 \log \left (-e^{x+x^2} x+x^2\right )+\frac {1}{3} \int \frac {x^3}{e^{x+x^2}-x} \, dx+\frac {2}{3} \int \frac {x^3}{e^{x+x^2}-x} \, dx-\int \frac {x^3}{e^{x+x^2}-x} \, dx\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.37, size = 33, normalized size = 1.06 \begin {gather*} \frac {1}{3} \left (15 x+3 x^2-x (1+x) \log \left (x \left (-e^{x+x^2}+x\right )\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.88, size = 28, normalized size = 0.90 \begin {gather*} x^{2} - \frac {1}{3} \, {\left (x^{2} + x\right )} \log \left (x^{2} - x e^{\left (x^{2} + x\right )}\right ) + 5 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.22, size = 43, normalized size = 1.39 \begin {gather*} -\frac {1}{3} \, x^{2} \log \left (x^{2} - x e^{\left (x^{2} + x\right )}\right ) + x^{2} - \frac {1}{3} \, x \log \left (x^{2} - x e^{\left (x^{2} + x\right )}\right ) + 5 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.13, size = 44, normalized size = 1.42




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.38, size = 34, normalized size = 1.10 \begin {gather*} x^{2} - \frac {1}{3} \, {\left (x^{2} + x\right )} \log \left (x - e^{\left (x^{2} + x\right )}\right ) - \frac {1}{3} \, {\left (x^{2} + x\right )} \log \relax (x) + 5 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.41, size = 32, normalized size = 1.03 \begin {gather*} 5\,x-\ln \left (x^2-x\,{\mathrm {e}}^{x^2}\,{\mathrm {e}}^x\right )\,\left (\frac {x^2}{3}+\frac {x}{3}\right )+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

5*x - log(x^2 - x*exp(x^2)*exp(x))*(x/3 + x^2/3) + x^2

________________________________________________________________________________________

sympy [A]  time = 0.48, size = 29, normalized size = 0.94 \begin {gather*} x^{2} + 5 x + \left (- \frac {x^{2}}{3} - \frac {x}{3}\right ) \log {\left (x^{2} - x e^{x^{2} + x} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2 + 5*x + (-x**2/3 - x/3)*log(x**2 - x*exp(x**2 + x))

________________________________________________________________________________________