3.9.7 \(\int \frac {4 x^3+e^x (2 x^3-4 x^4)+e^{2 e^{e^4}+2 x^2} (4-8 x^2+e^x (2+2 x-4 x^2))}{8 x^3+12 e^x x^3+6 e^{2 x} x^3+e^{3 x} x^3} \, dx\)

Optimal. Leaf size=32 \[ \frac {-\frac {e^{2 e^{e^4}+2 x^2}}{x^2}+2 x}{\left (2+e^x\right )^2} \]

________________________________________________________________________________________

Rubi [B]  time = 1.63, antiderivative size = 148, normalized size of antiderivative = 4.62, number of steps used = 31, number of rules used = 14, integrand size = 94, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.149, Rules used = {6741, 6742, 2185, 2184, 2190, 2279, 2391, 2191, 2282, 36, 29, 31, 44, 2288} \begin {gather*} \frac {x^2}{2}-\frac {e^{2 x^2+2 e^{e^4}} \left (e^x x^2+2 x^2\right )}{\left (e^x+2\right )^3 x^4}-\frac {1}{8} (1-2 x)^2+\frac {1-2 x}{e^x+2}+\frac {2 x}{e^x+2}+\frac {2 x}{\left (e^x+2\right )^2}-\frac {x}{2}-\frac {1}{e^x+2}-\frac {1}{2} (1-2 x) \log \left (\frac {e^x}{2}+1\right )-x \log \left (\frac {e^x}{2}+1\right )+\frac {1}{2} \log \left (e^x+2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(4*x^3 + E^x*(2*x^3 - 4*x^4) + E^(2*E^E^4 + 2*x^2)*(4 - 8*x^2 + E^x*(2 + 2*x - 4*x^2)))/(8*x^3 + 12*E^x*x^
3 + 6*E^(2*x)*x^3 + E^(3*x)*x^3),x]

[Out]

