\(\int \frac {-7-e^{12}+36 x-111 x^2+66 x^3+12 x^4-24 x^5+53 x^6-42 x^7+20 x^9-15 x^{10}+6 x^{11}-x^{12}+e^8 (-9-3 x^2+6 x^3-3 x^4)+e^4 (-15-6 x^2+3 x^4+12 x^5-18 x^6+12 x^7-3 x^8)}{1+e^{12}+3 x^2-6 x^3+6 x^4-12 x^5+19 x^6-18 x^7+18 x^8-20 x^9+15 x^{10}-6 x^{11}+x^{12}+e^8 (3+3 x^2-6 x^3+3 x^4)+e^4 (3+6 x^2-12 x^3+9 x^4-12 x^5+18 x^6-12 x^7+3 x^8)} \, dx\) [7805]

   Optimal result
   Rubi [B] (verified)
   Mathematica [A] (verified)
   Maple [B] (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 = 240, antiderivative size = 31 \[ \int \frac {-7-e^{12}+36 x-111 x^2+66 x^3+12 x^4-24 x^5+53 x^6-42 x^7+20 x^9-15 x^{10}+6 x^{11}-x^{12}+e^8 \left (-9-3 x^2+6 x^3-3 x^4\right )+e^4 \left (-15-6 x^2+3 x^4+12 x^5-18 x^6+12 x^7-3 x^8\right )}{1+e^{12}+3 x^2-6 x^3+6 x^4-12 x^5+19 x^6-18 x^7+18 x^8-20 x^9+15 x^{10}-6 x^{11}+x^{12}+e^8 \left (3+3 x^2-6 x^3+3 x^4\right )+e^4 \left (3+6 x^2-12 x^3+9 x^4-12 x^5+18 x^6-12 x^7+3 x^8\right )} \, dx=-x+x^2-\left (x+\frac {3}{1+e^4+\left (-x+x^2\right )^2}\right )^2 \]

[Out]

x^2-(x+3/(1+exp(4)+(x^2-x)^2))^2-x

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(83\) vs. \(2(31)=62\).

Time = 1.19 (sec) , antiderivative size = 83, normalized size of antiderivative = 2.68, number of steps used = 28, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.058, Rules used = {2099, 1602, 1694, 1687, 1192, 12, 1108, 648, 632, 210, 642, 1261, 643, 1120} \[ \int \frac {-7-e^{12}+36 x-111 x^2+66 x^3+12 x^4-24 x^5+53 x^6-42 x^7+20 x^9-15 x^{10}+6 x^{11}-x^{12}+e^8 \left (-9-3 x^2+6 x^3-3 x^4\right )+e^4 \left (-15-6 x^2+3 x^4+12 x^5-18 x^6+12 x^7-3 x^8\right )}{1+e^{12}+3 x^2-6 x^3+6 x^4-12 x^5+19 x^6-18 x^7+18 x^8-20 x^9+15 x^{10}-6 x^{11}+x^{12}+e^8 \left (3+3 x^2-6 x^3+3 x^4\right )+e^4 \left (3+6 x^2-12 x^3+9 x^4-12 x^5+18 x^6-12 x^7+3 x^8\right )} \, dx=-\frac {9}{\left (x^4-2 x^3+x^2+e^4+1\right )^2}+\frac {48 (1-2 x)}{(2 x-1)^4-2 (1-2 x)^2+16 e^4+17}-x-\frac {48}{(2 x-1)^4-2 (1-2 x)^2+16 e^4+17} \]

[In]

Int[(-7 - E^12 + 36*x - 111*x^2 + 66*x^3 + 12*x^4 - 24*x^5 + 53*x^6 - 42*x^7 + 20*x^9 - 15*x^10 + 6*x^11 - x^1
2 + E^8*(-9 - 3*x^2 + 6*x^3 - 3*x^4) + E^4*(-15 - 6*x^2 + 3*x^4 + 12*x^5 - 18*x^6 + 12*x^7 - 3*x^8))/(1 + E^12
 + 3*x^2 - 6*x^3 + 6*x^4 - 12*x^5 + 19*x^6 - 18*x^7 + 18*x^8 - 20*x^9 + 15*x^10 - 6*x^11 + x^12 + E^8*(3 + 3*x
^2 - 6*x^3 + 3*x^4) + E^4*(3 + 6*x^2 - 12*x^3 + 9*x^4 - 12*x^5 + 18*x^6 - 12*x^7 + 3*x^8)),x]

[Out]

-x - 9/(1 + E^4 + x^2 - 2*x^3 + x^4)^2 - 48/(17 + 16*E^4 - 2*(1 - 2*x)^2 + (-1 + 2*x)^4) + (48*(1 - 2*x))/(17
+ 16*E^4 - 2*(1 - 2*x)^2 + (-1 + 2*x)^4)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 210

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

Rule 632

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

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

Rule 648

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 1108

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r = Rt[2*q - b/c, 2]}
, Dist[1/(2*c*q*r), Int[(r - x)/(q - r*x + x^2), x], x] + Dist[1/(2*c*q*r), Int[(r + x)/(q + r*x + x^2), x], x
]]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && NegQ[b^2 - 4*a*c]

