\(\int \frac {-324+29 x^2+20 x^3+3 x^4+e^8 (-81+2 x^2)+e^4 (-324+14 x^2+4 x^3)}{324 x+72 x^2+29 x^3+10 x^4+x^5+e^8 (81 x+18 x^2+2 x^3)+e^4 (324 x+72 x^2+14 x^3+2 x^4)} \, dx\) [5245]

   Optimal result
   Rubi [B] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [F(-2)]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 110, antiderivative size = 27 \[ \int \frac {-324+29 x^2+20 x^3+3 x^4+e^8 \left (-81+2 x^2\right )+e^4 \left (-324+14 x^2+4 x^3\right )}{324 x+72 x^2+29 x^3+10 x^4+x^5+e^8 \left (81 x+18 x^2+2 x^3\right )+e^4 \left (324 x+72 x^2+14 x^3+2 x^4\right )} \, dx=\log \left (\frac {(9+x)^2+\left (x+\frac {x (3+x)}{2+e^4}\right )^2}{x}\right ) \]

[Out]

ln((((3+x)*x/(2+exp(4))+x)^2+(x+9)^2)/x)

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(55\) vs. \(2(27)=54\).

Time = 0.15 (sec) , antiderivative size = 55, normalized size of antiderivative = 2.04, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.018, Rules used = {2099, 1601} \[ \int \frac {-324+29 x^2+20 x^3+3 x^4+e^8 \left (-81+2 x^2\right )+e^4 \left (-324+14 x^2+4 x^3\right )}{324 x+72 x^2+29 x^3+10 x^4+x^5+e^8 \left (81 x+18 x^2+2 x^3\right )+e^4 \left (324 x+72 x^2+14 x^3+2 x^4\right )} \, dx=\log \left (x^4+2 \left (5+e^4\right ) x^3+\left (29+14 e^4+2 e^8\right ) x^2+18 \left (2+e^4\right )^2 x+81 \left (2+e^4\right )^2\right )-\log (x) \]

[In]

Int[(-324 + 29*x^2 + 20*x^3 + 3*x^4 + E^8*(-81 + 2*x^2) + E^4*(-324 + 14*x^2 + 4*x^3))/(324*x + 72*x^2 + 29*x^
3 + 10*x^4 + x^5 + E^8*(81*x + 18*x^2 + 2*x^3) + E^4*(324*x + 72*x^2 + 14*x^3 + 2*x^4)),x]

[Out]

-Log[x] + Log[81*(2 + E^4)^2 + 18*(2 + E^4)^2*x + (29 + 14*E^4 + 2*E^8)*x^2 + 2*(5 + E^4)*x^3 + x^4]

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{align*} \text {integral}& = \int \left (-\frac {1}{x}+\frac {2 \left (9 \left (2+e^4\right )^2+\left (29+14 e^4+2 e^8\right ) x+3 \left (5+e^4\right ) x^2+2 x^3\right )}{81 \left (2+e^4\right )^2+18 \left (2+e^4\right )^2 x+\left (29+14 e^4+2 e^8\right ) x^2+2 \left (5+e^4\right ) x^3+x^4}\right ) \, dx \\ & = -\log (x)+2 \int \frac {9 \left (2+e^4\right )^2+\left (29+14 e^4+2 e^8\right ) x+3 \left (5+e^4\right ) x^2+2 x^3}{81 \left (2+e^4\right )^2+18 \left (2+e^4\right )^2 x+\left (29+14 e^4+2 e^8\right ) x^2+2 \left (5+e^4\right ) x^3+x^4} \, dx \\ & = -\log (x)+\log \left (81 \left (2+e^4\right )^2+18 \left (2+e^4\right )^2 x+\left (29+14 e^4+2 e^8\right ) x^2+2 \left (5+e^4\right ) x^3+x^4\right ) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(70\) vs. \(2(27)=54\).

Time = 0.06 (sec) , antiderivative size = 70, normalized size of antiderivative = 2.59 \[ \int \frac {-324+29 x^2+20 x^3+3 x^4+e^8 \left (-81+2 x^2\right )+e^4 \left (-324+14 x^2+4 x^3\right )}{324 x+72 x^2+29 x^3+10 x^4+x^5+e^8 \left (81 x+18 x^2+2 x^3\right )+e^4 \left (324 x+72 x^2+14 x^3+2 x^4\right )} \, dx=-\log (x)+\log \left (324+324 e^4+81 e^8+72 x+72 e^4 x+18 e^8 x+29 x^2+14 e^4 x^2+2 e^8 x^2+10 x^3+2 e^4 x^3+x^4\right ) \]

[In]

Integrate[(-324 + 29*x^2 + 20*x^3 + 3*x^4 + E^8*(-81 + 2*x^2) + E^4*(-324 + 14*x^2 + 4*x^3))/(324*x + 72*x^2 +
 29*x^3 + 10*x^4 + x^5 + E^8*(81*x + 18*x^2 + 2*x^3) + E^4*(324*x + 72*x^2 + 14*x^3 + 2*x^4)),x]

[Out]

