3.101.98 \(\int \frac {-1387+573 x+812 x^2-199 x^3-190 x^4+9 x^5+17 x^6+2 x^7}{-630+251 x+376 x^2-85 x^3-89 x^4+3 x^5+8 x^6+x^7} \, dx\) [10098]

Optimal. Leaf size=20 \[ 2 x+\log \left (5+x+\frac {1}{\left (5-x-x^2\right )^2}\right ) \]

[Out]

ln(x+1/(-x^2-x+5)^2+5)+2*x

________________________________________________________________________________________

Rubi [A]
time = 0.19, antiderivative size = 39, normalized size of antiderivative = 1.95, number of steps used = 4, number of rules used = 3, integrand size = 71, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.042, Rules used = {2099, 642, 1601} \begin {gather*} -2 \log \left (-x^2-x+5\right )+\log \left (x^5+7 x^4+x^3-55 x^2-25 x+126\right )+2 x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-1387 + 573*x + 812*x^2 - 199*x^3 - 190*x^4 + 9*x^5 + 17*x^6 + 2*x^7)/(-630 + 251*x + 376*x^2 - 85*x^3 -
89*x^4 + 3*x^5 + 8*x^6 + x^7),x]

[Out]

2*x - 2*Log[5 - x - x^2] + Log[126 - 25*x - 55*x^2 + x^3 + 7*x^4 + x^5]

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 1601

Int[(Pp_)/(Qq_), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[Coeff[Pp, x, p]*(Log[RemoveConte
nt[Qq, x]]/(q*Coeff[Qq, x, q])), x] /; EqQ[p, q - 1] && EqQ[Pp, Simplify[(Coeff[Pp, x, p]/(q*Coeff[Qq, x, q]))
*D[Qq, x]]]] /; PolyQ[Pp, x] && PolyQ[Qq, x]

Rule 2099

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (2-\frac {2 (1+2 x)}{-5+x+x^2}+\frac {-25-110 x+3 x^2+28 x^3+5 x^4}{126-25 x-55 x^2+x^3+7 x^4+x^5}\right ) \, dx\\ &=2 x-2 \int \frac {1+2 x}{-5+x+x^2} \, dx+\int \frac {-25-110 x+3 x^2+28 x^3+5 x^4}{126-25 x-55 x^2+x^3+7 x^4+x^5} \, dx\\ &=2 x-2 \log \left (5-x-x^2\right )+\log \left (126-25 x-55 x^2+x^3+7 x^4+x^5\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 39, normalized size = 1.95 \begin {gather*} 2 x-2 \log \left (5-x-x^2\right )+\log \left (126-25 x-55 x^2+x^3+7 x^4+x^5\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-1387 + 573*x + 812*x^2 - 199*x^3 - 190*x^4 + 9*x^5 + 17*x^6 + 2*x^7)/(-630 + 251*x + 376*x^2 - 85*
x^3 - 89*x^4 + 3*x^5 + 8*x^6 + x^7),x]

[Out]

2*x - 2*Log[5 - x - x^2] + Log[126 - 25*x - 55*x^2 + x^3 + 7*x^4 + x^5]

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 36, normalized size = 1.80

method result size
default \(2 x +\ln \left (x^{5}+7 x^{4}+x^{3}-55 x^{2}-25 x +126\right )-2 \ln \left (x^{2}+x -5\right )\) \(36\)
norman \(2 x +\ln \left (x^{5}+7 x^{4}+x^{3}-55 x^{2}-25 x +126\right )-2 \ln \left (x^{2}+x -5\right )\) \(36\)
risch \(2 x +\ln \left (x^{5}+7 x^{4}+x^{3}-55 x^{2}-25 x +126\right )-2 \ln \left (x^{2}+x -5\right )\) \(36\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^7+17*x^6+9*x^5-190*x^4-199*x^3+812*x^2+573*x-1387)/(x^7+8*x^6+3*x^5-89*x^4-85*x^3+376*x^2+251*x-630),
x,method=_RETURNVERBOSE)