Rule 1120

Int[(P4_)^(p_), x_Symbol] :> With[{a = Coeff[P4, x, 0], b = Coeff[P4, x, 1], c = Coeff[P4, x, 2], d = Coeff[P4
, x, 3], e = Coeff[P4, x, 4]}, Subst[Int[SimplifyIntegrand[(a + d^4/(256*e^3) - b*(d/(8*e)) + (c - 3*(d^2/(8*e
)))*x^2 + e*x^4)^p, x], x], x, d/(4*e) + x] /; EqQ[d^3 - 4*c*d*e + 8*b*e^2, 0] && NeQ[d, 0]] /; FreeQ[p, x] &&
 PolyQ[P4, x, 4] && NeQ[p, 2] && NeQ[p, 3]

Rule 1192

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

Rule 1261

Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[
Int[(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x]

Rule 1602

Int[(Pp_)*(Qq_)^(m_.), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[Coeff[Pp, x, p]*x^(p - q +
 1)*(Qq^(m + 1)/((p + m*q + 1)*Coeff[Qq, x, q])), x] /; NeQ[p + m*q + 1, 0] && EqQ[(p + m*q + 1)*Coeff[Qq, x,
q]*Pp, Coeff[Pp, x, p]*x^(p - q)*((p - q + 1)*Qq + (m + 1)*x*D[Qq, x])]] /; FreeQ[m, x] && PolyQ[Pp, x] && Pol
yQ[Qq, x] && NeQ[m, -1]

Rule 1687

Int[(Pq_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{q = Expon[Pq, x], k}, Int[Sum[Coeff[
Pq, x, 2*k]*x^(2*k), {k, 0, q/2}]*(a + b*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pq, x, 2*k + 1]*x^(2*k), {k, 0,
(q - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] &&  !PolyQ[Pq, x^2]

Rule 1694

Int[(Pq_)*(Q4_)^(p_), x_Symbol] :> With[{a = Coeff[Q4, x, 0], b = Coeff[Q4, x, 1], c = Coeff[Q4, x, 2], d = Co
eff[Q4, x, 3], e = Coeff[Q4, x, 4]}, Subst[Int[SimplifyIntegrand[(Pq /. x -> -d/(4*e) + x)*(a + d^4/(256*e^3)
- b*(d/(8*e)) + (c - 3*(d^2/(8*e)))*x^2 + e*x^4)^p, x], x], x, d/(4*e) + x] /; EqQ[d^3 - 4*c*d*e + 8*b*e^2, 0]
 && NeQ[d, 0]] /; FreeQ[p, x] && PolyQ[Pq, x] && PolyQ[Q4, x, 4] &&  !IGtQ[p, 0]

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 (-1+\frac {36 x \left (1-3 x+2 x^2\right )}{\left (1+e^4+x^2-2 x^3+x^4\right )^3}+\frac {12 \left (-2 \left (1+e^4\right )-x^2+x^3\right )}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}+\frac {18}{1+e^4+x^2-2 x^3+x^4}\right ) \, dx \\ & = -x+12 \int \frac {-2 \left (1+e^4\right )-x^2+x^3}{\left (1+e^4+x^2-2 x^3+x^4\right )^2} \, dx+18 \int \frac {1}{1+e^4+x^2-2 x^3+x^4} \, dx+36 \int \frac {x \left (1-3 x+2 x^2\right )}{\left (1+e^4+x^2-2 x^3+x^4\right )^3} \, dx \\ & = -x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}+12 \text {Subst}\left (\int \frac {\frac {1}{8} \left (-17-16 e^4\right )-\frac {x}{4}+\frac {x^2}{2}+x^3}{\left (\frac {17}{16}+e^4-\frac {x^2}{2}+x^4\right )^2} \, dx,x,-\frac {1}{2}+x\right )+18 \text {Subst}\left (\int \frac {1}{\frac {17}{16}+e^4-\frac {x^2}{2}+x^4} \, dx,x,-\frac {1}{2}+x\right ) \\ & = -x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}+12 \text {Subst}\left (\int \frac {\frac {1}{8} \left (-17-16 e^4\right )+\frac {x^2}{2}}{\left (\frac {17}{16}+e^4-\frac {x^2}{2}+x^4\right )^2} \, dx,x,-\frac {1}{2}+x\right )+12 \text {Subst}\left (\int \frac {x \left (-\frac {1}{4}+x^2\right )}{\left (\frac {17}{16}+e^4-\frac {x^2}{2}+x^4\right )^2} \, dx,x,-\frac {1}{2}+x\right )+\left (36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \text {Subst}\left (\int \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}-x}{\frac {1}{4} \sqrt {17+16 e^4}-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )+\left (36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \text {Subst}\left (\int \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+x}{\frac {1}{4} \sqrt {17+16 e^4}+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right ) \\ & = -x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}+\frac {48 (1-2 x)}{17+16 e^4-2 (1-2 x)^2+(-1+2 x)^4}+6 \text {Subst}\left (\int \frac {-\frac {1}{4}+x}{\left (\frac {17}{16}+e^4-\frac {x}{2}+x^2\right )^2} \, dx,x,\left (-\frac {1}{2}+x\right )^2\right )+\frac {18 \text {Subst}\left (\int \frac {1}{\frac {1}{4} \sqrt {17+16 e^4}-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )}{\sqrt {17+16 e^4}}+\frac {18 \text {Subst}\left (\int \frac {1}{\frac {1}{4} \sqrt {17+16 e^4}+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )}{\sqrt {17+16 e^4}}+\frac {24 \text {Subst}\left (\int -\frac {3 \left (17+33 e^4+16 e^8\right )}{4 \left (\frac {17}{16}+e^4-\frac {x^2}{2}+x^4\right )} \, dx,x,-\frac {1}{2}+x\right )}{17+33 e^4+16 e^8}-\left (18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \text {Subst}\left (\int \frac {-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x}{\frac {1}{4} \sqrt {17+16 e^4}-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )+\left (18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \text {Subst}\left (\int \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x}{\frac {1}{4} \sqrt {17+16 e^4}+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right ) \\ & = -x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}-\frac {3}{1+e^4+x^2-2 x^3+x^4}+\frac {48 (1-2 x)}{17+16 e^4-2 (1-2 x)^2+(-1+2 x)^4}+18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}} \log \left (\sqrt {17+16 e^4}-\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )} (1-2 x)+(-1+2 x)^2\right )-18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}} \log \left (\sqrt {17+16 e^4}+\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )} (1-2 x)+(-1+2 x)^2\right )-18 \text {Subst}\left (\int \frac {1}{\frac {17}{16}+e^4-\frac {x^2}{2}+x^4} \, dx,x,-\frac {1}{2}+x\right )-\frac {36 \text {Subst}\left (\int \frac {1}{\frac {1}{2} \left (1-\sqrt {17+16 e^4}\right )-x^2} \, dx,x,-1-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x\right )}{\sqrt {17+16 e^4}}-\frac {36 \text {Subst}\left (\int \frac {1}{\frac {1}{2} \left (1-\sqrt {17+16 e^4}\right )-x^2} \, dx,x,-1+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x\right )}{\sqrt {17+16 e^4}} \\ & = -x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}-\frac {3}{1+e^4+x^2-2 x^3+x^4}+\frac {48 (1-2 x)}{17+16 e^4-2 (1-2 x)^2+(-1+2 x)^4}-36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (-1+\sqrt {17+16 e^4}\right )}} \arctan \left (\frac {2-\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )}-4 x}{\sqrt {2 \left (-1+\sqrt {17+16 e^4}\right )}}\right )-36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (-1+\sqrt {17+16 e^4}\right )}} \arctan \left (\frac {2+\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )}-4 x}{\sqrt {2 \left (-1+\sqrt {17+16 e^4}\right )}}\right )+18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}} \log \left (\sqrt {17+16 e^4}-\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )} (1-2 x)+(-1+2 x)^2\right )-18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}} \log \left (\sqrt {17+16 e^4}+\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )} (1-2 x)+(-1+2 x)^2\right )-\left (36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \text {Subst}\left (\int \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}-x}{\frac {1}{4} \sqrt {17+16 e^4}-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )-\left (36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \text {Subst}\left (\int \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+x}{\frac {1}{4} \sqrt {17+16 e^4}+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right ) \\ & = -x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}-\frac {3}{1+e^4+x^2-2 x^3+x^4}+\frac {48 (1-2 x)}{17+16 e^4-2 (1-2 x)^2+(-1+2 x)^4}-36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (-1+\sqrt {17+16 e^4}\right )}} \arctan \left (\frac {2-\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )}-4 x}{\sqrt {2 \left (-1+\sqrt {17+16 e^4}\right )}}\right )-36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (-1+\sqrt {17+16 e^4}\right )}} \arctan \left (\frac {2+\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )}-4 x}{\sqrt {2 \left (-1+\sqrt {17+16 e^4}\right )}}\right )+18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}} \log \left (\sqrt {17+16 e^4}-\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )} (1-2 x)+(-1+2 x)^2\right )-18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}} \log \left (\sqrt {17+16 e^4}+\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )} (1-2 x)+(-1+2 x)^2\right )-\frac {18 \text {Subst}\left (\int \frac {1}{\frac {1}{4} \sqrt {17+16 e^4}-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )}{\sqrt {17+16 e^4}}-\frac {18 \text {Subst}\left (\int \frac {1}{\frac {1}{4} \sqrt {17+16 e^4}+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )}{\sqrt {17+16 e^4}}+\left (18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \text {Subst}\left (\int \frac {-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x}{\frac {1}{4} \sqrt {17+16 e^4}-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )-\left (18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \text {Subst}\left (\int \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x}{\frac {1}{4} \sqrt {17+16 e^4}+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right ) \\ & = -x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}-\frac {3}{1+e^4+x^2-2 x^3+x^4}+\frac {48 (1-2 x)}{17+16 e^4-2 (1-2 x)^2+(-1+2 x)^4}-36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (-1+\sqrt {17+16 e^4}\right )}} \arctan \left (\frac {2-\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )}-4 x}{\sqrt {2 \left (-1+\sqrt {17+16 e^4}\right )}}\right )-36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (-1+\sqrt {17+16 e^4}\right )}} \arctan \left (\frac {2+\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )}-4 x}{\sqrt {2 \left (-1+\sqrt {17+16 e^4}\right )}}\right )+\frac {36 \text {Subst}\left (\int \frac {1}{\frac {1}{2} \left (1-\sqrt {17+16 e^4}\right )-x^2} \, dx,x,-1-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x\right )}{\sqrt {17+16 e^4}}+\frac {36 \text {Subst}\left (\int \frac {1}{\frac {1}{2} \left (1-\sqrt {17+16 e^4}\right )-x^2} \, dx,x,-1+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x\right )}{\sqrt {17+16 e^4}} \\ & = -x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}-\frac {3}{1+e^4+x^2-2 x^3+x^4}+\frac {48 (1-2 x)}{17+16 e^4-2 (1-2 x)^2+(-1+2 x)^4} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.45 \[ \int \frac {-7-e^{12}+36 x-111 x^2+66 x^3+12 x^4-24 x^5+53 x^6-42 x^7+20 x^9-15 x^{10}+6 x^{11}-x^{12}+e^8 \left (-9-3 x^2+6 x^3-3 x^4\right )+e^4 \left (-15-6 x^2+3 x^4+12 x^5-18 x^6+12 x^7-3 x^8\right )}{1+e^{12}+3 x^2-6 x^3+6 x^4-12 x^5+19 x^6-18 x^7+18 x^8-20 x^9+15 x^{10}-6 x^{11}+x^{12}+e^8 \left (3+3 x^2-6 x^3+3 x^4\right )+e^4 \left (3+6 x^2-12 x^3+9 x^4-12 x^5+18 x^6-12 x^7+3 x^8\right )} \, dx=-x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}-\frac {6 x}{1+e^4+x^2-2 x^3+x^4} \]