-Log[x] + Log[324 + 324*E^4 + 81*E^8 + 72*x + 72*E^4*x + 18*E^8*x + 29*x^2 + 14*E^4*x^2 + 2*E^8*x^2 + 10*x^3 +
 2*E^4*x^3 + x^4]

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(57\) vs. \(2(26)=52\).

Time = 0.11 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.15

method result size
risch \(-\ln \left (-x \right )+\ln \left (x^{4}+\left (2 \,{\mathrm e}^{4}+10\right ) x^{3}+\left (2 \,{\mathrm e}^{8}+14 \,{\mathrm e}^{4}+29\right ) x^{2}+\left (18 \,{\mathrm e}^{8}+72 \,{\mathrm e}^{4}+72\right ) x +81 \,{\mathrm e}^{8}+324 \,{\mathrm e}^{4}+324\right )\) \(58\)
default \(\ln \left (2 x^{2} {\mathrm e}^{8}+2 x^{3} {\mathrm e}^{4}+x^{4}+18 x \,{\mathrm e}^{8}+14 x^{2} {\mathrm e}^{4}+10 x^{3}+81 \,{\mathrm e}^{8}+72 x \,{\mathrm e}^{4}+29 x^{2}+324 \,{\mathrm e}^{4}+72 x +324\right )-\ln \left (x \right )\) \(64\)
norman \(\ln \left (2 x^{2} {\mathrm e}^{8}+2 x^{3} {\mathrm e}^{4}+x^{4}+18 x \,{\mathrm e}^{8}+14 x^{2} {\mathrm e}^{4}+10 x^{3}+81 \,{\mathrm e}^{8}+72 x \,{\mathrm e}^{4}+29 x^{2}+324 \,{\mathrm e}^{4}+72 x +324\right )-\ln \left (x \right )\) \(70\)
parallelrisch \(\ln \left (2 x^{2} {\mathrm e}^{8}+2 x^{3} {\mathrm e}^{4}+x^{4}+18 x \,{\mathrm e}^{8}+14 x^{2} {\mathrm e}^{4}+10 x^{3}+81 \,{\mathrm e}^{8}+72 x \,{\mathrm e}^{4}+29 x^{2}+324 \,{\mathrm e}^{4}+72 x +324\right )-\ln \left (x \right )\) \(70\)

[In]

int(((2*x^2-81)*exp(4)^2+(4*x^3+14*x^2-324)*exp(4)+3*x^4+20*x^3+29*x^2-324)/((2*x^3+18*x^2+81*x)*exp(4)^2+(2*x
^4+14*x^3+72*x^2+324*x)*exp(4)+x^5+10*x^4+29*x^3+72*x^2+324*x),x,method=_RETURNVERBOSE)

[Out]

-ln(-x)+ln(x^4+(2*exp(4)+10)*x^3+(2*exp(8)+14*exp(4)+29)*x^2+(18*exp(8)+72*exp(4)+72)*x+81*exp(8)+324*exp(4)+3
24)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 54 vs. \(2 (26) = 52\).

Time = 0.26 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.00 \[ \int \frac {-324+29 x^2+20 x^3+3 x^4+e^8 \left (-81+2 x^2\right )+e^4 \left (-324+14 x^2+4 x^3\right )}{324 x+72 x^2+29 x^3+10 x^4+x^5+e^8 \left (81 x+18 x^2+2 x^3\right )+e^4 \left (324 x+72 x^2+14 x^3+2 x^4\right )} \, dx=\log \left (x^{4} + 10 \, x^{3} + 29 \, x^{2} + {\left (2 \, x^{2} + 18 \, x + 81\right )} e^{8} + 2 \, {\left (x^{3} + 7 \, x^{2} + 36 \, x + 162\right )} e^{4} + 72 \, x + 324\right ) - \log \left (x\right ) \]

[In]

integrate(((2*x^2-81)*exp(4)^2+(4*x^3+14*x^2-324)*exp(4)+3*x^4+20*x^3+29*x^2-324)/((2*x^3+18*x^2+81*x)*exp(4)^
2+(2*x^4+14*x^3+72*x^2+324*x)*exp(4)+x^5+10*x^4+29*x^3+72*x^2+324*x),x, algorithm="fricas")

[Out]

log(x^4 + 10*x^3 + 29*x^2 + (2*x^2 + 18*x + 81)*e^8 + 2*(x^3 + 7*x^2 + 36*x + 162)*e^4 + 72*x + 324) - log(x)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 58 vs. \(2 (20) = 40\).

Time = 3.34 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.15 \[ \int \frac {-324+29 x^2+20 x^3+3 x^4+e^8 \left (-81+2 x^2\right )+e^4 \left (-324+14 x^2+4 x^3\right )}{324 x+72 x^2+29 x^3+10 x^4+x^5+e^8 \left (81 x+18 x^2+2 x^3\right )+e^4 \left (324 x+72 x^2+14 x^3+2 x^4\right )} \, dx=- \log {\left (x \right )} + \log {\left (x^{4} + x^{3} \cdot \left (10 + 2 e^{4}\right ) + x^{2} \cdot \left (29 + 14 e^{4} + 2 e^{8}\right ) + x \left (72 + 72 e^{4} + 18 e^{8}\right ) + 324 + 324 e^{4} + 81 e^{8} \right )} \]

