\(\int \frac {-3+x-2 x^3+x^4}{10-8 x+2 x^2} \, dx\) [293]

   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 = 41 \[ \int \frac {-3+x-2 x^3+x^4}{10-8 x+2 x^2} \, dx=\frac {3 x}{2}+\frac {x^2}{2}+\frac {x^3}{6}+6 \arctan (2-x)+\frac {3}{4} \log \left (5-4 x+x^2\right ) \]

[Out]

3/2*x+1/2*x^2+1/6*x^3-6*arctan(-2+x)+3/4*ln(x^2-4*x+5)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {1671, 648, 632, 210, 642} \[ \int \frac {-3+x-2 x^3+x^4}{10-8 x+2 x^2} \, dx=6 \arctan (2-x)+\frac {x^3}{6}+\frac {x^2}{2}+\frac {3}{4} \log \left (x^2-4 x+5\right )+\frac {3 x}{2} \]

[In]

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

[Out]

(3*x)/2 + x^2/2 + x^3/6 + 6*ArcTan[2 - x] + (3*Log[5 - 4*x + x^2])/4

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 632

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

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

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

Rule 1671

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {3}{2}+x+\frac {x^2}{2}-\frac {3 (6-x)}{10-8 x+2 x^2}\right ) \, dx \\ & = \frac {3 x}{2}+\frac {x^2}{2}+\frac {x^3}{6}-3 \int \frac {6-x}{10-8 x+2 x^2} \, dx \\ & = \frac {3 x}{2}+\frac {x^2}{2}+\frac {x^3}{6}+\frac {3}{4} \int \frac {-8+4 x}{10-8 x+2 x^2} \, dx-12 \int \frac {1}{10-8 x+2 x^2} \, dx \\ & = \frac {3 x}{2}+\frac {x^2}{2}+\frac {x^3}{6}+\frac {3}{4} \log \left (5-4 x+x^2\right )+24 \text {Subst}\left (\int \frac {1}{-16-x^2} \, dx,x,-8+4 x\right ) \\ & = \frac {3 x}{2}+\frac {x^2}{2}+\frac {x^3}{6}+6 \tan ^{-1}(2-x)+\frac {3}{4} \log \left (5-4 x+x^2\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.95 \[ \int \frac {-3+x-2 x^3+x^4}{10-8 x+2 x^2} \, dx=\frac {1}{2} \left (3 x+x^2+\frac {x^3}{3}+12 \arctan (2-x)+\frac {3}{2} \log \left (5-4 x+x^2\right )\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.07 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.78

method result size
default \(\frac {3 x}{2}+\frac {x^{2}}{2}+\frac {x^{3}}{6}-6 \arctan \left (x -2\right )+\frac {3 \ln \left (x^{2}-4 x +5\right )}{4}\) \(32\)
risch \(\frac {3 x}{2}+\frac {x^{2}}{2}+\frac {x^{3}}{6}-6 \arctan \left (x -2\right )+\frac {3 \ln \left (x^{2}-4 x +5\right )}{4}\) \(32\)
parallelrisch \(\frac {x^{3}}{6}+\frac {x^{2}}{2}+\frac {3 x}{2}+\frac {3 \ln \left (x -2-i\right )}{4}+3 i \ln \left (x -2-i\right )+\frac {3 \ln \left (x -2+i\right )}{4}-3 i \ln \left (x -2+i\right )\) \(49\)

[In]

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

[Out]

3/2*x+1/2*x^2+1/6*x^3-6*arctan(x-2)+3/4*ln(x^2-4*x+5)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.76 \[ \int \frac {-3+x-2 x^3+x^4}{10-8 x+2 x^2} \, dx=\frac {1}{6} \, x^{3} + \frac {1}{2} \, x^{2} + \frac {3}{2} \, x - 6 \, \arctan \left (x - 2\right ) + \frac {3}{4} \, \log \left (x^{2} - 4 \, x + 5\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.83 \[ \int \frac {-3+x-2 x^3+x^4}{10-8 x+2 x^2} \, dx=\frac {x^{3}}{6} + \frac {x^{2}}{2} + \frac {3 x}{2} + \frac {3 \log {\left (x^{2} - 4 x + 5 \right )}}{4} - 6 \operatorname {atan}{\left (x - 2 \right )} \]

[In]

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

[Out]

x**3/6 + x**2/2 + 3*x/2 + 3*log(x**2 - 4*x + 5)/4 - 6*atan(x - 2)

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.76 \[ \int \frac {-3+x-2 x^3+x^4}{10-8 x+2 x^2} \, dx=\frac {1}{6} \, x^{3} + \frac {1}{2} \, x^{2} + \frac {3}{2} \, x - 6 \, \arctan \left (x - 2\right ) + \frac {3}{4} \, \log \left (x^{2} - 4 \, x + 5\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.76 \[ \int \frac {-3+x-2 x^3+x^4}{10-8 x+2 x^2} \, dx=\frac {1}{6} \, x^{3} + \frac {1}{2} \, x^{2} + \frac {3}{2} \, x - 6 \, \arctan \left (x - 2\right ) + \frac {3}{4} \, \log \left (x^{2} - 4 \, x + 5\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 9.57 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.76 \[ \int \frac {-3+x-2 x^3+x^4}{10-8 x+2 x^2} \, dx=\frac {3\,x}{2}-6\,\mathrm {atan}\left (x-2\right )+\frac {3\,\ln \left (x^2-4\,x+5\right )}{4}+\frac {x^2}{2}+\frac {x^3}{6} \]

[In]

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

[Out]

(3*x)/2 - 6*atan(x - 2) + (3*log(x^2 - 4*x + 5))/4 + x^2/2 + x^3/6