\(\int \frac {8 x^2-16 x^4+e^{16+2 x} (-8 x+8 x^2-16 x^4)+e^{32+4 x} (2 x^2-4 x^4)+(-8+16 x^2+e^{32+4 x} (-2+4 x^2)+e^{16+2 x} (-8+16 x^2)) \log (5 x)}{4 x+4 e^{16+2 x} x+e^{32+4 x} x} \, dx\) [8271]

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

Optimal result

Integrand size = 120, antiderivative size = 28 \[ \int \frac {8 x^2-16 x^4+e^{16+2 x} \left (-8 x+8 x^2-16 x^4\right )+e^{32+4 x} \left (2 x^2-4 x^4\right )+\left (-8+16 x^2+e^{32+4 x} \left (-2+4 x^2\right )+e^{16+2 x} \left (-8+16 x^2\right )\right ) \log (5 x)}{4 x+4 e^{16+2 x} x+e^{32+4 x} x} \, dx=\frac {4}{2+e^{16+2 x}}-\left (-x^2+\log (5 x)\right )^2 \]

[Out]

4/(exp(4)^4*exp(x)^2+2)-(ln(5*x)-x^2)^2

Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.29, number of steps used = 17, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.092, Rules used = {6820, 6874, 2320, 46, 36, 29, 31, 14, 2393, 2338, 2341} \[ \int \frac {8 x^2-16 x^4+e^{16+2 x} \left (-8 x+8 x^2-16 x^4\right )+e^{32+4 x} \left (2 x^2-4 x^4\right )+\left (-8+16 x^2+e^{32+4 x} \left (-2+4 x^2\right )+e^{16+2 x} \left (-8+16 x^2\right )\right ) \log (5 x)}{4 x+4 e^{16+2 x} x+e^{32+4 x} x} \, dx=-x^4+2 x^2 \log (5 x)+\frac {4}{e^{2 x+16}+2}-\log ^2(5 x) \]

[In]

Int[(8*x^2 - 16*x^4 + E^(16 + 2*x)*(-8*x + 8*x^2 - 16*x^4) + E^(32 + 4*x)*(2*x^2 - 4*x^4) + (-8 + 16*x^2 + E^(
32 + 4*x)*(-2 + 4*x^2) + E^(16 + 2*x)*(-8 + 16*x^2))*Log[5*x])/(4*x + 4*E^(16 + 2*x)*x + E^(32 + 4*x)*x),x]

[Out]

4/(2 + E^(16 + 2*x)) - x^4 + 2*x^2*Log[5*x] - Log[5*x]^2

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

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 46

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] && Lt
Q[m + n + 2, 0])

Rule 2320

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 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2393

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 6820

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

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {2 \left (-4 x+8 x^3+e^{4 (8+x)} x \left (-1+2 x^2\right )+e^{2 (8+x)} \left (4-4 x+8 x^3\right )\right )}{\left (2+e^{2 (8+x)}\right )^2}+\frac {2 \left (-1+2 x^2\right ) \log (5 x)}{x}\right ) \, dx \\ & = -\left (2 \int \frac {-4 x+8 x^3+e^{4 (8+x)} x \left (-1+2 x^2\right )+e^{2 (8+x)} \left (4-4 x+8 x^3\right )}{\left (2+e^{2 (8+x)}\right )^2} \, dx\right )+2 \int \frac {\left (-1+2 x^2\right ) \log (5 x)}{x} \, dx \\ & = -\left (2 \int \left (-\frac {8}{\left (2+e^{16+2 x}\right )^2}+\frac {4}{2+e^{16+2 x}}+x \left (-1+2 x^2\right )\right ) \, dx\right )+2 \int \left (-\frac {\log (5 x)}{x}+2 x \log (5 x)\right ) \, dx \\ & = -\left (2 \int x \left (-1+2 x^2\right ) \, dx\right )-2 \int \frac {\log (5 x)}{x} \, dx+4 \int x \log (5 x) \, dx-8 \int \frac {1}{2+e^{16+2 x}} \, dx+16 \int \frac {1}{\left (2+e^{16+2 x}\right )^2} \, dx \\ & = -x^2+2 x^2 \log (5 x)-\log ^2(5 x)-2 \int \left (-x+2 x^3\right ) \, dx-4 \text {Subst}\left (\int \frac {1}{x (2+x)} \, dx,x,e^{16+2 x}\right )+8 \text {Subst}\left (\int \frac {1}{x (2+x)^2} \, dx,x,e^{16+2 x}\right ) \\ & = -x^4+2 x^2 \log (5 x)-\log ^2(5 x)-2 \text {Subst}\left (\int \frac {1}{x} \, dx,x,e^{16+2 x}\right )+2 \text {Subst}\left (\int \frac {1}{2+x} \, dx,x,e^{16+2 x}\right )+8 \text {Subst}\left (\int \left (\frac {1}{4 x}-\frac {1}{2 (2+x)^2}-\frac {1}{4 (2+x)}\right ) \, dx,x,e^{16+2 x}\right ) \\ & = \frac {4}{2+e^{16+2 x}}-x^4+2 x^2 \log (5 x)-\log ^2(5 x) \\ \end{align*}

