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

   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 = 29, antiderivative size = 30 \[ \int \frac {1+2 x+3 x^2+x^3}{(-3+x) (-2+x) (-1+x)} \, dx=x+\frac {7}{2} \log (1-x)-25 \log (2-x)+\frac {61}{2} \log (3-x) \]

[Out]

x+7/2*ln(1-x)-25*ln(2-x)+61/2*ln(3-x)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 30, 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.034, Rules used = {1626} \[ \int \frac {1+2 x+3 x^2+x^3}{(-3+x) (-2+x) (-1+x)} \, dx=x+\frac {7}{2} \log (1-x)-25 \log (2-x)+\frac {61}{2} \log (3-x) \]

[In]

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

[Out]

x + (7*Log[1 - x])/2 - 25*Log[2 - x] + (61*Log[3 - x])/2

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 (1+\frac {61}{2 (-3+x)}-\frac {25}{-2+x}+\frac {7}{2 (-1+x)}\right ) \, dx \\ & = x+\frac {7}{2} \log (1-x)-25 \log (2-x)+\frac {61}{2} \log (3-x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.80 \[ \int \frac {1+2 x+3 x^2+x^3}{(-3+x) (-2+x) (-1+x)} \, dx=x+\frac {61}{2} \log (-3+x)-25 \log (-2+x)+\frac {7}{2} \log (-1+x) \]

[In]

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

[Out]

x + (61*Log[-3 + x])/2 - 25*Log[-2 + x] + (7*Log[-1 + x])/2

Maple [A] (verified)

Time = 0.85 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.70

method result size
default \(x +\frac {61 \ln \left (-3+x \right )}{2}+\frac {7 \ln \left (x -1\right )}{2}-25 \ln \left (x -2\right )\) \(21\)
norman \(x +\frac {61 \ln \left (-3+x \right )}{2}+\frac {7 \ln \left (x -1\right )}{2}-25 \ln \left (x -2\right )\) \(21\)
risch \(x +\frac {61 \ln \left (-3+x \right )}{2}+\frac {7 \ln \left (x -1\right )}{2}-25 \ln \left (x -2\right )\) \(21\)
parallelrisch \(x +\frac {61 \ln \left (-3+x \right )}{2}+\frac {7 \ln \left (x -1\right )}{2}-25 \ln \left (x -2\right )\) \(21\)

[In]

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

[Out]

x+61/2*ln(-3+x)+7/2*ln(x-1)-25*ln(x-2)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.67 \[ \int \frac {1+2 x+3 x^2+x^3}{(-3+x) (-2+x) (-1+x)} \, dx=x + \frac {7}{2} \, \log \left (x - 1\right ) - 25 \, \log \left (x - 2\right ) + \frac {61}{2} \, \log \left (x - 3\right ) \]

[In]

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

[Out]

x + 7/2*log(x - 1) - 25*log(x - 2) + 61/2*log(x - 3)

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.80 \[ \int \frac {1+2 x+3 x^2+x^3}{(-3+x) (-2+x) (-1+x)} \, dx=x + \frac {61 \log {\left (x - 3 \right )}}{2} - 25 \log {\left (x - 2 \right )} + \frac {7 \log {\left (x - 1 \right )}}{2} \]

[In]

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

[Out]

x + 61*log(x - 3)/2 - 25*log(x - 2) + 7*log(x - 1)/2

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.67 \[ \int \frac {1+2 x+3 x^2+x^3}{(-3+x) (-2+x) (-1+x)} \, dx=x + \frac {7}{2} \, \log \left (x - 1\right ) - 25 \, \log \left (x - 2\right ) + \frac {61}{2} \, \log \left (x - 3\right ) \]

[In]

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

[Out]

x + 7/2*log(x - 1) - 25*log(x - 2) + 61/2*log(x - 3)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.77 \[ \int \frac {1+2 x+3 x^2+x^3}{(-3+x) (-2+x) (-1+x)} \, dx=x + \frac {7}{2} \, \log \left ({\left | x - 1 \right |}\right ) - 25 \, \log \left ({\left | x - 2 \right |}\right ) + \frac {61}{2} \, \log \left ({\left | x - 3 \right |}\right ) \]

[In]

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

[Out]

x + 7/2*log(abs(x - 1)) - 25*log(abs(x - 2)) + 61/2*log(abs(x - 3))

Mupad [B] (verification not implemented)

Time = 9.51 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.67 \[ \int \frac {1+2 x+3 x^2+x^3}{(-3+x) (-2+x) (-1+x)} \, dx=x+\frac {7\,\ln \left (x-1\right )}{2}-25\,\ln \left (x-2\right )+\frac {61\,\ln \left (x-3\right )}{2} \]

[In]

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

[Out]

x + (7*log(x - 1))/2 - 25*log(x - 2) + (61*log(x - 3))/2