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\) [4547]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.68, 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 = {6874, 2225, 6820, 2335, 2629, 45} \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 45

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 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 2335

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

Rule 2629

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

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 {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.10, 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]))]

________________________________________________________________________________________

Maple [A]
time = 1.08, size = 22, normalized size = 1.00

method result size
default \(-{\mathrm e}^{x}+\ln \left (\frac {1}{\left (-x -4\right ) \ln \left (x \right )}\right ) x +x\) \(22\)
risch \(-x \ln \left (4+x \right )-x \ln \left (\ln \left (x \right )\right )-\frac {i x \pi \,\mathrm {csgn}\left (\frac {i}{4+x}\right ) \mathrm {csgn}\left (\frac {i}{\ln \left (x \right )}\right ) \mathrm {csgn}\left (\frac {i}{\ln \left (x \right ) \left (4+x \right )}\right )}{2}+\frac {i x \pi \,\mathrm {csgn}\left (\frac {i}{4+x}\right ) \mathrm {csgn}\left (\frac {i}{\ln \left (x \right ) \left (4+x \right )}\right )^{2}}{2}+\frac {i x \pi \,\mathrm {csgn}\left (\frac {i}{\ln \left (x \right )}\right ) \mathrm {csgn}\left (\frac {i}{\ln \left (x \right ) \left (4+x \right )}\right )^{2}}{2}+\frac {i x \pi \mathrm {csgn}\left (\frac {i}{\ln \left (x \right ) \left (4+x \right )}\right )^{3}}{2}-i x \pi \mathrm {csgn}\left (\frac {i}{\ln \left (x \right ) \left (4+x \right )}\right )^{2}+i x \pi +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.33, size = 21, normalized size = 0.95 \begin {gather*} -x \log \left (-x - 4\right ) - x \log \left (\log \left (x\right )\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))+((-4-x)*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

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 20, normalized size = 0.91 \begin {gather*} x \log \left (-\frac {1}{{\left (x + 4\right )} \log \left (x\right )}\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))+((-4-x)*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

________________________________________________________________________________________

Sympy [A]
time = 0.43, size = 37, normalized size = 1.68 \begin {gather*} x + \left (x + \frac {2}{3}\right ) \log {\left (- \frac {1}{\left (x + 4\right ) \log {\left (x \right )}} \right )} - e^{x} + \frac {2 \log {\left (x + 4 \right )}}{3} + \frac {2 \log {\left (\log {\left (x \right )} \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))+((-4-x)*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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 79 vs. \(2 (21) = 42\).
time = 0.43, size = 79, normalized size = 3.59 \begin {gather*} -\frac {1}{2} \, x \log \left (-\frac {1}{2} \, \pi ^{2} x^{2} \mathrm {sgn}\left (x\right ) + \frac {1}{2} \, \pi ^{2} x^{2} + x^{2} \log \left ({\left | x \right |}\right )^{2} - 4 \, \pi ^{2} x \mathrm {sgn}\left (x\right ) + 4 \, \pi ^{2} x + 8 \, x \log \left ({\left | x \right |}\right )^{2} - 8 \, \pi ^{2} \mathrm {sgn}\left (x\right ) + 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))+((-4-x)*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

________________________________________________________________________________________

Mupad [B]
time = 3.28, size = 20, normalized size = 0.91 \begin {gather*} x-{\mathrm {e}}^x+x\,\ln \left (-\frac {1}{\ln \left (x\right )\,\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)))

________________________________________________________________________________________