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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0276182, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {1657, 634, 618, 204, 628} \[ \frac{x^3}{6}+\frac{x^2}{2}+\frac{3}{4} \log \left (x^2-4 x+5\right )+\frac{3 x}{2}+6 \tan ^{-1}(2-x) \]

Antiderivative was successfully verified.

[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 1657

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]

Rule 634

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 618

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 204

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

Rule 628

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]

Rubi steps

\begin{align*} \int \frac{-3+x-2 x^3+x^4}{10-8 x+2 x^2} \, dx &=\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 \operatorname{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]  time = 0.009641, size = 39, normalized size = 0.95 \[ \frac{1}{2} \left (\frac{x^3}{3}+x^2+\frac{3}{2} \log \left (x^2-4 x+5\right )+3 x+12 \tan ^{-1}(2-x)\right ) \]

Antiderivative was successfully verified.

[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]  time = 0.004, size = 32, normalized size = 0.8 \begin{align*}{\frac{3\,x}{2}}+{\frac{{x}^{2}}{2}}+{\frac{{x}^{3}}{6}}-6\,\arctan \left ( -2+x \right ) +{\frac{3\,\ln \left ({x}^{2}-4\,x+5 \right ) }{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.45813, size = 42, normalized size = 1.02 \begin{align*} \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 ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

Fricas [A]  time = 1.56159, size = 95, normalized size = 2.32 \begin{align*} \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 ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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]  time = 0.110648, size = 34, normalized size = 0.83 \begin{align*} \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 )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

Giac [A]  time = 1.12129, size = 42, normalized size = 1.02 \begin{align*} \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 ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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)