[In]

Integrate[(-7 - E^12 + 36*x - 111*x^2 + 66*x^3 + 12*x^4 - 24*x^5 + 53*x^6 - 42*x^7 + 20*x^9 - 15*x^10 + 6*x^11
 - x^12 + E^8*(-9 - 3*x^2 + 6*x^3 - 3*x^4) + E^4*(-15 - 6*x^2 + 3*x^4 + 12*x^5 - 18*x^6 + 12*x^7 - 3*x^8))/(1
+ E^12 + 3*x^2 - 6*x^3 + 6*x^4 - 12*x^5 + 19*x^6 - 18*x^7 + 18*x^8 - 20*x^9 + 15*x^10 - 6*x^11 + x^12 + E^8*(3
 + 3*x^2 - 6*x^3 + 3*x^4) + E^4*(3 + 6*x^2 - 12*x^3 + 9*x^4 - 12*x^5 + 18*x^6 - 12*x^7 + 3*x^8)),x]

[Out]

-x - 9/(1 + E^4 + x^2 - 2*x^3 + x^4)^2 - (6*x)/(1 + E^4 + x^2 - 2*x^3 + x^4)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(94\) vs. \(2(30)=60\).

Time = 0.26 (sec) , antiderivative size = 95, normalized size of antiderivative = 3.06

