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

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

________________________________________________________________________________________

Rubi [A]  time = 1.79, antiderivative size = 33, normalized size of antiderivative = 1.32, number of steps used = 50, number of rules used = 13, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.236, Rules used = {14, 2304, 6688, 6742, 2199, 2194, 2178, 2554, 6483, 6475, 2176, 12, 2557} \begin {gather*} x^2 (-\log (x))+e^x x \log (x) \log \left (x^2\right )+e^x \log (x) \log \left (x^2\right )+3 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

3*Log[x] - x^2*Log[x] + E^x*Log[x]*Log[x^2] + E^x*x*Log[x]*Log[x^2]

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 2176

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] &&  !$UseGamma === True

Rule 2178

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

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 2199

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$UseGamma === True

Rule 2304

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

Rule 2554

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[(w*D[u, x]
)/u, x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, x]

Rule 2557

Int[Log[v_]*Log[w_]*(u_), x_Symbol] :> With[{z = IntHide[u, x]}, Dist[Log[v]*Log[w], z, x] + (-Int[SimplifyInt
egrand[(z*Log[w]*D[v, x])/v, x], x] - Int[SimplifyIntegrand[(z*Log[v]*D[w, x])/w, x], x]) /; InverseFunctionFr
eeQ[z, x]] /; InverseFunctionFreeQ[v, x] && InverseFunctionFreeQ[w, x]

Rule 6475

Int[ExpIntegralE[1, (b_.)*(x_)]/(x_), x_Symbol] :> Simp[b*x*HypergeometricPFQ[{1, 1, 1}, {2, 2, 2}, -(b*x)], x
] + (-Simp[EulerGamma*Log[x], x] - Simp[(1*Log[b*x]^2)/2, x]) /; FreeQ[b, x]

Rule 6483

Int[ExpIntegralEi[(b_.)*(x_)]/(x_), x_Symbol] :> Simp[Log[x]*(ExpIntegralEi[b*x] + ExpIntegralE[1, -(b*x)]), x
] - Int[ExpIntegralE[1, -(b*x)]/x, x] /; FreeQ[b, x]

Rule 6688

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

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

________________________________________________________________________________________

Mathematica [A]  time = 0.24, size = 21, normalized size = 0.84 \begin {gather*} -\log (x) \left (-3+x^2-e^x (1+x) \log \left (x^2\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.18, size = 29, normalized size = 1.16 \begin {gather*} 2 \, x e^{x} \log \relax (x)^{2} - x^{2} \log \relax (x) + 2 \, e^{x} \log \relax (x)^{2} + 3 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.09, size = 59, normalized size = 2.36




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -x^{2} \log \relax (x) + 2 \, {\left ({\left (x + 1\right )} \log \relax (x)^{2} - \log \relax (x)\right )} e^{x} + 2 \, e^{x} \log \relax (x) - 2 \, {\rm Ei}\relax (x) + 2 \, \int \frac {e^{x}}{x}\,{d x} + 3 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.21, size = 25, normalized size = 1.00 \begin {gather*} \ln \relax (x)\,\left (\ln \left (x^2\right )\,{\mathrm {e}}^x-x^2+x\,\ln \left (x^2\right )\,{\mathrm {e}}^x+3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________