\(\int \frac {40-100 x-100 x^2-54 x^3+10 x^4-2 x^5-5 x^6+e^e (200+80 x+8 x^2-50 x^4-20 x^5-2 x^6)}{-200-80 x+292 x^2+120 x^3-138 x^4-60 x^5+19 x^6+10 x^7+x^8} \, dx\) [3031]

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

Optimal result

Integrand size = 100, antiderivative size = 25 \[ \int \frac {40-100 x-100 x^2-54 x^3+10 x^4-2 x^5-5 x^6+e^e \left (200+80 x+8 x^2-50 x^4-20 x^5-2 x^6\right )}{-200-80 x+292 x^2+120 x^3-138 x^4-60 x^5+19 x^6+10 x^7+x^8} \, dx=2-\frac {x}{5+x}+\left (e^e+\frac {1}{-\frac {2}{x}+x}\right )^2 \]

[Out]

2-x/(5+x)+(1/(x-2/x)+exp(exp(1)))^2

Rubi [A] (verified)

Time = 0.19 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.52, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.040, Rules used = {2099, 267, 653, 213} \[ \int \frac {40-100 x-100 x^2-54 x^3+10 x^4-2 x^5-5 x^6+e^e \left (200+80 x+8 x^2-50 x^4-20 x^5-2 x^6\right )}{-200-80 x+292 x^2+120 x^3-138 x^4-60 x^5+19 x^6+10 x^7+x^8} \, dx=-\frac {2 e^e x+1}{2-x^2}+\frac {2}{\left (2-x^2\right )^2}+\frac {5}{x+5} \]

[In]

Int[(40 - 100*x - 100*x^2 - 54*x^3 + 10*x^4 - 2*x^5 - 5*x^6 + E^E*(200 + 80*x + 8*x^2 - 50*x^4 - 20*x^5 - 2*x^
6))/(-200 - 80*x + 292*x^2 + 120*x^3 - 138*x^4 - 60*x^5 + 19*x^6 + 10*x^7 + x^8),x]