method result size
risch \(-x +\frac {-9-6 x^{5}+12 x^{4}-6 x^{3}+\left (-6 \,{\mathrm e}^{4}-6\right ) x}{x^{8}-4 x^{7}+6 x^{6}+2 x^{4} {\mathrm e}^{4}-4 x^{5}-4 x^{3} {\mathrm e}^{4}+3 x^{4}+2 x^{2} {\mathrm e}^{4}-4 x^{3}+{\mathrm e}^{8}+2 x^{2}+2 \,{\mathrm e}^{4}+1}\) \(95\)
norman \(\frac {-20 x^{6}+10 x^{7}+\left (7-2 \,{\mathrm e}^{4}\right ) x^{5}+\left (-{\mathrm e}^{8}-8 \,{\mathrm e}^{4}-7\right ) x +\left (-8 \,{\mathrm e}^{4}-8\right ) x^{2}+\left (-4 \,{\mathrm e}^{4}+4\right ) x^{4}+\left (14 \,{\mathrm e}^{4}+8\right ) x^{3}-x^{9}-4 \,{\mathrm e}^{8}-8 \,{\mathrm e}^{4}-13}{\left (x^{4}-2 x^{3}+x^{2}+{\mathrm e}^{4}+1\right )^{2}}\) \(100\)
gosper \(-\frac {x^{9}-10 x^{7}+2 x^{5} {\mathrm e}^{4}+20 x^{6}+4 x^{4} {\mathrm e}^{4}-7 x^{5}-14 x^{3} {\mathrm e}^{4}-4 x^{4}+x \,{\mathrm e}^{8}+8 x^{2} {\mathrm e}^{4}-8 x^{3}+4 \,{\mathrm e}^{8}+8 x \,{\mathrm e}^{4}+8 x^{2}+8 \,{\mathrm e}^{4}+7 x +13}{x^{8}-4 x^{7}+6 x^{6}+2 x^{4} {\mathrm e}^{4}-4 x^{5}-4 x^{3} {\mathrm e}^{4}+3 x^{4}+2 x^{2} {\mathrm e}^{4}-4 x^{3}+{\mathrm e}^{8}+2 x^{2}+2 \,{\mathrm e}^{4}+1}\) \(156\)
parallelrisch \(-\frac {x^{9}-10 x^{7}+2 x^{5} {\mathrm e}^{4}+20 x^{6}+4 x^{4} {\mathrm e}^{4}-7 x^{5}-14 x^{3} {\mathrm e}^{4}-4 x^{4}+x \,{\mathrm e}^{8}+8 x^{2} {\mathrm e}^{4}-8 x^{3}+4 \,{\mathrm e}^{8}+8 x \,{\mathrm e}^{4}+8 x^{2}+8 \,{\mathrm e}^{4}+7 x +13}{x^{8}-4 x^{7}+6 x^{6}+2 x^{4} {\mathrm e}^{4}-4 x^{5}-4 x^{3} {\mathrm e}^{4}+3 x^{4}+2 x^{2} {\mathrm e}^{4}-4 x^{3}+{\mathrm e}^{8}+2 x^{2}+2 \,{\mathrm e}^{4}+1}\) \(156\)