Mathematica [A] (verified)

Time = 1.24 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.29 \[ \int \frac {8 x^2-16 x^4+e^{16+2 x} \left (-8 x+8 x^2-16 x^4\right )+e^{32+4 x} \left (2 x^2-4 x^4\right )+\left (-8+16 x^2+e^{32+4 x} \left (-2+4 x^2\right )+e^{16+2 x} \left (-8+16 x^2\right )\right ) \log (5 x)}{4 x+4 e^{16+2 x} x+e^{32+4 x} x} \, dx=\frac {4}{2+e^{2 (8+x)}}-x^4+2 x^2 \log (5 x)-\log ^2(5 x) \]

[In]

Integrate[(8*x^2 - 16*x^4 + E^(16 + 2*x)*(-8*x + 8*x^2 - 16*x^4) + E^(32 + 4*x)*(2*x^2 - 4*x^4) + (-8 + 16*x^2
 + E^(32 + 4*x)*(-2 + 4*x^2) + E^(16 + 2*x)*(-8 + 16*x^2))*Log[5*x])/(4*x + 4*E^(16 + 2*x)*x + E^(32 + 4*x)*x)
,x]

[Out]

4/(2 + E^(2*(8 + x))) - x^4 + 2*x^2*Log[5*x] - Log[5*x]^2

Maple [A] (verified)

Time = 1.45 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.71

method result size
risch \(-\ln \left (5 x \right )^{2}+2 x^{2} \ln \left (5 x \right )-\frac {{\mathrm e}^{2 x +16} x^{4}+2 x^{4}-4}{{\mathrm e}^{2 x +16}+2}\) \(48\)
parallelrisch \(\frac {-2 \,{\mathrm e}^{16} {\mathrm e}^{2 x} x^{4}+4 \,{\mathrm e}^{16} {\mathrm e}^{2 x} \ln \left (5 x \right ) x^{2}-2 \,{\mathrm e}^{16} \ln \left (5 x \right )^{2} {\mathrm e}^{2 x}-4 \,{\mathrm e}^{2 x} {\mathrm e}^{16}-4 x^{4}+8 x^{2} \ln \left (5 x \right )-4 \ln \left (5 x \right )^{2}}{2 \,{\mathrm e}^{2 x} {\mathrm e}^{16}+4}\) \(95\)

[In]

int((((4*x^2-2)*exp(4)^8*exp(x)^4+(16*x^2-8)*exp(4)^4*exp(x)^2+16*x^2-8)*ln(5*x)+(-4*x^4+2*x^2)*exp(4)^8*exp(x
)^4+(-16*x^4+8*x^2-8*x)*exp(4)^4*exp(x)^2-16*x^4+8*x^2)/(x*exp(4)^8*exp(x)^4+4*x*exp(4)^4*exp(x)^2+4*x),x,meth
od=_RETURNVERBOSE)

[Out]

