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

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

________________________________________________________________________________________

Rubi [F]  time = 0.50, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {-4 x-2 x^2+(-12-4 x) \log (3+x)+\left (3+x+3 x^2-5 x^3-2 x^4\right ) \log ^2(3+x)}{\left (3 x^2+x^3\right ) \log ^2(3+x)} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 26, normalized size = 1.00 \begin {gather*} -\frac {1}{x}+x-x^2+\frac {2 (2+x)}{x \log (3+x)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^4-5*x^3+3*x^2+x+3)*log(3+x)^2+(-4*x-12)*log(3+x)-2*x^2-4*x)/(x^3+3*x^2)/log(3+x)^2,x, algorit
hm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.29, size = 26, normalized size = 1.00 \begin {gather*} -x^{2} + x - \frac {1}{x} + \frac {2 \, {\left (x + 2\right )}}{x \log \left (x + 3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^4-5*x^3+3*x^2+x+3)*log(3+x)^2+(-4*x-12)*log(3+x)-2*x^2-4*x)/(x^3+3*x^2)/log(3+x)^2,x, algorit
hm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.38, size = 31, normalized size = 1.19




method result size



risch \(-\frac {x^{3}-x^{2}+1}{x}+\frac {2 x +4}{x \ln \left (3+x \right )}\) \(31\)
norman \(\frac {4+\ln \left (3+x \right ) x^{2}+2 x -\ln \left (3+x \right ) x^{3}-\ln \left (3+x \right )}{x \ln \left (3+x \right )}\) \(39\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-2*x^4-5*x^3+3*x^2+x+3)*ln(3+x)^2+(-4*x-12)*ln(3+x)-2*x^2-4*x)/(x^3+3*x^2)/ln(3+x)^2,x,method=_RETURNVER
BOSE)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^4-5*x^3+3*x^2+x+3)*log(3+x)^2+(-4*x-12)*log(3+x)-2*x^2-4*x)/(x^3+3*x^2)/log(3+x)^2,x, algorit
hm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.17, size = 31, normalized size = 1.19 \begin {gather*} x+\frac {2}{\ln \left (x+3\right )}-\frac {1}{x}-x^2+\frac {4}{x\,\ln \left (x+3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 19, normalized size = 0.73 \begin {gather*} - x^{2} + x + \frac {2 x + 4}{x \log {\left (x + 3 \right )}} - \frac {1}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________