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

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

________________________________________________________________________________________

Rubi [A]  time = 0.33, antiderivative size = 27, normalized size of antiderivative = 0.82, number of steps used = 9, number of rules used = 7, integrand size = 56, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {1593, 6742, 1620, 2395, 36, 29, 31} \begin {gather*} \frac {6}{x^2}-3 x+\frac {2 \log (x+1)}{x}-\frac {10+\log (4)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

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 1620

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

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

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 30, normalized size = 0.91 \begin {gather*} \frac {6}{x^2}-\frac {10}{x}-3 x-\frac {2 \log (2)}{x}+\frac {2 \log (1+x)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

6/x^2 - 10/x - 3*x - (2*Log[2])/x + (2*Log[1 + x])/x

________________________________________________________________________________________

fricas [A]  time = 0.52, size = 27, normalized size = 0.82 \begin {gather*} -\frac {3 \, x^{3} + 2 \, x \log \relax (2) - 2 \, x \log \left (x + 1\right ) + 10 \, x - 6}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(3*x^3 + 2*x*log(2) - 2*x*log(x + 1) + 10*x - 6)/x^2

________________________________________________________________________________________

giac [A]  time = 0.15, size = 27, normalized size = 0.82 \begin {gather*} -3 \, x + \frac {2 \, \log \left (x + 1\right )}{x} - \frac {2 \, {\left (x \log \relax (2) + 5 \, x - 3\right )}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.38, size = 27, normalized size = 0.82




method result size



norman \(\frac {6+\left (-10-2 \ln \relax (2)\right ) x -3 x^{3}+2 \ln \left (x +1\right ) x}{x^{2}}\) \(27\)
risch \(\frac {2 \ln \left (x +1\right )}{x}-\frac {3 x^{3}+2 x \ln \relax (2)+10 x -6}{x^{2}}\) \(31\)
derivativedivides \(-\frac {2 \ln \relax (2)}{x}+\frac {2 \ln \left (x +1\right ) \left (x +1\right )}{x}-3 x -3-2 \ln \left (x +1\right )+\frac {6}{x^{2}}-\frac {10}{x}\) \(41\)
default \(-\frac {2 \ln \relax (2)}{x}+\frac {2 \ln \left (x +1\right ) \left (x +1\right )}{x}-3 x -3-2 \ln \left (x +1\right )+\frac {6}{x^{2}}-\frac {10}{x}\) \(41\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(6+(-10-2*ln(2))*x-3*x^3+2*ln(x+1)*x)/x^2

________________________________________________________________________________________

maxima [B]  time = 0.39, size = 66, normalized size = 2.00 \begin {gather*} -2 \, {\left (\frac {1}{x} - \log \left (x + 1\right ) + \log \relax (x)\right )} \log \relax (2) - 2 \, {\left (\log \left (x + 1\right ) - \log \relax (x)\right )} \log \relax (2) - 3 \, x + \frac {2 \, {\left (x + 1\right )} \log \left (x + 1\right )}{x} - \frac {6 \, {\left (2 \, x - 1\right )}}{x^{2}} + \frac {2}{x} - 2 \, \log \left (x + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.19, size = 25, normalized size = 0.76 \begin {gather*} -3\,x-\frac {x\,\left (2\,\ln \relax (2)-2\,\ln \left (x+1\right )+10\right )-6}{x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

- 3*x - (x*(2*log(2) - 2*log(x + 1) + 10) - 6)/x^2

________________________________________________________________________________________

sympy [A]  time = 0.18, size = 24, normalized size = 0.73 \begin {gather*} - 3 x + \frac {2 \log {\left (x + 1 \right )}}{x} - \frac {x \left (2 \log {\relax (2 )} + 10\right ) - 6}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-3*x + 2*log(x + 1)/x - (x*(2*log(2) + 10) - 6)/x**2

________________________________________________________________________________________