-ln(5*x)^2+2*x^2*ln(5*x)-(exp(2*x+16)*x^4+2*x^4-4)/(exp(2*x+16)+2)

Fricas [B] (verification not implemented)

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

Time = 0.24 (sec) , antiderivative size = 66, normalized size of antiderivative = 2.36 \[ \int \frac {8 x^2-16 x^4+e^{16+2 x} \left (-8 x+8 x^2-16 x^4\right )+e^{32+4 x} \left (2 x^2-4 x^4\right )+\left (-8+16 x^2+e^{32+4 x} \left (-2+4 x^2\right )+e^{16+2 x} \left (-8+16 x^2\right )\right ) \log (5 x)}{4 x+4 e^{16+2 x} x+e^{32+4 x} x} \, dx=-\frac {x^{4} e^{\left (2 \, x + 16\right )} + 2 \, x^{4} + {\left (e^{\left (2 \, x + 16\right )} + 2\right )} \log \left (5 \, x\right )^{2} - 2 \, {\left (x^{2} e^{\left (2 \, x + 16\right )} + 2 \, x^{2}\right )} \log \left (5 \, x\right ) - 4}{e^{\left (2 \, x + 16\right )} + 2} \]

[In]

integrate((((4*x^2-2)*exp(4)^8*exp(x)^4+(16*x^2-8)*exp(4)^4*exp(x)^2+16*x^2-8)*log(5*x)+(-4*x^4+2*x^2)*exp(4)^
8*exp(x)^4+(-16*x^4+8*x^2-8*x)*exp(4)^4*exp(x)^2-16*x^4+8*x^2)/(x*exp(4)^8*exp(x)^4+4*x*exp(4)^4*exp(x)^2+4*x)
,x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.11 \[ \int \frac {8 x^2-16 x^4+e^{16+2 x} \left (-8 x+8 x^2-16 x^4\right )+e^{32+4 x} \left (2 x^2-4 x^4\right )+\left (-8+16 x^2+e^{32+4 x} \left (-2+4 x^2\right )+e^{16+2 x} \left (-8+16 x^2\right )\right ) \log (5 x)}{4 x+4 e^{16+2 x} x+e^{32+4 x} x} \, dx=- x^{4} + 2 x^{2} \log {\left (5 x \right )} - \log {\left (5 x \right )}^{2} + \frac {4}{e^{16} e^{2 x} + 2} \]

[In]

integrate((((4*x**2-2)*exp(4)**8*exp(x)**4+(16*x**2-8)*exp(4)**4*exp(x)**2+16*x**2-8)*ln(5*x)+(-4*x**4+2*x**2)
*exp(4)**8*exp(x)**4+(-16*x**4+8*x**2-8*x)*exp(4)**4*exp(x)**2-16*x**4+8*x**2)/(x*exp(4)**8*exp(x)**4+4*x*exp(
4)**4*exp(x)**2+4*x),x)

[Out]

-x**4 + 2*x**2*log(5*x) - log(5*x)**2 + 4/(exp(16)*exp(2*x) + 2)

Maxima [B] (verification not implemented)

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

Time = 0.30 (sec) , antiderivative size = 89, normalized size of antiderivative = 3.18 \[ \int \frac {8 x^2-16 x^4+e^{16+2 x} \left (-8 x+8 x^2-16 x^4\right )+e^{32+4 x} \left (2 x^2-4 x^4\right )+\left (-8+16 x^2+e^{32+4 x} \left (-2+4 x^2\right )+e^{16+2 x} \left (-8+16 x^2\right )\right ) \log (5 x)}{4 x+4 e^{16+2 x} x+e^{32+4 x} x} \, dx=-\frac {2 \, x^{4} - 4 \, x^{2} \log \left (5\right ) + {\left (x^{4} e^{16} - 2 \, x^{2} e^{16} \log \left (5\right ) + e^{16} \log \left (x\right )^{2} - 2 \, {\left (x^{2} e^{16} - e^{16} \log \left (5\right )\right )} \log \left (x\right )\right )} e^{\left (2 \, x\right )} - 4 \, {\left (x^{2} - \log \left (5\right )\right )} \log \left (x\right ) + 2 \, \log \left (x\right )^{2} - 4}{e^{\left (2 \, x + 16\right )} + 2} \]

[In]

integrate((((4*x^2-2)*exp(4)^8*exp(x)^4+(16*x^2-8)*exp(4)^4*exp(x)^2+16*x^2-8)*log(5*x)+(-4*x^4+2*x^2)*exp(4)^
8*exp(x)^4+(-16*x^4+8*x^2-8*x)*exp(4)^4*exp(x)^2-16*x^4+8*x^2)/(x*exp(4)^8*exp(x)^4+4*x*exp(4)^4*exp(x)^2+4*x)
,x, algorithm="maxima")

[Out]

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

Giac [B] (verification not implemented)

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

Time = 0.30 (sec) , antiderivative size = 104, normalized size of antiderivative = 3.71 \[ \int \frac {8 x^2-16 x^4+e^{16+2 x} \left (-8 x+8 x^2-16 x^4\right )+e^{32+4 x} \left (2 x^2-4 x^4\right )+\left (-8+16 x^2+e^{32+4 x} \left (-2+4 x^2\right )+e^{16+2 x} \left (-8+16 x^2\right )\right ) \log (5 x)}{4 x+4 e^{16+2 x} x+e^{32+4 x} x} \, dx=-\frac {x^{4} e^{\left (2 \, x + 16\right )} + 2 \, x^{4} - 2 \, x^{2} e^{\left (2 \, x + 16\right )} \log \left (5\right ) - 2 \, x^{2} e^{\left (2 \, x + 16\right )} \log \left (x\right ) - 4 \, x^{2} \log \left (5\right ) - 4 \, x^{2} \log \left (x\right ) + 2 \, e^{\left (2 \, x + 16\right )} \log \left (5\right ) \log \left (x\right ) + e^{\left (2 \, x + 16\right )} \log \left (x\right )^{2} + 4 \, \log \left (5\right ) \log \left (x\right ) + 2 \, \log \left (x\right )^{2} - 4}{e^{\left (2 \, x + 16\right )} + 2} \]

[In]

integrate((((4*x^2-2)*exp(4)^8*exp(x)^4+(16*x^2-8)*exp(4)^4*exp(x)^2+16*x^2-8)*log(5*x)+(-4*x^4+2*x^2)*exp(4)^
8*exp(x)^4+(-16*x^4+8*x^2-8*x)*exp(4)^4*exp(x)^2-16*x^4+8*x^2)/(x*exp(4)^8*exp(x)^4+4*x*exp(4)^4*exp(x)^2+4*x)
,x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 12.86 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.36 \[ \int \frac {8 x^2-16 x^4+e^{16+2 x} \left (-8 x+8 x^2-16 x^4\right )+e^{32+4 x} \left (2 x^2-4 x^4\right )+\left (-8+16 x^2+e^{32+4 x} \left (-2+4 x^2\right )+e^{16+2 x} \left (-8+16 x^2\right )\right ) \log (5 x)}{4 x+4 e^{16+2 x} x+e^{32+4 x} x} \, dx=2\,x^2\,\ln \left (5\,x\right )+\frac {4\,{\mathrm {e}}^{-16}}{{\mathrm {e}}^{2\,x}+2\,{\mathrm {e}}^{-16}}-{\ln \left (5\,x\right )}^2-x^4 \]

[In]

int((log(5*x)*(16*x^2 + exp(2*x)*exp(16)*(16*x^2 - 8) + exp(4*x)*exp(32)*(4*x^2 - 2) - 8) + 8*x^2 - 16*x^4 - e
xp(2*x)*exp(16)*(8*x - 8*x^2 + 16*x^4) + exp(4*x)*exp(32)*(2*x^2 - 4*x^4))/(4*x + 4*x*exp(2*x)*exp(16) + x*exp
(4*x)*exp(32)),x)

[Out]

2*x^2*log(5*x) + (4*exp(-16))/(exp(2*x) + 2*exp(-16)) - log(5*x)^2 - x^4