[In]

int((-exp(4)^3+(-3*x^4+6*x^3-3*x^2-9)*exp(4)^2+(-3*x^8+12*x^7-18*x^6+12*x^5+3*x^4-6*x^2-15)*exp(4)-x^12+6*x^11
-15*x^10+20*x^9-42*x^7+53*x^6-24*x^5+12*x^4+66*x^3-111*x^2+36*x-7)/(exp(4)^3+(3*x^4-6*x^3+3*x^2+3)*exp(4)^2+(3
*x^8-12*x^7+18*x^6-12*x^5+9*x^4-12*x^3+6*x^2+3)*exp(4)+x^12-6*x^11+15*x^10-20*x^9+18*x^8-18*x^7+19*x^6-12*x^5+
6*x^4-6*x^3+3*x^2+1),x,method=_RETURNVERBOSE)

[Out]

-x+(-9-6*x^5+12*x^4-6*x^3+(-6*exp(4)-6)*x)/(x^8-4*x^7+6*x^6+2*x^4*exp(4)-4*x^5-4*x^3*exp(4)+3*x^4+2*x^2*exp(4)
-4*x^3+exp(8)+2*x^2+2*exp(4)+1)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (30) = 60\).

Time = 0.26 (sec) , antiderivative size = 119, normalized size of antiderivative = 3.84 \[ \int \frac {-7-e^{12}+36 x-111 x^2+66 x^3+12 x^4-24 x^5+53 x^6-42 x^7+20 x^9-15 x^{10}+6 x^{11}-x^{12}+e^8 \left (-9-3 x^2+6 x^3-3 x^4\right )+e^4 \left (-15-6 x^2+3 x^4+12 x^5-18 x^6+12 x^7-3 x^8\right )}{1+e^{12}+3 x^2-6 x^3+6 x^4-12 x^5+19 x^6-18 x^7+18 x^8-20 x^9+15 x^{10}-6 x^{11}+x^{12}+e^8 \left (3+3 x^2-6 x^3+3 x^4\right )+e^4 \left (3+6 x^2-12 x^3+9 x^4-12 x^5+18 x^6-12 x^7+3 x^8\right )} \, dx=-\frac {x^{9} - 4 \, x^{8} + 6 \, x^{7} - 4 \, x^{6} + 9 \, x^{5} - 16 \, x^{4} + 8 \, x^{3} + x e^{8} + 2 \, {\left (x^{5} - 2 \, x^{4} + x^{3} + 4 \, x\right )} e^{4} + 7 \, x + 9}{x^{8} - 4 \, x^{7} + 6 \, x^{6} - 4 \, x^{5} + 3 \, x^{4} - 4 \, x^{3} + 2 \, x^{2} + 2 \, {\left (x^{4} - 2 \, x^{3} + x^{2} + 1\right )} e^{4} + e^{8} + 1} \]

