3.46.47 \(\int \frac {-4-x+(4+e^x (-4-x)) \log (x)+(4+x) \log (x) \log (-\frac {1}{(4+x) \log (x)})}{(4+x) \log (x)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.63, antiderivative size = 21, normalized size of antiderivative = 0.95, number of steps used = 15, number of rules used = 6, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {6742, 2194, 6688, 2298, 2549, 43} \begin {gather*} x-e^x+x \log \left (-\frac {1}{(x+4) \log (x)}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

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 2298

Int[Log[(c_.)*(x_)]^(-1), x_Symbol] :> Simp[LogIntegral[c*x]/c, x] /; FreeQ[c, x]

Rule 2549

Int[Log[u_], x_Symbol] :> Simp[x*Log[u], x] - Int[SimplifyIntegrand[x*Simplify[D[u, x]/u], x], x] /; ProductQ[
u]

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.70, size = 20, normalized size = 0.91 \begin {gather*} x \log \left (-\frac {1}{{\left (x + 4\right )} \log \relax (x)}\right ) + x - e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.39, size = 79, normalized size = 3.59 \begin {gather*} -\frac {1}{2} \, x \log \left (-\frac {1}{2} \, \pi ^{2} x^{2} \mathrm {sgn}\relax (x) + \frac {1}{2} \, \pi ^{2} x^{2} + x^{2} \log \left ({\left | x \right |}\right )^{2} - 4 \, \pi ^{2} x \mathrm {sgn}\relax (x) + 4 \, \pi ^{2} x + 8 \, x \log \left ({\left | x \right |}\right )^{2} - 8 \, \pi ^{2} \mathrm {sgn}\relax (x) + 8 \, \pi ^{2} + 16 \, \log \left ({\left | x \right |}\right )^{2}\right ) + x - e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*x*log(-1/2*pi^2*x^2*sgn(x) + 1/2*pi^2*x^2 + x^2*log(abs(x))^2 - 4*pi^2*x*sgn(x) + 4*pi^2*x + 8*x*log(abs(
x))^2 - 8*pi^2*sgn(x) + 8*pi^2 + 16*log(abs(x))^2) + x - e^x

________________________________________________________________________________________

maple [A]  time = 0.20, size = 22, normalized size = 1.00




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((4+x)*ln(x)*ln(-1/(4+x)/ln(x))+((-x-4)*exp(x)+4)*ln(x)-x-4)/(4+x)/ln(x),x,method=_RETURNVERBOSE)

[Out]

-exp(x)+ln(1/(-x-4)/ln(x))*x+x

________________________________________________________________________________________

maxima [A]  time = 0.57, size = 21, normalized size = 0.95 \begin {gather*} -x \log \left (-x - 4\right ) - x \log \left (\log \relax (x)\right ) + x - e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.28, size = 20, normalized size = 0.91 \begin {gather*} x-{\mathrm {e}}^x+x\,\ln \left (-\frac {1}{\ln \relax (x)\,\left (x+4\right )}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(x + log(x)*(exp(x)*(x + 4) - 4) - log(-1/(log(x)*(x + 4)))*log(x)*(x + 4) + 4)/(log(x)*(x + 4)),x)

[Out]

x - exp(x) + x*log(-1/(log(x)*(x + 4)))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________