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

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

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 31, normalized size of antiderivative = 1.24, number of steps used = 14, number of rules used = 5, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {14, 2199, 2194, 2178, 2551} \begin {gather*} x+e^x+2 \log (x)-\frac {\log (3) \log \left (e^{e^x} x\right )}{x}+\frac {4 \log (3)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {e^x (x-\log (3))}{x}+\frac {2 x+x^2-5 \log (3)+\log (3) \log \left (e^{e^x} x\right )}{x^2}\right ) \, dx\\ &=\int \frac {e^x (x-\log (3))}{x} \, dx+\int \frac {2 x+x^2-5 \log (3)+\log (3) \log \left (e^{e^x} x\right )}{x^2} \, dx\\ &=\int \left (e^x-\frac {e^x \log (3)}{x}\right ) \, dx+\int \left (\frac {2 x+x^2-5 \log (3)}{x^2}+\frac {\log (3) \log \left (e^{e^x} x\right )}{x^2}\right ) \, dx\\ &=-\left (\log (3) \int \frac {e^x}{x} \, dx\right )+\log (3) \int \frac {\log \left (e^{e^x} x\right )}{x^2} \, dx+\int e^x \, dx+\int \frac {2 x+x^2-5 \log (3)}{x^2} \, dx\\ &=e^x-\text {Ei}(x) \log (3)-\frac {\log (3) \log \left (e^{e^x} x\right )}{x}+\log (3) \int \frac {1+e^x x}{x^2} \, dx+\int \left (1+\frac {2}{x}-\frac {5 \log (3)}{x^2}\right ) \, dx\\ &=e^x+x+\frac {5 \log (3)}{x}-\text {Ei}(x) \log (3)+2 \log (x)-\frac {\log (3) \log \left (e^{e^x} x\right )}{x}+\log (3) \int \left (\frac {1}{x^2}+\frac {e^x}{x}\right ) \, dx\\ &=e^x+x+\frac {4 \log (3)}{x}-\text {Ei}(x) \log (3)+2 \log (x)-\frac {\log (3) \log \left (e^{e^x} x\right )}{x}+\log (3) \int \frac {e^x}{x} \, dx\\ &=e^x+x+\frac {4 \log (3)}{x}+2 \log (x)-\frac {\log (3) \log \left (e^{e^x} x\right )}{x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 31, normalized size = 1.24 \begin {gather*} e^x+x+\frac {4 \log (3)}{x}+2 \log (x)-\frac {\log (3) \log \left (e^{e^x} x\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.96, size = 32, normalized size = 1.28 \begin {gather*} \frac {x^{2} - x e^{x} + {\left (2 \, x - \log \relax (3)\right )} \log \left (x e^{\left (e^{x}\right )}\right ) + 4 \, \log \relax (3)}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.23, size = 33, normalized size = 1.32 \begin {gather*} \frac {x^{2} + x e^{x} - e^{x} \log \relax (3) + 2 \, x \log \relax (x) - \log \relax (3) \log \relax (x) + 4 \, \log \relax (3)}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.10, size = 29, normalized size = 1.16




method result size



default \(-\frac {\ln \relax (3) \ln \left (x \,{\mathrm e}^{{\mathrm e}^{x}}\right )}{x}+\frac {4 \ln \relax (3)}{x}+x +2 \ln \relax (x )+{\mathrm e}^{x}\) \(29\)
risch \(-\frac {\ln \relax (3) \ln \left ({\mathrm e}^{{\mathrm e}^{x}}\right )}{x}+\frac {i \ln \relax (3) \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i {\mathrm e}^{{\mathrm e}^{x}}\right ) \mathrm {csgn}\left (i x \,{\mathrm e}^{{\mathrm e}^{x}}\right )-i \ln \relax (3) \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x \,{\mathrm e}^{{\mathrm e}^{x}}\right )^{2}-i \ln \relax (3) \pi \,\mathrm {csgn}\left (i {\mathrm e}^{{\mathrm e}^{x}}\right ) \mathrm {csgn}\left (i x \,{\mathrm e}^{{\mathrm e}^{x}}\right )^{2}+i \ln \relax (3) \pi \mathrm {csgn}\left (i x \,{\mathrm e}^{{\mathrm e}^{x}}\right )^{3}+4 x \ln \relax (x )-2 \ln \relax (3) \ln \relax (x )+2 x^{2}+2 \,{\mathrm e}^{x} x +8 \ln \relax (3)}{2 x}\) \(130\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-ln(3)/x*ln(x*exp(exp(x)))+4*ln(3)/x+x+2*ln(x)+exp(x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.14, size = 28, normalized size = 1.12 \begin {gather*} x+{\mathrm {e}}^x+2\,\ln \relax (x)-\frac {{\mathrm {e}}^x\,\ln \relax (3)-4\,\ln \relax (3)+\ln \relax (3)\,\ln \relax (x)}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________