-(2 + E^x)^(-1) + (1 - 2*x)/(2 + E^x) - (1 - 2*x)^2/8 - x/2 + (2*x)/(2 + E^x)^2 + (2*x)/(2 + E^x) + x^2/2 - (E
^(2*E^E^4 + 2*x^2)*(2*x^2 + E^x*x^2))/((2 + E^x)^3*x^4) - ((1 - 2*x)*Log[1 + E^x/2])/2 - x*Log[1 + E^x/2] + Lo
g[2 + E^x]/2

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 2184

Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[(c
+ d*x)^(m + 1)/(a*d*(m + 1)), x] - Dist[b/a, Int[((c + d*x)^m*(F^(g*(e + f*x)))^n)/(a + b*(F^(g*(e + f*x)))^n)
, x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2185

Int[((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.))^(p_)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Dis
t[1/a, Int[(c + d*x)^m*(a + b*(F^(g*(e + f*x)))^n)^(p + 1), x], x] - Dist[b/a, Int[(c + d*x)^m*(F^(g*(e + f*x)
))^n*(a + b*(F^(g*(e + f*x)))^n)^p, x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && ILtQ[p, 0] && IGtQ[m, 0
]

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
 - Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2191

Int[((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((a_.) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.))^(p_.)*
((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m*(a + b*(F^(g*(e + f*x)))^n)^(p + 1))/(b*f*g*n*(p +
1)*Log[F]), x] - Dist[(d*m)/(b*f*g*n*(p + 1)*Log[F]), Int[(c + d*x)^(m - 1)*(a + b*(F^(g*(e + f*x)))^n)^(p + 1
), x], x] /; FreeQ[{F, a, b, c, d, e, f, g, m, n, p}, x] && NeQ[p, -1]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 2288

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = (v*y)/(Log[F]*D[u, x])}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 6741

Int[u_, x_Symbol] :> With[{v = NormalizeIntegrand[u, x]}, Int[v, x] /; v =!= u]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {4 x^3+e^x \left (2 x^3-4 x^4\right )+e^{2 e^{e^4}+2 x^2} \left (4-8 x^2+e^x \left (2+2 x-4 x^2\right )\right )}{\left (2+e^x\right )^3 x^3} \, dx\\ &=\int \left (-\frac {2 \left (-2-e^x+2 e^x x\right )}{\left (2+e^x\right )^3}-\frac {2 e^{2 e^{e^4}+2 x^2} \left (-2-e^x-e^x x+4 x^2+2 e^x x^2\right )}{\left (2+e^x\right )^3 x^3}\right ) \, dx\\ &=-\left (2 \int \frac {-2-e^x+2 e^x x}{\left (2+e^x\right )^3} \, dx\right )-2 \int \frac {e^{2 e^{e^4}+2 x^2} \left (-2-e^x-e^x x+4 x^2+2 e^x x^2\right )}{\left (2+e^x\right )^3 x^3} \, dx\\ &=-\frac {e^{2 e^{e^4}+2 x^2} \left (2 x^2+e^x x^2\right )}{\left (2+e^x\right )^3 x^4}-2 \int \left (-\frac {4 x}{\left (2+e^x\right )^3}+\frac {-1+2 x}{\left (2+e^x\right )^2}\right ) \, dx\\ &=-\frac {e^{2 e^{e^4}+2 x^2} \left (2 x^2+e^x x^2\right )}{\left (2+e^x\right )^3 x^4}-2 \int \frac {-1+2 x}{\left (2+e^x\right )^2} \, dx+8 \int \frac {x}{\left (2+e^x\right )^3} \, dx\\ &=-\frac {e^{2 e^{e^4}+2 x^2} \left (2 x^2+e^x x^2\right )}{\left (2+e^x\right )^3 x^4}-4 \int \frac {e^x x}{\left (2+e^x\right )^3} \, dx+4 \int \frac {x}{\left (2+e^x\right )^2} \, dx+\int \frac {e^x (-1+2 x)}{\left (2+e^x\right )^2} \, dx-\int \frac {-1+2 x}{2+e^x} \, dx\\ &=\frac {1-2 x}{2+e^x}-\frac {1}{8} (1-2 x)^2+\frac {2 x}{\left (2+e^x\right )^2}-\frac {e^{2 e^{e^4}+2 x^2} \left (2 x^2+e^x x^2\right )}{\left (2+e^x\right )^3 x^4}+\frac {1}{2} \int \frac {e^x (-1+2 x)}{2+e^x} \, dx-2 \int \frac {1}{\left (2+e^x\right )^2} \, dx+2 \int \frac {1}{2+e^x} \, dx-2 \int \frac {e^x x}{\left (2+e^x\right )^2} \, dx+2 \int \frac {x}{2+e^x} \, dx\\ &=\frac {1-2 x}{2+e^x}-\frac {1}{8} (1-2 x)^2+\frac {2 x}{\left (2+e^x\right )^2}+\frac {2 x}{2+e^x}+\frac {x^2}{2}-\frac {e^{2 e^{e^4}+2 x^2} \left (2 x^2+e^x x^2\right )}{\left (2+e^x\right )^3 x^4}-\frac {1}{2} (1-2 x) \log \left (1+\frac {e^x}{2}\right )-2 \int \frac {1}{2+e^x} \, dx-2 \operatorname {Subst}\left (\int \frac {1}{x (2+x)^2} \, dx,x,e^x\right )+2 \operatorname {Subst}\left (\int \frac {1}{x (2+x)} \, dx,x,e^x\right )-\int \frac {e^x x}{2+e^x} \, dx-\int \log \left (1+\frac {e^x}{2}\right ) \, dx\\ &=\frac {1-2 x}{2+e^x}-\frac {1}{8} (1-2 x)^2+\frac {2 x}{\left (2+e^x\right )^2}+\frac {2 x}{2+e^x}+\frac {x^2}{2}-\frac {e^{2 e^{e^4}+2 x^2} \left (2 x^2+e^x x^2\right )}{\left (2+e^x\right )^3 x^4}-\frac {1}{2} (1-2 x) \log \left (1+\frac {e^x}{2}\right )-x \log \left (1+\frac {e^x}{2}\right )-2 \operatorname {Subst}\left (\int \frac {1}{x (2+x)} \, dx,x,e^x\right )-2 \operatorname {Subst}\left (\int \left (\frac {1}{4 x}-\frac {1}{2 (2+x)^2}-\frac {1}{4 (2+x)}\right ) \, dx,x,e^x\right )+\int \log \left (1+\frac {e^x}{2}\right ) \, dx+\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )-\operatorname {Subst}\left (\int \frac {1}{2+x} \, dx,x,e^x\right )-\operatorname {Subst}\left (\int \frac {\log \left (1+\frac {x}{2}\right )}{x} \, dx,x,e^x\right )\\ &=-\frac {1}{2+e^x}+\frac {1-2 x}{2+e^x}-\frac {1}{8} (1-2 x)^2+\frac {x}{2}+\frac {2 x}{\left (2+e^x\right )^2}+\frac {2 x}{2+e^x}+\frac {x^2}{2}-\frac {e^{2 e^{e^4}+2 x^2} \left (2 x^2+e^x x^2\right )}{\left (2+e^x\right )^3 x^4}-\frac {1}{2} (1-2 x) \log \left (1+\frac {e^x}{2}\right )-x \log \left (1+\frac {e^x}{2}\right )-\frac {1}{2} \log \left (2+e^x\right )+\text {Li}_2\left (-\frac {e^x}{2}\right )-\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )+\operatorname {Subst}\left (\int \frac {1}{2+x} \, dx,x,e^x\right )+\operatorname {Subst}\left (\int \frac {\log \left (1+\frac {x}{2}\right )}{x} \, dx,x,e^x\right )\\ &=-\frac {1}{2+e^x}+\frac {1-2 x}{2+e^x}-\frac {1}{8} (1-2 x)^2-\frac {x}{2}+\frac {2 x}{\left (2+e^x\right )^2}+\frac {2 x}{2+e^x}+\frac {x^2}{2}-\frac {e^{2 e^{e^4}+2 x^2} \left (2 x^2+e^x x^2\right )}{\left (2+e^x\right )^3 x^4}-\frac {1}{2} (1-2 x) \log \left (1+\frac {e^x}{2}\right )-x \log \left (1+\frac {e^x}{2}\right )+\frac {1}{2} \log \left (2+e^x\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.38, size = 31, normalized size = 0.97 \begin {gather*} -\frac {e^{2 \left (e^{e^4}+x^2\right )}-2 x^3}{\left (2+e^x\right )^2 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(4*x^3 + E^x*(2*x^3 - 4*x^4) + E^(2*E^E^4 + 2*x^2)*(4 - 8*x^2 + E^x*(2 + 2*x - 4*x^2)))/(8*x^3 + 12*
E^x*x^3 + 6*E^(2*x)*x^3 + E^(3*x)*x^3),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.51, size = 44, normalized size = 1.38 \begin {gather*} \frac {2 \, x^{3} - e^{\left (2 \, x^{2} + 2 \, e^{\left (e^{4}\right )}\right )}}{x^{2} e^{\left (2 \, x\right )} + 4 \, x^{2} e^{x} + 4 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-4*x^2+2*x+2)*exp(x)-8*x^2+4)*exp(exp(exp(4))+x^2)^2+(-4*x^4+2*x^3)*exp(x)+4*x^3)/(x^3*exp(x)^3+6
*exp(x)^2*x^3+12*exp(x)*x^3+8*x^3),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.32, size = 44, normalized size = 1.38 \begin {gather*} \frac {2 \, x^{3} - e^{\left (2 \, x^{2} + 2 \, e^{\left (e^{4}\right )}\right )}}{x^{2} e^{\left (2 \, x\right )} + 4 \, x^{2} e^{x} + 4 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-4*x^2+2*x+2)*exp(x)-8*x^2+4)*exp(exp(exp(4))+x^2)^2+(-4*x^4+2*x^3)*exp(x)+4*x^3)/(x^3*exp(x)^3+6
*exp(x)^2*x^3+12*exp(x)*x^3+8*x^3),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.12, size = 34, normalized size = 1.06




method result size



risch \(\frac {2 x}{\left ({\mathrm e}^{x}+2\right )^{2}}-\frac {{\mathrm e}^{2 \,{\mathrm e}^{{\mathrm e}^{4}}+2 x^{2}}}{x^{2} \left ({\mathrm e}^{x}+2\right )^{2}}\) \(34\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((-4*x^2+2*x+2)*exp(x)-8*x^2+4)*exp(exp(exp(4))+x^2)^2+(-4*x^4+2*x^3)*exp(x)+4*x^3)/(x^3*exp(x)^3+6*exp(x
)^2*x^3+12*exp(x)*x^3+8*x^3),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 1.05, size = 117, normalized size = 3.66 \begin {gather*} \frac {x e^{\left (2 \, x\right )} + 2 \, {\left (2 \, x + 1\right )} e^{x} + 4 \, x + 6}{2 \, {\left (e^{\left (2 \, x\right )} + 4 \, e^{x} + 4\right )}} - \frac {x e^{\left (2 \, x\right )} + 2 \, {\left (2 \, x + 1\right )} e^{x} + 4}{2 \, {\left (e^{\left (2 \, x\right )} + 4 \, e^{x} + 4\right )}} - \frac {e^{\left (2 \, x^{2} + 2 \, e^{\left (e^{4}\right )}\right )}}{x^{2} e^{\left (2 \, x\right )} + 4 \, x^{2} e^{x} + 4 \, x^{2}} - \frac {1}{e^{\left (2 \, x\right )} + 4 \, e^{x} + 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-4*x^2+2*x+2)*exp(x)-8*x^2+4)*exp(exp(exp(4))+x^2)^2+(-4*x^4+2*x^3)*exp(x)+4*x^3)/(x^3*exp(x)^3+6
*exp(x)^2*x^3+12*exp(x)*x^3+8*x^3),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.24, size = 30, normalized size = 0.94 \begin {gather*} -\frac {{\mathrm {e}}^{2\,{\mathrm {e}}^{{\mathrm {e}}^4}}\,{\mathrm {e}}^{2\,x^2}-2\,x^3}{x^2\,{\left ({\mathrm {e}}^x+2\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(x)*(2*x^3 - 4*x^4) + exp(2*exp(exp(4)) + 2*x^2)*(exp(x)*(2*x - 4*x^2 + 2) - 8*x^2 + 4) + 4*x^3)/(12*x
^3*exp(x) + 6*x^3*exp(2*x) + x^3*exp(3*x) + 8*x^3),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.24, size = 49, normalized size = 1.53 \begin {gather*} \frac {2 x}{e^{2 x} + 4 e^{x} + 4} - \frac {e^{2 x^{2} + 2 e^{e^{4}}}}{x^{2} e^{2 x} + 4 x^{2} e^{x} + 4 x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-4*x**2+2*x+2)*exp(x)-8*x**2+4)*exp(exp(exp(4))+x**2)**2+(-4*x**4+2*x**3)*exp(x)+4*x**3)/(x**3*ex
p(x)**3+6*exp(x)**2*x**3+12*exp(x)*x**3+8*x**3),x)

[Out]

2*x/(exp(2*x) + 4*exp(x) + 4) - exp(2*x**2 + 2*exp(exp(4)))/(x**2*exp(2*x) + 4*x**2*exp(x) + 4*x**2)

________________________________________________________________________________________