\(\int x^3 \tanh ^2(a+2 \log (x)) \, dx\) [153]

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

Optimal result

Integrand size = 13, antiderivative size = 47 \[ \int x^3 \tanh ^2(a+2 \log (x)) \, dx=\frac {x^4}{4}-\frac {e^{-2 a}}{1+e^{2 a} x^4}-e^{-2 a} \log \left (1+e^{2 a} x^4\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {5656, 455, 45} \[ \int x^3 \tanh ^2(a+2 \log (x)) \, dx=-\frac {e^{-2 a}}{e^{2 a} x^4+1}-e^{-2 a} \log \left (e^{2 a} x^4+1\right )+\frac {x^4}{4} \]

[In]

Int[x^3*Tanh[a + 2*Log[x]]^2,x]

[Out]

x^4/4 - 1/(E^(2*a)*(1 + E^(2*a)*x^4)) - Log[1 + E^(2*a)*x^4]/E^(2*a)

Rule 45

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, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 455

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && EqQ[m
- n + 1, 0]

Rule 5656

Int[((e_.)*(x_))^(m_.)*Tanh[((a_.) + Log[x_]*(b_.))*(d_.)]^(p_.), x_Symbol] :> Int[(e*x)^m*((-1 + E^(2*a*d)*x^
(2*b*d))^p/(1 + E^(2*a*d)*x^(2*b*d))^p), x] /; FreeQ[{a, b, d, e, m, p}, x]

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

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.83 \[ \int x^3 \tanh ^2(a+2 \log (x)) \, dx=\frac {x^4}{4}-\cosh (2 a) \log \left (\left (1+x^4\right ) \cosh (a)+\left (-1+x^4\right ) \sinh (a)\right )+\log \left (\left (1+x^4\right ) \cosh (a)+\left (-1+x^4\right ) \sinh (a)\right ) \sinh (2 a)+\frac {-\cosh (3 a)+\sinh (3 a)}{\left (1+x^4\right ) \cosh (a)+\left (-1+x^4\right ) \sinh (a)} \]

[In]

Integrate[x^3*Tanh[a + 2*Log[x]]^2,x]

[Out]

x^4/4 - Cosh[2*a]*Log[(1 + x^4)*Cosh[a] + (-1 + x^4)*Sinh[a]] + Log[(1 + x^4)*Cosh[a] + (-1 + x^4)*Sinh[a]]*Si
nh[2*a] + (-Cosh[3*a] + Sinh[3*a])/((1 + x^4)*Cosh[a] + (-1 + x^4)*Sinh[a])

Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.89

method result size
risch \(\frac {x^{4}}{4}-\frac {{\mathrm e}^{-2 a}}{1+{\mathrm e}^{2 a} x^{4}}-{\mathrm e}^{-2 a} \ln \left (1+{\mathrm e}^{2 a} x^{4}\right )\) \(42\)

[In]

int(x^3*tanh(a+2*ln(x))^2,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.23 \[ \int x^3 \tanh ^2(a+2 \log (x)) \, dx=\frac {x^{8} e^{\left (4 \, a\right )} + x^{4} e^{\left (2 \, a\right )} - 4 \, {\left (x^{4} e^{\left (2 \, a\right )} + 1\right )} \log \left (x^{4} e^{\left (2 \, a\right )} + 1\right ) - 4}{4 \, {\left (x^{4} e^{\left (4 \, a\right )} + e^{\left (2 \, a\right )}\right )}} \]

[In]

integrate(x^3*tanh(a+2*log(x))^2,x, algorithm="fricas")

[Out]

1/4*(x^8*e^(4*a) + x^4*e^(2*a) - 4*(x^4*e^(2*a) + 1)*log(x^4*e^(2*a) + 1) - 4)/(x^4*e^(4*a) + e^(2*a))

Sympy [F]

\[ \int x^3 \tanh ^2(a+2 \log (x)) \, dx=\int x^{3} \tanh ^{2}{\left (a + 2 \log {\left (x \right )} \right )}\, dx \]

[In]

integrate(x**3*tanh(a+2*ln(x))**2,x)

[Out]

Integral(x**3*tanh(a + 2*log(x))**2, x)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.85 \[ \int x^3 \tanh ^2(a+2 \log (x)) \, dx=\frac {1}{4} \, x^{4} - e^{\left (-2 \, a\right )} \log \left (x^{4} e^{\left (2 \, a\right )} + 1\right ) - \frac {1}{x^{4} e^{\left (4 \, a\right )} + e^{\left (2 \, a\right )}} \]

[In]

integrate(x^3*tanh(a+2*log(x))^2,x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.83 \[ \int x^3 \tanh ^2(a+2 \log (x)) \, dx=\frac {1}{4} \, x^{4} + \frac {x^{4}}{x^{4} e^{\left (2 \, a\right )} + 1} - e^{\left (-2 \, a\right )} \log \left (x^{4} e^{\left (2 \, a\right )} + 1\right ) \]

[In]

integrate(x^3*tanh(a+2*log(x))^2,x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 1.76 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.83 \[ \int x^3 \tanh ^2(a+2 \log (x)) \, dx=\frac {x^4}{4}-\frac {{\mathrm {e}}^{-2\,a}}{{\mathrm {e}}^{2\,a}\,x^4+1}-{\mathrm {e}}^{-2\,a}\,\ln \left (x^4+{\mathrm {e}}^{-2\,a}\right ) \]

[In]

int(x^3*tanh(a + 2*log(x))^2,x)

[Out]

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