[In]

integrate(((2*x**2-81)*exp(4)**2+(4*x**3+14*x**2-324)*exp(4)+3*x**4+20*x**3+29*x**2-324)/((2*x**3+18*x**2+81*x
)*exp(4)**2+(2*x**4+14*x**3+72*x**2+324*x)*exp(4)+x**5+10*x**4+29*x**3+72*x**2+324*x),x)

[Out]

-log(x) + log(x**4 + x**3*(10 + 2*exp(4)) + x**2*(29 + 14*exp(4) + 2*exp(8)) + x*(72 + 72*exp(4) + 18*exp(8))
+ 324 + 324*exp(4) + 81*exp(8))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 53 vs. \(2 (26) = 52\).

Time = 0.18 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.96 \[ \int \frac {-324+29 x^2+20 x^3+3 x^4+e^8 \left (-81+2 x^2\right )+e^4 \left (-324+14 x^2+4 x^3\right )}{324 x+72 x^2+29 x^3+10 x^4+x^5+e^8 \left (81 x+18 x^2+2 x^3\right )+e^4 \left (324 x+72 x^2+14 x^3+2 x^4\right )} \, dx=\log \left (x^{4} + 2 \, x^{3} {\left (e^{4} + 5\right )} + x^{2} {\left (2 \, e^{8} + 14 \, e^{4} + 29\right )} + 18 \, x {\left (e^{8} + 4 \, e^{4} + 4\right )} + 81 \, e^{8} + 324 \, e^{4} + 324\right ) - \log \left (x\right ) \]

[In]

integrate(((2*x^2-81)*exp(4)^2+(4*x^3+14*x^2-324)*exp(4)+3*x^4+20*x^3+29*x^2-324)/((2*x^3+18*x^2+81*x)*exp(4)^
2+(2*x^4+14*x^3+72*x^2+324*x)*exp(4)+x^5+10*x^4+29*x^3+72*x^2+324*x),x, algorithm="maxima")

[Out]

log(x^4 + 2*x^3*(e^4 + 5) + x^2*(2*e^8 + 14*e^4 + 29) + 18*x*(e^8 + 4*e^4 + 4) + 81*e^8 + 324*e^4 + 324) - log
(x)

Giac [F(-2)]

Exception generated. \[ \int \frac {-324+29 x^2+20 x^3+3 x^4+e^8 \left (-81+2 x^2\right )+e^4 \left (-324+14 x^2+4 x^3\right )}{324 x+72 x^2+29 x^3+10 x^4+x^5+e^8 \left (81 x+18 x^2+2 x^3\right )+e^4 \left (324 x+72 x^2+14 x^3+2 x^4\right )} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate(((2*x^2-81)*exp(4)^2+(4*x^3+14*x^2-324)*exp(4)+3*x^4+20*x^3+29*x^2-324)/((2*x^3+18*x^2+81*x)*exp(4)^
2+(2*x^4+14*x^3+72*x^2+324*x)*exp(4)+x^5+10*x^4+29*x^3+72*x^2+324*x),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:sym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Value

Mupad [B] (verification not implemented)

Time = 10.73 (sec) , antiderivative size = 63, normalized size of antiderivative = 2.33 \[ \int \frac {-324+29 x^2+20 x^3+3 x^4+e^8 \left (-81+2 x^2\right )+e^4 \left (-324+14 x^2+4 x^3\right )}{324 x+72 x^2+29 x^3+10 x^4+x^5+e^8 \left (81 x+18 x^2+2 x^3\right )+e^4 \left (324 x+72 x^2+14 x^3+2 x^4\right )} \, dx=\ln \left (72\,x+324\,{\mathrm {e}}^4+81\,{\mathrm {e}}^8+72\,x\,{\mathrm {e}}^4+18\,x\,{\mathrm {e}}^8+14\,x^2\,{\mathrm {e}}^4+2\,x^3\,{\mathrm {e}}^4+2\,x^2\,{\mathrm {e}}^8+29\,x^2+10\,x^3+x^4+324\right )-\ln \left (x\right ) \]

[In]

int((exp(8)*(2*x^2 - 81) + exp(4)*(14*x^2 + 4*x^3 - 324) + 29*x^2 + 20*x^3 + 3*x^4 - 324)/(324*x + exp(8)*(81*
x + 18*x^2 + 2*x^3) + exp(4)*(324*x + 72*x^2 + 14*x^3 + 2*x^4) + 72*x^2 + 29*x^3 + 10*x^4 + x^5),x)

[Out]

log(72*x + 324*exp(4) + 81*exp(8) + 72*x*exp(4) + 18*x*exp(8) + 14*x^2*exp(4) + 2*x^3*exp(4) + 2*x^2*exp(8) +
29*x^2 + 10*x^3 + x^4 + 324) - log(x)