3.360 \(\int \frac{5+x^3}{(10-6 x+x^2) (\frac{1}{2}-x+x^2)} \, dx\)

Optimal. Leaf size=49 \[ \frac{56}{221} \log \left (x^2-6 x+10\right )+\frac{109}{442} \log \left (2 x^2-2 x+1\right )-\frac{261}{221} \tan ^{-1}(1-2 x)-\frac{1026}{221} \tan ^{-1}(3-x) \]

[Out]

(-261*ArcTan[1 - 2*x])/221 - (1026*ArcTan[3 - x])/221 + (56*Log[10 - 6*x + x^2])/221 + (109*Log[1 - 2*x + 2*x^
2])/442

________________________________________________________________________________________

Rubi [A]  time = 0.142056, antiderivative size = 49, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {6728, 634, 618, 204, 628, 617} \[ \frac{56}{221} \log \left (x^2-6 x+10\right )+\frac{109}{442} \log \left (2 x^2-2 x+1\right )-\frac{261}{221} \tan ^{-1}(1-2 x)-\frac{1026}{221} \tan ^{-1}(3-x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-261*ArcTan[1 - 2*x])/221 - (1026*ArcTan[3 - x])/221 + (56*Log[10 - 6*x + x^2])/221 + (109*Log[1 - 2*x + 2*x^
2])/442

Rule 6728

Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a +
b*x^n + c*x^(2*n)), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]

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]

Rule 617

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[(a*c)/b^2]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + (2*c*x)/b], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rubi steps

\begin{align*} \int \frac{5+x^3}{\left (10-6 x+x^2\right ) \left (\frac{1}{2}-x+x^2\right )} \, dx &=\int \left (\frac{2 (345+56 x)}{221 \left (10-6 x+x^2\right )}+\frac{2 (76+109 x)}{221 \left (1-2 x+2 x^2\right )}\right ) \, dx\\ &=\frac{2}{221} \int \frac{345+56 x}{10-6 x+x^2} \, dx+\frac{2}{221} \int \frac{76+109 x}{1-2 x+2 x^2} \, dx\\ &=\frac{109}{442} \int \frac{-2+4 x}{1-2 x+2 x^2} \, dx+\frac{56}{221} \int \frac{-6+2 x}{10-6 x+x^2} \, dx+\frac{261}{221} \int \frac{1}{1-2 x+2 x^2} \, dx+\frac{1026}{221} \int \frac{1}{10-6 x+x^2} \, dx\\ &=\frac{56}{221} \log \left (10-6 x+x^2\right )+\frac{109}{442} \log \left (1-2 x+2 x^2\right )+\frac{261}{221} \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1-2 x\right )-\frac{2052}{221} \operatorname{Subst}\left (\int \frac{1}{-4-x^2} \, dx,x,-6+2 x\right )\\ &=-\frac{261}{221} \tan ^{-1}(1-2 x)-\frac{1026}{221} \tan ^{-1}(3-x)+\frac{56}{221} \log \left (10-6 x+x^2\right )+\frac{109}{442} \log \left (1-2 x+2 x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0147152, size = 49, normalized size = 1. \[ \frac{56}{221} \log \left (x^2-6 x+10\right )+\frac{109}{442} \log \left (2 x^2-2 x+1\right )-\frac{261}{221} \tan ^{-1}(1-2 x)-\frac{1026}{221} \tan ^{-1}(3-x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-261*ArcTan[1 - 2*x])/221 - (1026*ArcTan[3 - x])/221 + (56*Log[10 - 6*x + x^2])/221 + (109*Log[1 - 2*x + 2*x^
2])/442

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 40, normalized size = 0.8 \begin{align*}{\frac{261\,\arctan \left ( 2\,x-1 \right ) }{221}}+{\frac{1026\,\arctan \left ( -3+x \right ) }{221}}+{\frac{56\,\ln \left ({x}^{2}-6\,x+10 \right ) }{221}}+{\frac{109\,\ln \left ( 2\,{x}^{2}-2\,x+1 \right ) }{442}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

261/221*arctan(2*x-1)+1026/221*arctan(-3+x)+56/221*ln(x^2-6*x+10)+109/442*ln(2*x^2-2*x+1)

________________________________________________________________________________________

Maxima [A]  time = 1.70234, size = 53, normalized size = 1.08 \begin{align*} \frac{261}{221} \, \arctan \left (2 \, x - 1\right ) + \frac{1026}{221} \, \arctan \left (x - 3\right ) + \frac{109}{442} \, \log \left (2 \, x^{2} - 2 \, x + 1\right ) + \frac{56}{221} \, \log \left (x^{2} - 6 \, x + 10\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

261/221*arctan(2*x - 1) + 1026/221*arctan(x - 3) + 109/442*log(2*x^2 - 2*x + 1) + 56/221*log(x^2 - 6*x + 10)

________________________________________________________________________________________

Fricas [A]  time = 1.50995, size = 146, normalized size = 2.98 \begin{align*} \frac{261}{221} \, \arctan \left (2 \, x - 1\right ) + \frac{1026}{221} \, \arctan \left (x - 3\right ) + \frac{109}{442} \, \log \left (x^{2} - x + \frac{1}{2}\right ) + \frac{56}{221} \, \log \left (x^{2} - 6 \, x + 10\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

261/221*arctan(2*x - 1) + 1026/221*arctan(x - 3) + 109/442*log(x^2 - x + 1/2) + 56/221*log(x^2 - 6*x + 10)

________________________________________________________________________________________

Sympy [A]  time = 0.197824, size = 44, normalized size = 0.9 \begin{align*} \frac{56 \log{\left (x^{2} - 6 x + 10 \right )}}{221} + \frac{109 \log{\left (x^{2} - x + \frac{1}{2} \right )}}{442} + \frac{1026 \operatorname{atan}{\left (x - 3 \right )}}{221} + \frac{261 \operatorname{atan}{\left (2 x - 1 \right )}}{221} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

56*log(x**2 - 6*x + 10)/221 + 109*log(x**2 - x + 1/2)/442 + 1026*atan(x - 3)/221 + 261*atan(2*x - 1)/221

________________________________________________________________________________________

Giac [A]  time = 1.11396, size = 53, normalized size = 1.08 \begin{align*} \frac{261}{221} \, \arctan \left (2 \, x - 1\right ) + \frac{1026}{221} \, \arctan \left (x - 3\right ) + \frac{109}{442} \, \log \left (2 \, x^{2} - 2 \, x + 1\right ) + \frac{56}{221} \, \log \left (x^{2} - 6 \, x + 10\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

261/221*arctan(2*x - 1) + 1026/221*arctan(x - 3) + 109/442*log(2*x^2 - 2*x + 1) + 56/221*log(x^2 - 6*x + 10)