### 3.1002 $$\int \text{sech}^2(x) \sqrt{1+\tanh ^2(x)} \, dx$$

Optimal. Leaf size=24 $\frac{1}{2} \tanh (x) \sqrt{\tanh ^2(x)+1}+\frac{1}{2} \sinh ^{-1}(\tanh (x))$

[Out]

ArcSinh[Tanh[x]]/2 + (Tanh[x]*Sqrt[1 + Tanh[x]^2])/2

________________________________________________________________________________________

Rubi [A]  time = 0.0433874, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 15, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.2, Rules used = {3675, 195, 215} $\frac{1}{2} \tanh (x) \sqrt{\tanh ^2(x)+1}+\frac{1}{2} \sinh ^{-1}(\tanh (x))$

Antiderivative was successfully veriﬁed.

[In]

Int[Sech[x]^2*Sqrt[1 + Tanh[x]^2],x]

[Out]

ArcSinh[Tanh[x]]/2 + (Tanh[x]*Sqrt[1 + Tanh[x]^2])/2

Rule 3675

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/(c^(m - 1)*f), Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)
^n)^p, x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rule 195

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(x*(a + b*x^n)^p)/(n*p + 1), x] + Dist[(a*n*p)/(n*p + 1),
Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 215

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

Rubi steps

\begin{align*} \int \text{sech}^2(x) \sqrt{1+\tanh ^2(x)} \, dx &=\operatorname{Subst}\left (\int \sqrt{1+x^2} \, dx,x,\tanh (x)\right )\\ &=\frac{1}{2} \tanh (x) \sqrt{1+\tanh ^2(x)}+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{\sqrt{1+x^2}} \, dx,x,\tanh (x)\right )\\ &=\frac{1}{2} \sinh ^{-1}(\tanh (x))+\frac{1}{2} \tanh (x) \sqrt{1+\tanh ^2(x)}\\ \end{align*}

Mathematica [B]  time = 0.0917873, size = 55, normalized size = 2.29 $\frac{1}{4} \sqrt{\tanh ^2(x)+1} \text{sech}(x) \text{sech}(2 x) \left (-\sinh (x)+\sinh (3 x)+2 \sqrt{\cosh (2 x)} \cosh ^2(x) \tanh ^{-1}\left (\frac{\sinh (x)}{\sqrt{\cosh (2 x)}}\right )\right )$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Sech[x]^2*Sqrt[1 + Tanh[x]^2],x]

[Out]

(Sech[x]*Sech[2*x]*(2*ArcTanh[Sinh[x]/Sqrt[Cosh[2*x]]]*Cosh[x]^2*Sqrt[Cosh[2*x]] - Sinh[x] + Sinh[3*x])*Sqrt[1
+ Tanh[x]^2])/4

________________________________________________________________________________________

Maple [F]  time = 0.142, size = 0, normalized size = 0. \begin{align*} \int \left ({\rm sech} \left (x\right ) \right ) ^{2}\sqrt{1+ \left ( \tanh \left ( x \right ) \right ) ^{2}}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(sech(x)^2*(1+tanh(x)^2)^(1/2),x)

[Out]

int(sech(x)^2*(1+tanh(x)^2)^(1/2),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\tanh \left (x\right )^{2} + 1} \operatorname{sech}\left (x\right )^{2}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^2*(1+tanh(x)^2)^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(tanh(x)^2 + 1)*sech(x)^2, x)

________________________________________________________________________________________

Fricas [B]  time = 2.08352, size = 1181, normalized size = 49.21 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^2*(1+tanh(x)^2)^(1/2),x, algorithm="fricas")

[Out]

1/4*((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)*log((cosh(x)^2 + 2*cosh(x)*sinh(x) + sinh(x)^2 + 2*sqrt((cosh(x)^2 + sinh(x)^2)/(cosh
(x)^2 - 2*cosh(x)*sinh(x) + sinh(x)^2)) - 1)/(cosh(x)^2 + 2*cosh(x)*sinh(x) + sinh(x)^2)) - (cosh(x)^4 + 4*cos
h(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
)*log((cosh(x)^2 + 2*cosh(x)*sinh(x) + sinh(x)^2 - 2*sqrt((cosh(x)^2 + sinh(x)^2)/(cosh(x)^2 - 2*cosh(x)*sinh(
x) + sinh(x)^2)) - 1)/(cosh(x)^2 + 2*cosh(x)*sinh(x) + sinh(x)^2)) + 4*(cosh(x)^2 + 2*cosh(x)*sinh(x) + sinh(x
)^2 - 1)*sqrt((cosh(x)^2 + sinh(x)^2)/(cosh(x)^2 - 2*cosh(x)*sinh(x) + sinh(x)^2)))/(cosh(x)^4 + 4*cosh(x)*sin
h(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)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\tanh ^{2}{\left (x \right )} + 1} \operatorname{sech}^{2}{\left (x \right )}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)**2*(1+tanh(x)**2)**(1/2),x)

[Out]

Integral(sqrt(tanh(x)**2 + 1)*sech(x)**2, x)

________________________________________________________________________________________

Giac [B]  time = 1.18325, size = 196, normalized size = 8.17 \begin{align*} \frac{1}{4} \, \sqrt{2}{\left (\sqrt{2} \log \left (\frac{\sqrt{2} - \sqrt{e^{\left (4 \, x\right )} + 1} + e^{\left (2 \, x\right )} + 1}{\sqrt{2} + \sqrt{e^{\left (4 \, x\right )} + 1} - e^{\left (2 \, x\right )} - 1}\right ) - \frac{4 \,{\left (3 \,{\left (\sqrt{e^{\left (4 \, x\right )} + 1} - e^{\left (2 \, x\right )}\right )}^{3} -{\left (\sqrt{e^{\left (4 \, x\right )} + 1} - e^{\left (2 \, x\right )}\right )}^{2} - \sqrt{e^{\left (4 \, x\right )} + 1} + e^{\left (2 \, x\right )} - 1\right )}}{{\left ({\left (\sqrt{e^{\left (4 \, x\right )} + 1} - e^{\left (2 \, x\right )}\right )}^{2} - 2 \, \sqrt{e^{\left (4 \, x\right )} + 1} + 2 \, e^{\left (2 \, x\right )} - 1\right )}^{2}}\right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^2*(1+tanh(x)^2)^(1/2),x, algorithm="giac")

[Out]

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