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

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

________________________________________________________________________________________

Rubi [A]  time = 0.29, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 72, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {1593, 6688, 12, 6686} \begin {gather*} \left (x-\log \left (\frac {3}{x}+3\right )+e^4-e^3+1\right )^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(1 - E^3 + E^4 + x - Log[3 + 3/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 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 6686

Int[(u_)*(y_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[(q*y^(m + 1))/(m + 1), x] /;  !F
alseQ[q]] /; FreeQ[m, x] && NeQ[m, -1]

Rule 6688

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

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.87, size = 48, normalized size = 2.09 \begin {gather*} x^{2} + 2 \, x e^{4} - 2 \, x e^{3} - 2 \, {\left (x + e^{4} - e^{3} + 1\right )} \log \left (\frac {3 \, {\left (x + 1\right )}}{x}\right ) + \log \left (\frac {3 \, {\left (x + 1\right )}}{x}\right )^{2} + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.49, size = 63, normalized size = 2.74




method result size



norman \(x^{2}+\ln \left (\frac {3 x +3}{x}\right )^{2}+\left (2+2 \,{\mathrm e}^{4}-2 \,{\mathrm e}^{3}\right ) x +\left (-2 \,{\mathrm e}^{4}+2 \,{\mathrm e}^{3}-2\right ) \ln \left (\frac {3 x +3}{x}\right )-2 x \ln \left (\frac {3 x +3}{x}\right )\) \(63\)
derivativedivides \(-2 \ln \left (\frac {3}{x}+3\right ) {\mathrm e}^{4}+2 \ln \left (\frac {3}{x}+3\right ) {\mathrm e}^{3}+2 x \,{\mathrm e}^{4}-2 x \,{\mathrm e}^{3}+2 x +x^{2}+\ln \left (\frac {3}{x}+3\right )^{2}-\frac {2 \ln \left (\frac {3}{x}+3\right ) \left (\frac {3}{x}+3\right ) x}{3}\) \(70\)
default \(-2 \ln \left (\frac {3}{x}+3\right ) {\mathrm e}^{4}+2 \ln \left (\frac {3}{x}+3\right ) {\mathrm e}^{3}+2 x \,{\mathrm e}^{4}-2 x \,{\mathrm e}^{3}+2 x +x^{2}+\ln \left (\frac {3}{x}+3\right )^{2}-\frac {2 \ln \left (\frac {3}{x}+3\right ) \left (\frac {3}{x}+3\right ) x}{3}\) \(70\)
risch \(2 x \,{\mathrm e}^{4}-2 x \,{\mathrm e}^{3}+x^{2}+2 x +2 \,{\mathrm e}^{4} \ln \relax (x )-2 \ln \relax (x ) {\mathrm e}^{3}+2 \ln \relax (x )-2 \,{\mathrm e}^{4} \ln \left (x +1\right )+2 \,{\mathrm e}^{3} \ln \left (x +1\right )+\ln \left (\frac {3}{x}+3\right )^{2}+2 \ln \left (\frac {3}{x}\right )-\frac {2 \ln \left (\frac {3}{x}+3\right ) \left (\frac {3}{x}+3\right ) x}{3}\) \(86\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-2*x^2-2*x-2)*ln((3*x+3)/x)+(2*x^2+2*x+2)*exp(4)+(-2*x^2-2*x-2)*exp(3)+2*x^3+4*x^2+4*x+2)/(x^2+x),x,meth
od=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.48, size = 132, normalized size = 5.74 \begin {gather*} x^{2} + 2 \, x {\left (e^{4} - e^{3} - \log \relax (3) + 1\right )} - 2 \, {\left (\log \left (x + 1\right ) - \log \relax (x)\right )} e^{4} + 2 \, {\left (\log \left (x + 1\right ) - \log \relax (x)\right )} e^{3} - 2 \, {\left (x + e^{4} - e^{3} + 2\right )} \log \left (x + 1\right ) + 2 \, e^{4} \log \left (x + 1\right ) - 2 \, e^{3} \log \left (x + 1\right ) - \log \left (x + 1\right )^{2} + 2 \, x \log \relax (x) + 2 \, \log \left (x + 1\right ) \log \relax (x) - \log \relax (x)^{2} + 2 \, {\left (\log \left (x + 1\right ) - \log \relax (x)\right )} \log \left (\frac {3}{x} + 3\right ) + 2 \, \log \left (x + 1\right ) + 2 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________