3.105 \(\int \frac {\tanh ^4(x)}{a+a \text {sech}(x)} \, dx\)

Optimal. Leaf size=31 \[ \frac {x}{a}-\frac {\tan ^{-1}(\sinh (x))}{2 a}-\frac {\tanh (x) (2-\text {sech}(x))}{2 a} \]

[Out]

x/a-1/2*arctan(sinh(x))/a-1/2*(2-sech(x))*tanh(x)/a

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3888, 3881, 3770} \[ \frac {x}{a}-\frac {\tan ^{-1}(\sinh (x))}{2 a}-\frac {\tanh (x) (2-\text {sech}(x))}{2 a} \]

Antiderivative was successfully verified.

[In]

Int[Tanh[x]^4/(a + a*Sech[x]),x]

[Out]

x/a - ArcTan[Sinh[x]]/(2*a) - ((2 - Sech[x])*Tanh[x])/(2*a)

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3881

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> -Simp[(e*(e*Cot[
c + d*x])^(m - 1)*(a*m + b*(m - 1)*Csc[c + d*x]))/(d*m*(m - 1)), x] - Dist[e^2/m, Int[(e*Cot[c + d*x])^(m - 2)
*(a*m + b*(m - 1)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[m, 1]

Rule 3888

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Dist[a^(2*n
)/e^(2*n), Int[(e*Cot[c + d*x])^(m + 2*n)/(-a + b*Csc[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && E
qQ[a^2 - b^2, 0] && ILtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {\tanh ^4(x)}{a+a \text {sech}(x)} \, dx &=-\frac {\int (-a+a \text {sech}(x)) \tanh ^2(x) \, dx}{a^2}\\ &=-\frac {(2-\text {sech}(x)) \tanh (x)}{2 a}-\frac {\int (-2 a+a \text {sech}(x)) \, dx}{2 a^2}\\ &=\frac {x}{a}-\frac {(2-\text {sech}(x)) \tanh (x)}{2 a}-\frac {\int \text {sech}(x) \, dx}{2 a}\\ &=\frac {x}{a}-\frac {\tan ^{-1}(\sinh (x))}{2 a}-\frac {(2-\text {sech}(x)) \tanh (x)}{2 a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 41, normalized size = 1.32 \[ \frac {\cosh ^2\left (\frac {x}{2}\right ) \text {sech}(x) \left (2 \left (x-\tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )\right )+\tanh (x) (\text {sech}(x)-2)\right )}{a (\text {sech}(x)+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[Tanh[x]^4/(a + a*Sech[x]),x]

[Out]

(Cosh[x/2]^2*Sech[x]*(2*(x - ArcTan[Tanh[x/2]]) + (-2 + Sech[x])*Tanh[x]))/(a*(1 + Sech[x]))

________________________________________________________________________________________

fricas [B]  time = 0.40, size = 210, normalized size = 6.77 \[ \frac {x \cosh \relax (x)^{4} + x \sinh \relax (x)^{4} + {\left (4 \, x \cosh \relax (x) + 1\right )} \sinh \relax (x)^{3} + 2 \, {\left (x + 1\right )} \cosh \relax (x)^{2} + \cosh \relax (x)^{3} + {\left (6 \, x \cosh \relax (x)^{2} + 2 \, x + 3 \, \cosh \relax (x) + 2\right )} \sinh \relax (x)^{2} - {\left (\cosh \relax (x)^{4} + 4 \, \cosh \relax (x) \sinh \relax (x)^{3} + \sinh \relax (x)^{4} + 2 \, {\left (3 \, \cosh \relax (x)^{2} + 1\right )} \sinh \relax (x)^{2} + 2 \, \cosh \relax (x)^{2} + 4 \, {\left (\cosh \relax (x)^{3} + \cosh \relax (x)\right )} \sinh \relax (x) + 1\right )} \arctan \left (\cosh \relax (x) + \sinh \relax (x)\right ) + {\left (4 \, x \cosh \relax (x)^{3} + 4 \, {\left (x + 1\right )} \cosh \relax (x) + 3 \, \cosh \relax (x)^{2} - 1\right )} \sinh \relax (x) + x - \cosh \relax (x) + 2}{a \cosh \relax (x)^{4} + 4 \, a \cosh \relax (x) \sinh \relax (x)^{3} + a \sinh \relax (x)^{4} + 2 \, a \cosh \relax (x)^{2} + 2 \, {\left (3 \, a \cosh \relax (x)^{2} + a\right )} \sinh \relax (x)^{2} + 4 \, {\left (a \cosh \relax (x)^{3} + a \cosh \relax (x)\right )} \sinh \relax (x) + a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^4/(a+a*sech(x)),x, algorithm="fricas")

[Out]

(x*cosh(x)^4 + x*sinh(x)^4 + (4*x*cosh(x) + 1)*sinh(x)^3 + 2*(x + 1)*cosh(x)^2 + cosh(x)^3 + (6*x*cosh(x)^2 +
2*x + 3*cosh(x) + 2)*sinh(x)^2 - (cosh(x)^4 + 4*cosh(x)*sinh(x)^3 + sinh(x)^4 + 2*(3*cosh(x)^2 + 1)*sinh(x)^2
+ 2*cosh(x)^2 + 4*(cosh(x)^3 + cosh(x))*sinh(x) + 1)*arctan(cosh(x) + sinh(x)) + (4*x*cosh(x)^3 + 4*(x + 1)*co
sh(x) + 3*cosh(x)^2 - 1)*sinh(x) + x - cosh(x) + 2)/(a*cosh(x)^4 + 4*a*cosh(x)*sinh(x)^3 + a*sinh(x)^4 + 2*a*c
osh(x)^2 + 2*(3*a*cosh(x)^2 + a)*sinh(x)^2 + 4*(a*cosh(x)^3 + a*cosh(x))*sinh(x) + a)

________________________________________________________________________________________

giac [A]  time = 0.11, size = 42, normalized size = 1.35 \[ \frac {x}{a} - \frac {\arctan \left (e^{x}\right )}{a} + \frac {e^{\left (3 \, x\right )} + 2 \, e^{\left (2 \, x\right )} - e^{x} + 2}{a {\left (e^{\left (2 \, x\right )} + 1\right )}^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^4/(a+a*sech(x)),x, algorithm="giac")

[Out]

x/a - arctan(e^x)/a + (e^(3*x) + 2*e^(2*x) - e^x + 2)/(a*(e^(2*x) + 1)^2)

________________________________________________________________________________________

maple [B]  time = 0.14, size = 75, normalized size = 2.42 \[ -\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a}-\frac {3 \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}-\frac {\tanh \left (\frac {x}{2}\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}-\frac {\arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)^4/(a+a*sech(x)),x)

[Out]

-1/a*ln(tanh(1/2*x)-1)+1/a*ln(tanh(1/2*x)+1)-3/a/(tanh(1/2*x)^2+1)^2*tanh(1/2*x)^3-1/a/(tanh(1/2*x)^2+1)^2*tan
h(1/2*x)-1/a*arctan(tanh(1/2*x))

________________________________________________________________________________________

maxima [B]  time = 0.51, size = 51, normalized size = 1.65 \[ \frac {x}{a} + \frac {e^{\left (-x\right )} - 2 \, e^{\left (-2 \, x\right )} - e^{\left (-3 \, x\right )} - 2}{2 \, a e^{\left (-2 \, x\right )} + a e^{\left (-4 \, x\right )} + a} + \frac {\arctan \left (e^{\left (-x\right )}\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^4/(a+a*sech(x)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.44, size = 67, normalized size = 2.16 \[ \frac {x}{a}+\frac {\frac {2}{a}+\frac {{\mathrm {e}}^x}{a}}{{\mathrm {e}}^{2\,x}+1}-\frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\sqrt {a^2}}{a}\right )}{\sqrt {a^2}}-\frac {2\,{\mathrm {e}}^x}{a\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)^4/(a + a/cosh(x)),x)

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\tanh ^{4}{\relax (x )}}{\operatorname {sech}{\relax (x )} + 1}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)**4/(a+a*sech(x)),x)

[Out]

Integral(tanh(x)**4/(sech(x) + 1), x)/a

________________________________________________________________________________________