\(\int \frac {x-2 x \log (x)+(9+e^x (-3-3 x)+e^{x^2} (-3-6 x^2)) \log ^2(x)+3 \log ^3(x)}{3 \log ^2(x)} \, dx\) [6190]

   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 = 50, antiderivative size = 31 \[ \int \frac {x-2 x \log (x)+\left (9+e^x (-3-3 x)+e^{x^2} \left (-3-6 x^2\right )\right ) \log ^2(x)+3 \log ^3(x)}{3 \log ^2(x)} \, dx=1+2 x+x \left (-e^x-e^{x^2}-\frac {x}{3 \log (x)}+\log (x)\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.23, number of steps used = 18, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {12, 6874, 2258, 2235, 2243, 6820, 2207, 2225, 2343, 2346, 2209, 2332} \[ \int \frac {x-2 x \log (x)+\left (9+e^x (-3-3 x)+e^{x^2} \left (-3-6 x^2\right )\right ) \log ^2(x)+3 \log ^3(x)}{3 \log ^2(x)} \, dx=-e^{x^2} x-\frac {x^2}{3 \log (x)}+2 x+e^x-e^x (x+1)+x \log (x) \]

[In]

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

[Out]

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

Rule 12

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

Rule 2207

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^m*
((b*F^(g*(e + f*x)))^n/(f*g*n*Log[F])), x] - Dist[d*(m/(f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !TrueQ[$UseGamma]

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2225

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 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2243

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^(m
- n + 1)*(F^(a + b*(c + d*x)^n)/(b*d*n*Log[F])), x] - Dist[(m - n + 1)/(b*n*Log[F]), Int[(c + d*x)^(m - n)*F^(
a + b*(c + d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[2*((m + 1)/n)] && LtQ[0, (m + 1)/n, 5] &&
IntegerQ[n] && (LtQ[0, n, m + 1] || LtQ[m, n, 0])

Rule 2258

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*(u_), x_Symbol] :> Int[ExpandLinearProduct[F^(a + b*(c + d*
x)^n), u, c, d, x], x] /; FreeQ[{F, a, b, c, d, n}, x] && PolynomialQ[u, x]

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2343

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

Rule 2346

Int[((a_.) + Log[(c_.)*(x_)]*(b_.))^(p_)*(x_)^(m_.), x_Symbol] :> Dist[1/c^(m + 1), Subst[Int[E^((m + 1)*x)*(a
 + b*x)^p, x], x, Log[c*x]], x] /; FreeQ[{a, b, c, p}, x] && IntegerQ[m]

Rule 6820

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

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \frac {1}{3} \int \frac {x-2 x \log (x)+\left (9+e^x (-3-3 x)+e^{x^2} \left (-3-6 x^2\right )\right ) \log ^2(x)+3 \log ^3(x)}{\log ^2(x)} \, dx \\ & = \frac {1}{3} \int \left (-3 e^{x^2} \left (1+2 x^2\right )+\frac {x-2 x \log (x)+9 \log ^2(x)-3 e^x \log ^2(x)-3 e^x x \log ^2(x)+3 \log ^3(x)}{\log ^2(x)}\right ) \, dx \\ & = \frac {1}{3} \int \frac {x-2 x \log (x)+9 \log ^2(x)-3 e^x \log ^2(x)-3 e^x x \log ^2(x)+3 \log ^3(x)}{\log ^2(x)} \, dx-\int e^{x^2} \left (1+2 x^2\right ) \, dx \\ & = \frac {1}{3} \int \left (9-3 e^x (1+x)+\frac {x}{\log ^2(x)}-\frac {2 x}{\log (x)}+3 \log (x)\right ) \, dx-\int \left (e^{x^2}+2 e^{x^2} x^2\right ) \, dx \\ & = 3 x+\frac {1}{3} \int \frac {x}{\log ^2(x)} \, dx-\frac {2}{3} \int \frac {x}{\log (x)} \, dx-2 \int e^{x^2} x^2 \, dx-\int e^{x^2} \, dx-\int e^x (1+x) \, dx+\int \log (x) \, dx \\ & = 2 x-e^{x^2} x-e^x (1+x)-\frac {1}{2} \sqrt {\pi } \text {erfi}(x)-\frac {x^2}{3 \log (x)}+x \log (x)+\frac {2}{3} \int \frac {x}{\log (x)} \, dx-\frac {2}{3} \text {Subst}\left (\int \frac {e^{2 x}}{x} \, dx,x,\log (x)\right )+\int e^x \, dx+\int e^{x^2} \, dx \\ & = e^x+2 x-e^{x^2} x-e^x (1+x)-\frac {2}{3} \text {Ei}(2 \log (x))-\frac {x^2}{3 \log (x)}+x \log (x)+\frac {2}{3} \text {Subst}\left (\int \frac {e^{2 x}}{x} \, dx,x,\log (x)\right ) \\ & = e^x+2 x-e^{x^2} x-e^x (1+x)-\frac {x^2}{3 \log (x)}+x \log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.06 \[ \int \frac {x-2 x \log (x)+\left (9+e^x (-3-3 x)+e^{x^2} \left (-3-6 x^2\right )\right ) \log ^2(x)+3 \log ^3(x)}{3 \log ^2(x)} \, dx=2 x-e^x x-e^{x^2} x-\frac {x^2}{3 \log (x)}+x \log (x) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.13 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.97

method result size
default \(2 x -\frac {x^{2}}{3 \ln \left (x \right )}-{\mathrm e}^{x} x -{\mathrm e}^{x^{2}} x +x \ln \left (x \right )\) \(30\)
risch \(2 x -\frac {x^{2}}{3 \ln \left (x \right )}-{\mathrm e}^{x} x -{\mathrm e}^{x^{2}} x +x \ln \left (x \right )\) \(30\)
parts \(2 x -\frac {x^{2}}{3 \ln \left (x \right )}-{\mathrm e}^{x} x -{\mathrm e}^{x^{2}} x +x \ln \left (x \right )\) \(30\)
parallelrisch \(-\frac {-3 x \ln \left (x \right )^{2}+3 x \,{\mathrm e}^{x} \ln \left (x \right )+3 x \,{\mathrm e}^{x^{2}} \ln \left (x \right )+x^{2}-6 x \ln \left (x \right )}{3 \ln \left (x \right )}\) \(39\)

[In]

int(1/3*(3*ln(x)^3+((-6*x^2-3)*exp(x^2)+(-3*x-3)*exp(x)+9)*ln(x)^2-2*x*ln(x)+x)/ln(x)^2,x,method=_RETURNVERBOS
E)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.19 \[ \int \frac {x-2 x \log (x)+\left (9+e^x (-3-3 x)+e^{x^2} \left (-3-6 x^2\right )\right ) \log ^2(x)+3 \log ^3(x)}{3 \log ^2(x)} \, dx=\frac {3 \, x \log \left (x\right )^{2} - x^{2} - 3 \, {\left (x e^{\left (x^{2}\right )} + x e^{x} - 2 \, x\right )} \log \left (x\right )}{3 \, \log \left (x\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.87 \[ \int \frac {x-2 x \log (x)+\left (9+e^x (-3-3 x)+e^{x^2} \left (-3-6 x^2\right )\right ) \log ^2(x)+3 \log ^3(x)}{3 \log ^2(x)} \, dx=- \frac {x^{2}}{3 \log {\left (x \right )}} - x e^{x} - x e^{x^{2}} + x \log {\left (x \right )} + 2 x \]

[In]

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

[Out]

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

Maxima [C] (verification not implemented)

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

Time = 0.21 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.32 \[ \int \frac {x-2 x \log (x)+\left (9+e^x (-3-3 x)+e^{x^2} \left (-3-6 x^2\right )\right ) \log ^2(x)+3 \log ^3(x)}{3 \log ^2(x)} \, dx=-x e^{\left (x^{2}\right )} - {\left (x - 1\right )} e^{x} + x \log \left (x\right ) + 2 \, x - \frac {2}{3} \, {\rm Ei}\left (2 \, \log \left (x\right )\right ) - e^{x} + \frac {2}{3} \, \Gamma \left (-1, -2 \, \log \left (x\right )\right ) \]

[In]

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

[Out]

-x*e^(x^2) - (x - 1)*e^x + x*log(x) + 2*x - 2/3*Ei(2*log(x)) - e^x + 2/3*gamma(-1, -2*log(x))

Giac [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.23 \[ \int \frac {x-2 x \log (x)+\left (9+e^x (-3-3 x)+e^{x^2} \left (-3-6 x^2\right )\right ) \log ^2(x)+3 \log ^3(x)}{3 \log ^2(x)} \, dx=-\frac {3 \, x e^{\left (x^{2}\right )} \log \left (x\right ) + 3 \, x e^{x} \log \left (x\right ) - 3 \, x \log \left (x\right )^{2} + x^{2} - 6 \, x \log \left (x\right )}{3 \, \log \left (x\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 11.00 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.94 \[ \int \frac {x-2 x \log (x)+\left (9+e^x (-3-3 x)+e^{x^2} \left (-3-6 x^2\right )\right ) \log ^2(x)+3 \log ^3(x)}{3 \log ^2(x)} \, dx=2\,x-x\,{\mathrm {e}}^{x^2}-\frac {x^2}{3\,\ln \left (x\right )}-x\,{\mathrm {e}}^x+x\,\ln \left (x\right ) \]

[In]

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

[Out]

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