[In]

integrate((-exp(4)^3+(-3*x^4+6*x^3-3*x^2-9)*exp(4)^2+(-3*x^8+12*x^7-18*x^6+12*x^5+3*x^4-6*x^2-15)*exp(4)-x^12+
6*x^11-15*x^10+20*x^9-42*x^7+53*x^6-24*x^5+12*x^4+66*x^3-111*x^2+36*x-7)/(exp(4)^3+(3*x^4-6*x^3+3*x^2+3)*exp(4
)^2+(3*x^8-12*x^7+18*x^6-12*x^5+9*x^4-12*x^3+6*x^2+3)*exp(4)+x^12-6*x^11+15*x^10-20*x^9+18*x^8-18*x^7+19*x^6-1
2*x^5+6*x^4-6*x^3+3*x^2+1),x, algorithm="fricas")

[Out]

-(x^9 - 4*x^8 + 6*x^7 - 4*x^6 + 9*x^5 - 16*x^4 + 8*x^3 + x*e^8 + 2*(x^5 - 2*x^4 + x^3 + 4*x)*e^4 + 7*x + 9)/(x
^8 - 4*x^7 + 6*x^6 - 4*x^5 + 3*x^4 - 4*x^3 + 2*x^2 + 2*(x^4 - 2*x^3 + x^2 + 1)*e^4 + e^8 + 1)

Sympy [B] (verification not implemented)

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

Time = 3.24 (sec) , antiderivative size = 88, normalized size of antiderivative = 2.84 \[ \int \frac {-7-e^{12}+36 x-111 x^2+66 x^3+12 x^4-24 x^5+53 x^6-42 x^7+20 x^9-15 x^{10}+6 x^{11}-x^{12}+e^8 \left (-9-3 x^2+6 x^3-3 x^4\right )+e^4 \left (-15-6 x^2+3 x^4+12 x^5-18 x^6+12 x^7-3 x^8\right )}{1+e^{12}+3 x^2-6 x^3+6 x^4-12 x^5+19 x^6-18 x^7+18 x^8-20 x^9+15 x^{10}-6 x^{11}+x^{12}+e^8 \left (3+3 x^2-6 x^3+3 x^4\right )+e^4 \left (3+6 x^2-12 x^3+9 x^4-12 x^5+18 x^6-12 x^7+3 x^8\right )} \, dx=- x - \frac {6 x^{5} - 12 x^{4} + 6 x^{3} + x \left (6 + 6 e^{4}\right ) + 9}{x^{8} - 4 x^{7} + 6 x^{6} - 4 x^{5} + x^{4} \cdot \left (3 + 2 e^{4}\right ) + x^{3} \left (- 4 e^{4} - 4\right ) + x^{2} \cdot \left (2 + 2 e^{4}\right ) + 1 + 2 e^{4} + e^{8}} \]

