3.60.28 \(\int \frac {(3 x+x^2+\frac {1}{2} e^x (-3 x-x^2)) \log ^2(3 x+x^2)+e^{\frac {-4+(-4-x) \log (3 x+x^2)}{\log (3 x+x^2)}} (12+8 x+(-3 x-x^2) \log ^2(3 x+x^2))}{(3 x+x^2) \log ^2(3 x+x^2)} \, dx\)

Optimal. Leaf size=27 \[ -9-\frac {e^x}{2}+e^{-4-x-\frac {4}{\log (x (3+x))}}+x \]

________________________________________________________________________________________

Rubi [A]  time = 3.84, antiderivative size = 26, normalized size of antiderivative = 0.96, number of steps used = 7, number of rules used = 5, integrand size = 110, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {1593, 6741, 6742, 2194, 6706} \begin {gather*} x-\frac {e^x}{2}+e^{-x-\frac {4}{\log (x (x+3))}-4} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

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 6706

Int[(F_)^(v_)*(u_), x_Symbol] :> With[{q = DerivativeDivides[v, u, x]}, Simp[(q*F^v)/Log[F], x] /;  !FalseQ[q]
] /; FreeQ[F, x]

Rule 6741

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

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 3.02, size = 41, normalized size = 1.52 \begin {gather*} x - \frac {1}{2} \, e^{x} + e^{\left (-\frac {x \log \left (x^{2} + 3 \, x\right ) + 4 \, \log \left (x^{2} + 3 \, x\right ) + 4}{\log \left (x^{2} + 3 \, x\right )}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.60, size = 40, normalized size = 1.48




method result size



default \(x +{\mathrm e}^{\frac {\left (-x -4\right ) \ln \left (x^{2}+3 x \right )-4}{\ln \left (x^{2}+3 x \right )}}-{\mathrm e}^{x -\ln \relax (2)}\) \(40\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 4.60, size = 26, normalized size = 0.96 \begin {gather*} x-\frac {{\mathrm {e}}^x}{2}+{\mathrm {e}}^{-x}\,{\mathrm {e}}^{-4}\,{\mathrm {e}}^{-\frac {4}{\ln \left (x^2+3\,x\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(-(log(3*x + x^2)*(x + 4) + 4)/log(3*x + x^2))*(8*x - log(3*x + x^2)^2*(3*x + x^2) + 12) + log(3*x + x
^2)^2*(3*x - exp(x - log(2))*(3*x + x^2) + x^2))/(log(3*x + x^2)^2*(3*x + x^2)),x)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-x**2-3*x)*ln(x**2+3*x)**2+8*x+12)*exp(((-x-4)*ln(x**2+3*x)-4)/ln(x**2+3*x))+((-x**2-3*x)*exp(x-l
n(2))+x**2+3*x)*ln(x**2+3*x)**2)/(x**2+3*x)/ln(x**2+3*x)**2,x)

[Out]

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

________________________________________________________________________________________