3.6.49 \(\int \frac {-156-87 x-6 x^2+2 x^3+e (-6 x-105 x^2-24 x^3+4 x^4)+e^2 (-18 x^4+2 x^5)}{-171-99 x-8 x^2+2 x^3+e (-117 x^2-28 x^3+4 x^4)+e^2 (-20 x^4+2 x^5)} \, dx\) [549]

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

[Out]

x+ln(1/(x+3+x^2*exp(1))+2/3*x-20/3)

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 35, normalized size of antiderivative = 1.46, number of steps used = 4, number of rules used = 3, integrand size = 102, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.029, Rules used = {2099, 642, 1601} \begin {gather*} -\log \left (e x^2+x+3\right )+\log \left (-2 e x^3-2 (1-10 e) x^2+14 x+57\right )+x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-156 - 87*x - 6*x^2 + 2*x^3 + E*(-6*x - 105*x^2 - 24*x^3 + 4*x^4) + E^2*(-18*x^4 + 2*x^5))/(-171 - 99*x -
 8*x^2 + 2*x^3 + E*(-117*x^2 - 28*x^3 + 4*x^4) + E^2*(-20*x^4 + 2*x^5)),x]

[Out]

x - Log[3 + x + E*x^2] + Log[57 + 14*x - 2*(1 - 10*E)*x^2 - 2*E*x^3]

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 (1+\frac {-1-2 e x}{3+x+e x^2}+\frac {2 \left (7-2 (1-10 e) x-3 e x^2\right )}{57+14 x-2 (1-10 e) x^2-2 e x^3}\right ) \, dx\\ &=x+2 \int \frac {7-2 (1-10 e) x-3 e x^2}{57+14 x-2 (1-10 e) x^2-2 e x^3} \, dx+\int \frac {-1-2 e x}{3+x+e x^2} \, dx\\ &=x-\log \left (3+x+e x^2\right )+\log \left (57+14 x-2 (1-10 e) x^2-2 e x^3\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 36, normalized size = 1.50 \begin {gather*} x-\log \left (3+x+e x^2\right )+\log \left (57+14 x-2 x^2+20 e x^2-2 e x^3\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-156 - 87*x - 6*x^2 + 2*x^3 + E*(-6*x - 105*x^2 - 24*x^3 + 4*x^4) + E^2*(-18*x^4 + 2*x^5))/(-171 -
99*x - 8*x^2 + 2*x^3 + E*(-117*x^2 - 28*x^3 + 4*x^4) + E^2*(-20*x^4 + 2*x^5)),x]

[Out]

x - Log[3 + x + E*x^2] + Log[57 + 14*x - 2*x^2 + 20*E*x^2 - 2*E*x^3]

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.42, size = 140, normalized size = 5.83

method result size
norman \(x -\ln \left (x +3+x^{2} {\mathrm e}\right )+\ln \left (2 x^{3} {\mathrm e}-20 x^{2} {\mathrm e}+2 x^{2}-14 x -57\right )\) \(40\)
risch \(x -\ln \left (-x^{2} {\mathrm e}-x -3\right )+\ln \left (2 x^{3} {\mathrm e}+\left (-20 \,{\mathrm e}+2\right ) x^{2}-14 x -57\right )\) \(41\)
default \(x +\left (\munderset {\textit {\_R} =\RootOf \left (-171+2 \,{\mathrm e}^{2} \textit {\_Z}^{5}+\left (-20 \,{\mathrm e}^{2}+4 \,{\mathrm e}\right ) \textit {\_Z}^{4}+\left (-28 \,{\mathrm e}+2\right ) \textit {\_Z}^{3}+\left (-117 \,{\mathrm e}-8\right ) \textit {\_Z}^{2}-99 \textit {\_Z} \right )}{\sum }\frac {\left (15+2 \textit {\_R}^{4} {\mathrm e}^{2}+4 \textit {\_R}^{3} {\mathrm e}+2 \left (1+6 \,{\mathrm e}\right ) \textit {\_R}^{2}+6 \left (2-{\mathrm e}\right ) \textit {\_R} \right ) \ln \left (x -\textit {\_R} \right )}{10 \textit {\_R}^{4} {\mathrm e}^{2}-80 \textit {\_R}^{3} {\mathrm e}^{2}+16 \textit {\_R}^{3} {\mathrm e}-84 \textit {\_R}^{2} {\mathrm e}-234 \textit {\_R} \,{\mathrm e}+6 \textit {\_R}^{2}-16 \textit {\_R} -99}\right )\) \(140\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((2*x^5-18*x^4)*exp(1)^2+(4*x^4-24*x^3-105*x^2-6*x)*exp(1)+2*x^3-6*x^2-87*x-156)/((2*x^5-20*x^4)*exp(1)^2+
(4*x^4-28*x^3-117*x^2)*exp(1)+2*x^3-8*x^2-99*x-171),x,method=_RETURNVERBOSE)

[Out]