[In]

integrate((-exp(4)**3+(-3*x**4+6*x**3-3*x**2-9)*exp(4)**2+(-3*x**8+12*x**7-18*x**6+12*x**5+3*x**4-6*x**2-15)*e
xp(4)-x**12+6*x**11-15*x**10+20*x**9-42*x**7+53*x**6-24*x**5+12*x**4+66*x**3-111*x**2+36*x-7)/(exp(4)**3+(3*x*
*4-6*x**3+3*x**2+3)*exp(4)**2+(3*x**8-12*x**7+18*x**6-12*x**5+9*x**4-12*x**3+6*x**2+3)*exp(4)+x**12-6*x**11+15
*x**10-20*x**9+18*x**8-18*x**7+19*x**6-12*x**5+6*x**4-6*x**3+3*x**2+1),x)

[Out]

-x - (6*x**5 - 12*x**4 + 6*x**3 + x*(6 + 6*exp(4)) + 9)/(x**8 - 4*x**7 + 6*x**6 - 4*x**5 + x**4*(3 + 2*exp(4))
 + x**3*(-4*exp(4) - 4) + x**2*(2 + 2*exp(4)) + 1 + 2*exp(4) + exp(8))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 86 vs. \(2 (30) = 60\).

Time = 0.20 (sec) , antiderivative size = 86, normalized size of antiderivative = 2.77 \[ \int \frac {-7-e^{12}+36 x-111 x^2+66 x^3+12 x^4-24 x^5+53 x^6-42 x^7+20 x^9-15 x^{10}+6 x^{11}-x^{12}+e^8 \left (-9-3 x^2+6 x^3-3 x^4\right )+e^4 \left (-15-6 x^2+3 x^4+12 x^5-18 x^6+12 x^7-3 x^8\right )}{1+e^{12}+3 x^2-6 x^3+6 x^4-12 x^5+19 x^6-18 x^7+18 x^8-20 x^9+15 x^{10}-6 x^{11}+x^{12}+e^8 \left (3+3 x^2-6 x^3+3 x^4\right )+e^4 \left (3+6 x^2-12 x^3+9 x^4-12 x^5+18 x^6-12 x^7+3 x^8\right )} \, dx=-x - \frac {3 \, {\left (2 \, x^{5} - 4 \, x^{4} + 2 \, x^{3} + 2 \, x {\left (e^{4} + 1\right )} + 3\right )}}{x^{8} - 4 \, x^{7} + 6 \, x^{6} - 4 \, x^{5} + x^{4} {\left (2 \, e^{4} + 3\right )} - 4 \, x^{3} {\left (e^{4} + 1\right )} + 2 \, x^{2} {\left (e^{4} + 1\right )} + e^{8} + 2 \, e^{4} + 1} \]

[In]

integrate((-exp(4)^3+(-3*x^4+6*x^3-3*x^2-9)*exp(4)^2+(-3*x^8+12*x^7-18*x^6+12*x^5+3*x^4-6*x^2-15)*exp(4)-x^12+
6*x^11-15*x^10+20*x^9-42*x^7+53*x^6-24*x^5+12*x^4+66*x^3-111*x^2+36*x-7)/(exp(4)^3+(3*x^4-6*x^3+3*x^2+3)*exp(4
)^2+(3*x^8-12*x^7+18*x^6-12*x^5+9*x^4-12*x^3+6*x^2+3)*exp(4)+x^12-6*x^11+15*x^10-20*x^9+18*x^8-18*x^7+19*x^6-1
2*x^5+6*x^4-6*x^3+3*x^2+1),x, algorithm="maxima")

[Out]

