### 3.164 $$\int \frac{-4+3 x+x^2}{(-1+2 x)^2 (3+2 x)} \, dx$$

Optimal. Leaf size=32 $-\frac{9}{32 (1-2 x)}+\frac{41}{128} \log (1-2 x)-\frac{25}{128} \log (2 x+3)$

[Out]

-9/(32*(1 - 2*x)) + (41*Log[1 - 2*x])/128 - (25*Log[3 + 2*x])/128

________________________________________________________________________________________

Rubi [A]  time = 0.0258633, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 23, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.043, Rules used = {893} $-\frac{9}{32 (1-2 x)}+\frac{41}{128} \log (1-2 x)-\frac{25}{128} \log (2 x+3)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-9/(32*(1 - 2*x)) + (41*Log[1 - 2*x])/128 - (25*Log[3 + 2*x])/128

Rule 893

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rubi steps

\begin{align*} \int \frac{-4+3 x+x^2}{(-1+2 x)^2 (3+2 x)} \, dx &=\int \left (-\frac{9}{16 (-1+2 x)^2}+\frac{41}{64 (-1+2 x)}-\frac{25}{64 (3+2 x)}\right ) \, dx\\ &=-\frac{9}{32 (1-2 x)}+\frac{41}{128} \log (1-2 x)-\frac{25}{128} \log (3+2 x)\\ \end{align*}

Mathematica [A]  time = 0.0154008, size = 32, normalized size = 1. $\frac{9}{32 (2 x-1)}+\frac{41}{128} \log (1-2 x)-\frac{25}{128} \log (2 x+3)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

9/(32*(-1 + 2*x)) + (41*Log[1 - 2*x])/128 - (25*Log[3 + 2*x])/128

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 27, normalized size = 0.8 \begin{align*} -{\frac{25\,\ln \left ( 3+2\,x \right ) }{128}}+{\frac{9}{64\,x-32}}+{\frac{41\,\ln \left ( 2\,x-1 \right ) }{128}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-25/128*ln(3+2*x)+9/32/(2*x-1)+41/128*ln(2*x-1)

________________________________________________________________________________________

Maxima [A]  time = 0.92048, size = 35, normalized size = 1.09 \begin{align*} \frac{9}{32 \,{\left (2 \, x - 1\right )}} - \frac{25}{128} \, \log \left (2 \, x + 3\right ) + \frac{41}{128} \, \log \left (2 \, x - 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

9/32/(2*x - 1) - 25/128*log(2*x + 3) + 41/128*log(2*x - 1)

________________________________________________________________________________________

Fricas [A]  time = 1.83746, size = 107, normalized size = 3.34 \begin{align*} -\frac{25 \,{\left (2 \, x - 1\right )} \log \left (2 \, x + 3\right ) - 41 \,{\left (2 \, x - 1\right )} \log \left (2 \, x - 1\right ) - 36}{128 \,{\left (2 \, x - 1\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/128*(25*(2*x - 1)*log(2*x + 3) - 41*(2*x - 1)*log(2*x - 1) - 36)/(2*x - 1)

________________________________________________________________________________________

Sympy [A]  time = 0.12268, size = 26, normalized size = 0.81 \begin{align*} \frac{41 \log{\left (x - \frac{1}{2} \right )}}{128} - \frac{25 \log{\left (x + \frac{3}{2} \right )}}{128} + \frac{9}{64 x - 32} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

41*log(x - 1/2)/128 - 25*log(x + 3/2)/128 + 9/(64*x - 32)

________________________________________________________________________________________

Giac [A]  time = 1.06433, size = 58, normalized size = 1.81 \begin{align*} \frac{9}{32 \,{\left (2 \, x - 1\right )}} - \frac{1}{8} \, \log \left (\frac{{\left | 2 \, x - 1 \right |}}{2 \,{\left (2 \, x - 1\right )}^{2}}\right ) - \frac{25}{128} \, \log \left ({\left | -\frac{4}{2 \, x - 1} - 1 \right |}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

9/32/(2*x - 1) - 1/8*log(1/2*abs(2*x - 1)/(2*x - 1)^2) - 25/128*log(abs(-4/(2*x - 1) - 1))