x+sum((15+2*_R^4*exp(2)+4*_R^3*exp(1)+2*(1+6*exp(1))*_R^2+6*(2-exp(1))*_R)/(10*_R^4*exp(2)-80*_R^3*exp(2)+16*_
R^3*exp(1)-84*_R^2*exp(1)-234*_R*exp(1)+6*_R^2-16*_R-99)*ln(x-_R),_R=RootOf(-171+2*exp(2)*_Z^5+(-20*exp(2)+4*e
xp(1))*_Z^4+(-28*exp(1)+2)*_Z^3+(-117*exp(1)-8)*_Z^2-99*_Z))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 38, normalized size = 1.58 \begin {gather*} x + \log \left (2 \, x^{3} e - 2 \, x^{2} {\left (10 \, e - 1\right )} - 14 \, x - 57\right ) - \log \left (x^{2} e + x + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^5-18*x^4)*exp(1)^2+(4*x^4-24*x^3-105*x^2-6*x)*exp(1)+2*x^3-6*x^2-87*x-156)/((2*x^5-20*x^4)*exp
(1)^2+(4*x^4-28*x^3-117*x^2)*exp(1)+2*x^3-8*x^2-99*x-171),x, algorithm="maxima")

[Out]

x + log(2*x^3*e - 2*x^2*(10*e - 1) - 14*x - 57) - log(x^2*e + x + 3)

________________________________________________________________________________________

Fricas [A]
time = 0.31, size = 38, normalized size = 1.58 \begin {gather*} x - \log \left (x^{2} e + x + 3\right ) + \log \left (2 \, x^{2} + 2 \, {\left (x^{3} - 10 \, x^{2}\right )} e - 14 \, x - 57\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^5-18*x^4)*exp(1)^2+(4*x^4-24*x^3-105*x^2-6*x)*exp(1)+2*x^3-6*x^2-87*x-156)/((2*x^5-20*x^4)*exp
(1)^2+(4*x^4-28*x^3-117*x^2)*exp(1)+2*x^3-8*x^2-99*x-171),x, algorithm="fricas")

[Out]

x - log(x^2*e + x + 3) + log(2*x^2 + 2*(x^3 - 10*x^2)*e - 14*x - 57)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 48 vs. \(2 (22) = 44\).
time = 2.17, size = 48, normalized size = 2.00 \begin {gather*} x - \log {\left (x^{2} + \frac {x}{e} + \frac {3}{e} \right )} + \log {\left (x^{3} + \frac {x^{2} \cdot \left (1 - 10 e\right )}{e} - \frac {7 x}{e} - \frac {57}{2 e} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x**5-18*x**4)*exp(1)**2+(4*x**4-24*x**3-105*x**2-6*x)*exp(1)+2*x**3-6*x**2-87*x-156)/((2*x**5-20
*x**4)*exp(1)**2+(4*x**4-28*x**3-117*x**2)*exp(1)+2*x**3-8*x**2-99*x-171),x)

[Out]

x - log(x**2 + x*exp(-1) + 3*exp(-1)) + log(x**3 + x**2*(1 - 10*E)*exp(-1) - 7*x*exp(-1) - 57*exp(-1)/2)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 40 vs. \(2 (19) = 38\).
time = 0.44, size = 40, normalized size = 1.67 \begin {gather*} x - \log \left (x^{2} e + x + 3\right ) + \log \left ({\left | 2 \, x^{3} e - 20 \, x^{2} e + 2 \, x^{2} - 14 \, x - 57 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^5-18*x^4)*exp(1)^2+(4*x^4-24*x^3-105*x^2-6*x)*exp(1)+2*x^3-6*x^2-87*x-156)/((2*x^5-20*x^4)*exp
(1)^2+(4*x^4-28*x^3-117*x^2)*exp(1)+2*x^3-8*x^2-99*x-171),x, algorithm="giac")

[Out]

x - log(x^2*e + x + 3) + log(abs(2*x^3*e - 20*x^2*e + 2*x^2 - 14*x - 57))

________________________________________________________________________________________

Mupad [B]
time = 0.72, size = 42, normalized size = 1.75 \begin {gather*} x+\ln \left (x^2\,{\mathrm {e}}^{-1}-7\,x\,{\mathrm {e}}^{-1}-\frac {57\,{\mathrm {e}}^{-1}}{2}-10\,x^2+x^3\right )-\ln \left (x^2+{\mathrm {e}}^{-1}\,x+3\,{\mathrm {e}}^{-1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((87*x + exp(2)*(18*x^4 - 2*x^5) + exp(1)*(6*x + 105*x^2 + 24*x^3 - 4*x^4) + 6*x^2 - 2*x^3 + 156)/(99*x + e
xp(2)*(20*x^4 - 2*x^5) + exp(1)*(117*x^2 + 28*x^3 - 4*x^4) + 8*x^2 - 2*x^3 + 171),x)

[Out]

x + log(x^2*exp(-1) - 7*x*exp(-1) - (57*exp(-1))/2 - 10*x^2 + x^3) - log(3*exp(-1) + x*exp(-1) + x^2)

________________________________________________________________________________________