[Out]

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

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 267

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rule 653

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((a*e - c*d*x)/(2*a*c*(p + 1)))*(a + c*x
^2)^(p + 1), x] + Dist[d*((2*p + 3)/(2*a*(p + 1))), Int[(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e}, x]
&& LtQ[p, -1] && NeQ[p, -3/2]

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 {5}{(5+x)^2}-\frac {8 x}{\left (-2+x^2\right )^3}-\frac {2 \left (4 e^e+x\right )}{\left (-2+x^2\right )^2}-\frac {2 e^e}{-2+x^2}\right ) \, dx \\ & = \frac {5}{5+x}-2 \int \frac {4 e^e+x}{\left (-2+x^2\right )^2} \, dx-8 \int \frac {x}{\left (-2+x^2\right )^3} \, dx-\left (2 e^e\right ) \int \frac {1}{-2+x^2} \, dx \\ & = \frac {5}{5+x}+\frac {2}{\left (2-x^2\right )^2}-\frac {1+2 e^e x}{2-x^2}+\sqrt {2} e^e \tanh ^{-1}\left (\frac {x}{\sqrt {2}}\right )+\left (2 e^e\right ) \int \frac {1}{-2+x^2} \, dx \\ & = \frac {5}{5+x}+\frac {2}{\left (2-x^2\right )^2}-\frac {1+2 e^e x}{2-x^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.88 \[ \int \frac {40-100 x-100 x^2-54 x^3+10 x^4-2 x^5-5 x^6+e^e \left (200+80 x+8 x^2-50 x^4-20 x^5-2 x^6\right )}{-200-80 x+292 x^2+120 x^3-138 x^4-60 x^5+19 x^6+10 x^7+x^8} \, dx=\frac {20-15 x^2+x^3+5 x^4+2 e^e x \left (-10-2 x+5 x^2+x^3\right )}{(5+x) \left (-2+x^2\right )^2} \]

[In]

Integrate[(40 - 100*x - 100*x^2 - 54*x^3 + 10*x^4 - 2*x^5 - 5*x^6 + E^E*(200 + 80*x + 8*x^2 - 50*x^4 - 20*x^5
- 2*x^6))/(-200 - 80*x + 292*x^2 + 120*x^3 - 138*x^4 - 60*x^5 + 19*x^6 + 10*x^7 + x^8),x]

[Out]

(20 - 15*x^2 + x^3 + 5*x^4 + 2*E^E*x*(-10 - 2*x + 5*x^2 + x^3))/((5 + x)*(-2 + x^2)^2)

Maple [A] (verified)

Time = 0.10 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.52

method result size
default \(-\frac {2 \left (-x^{3} {\mathrm e}^{{\mathrm e}}-\frac {x^{2}}{2}+2 x \,{\mathrm e}^{{\mathrm e}}\right )}{\left (x^{2}-2\right )^{2}}+\frac {5}{5+x}\) \(38\)
norman \(\frac {-20 x \,{\mathrm e}^{{\mathrm e}}+\left (-4 \,{\mathrm e}^{{\mathrm e}}-15\right ) x^{2}+\left (10 \,{\mathrm e}^{{\mathrm e}}+1\right ) x^{3}+\left (2 \,{\mathrm e}^{{\mathrm e}}+5\right ) x^{4}+20}{\left (5+x \right ) \left (x^{2}-2\right )^{2}}\) \(55\)
risch \(\frac {-20 x \,{\mathrm e}^{{\mathrm e}}+\left (-4 \,{\mathrm e}^{{\mathrm e}}-15\right ) x^{2}+\left (10 \,{\mathrm e}^{{\mathrm e}}+1\right ) x^{3}+\left (2 \,{\mathrm e}^{{\mathrm e}}+5\right ) x^{4}+20}{x^{5}+5 x^{4}-4 x^{3}-20 x^{2}+4 x +20}\) \(68\)
gosper \(\frac {2 x^{4} {\mathrm e}^{{\mathrm e}}+10 x^{3} {\mathrm e}^{{\mathrm e}}+5 x^{4}-4 x^{2} {\mathrm e}^{{\mathrm e}}+x^{3}-20 x \,{\mathrm e}^{{\mathrm e}}-15 x^{2}+20}{x^{5}+5 x^{4}-4 x^{3}-20 x^{2}+4 x +20}\) \(72\)
parallelrisch \(\frac {2 x^{4} {\mathrm e}^{{\mathrm e}}+10 x^{3} {\mathrm e}^{{\mathrm e}}+5 x^{4}-4 x^{2} {\mathrm e}^{{\mathrm e}}+x^{3}-20 x \,{\mathrm e}^{{\mathrm e}}-15 x^{2}+20}{x^{5}+5 x^{4}-4 x^{3}-20 x^{2}+4 x +20}\) \(72\)

[In]

int(((-2*x^6-20*x^5-50*x^4+8*x^2+80*x+200)*exp(exp(1))-5*x^6-2*x^5+10*x^4-54*x^3-100*x^2-100*x+40)/(x^8+10*x^7
+19*x^6-60*x^5-138*x^4+120*x^3+292*x^2-80*x-200),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (25) = 50\).

Time = 0.24 (sec) , antiderivative size = 63, normalized size of antiderivative = 2.52 \[ \int \frac {40-100 x-100 x^2-54 x^3+10 x^4-2 x^5-5 x^6+e^e \left (200+80 x+8 x^2-50 x^4-20 x^5-2 x^6\right )}{-200-80 x+292 x^2+120 x^3-138 x^4-60 x^5+19 x^6+10 x^7+x^8} \, dx=\frac {5 \, x^{4} + x^{3} - 15 \, x^{2} + 2 \, {\left (x^{4} + 5 \, x^{3} - 2 \, x^{2} - 10 \, x\right )} e^{e} + 20}{x^{5} + 5 \, x^{4} - 4 \, x^{3} - 20 \, x^{2} + 4 \, x + 20} \]

[In]

integrate(((-2*x^6-20*x^5-50*x^4+8*x^2+80*x+200)*exp(exp(1))-5*x^6-2*x^5+10*x^4-54*x^3-100*x^2-100*x+40)/(x^8+
10*x^7+19*x^6-60*x^5-138*x^4+120*x^3+292*x^2-80*x-200),x, algorithm="fricas")

[Out]

(5*x^4 + x^3 - 15*x^2 + 2*(x^4 + 5*x^3 - 2*x^2 - 10*x)*e^e + 20)/(x^5 + 5*x^4 - 4*x^3 - 20*x^2 + 4*x + 20)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 73 vs. \(2 (19) = 38\).

Time = 1.42 (sec) , antiderivative size = 73, normalized size of antiderivative = 2.92 \[ \int \frac {40-100 x-100 x^2-54 x^3+10 x^4-2 x^5-5 x^6+e^e \left (200+80 x+8 x^2-50 x^4-20 x^5-2 x^6\right )}{-200-80 x+292 x^2+120 x^3-138 x^4-60 x^5+19 x^6+10 x^7+x^8} \, dx=- \frac {x^{4} \left (- 2 e^{e} - 5\right ) + x^{3} \left (- 10 e^{e} - 1\right ) + x^{2} \cdot \left (15 + 4 e^{e}\right ) + 20 x e^{e} - 20}{x^{5} + 5 x^{4} - 4 x^{3} - 20 x^{2} + 4 x + 20} \]

[In]

integrate(((-2*x**6-20*x**5-50*x**4+8*x**2+80*x+200)*exp(exp(1))-5*x**6-2*x**5+10*x**4-54*x**3-100*x**2-100*x+
40)/(x**8+10*x**7+19*x**6-60*x**5-138*x**4+120*x**3+292*x**2-80*x-200),x)

[Out]

-(x**4*(-2*exp(E) - 5) + x**3*(-10*exp(E) - 1) + x**2*(15 + 4*exp(E)) + 20*x*exp(E) - 20)/(x**5 + 5*x**4 - 4*x
**3 - 20*x**2 + 4*x + 20)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 68 vs. \(2 (25) = 50\).

Time = 0.21 (sec) , antiderivative size = 68, normalized size of antiderivative = 2.72 \[ \int \frac {40-100 x-100 x^2-54 x^3+10 x^4-2 x^5-5 x^6+e^e \left (200+80 x+8 x^2-50 x^4-20 x^5-2 x^6\right )}{-200-80 x+292 x^2+120 x^3-138 x^4-60 x^5+19 x^6+10 x^7+x^8} \, dx=\frac {x^{4} {\left (2 \, e^{e} + 5\right )} + x^{3} {\left (10 \, e^{e} + 1\right )} - x^{2} {\left (4 \, e^{e} + 15\right )} - 20 \, x e^{e} + 20}{x^{5} + 5 \, x^{4} - 4 \, x^{3} - 20 \, x^{2} + 4 \, x + 20} \]

[In]

integrate(((-2*x^6-20*x^5-50*x^4+8*x^2+80*x+200)*exp(exp(1))-5*x^6-2*x^5+10*x^4-54*x^3-100*x^2-100*x+40)/(x^8+
10*x^7+19*x^6-60*x^5-138*x^4+120*x^3+292*x^2-80*x-200),x, algorithm="maxima")

[Out]

(x^4*(2*e^e + 5) + x^3*(10*e^e + 1) - x^2*(4*e^e + 15) - 20*x*e^e + 20)/(x^5 + 5*x^4 - 4*x^3 - 20*x^2 + 4*x +
20)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.36 \[ \int \frac {40-100 x-100 x^2-54 x^3+10 x^4-2 x^5-5 x^6+e^e \left (200+80 x+8 x^2-50 x^4-20 x^5-2 x^6\right )}{-200-80 x+292 x^2+120 x^3-138 x^4-60 x^5+19 x^6+10 x^7+x^8} \, dx=\frac {2 \, x^{3} e^{e} + x^{2} - 4 \, x e^{e}}{{\left (x^{2} - 2\right )}^{2}} + \frac {5}{x + 5} \]

[In]

integrate(((-2*x^6-20*x^5-50*x^4+8*x^2+80*x+200)*exp(exp(1))-5*x^6-2*x^5+10*x^4-54*x^3-100*x^2-100*x+40)/(x^8+
10*x^7+19*x^6-60*x^5-138*x^4+120*x^3+292*x^2-80*x-200),x, algorithm="giac")

[Out]

(2*x^3*e^e + x^2 - 4*x*e^e)/(x^2 - 2)^2 + 5/(x + 5)

Mupad [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.32 \[ \int \frac {40-100 x-100 x^2-54 x^3+10 x^4-2 x^5-5 x^6+e^e \left (200+80 x+8 x^2-50 x^4-20 x^5-2 x^6\right )}{-200-80 x+292 x^2+120 x^3-138 x^4-60 x^5+19 x^6+10 x^7+x^8} \, dx=\frac {5}{x+5}+\frac {2}{{\left (x^2-2\right )}^2}+\frac {2\,x\,{\mathrm {e}}^{\mathrm {e}}+1}{x^2-2} \]

[In]

int(-(100*x - exp(exp(1))*(80*x + 8*x^2 - 50*x^4 - 20*x^5 - 2*x^6 + 200) + 100*x^2 + 54*x^3 - 10*x^4 + 2*x^5 +
 5*x^6 - 40)/(292*x^2 - 80*x + 120*x^3 - 138*x^4 - 60*x^5 + 19*x^6 + 10*x^7 + x^8 - 200),x)

[Out]

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