[Out]

2*x+ln(x^5+7*x^4+x^3-55*x^2-25*x+126)-2*ln(x^2+x-5)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 35 vs. \(2 (16) = 32\).
time = 0.26, size = 35, normalized size = 1.75 \begin {gather*} 2 \, x + \log \left (x^{5} + 7 \, x^{4} + x^{3} - 55 \, x^{2} - 25 \, x + 126\right ) - 2 \, \log \left (x^{2} + x - 5\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^7+17*x^6+9*x^5-190*x^4-199*x^3+812*x^2+573*x-1387)/(x^7+8*x^6+3*x^5-89*x^4-85*x^3+376*x^2+251*x
-630),x, algorithm="maxima")

[Out]

2*x + log(x^5 + 7*x^4 + x^3 - 55*x^2 - 25*x + 126) - 2*log(x^2 + x - 5)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 35 vs. \(2 (16) = 32\).
time = 0.48, size = 35, normalized size = 1.75 \begin {gather*} 2 \, x + \log \left (x^{5} + 7 \, x^{4} + x^{3} - 55 \, x^{2} - 25 \, x + 126\right ) - 2 \, \log \left (x^{2} + x - 5\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^7+17*x^6+9*x^5-190*x^4-199*x^3+812*x^2+573*x-1387)/(x^7+8*x^6+3*x^5-89*x^4-85*x^3+376*x^2+251*x
-630),x, algorithm="fricas")

[Out]

2*x + log(x^5 + 7*x^4 + x^3 - 55*x^2 - 25*x + 126) - 2*log(x^2 + x - 5)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 36 vs. \(2 (17) = 34\).
time = 0.06, size = 36, normalized size = 1.80 \begin {gather*} 2 x - 2 \log {\left (x^{2} + x - 5 \right )} + \log {\left (x^{5} + 7 x^{4} + x^{3} - 55 x^{2} - 25 x + 126 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**7+17*x**6+9*x**5-190*x**4-199*x**3+812*x**2+573*x-1387)/(x**7+8*x**6+3*x**5-89*x**4-85*x**3+37
6*x**2+251*x-630),x)

[Out]

2*x - 2*log(x**2 + x - 5) + log(x**5 + 7*x**4 + x**3 - 55*x**2 - 25*x + 126)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 37 vs. \(2 (16) = 32\).
time = 0.40, size = 37, normalized size = 1.85 \begin {gather*} 2 \, x + \log \left ({\left | x^{5} + 7 \, x^{4} + x^{3} - 55 \, x^{2} - 25 \, x + 126 \right |}\right ) - 2 \, \log \left ({\left | x^{2} + x - 5 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^7+17*x^6+9*x^5-190*x^4-199*x^3+812*x^2+573*x-1387)/(x^7+8*x^6+3*x^5-89*x^4-85*x^3+376*x^2+251*x
-630),x, algorithm="giac")

[Out]

2*x + log(abs(x^5 + 7*x^4 + x^3 - 55*x^2 - 25*x + 126)) - 2*log(abs(x^2 + x - 5))

________________________________________________________________________________________

Mupad [B]
time = 7.59, size = 35, normalized size = 1.75 \begin {gather*} 2\,x-2\,\ln \left (x^2+x-5\right )+\ln \left (x^5+7\,x^4+x^3-55\,x^2-25\,x+126\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((573*x + 812*x^2 - 199*x^3 - 190*x^4 + 9*x^5 + 17*x^6 + 2*x^7 - 1387)/(251*x + 376*x^2 - 85*x^3 - 89*x^4 +
 3*x^5 + 8*x^6 + x^7 - 630),x)

[Out]

2*x - 2*log(x + x^2 - 5) + log(x^3 - 55*x^2 - 25*x + 7*x^4 + x^5 + 126)

________________________________________________________________________________________