\(\int \frac {4+3 x+x^2}{(-3+x) (-2+x) (-1+x)} \, dx\) [361]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 24, antiderivative size = 25 \[ \int \frac {4+3 x+x^2}{(-3+x) (-2+x) (-1+x)} \, dx=4 \log (1-x)-14 \log (2-x)+11 \log (3-x) \]

[Out]

4*ln(1-x)-14*ln(2-x)+11*ln(3-x)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.042, Rules used = {1626} \[ \int \frac {4+3 x+x^2}{(-3+x) (-2+x) (-1+x)} \, dx=4 \log (1-x)-14 \log (2-x)+11 \log (3-x) \]

[In]

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

[Out]

4*Log[1 - x] - 14*Log[2 - x] + 11*Log[3 - x]

Rule 1626

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[E
xpandIntegrand[Px*(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && Poly
Q[Px, x] && IntegersQ[m, n]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {11}{-3+x}-\frac {14}{-2+x}+\frac {4}{-1+x}\right ) \, dx \\ & = 4 \log (1-x)-14 \log (2-x)+11 \log (3-x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {4+3 x+x^2}{(-3+x) (-2+x) (-1+x)} \, dx=11 \log (-3+x)-14 \log (-2+x)+4 \log (-1+x) \]

[In]

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

[Out]

11*Log[-3 + x] - 14*Log[-2 + x] + 4*Log[-1 + x]

Maple [A] (verified)

Time = 0.81 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80

method result size
default \(11 \ln \left (-3+x \right )+4 \ln \left (x -1\right )-14 \ln \left (x -2\right )\) \(20\)
norman \(11 \ln \left (-3+x \right )+4 \ln \left (x -1\right )-14 \ln \left (x -2\right )\) \(20\)
risch \(11 \ln \left (-3+x \right )+4 \ln \left (x -1\right )-14 \ln \left (x -2\right )\) \(20\)
parallelrisch \(11 \ln \left (-3+x \right )+4 \ln \left (x -1\right )-14 \ln \left (x -2\right )\) \(20\)

[In]

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

[Out]

11*ln(-3+x)+4*ln(x-1)-14*ln(x-2)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {4+3 x+x^2}{(-3+x) (-2+x) (-1+x)} \, dx=4 \, \log \left (x - 1\right ) - 14 \, \log \left (x - 2\right ) + 11 \, \log \left (x - 3\right ) \]

[In]

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

[Out]

4*log(x - 1) - 14*log(x - 2) + 11*log(x - 3)

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {4+3 x+x^2}{(-3+x) (-2+x) (-1+x)} \, dx=11 \log {\left (x - 3 \right )} - 14 \log {\left (x - 2 \right )} + 4 \log {\left (x - 1 \right )} \]

[In]

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

[Out]

11*log(x - 3) - 14*log(x - 2) + 4*log(x - 1)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {4+3 x+x^2}{(-3+x) (-2+x) (-1+x)} \, dx=4 \, \log \left (x - 1\right ) - 14 \, \log \left (x - 2\right ) + 11 \, \log \left (x - 3\right ) \]

[In]

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

[Out]

4*log(x - 1) - 14*log(x - 2) + 11*log(x - 3)

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.88 \[ \int \frac {4+3 x+x^2}{(-3+x) (-2+x) (-1+x)} \, dx=4 \, \log \left ({\left | x - 1 \right |}\right ) - 14 \, \log \left ({\left | x - 2 \right |}\right ) + 11 \, \log \left ({\left | x - 3 \right |}\right ) \]

[In]

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

[Out]

4*log(abs(x - 1)) - 14*log(abs(x - 2)) + 11*log(abs(x - 3))

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {4+3 x+x^2}{(-3+x) (-2+x) (-1+x)} \, dx=4\,\ln \left (x-1\right )-14\,\ln \left (x-2\right )+11\,\ln \left (x-3\right ) \]

[In]

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

[Out]

4*log(x - 1) - 14*log(x - 2) + 11*log(x - 3)