-x - 3*(2*x^5 - 4*x^4 + 2*x^3 + 2*x*(e^4 + 1) + 3)/(x^8 - 4*x^7 + 6*x^6 - 4*x^5 + x^4*(2*e^4 + 3) - 4*x^3*(e^4
 + 1) + 2*x^2*(e^4 + 1) + e^8 + 2*e^4 + 1)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.55 \[ \int \frac {-7-e^{12}+36 x-111 x^2+66 x^3+12 x^4-24 x^5+53 x^6-42 x^7+20 x^9-15 x^{10}+6 x^{11}-x^{12}+e^8 \left (-9-3 x^2+6 x^3-3 x^4\right )+e^4 \left (-15-6 x^2+3 x^4+12 x^5-18 x^6+12 x^7-3 x^8\right )}{1+e^{12}+3 x^2-6 x^3+6 x^4-12 x^5+19 x^6-18 x^7+18 x^8-20 x^9+15 x^{10}-6 x^{11}+x^{12}+e^8 \left (3+3 x^2-6 x^3+3 x^4\right )+e^4 \left (3+6 x^2-12 x^3+9 x^4-12 x^5+18 x^6-12 x^7+3 x^8\right )} \, dx=-x - \frac {3 \, {\left (2 \, x^{5} - 4 \, x^{4} + 2 \, x^{3} + 2 \, x e^{4} + 2 \, x + 3\right )}}{{\left (x^{4} - 2 \, x^{3} + x^{2} + e^{4} + 1\right )}^{2}} \]

[In]

integrate((-exp(4)^3+(-3*x^4+6*x^3-3*x^2-9)*exp(4)^2+(-3*x^8+12*x^7-18*x^6+12*x^5+3*x^4-6*x^2-15)*exp(4)-x^12+
6*x^11-15*x^10+20*x^9-42*x^7+53*x^6-24*x^5+12*x^4+66*x^3-111*x^2+36*x-7)/(exp(4)^3+(3*x^4-6*x^3+3*x^2+3)*exp(4
)^2+(3*x^8-12*x^7+18*x^6-12*x^5+9*x^4-12*x^3+6*x^2+3)*exp(4)+x^12-6*x^11+15*x^10-20*x^9+18*x^8-18*x^7+19*x^6-1
2*x^5+6*x^4-6*x^3+3*x^2+1),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 13.56 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.87 \[ \int \frac {-7-e^{12}+36 x-111 x^2+66 x^3+12 x^4-24 x^5+53 x^6-42 x^7+20 x^9-15 x^{10}+6 x^{11}-x^{12}+e^8 \left (-9-3 x^2+6 x^3-3 x^4\right )+e^4 \left (-15-6 x^2+3 x^4+12 x^5-18 x^6+12 x^7-3 x^8\right )}{1+e^{12}+3 x^2-6 x^3+6 x^4-12 x^5+19 x^6-18 x^7+18 x^8-20 x^9+15 x^{10}-6 x^{11}+x^{12}+e^8 \left (3+3 x^2-6 x^3+3 x^4\right )+e^4 \left (3+6 x^2-12 x^3+9 x^4-12 x^5+18 x^6-12 x^7+3 x^8\right )} \, dx=-x-\frac {6\,x^5-12\,x^4+6\,x^3+\left (8\,{\mathrm {e}}^4+{\mathrm {e}}^8-{\left ({\mathrm {e}}^4+1\right )}^2+7\right )\,x+9}{{\left (x^4-2\,x^3+x^2+{\mathrm {e}}^4+1\right )}^2} \]

[In]

int(-(exp(12) - 36*x + exp(4)*(6*x^2 - 3*x^4 - 12*x^5 + 18*x^6 - 12*x^7 + 3*x^8 + 15) + exp(8)*(3*x^2 - 6*x^3
+ 3*x^4 + 9) + 111*x^2 - 66*x^3 - 12*x^4 + 24*x^5 - 53*x^6 + 42*x^7 - 20*x^9 + 15*x^10 - 6*x^11 + x^12 + 7)/(e
xp(12) + exp(4)*(6*x^2 - 12*x^3 + 9*x^4 - 12*x^5 + 18*x^6 - 12*x^7 + 3*x^8 + 3) + exp(8)*(3*x^2 - 6*x^3 + 3*x^
4 + 3) + 3*x^2 - 6*x^3 + 6*x^4 - 12*x^5 + 19*x^6 - 18*x^7 + 18*x^8 - 20*x^9 + 15*x^10 - 6*x^11 + x^12 + 1),x)

[Out]

- x - (6*x^3 - 12*x^4 + 6*x^5 + x*(8*exp(4) + exp(8) - (exp(4) + 1)^2 + 7) + 9)/(exp(4) + x^2 - 2*x^3 + x^4 +
1)^2