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

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

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {1594, 1628, 634, 618, 204, 628} \[ x^3-\frac {x^2}{2}+\frac {1}{4} \log \left (2 x^2-x+1\right )-\frac {\tan ^{-1}\left (\frac {1-4 x}{\sqrt {7}}\right )}{2 \sqrt {7}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-x^2/2 + x^3 - ArcTan[(1 - 4*x)/Sqrt[7]]/(2*Sqrt[7]) + Log[1 - x + 2*x^2]/4

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 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 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 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 1594

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {4 x^2-5 x^3+6 x^4}{1-x+2 x^2} \, dx &=\int \frac {x^2 \left (4-5 x+6 x^2\right )}{1-x+2 x^2} \, dx\\ &=\int \left (-x+3 x^2+\frac {x}{1-x+2 x^2}\right ) \, dx\\ &=-\frac {x^2}{2}+x^3+\int \frac {x}{1-x+2 x^2} \, dx\\ &=-\frac {x^2}{2}+x^3+\frac {1}{4} \int \frac {1}{1-x+2 x^2} \, dx+\frac {1}{4} \int \frac {-1+4 x}{1-x+2 x^2} \, dx\\ &=-\frac {x^2}{2}+x^3+\frac {1}{4} \log \left (1-x+2 x^2\right )-\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{-7-x^2} \, dx,x,-1+4 x\right )\\ &=-\frac {x^2}{2}+x^3-\frac {\tan ^{-1}\left (\frac {1-4 x}{\sqrt {7}}\right )}{2 \sqrt {7}}+\frac {1}{4} \log \left (1-x+2 x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 47, normalized size = 1.00 \[ x^3-\frac {x^2}{2}+\frac {1}{4} \log \left (2 x^2-x+1\right )+\frac {\tan ^{-1}\left (\frac {4 x-1}{\sqrt {7}}\right )}{2 \sqrt {7}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-1/2*x^2 + x^3 + ArcTan[(-1 + 4*x)/Sqrt[7]]/(2*Sqrt[7]) + Log[1 - x + 2*x^2]/4

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.03, size = 55, normalized size = 1.17 \[ \frac {1}{4} \log \left (2 x^2-x+1\right )+\frac {1}{2} \left (2 x^3-x^2\right )-\frac {\tan ^{-1}\left (\frac {1}{\sqrt {7}}-\frac {4 x}{\sqrt {7}}\right )}{2 \sqrt {7}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-x^2 + 2*x^3)/2 - ArcTan[1/Sqrt[7] - (4*x)/Sqrt[7]]/(2*Sqrt[7]) + Log[1 - x + 2*x^2]/4

________________________________________________________________________________________

fricas [A]  time = 0.57, size = 38, normalized size = 0.81 \[ x^{3} - \frac {1}{2} \, x^{2} + \frac {1}{14} \, \sqrt {7} \arctan \left (\frac {1}{7} \, \sqrt {7} {\left (4 \, x - 1\right )}\right ) + \frac {1}{4} \, \log \left (2 \, x^{2} - x + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^3 - 1/2*x^2 + 1/14*sqrt(7)*arctan(1/7*sqrt(7)*(4*x - 1)) + 1/4*log(2*x^2 - x + 1)

________________________________________________________________________________________

giac [A]  time = 0.93, size = 38, normalized size = 0.81 \[ x^{3} - \frac {1}{2} \, x^{2} + \frac {1}{14} \, \sqrt {7} \arctan \left (\frac {1}{7} \, \sqrt {7} {\left (4 \, x - 1\right )}\right ) + \frac {1}{4} \, \log \left (2 \, x^{2} - x + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^3 - 1/2*x^2 + 1/14*sqrt(7)*arctan(1/7*sqrt(7)*(4*x - 1)) + 1/4*log(2*x^2 - x + 1)

________________________________________________________________________________________

maple [A]  time = 0.41, size = 39, normalized size = 0.83




method result size



default \(x^{3}-\frac {x^{2}}{2}+\frac {\ln \left (2 x^{2}-x +1\right )}{4}+\frac {\sqrt {7}\, \arctan \left (\frac {\left (4 x -1\right ) \sqrt {7}}{7}\right )}{14}\) \(39\)
risch \(x^{3}-\frac {x^{2}}{2}+\frac {\ln \left (16 x^{2}-8 x +8\right )}{4}+\frac {\sqrt {7}\, \arctan \left (\frac {\left (4 x -1\right ) \sqrt {7}}{7}\right )}{14}\) \(39\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^3-1/2*x^2+1/4*ln(2*x^2-x+1)+1/14*7^(1/2)*arctan(1/7*(4*x-1)*7^(1/2))

________________________________________________________________________________________

maxima [A]  time = 0.95, size = 38, normalized size = 0.81 \[ x^{3} - \frac {1}{2} \, x^{2} + \frac {1}{14} \, \sqrt {7} \arctan \left (\frac {1}{7} \, \sqrt {7} {\left (4 \, x - 1\right )}\right ) + \frac {1}{4} \, \log \left (2 \, x^{2} - x + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^3 - 1/2*x^2 + 1/14*sqrt(7)*arctan(1/7*sqrt(7)*(4*x - 1)) + 1/4*log(2*x^2 - x + 1)

________________________________________________________________________________________

mupad [B]  time = 0.20, size = 40, normalized size = 0.85 \[ \frac {\ln \left (2\,x^2-x+1\right )}{4}+\frac {\sqrt {7}\,\mathrm {atan}\left (\frac {4\,\sqrt {7}\,x}{7}-\frac {\sqrt {7}}{7}\right )}{14}-\frac {x^2}{2}+x^3 \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(2*x^2 - x + 1)/4 + (7^(1/2)*atan((4*7^(1/2)*x)/7 - 7^(1/2)/7))/14 - x^2/2 + x^3

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 46, normalized size = 0.98 \[ x^{3} - \frac {x^{2}}{2} + \frac {\log {\left (x^{2} - \frac {x}{2} + \frac {1}{2} \right )}}{4} + \frac {\sqrt {7} \operatorname {atan}{\left (\frac {4 \sqrt {7} x}{7} - \frac {\sqrt {7}}{7} \right )}}{14} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**3 - x**2/2 + log(x**2 - x/2 + 1/2)/4 + sqrt(7)*atan(4*sqrt(7)*x/7 - sqrt(7)/7)/14

________________________________________________________________________________________