### 3.996 $$\int (1+\cosh ^2(x)) \text{sech}^2(x) \, dx$$

Optimal. Leaf size=4 $x+\tanh (x)$

[Out]

x + Tanh[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0196341, antiderivative size = 4, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 11, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.182, Rules used = {3012, 8} $x+\tanh (x)$

Antiderivative was successfully veriﬁed.

[In]

Int[(1 + Cosh[x]^2)*Sech[x]^2,x]

[Out]

x + Tanh[x]

Rule 3012

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*Cos[e
+ f*x]*(b*Sin[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Dist[(A*(m + 2) + C*(m + 1))/(b^2*(m + 1)), Int[(b*Sin[e
+ f*x])^(m + 2), x], x] /; FreeQ[{b, e, f, A, C}, x] && LtQ[m, -1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \left (1+\cosh ^2(x)\right ) \text{sech}^2(x) \, dx &=\tanh (x)+\int 1 \, dx\\ &=x+\tanh (x)\\ \end{align*}

Mathematica [A]  time = 0.0022229, size = 4, normalized size = 1. $x+\tanh (x)$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(1 + Cosh[x]^2)*Sech[x]^2,x]

[Out]

x + Tanh[x]

________________________________________________________________________________________

Maple [A]  time = 0.014, size = 5, normalized size = 1.3 \begin{align*} x+\tanh \left ( x \right ) \end{align*}

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

[In]

int((1+cosh(x)^2)*sech(x)^2,x)

[Out]

x+tanh(x)

________________________________________________________________________________________

Maxima [B]  time = 1.0527, size = 16, normalized size = 4. \begin{align*} x + \frac{2}{e^{\left (-2 \, x\right )} + 1} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.17168, size = 50, normalized size = 12.5 \begin{align*} \frac{{\left (x - 1\right )} \cosh \left (x\right ) + \sinh \left (x\right )}{\cosh \left (x\right )} \end{align*}

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

[In]

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

[Out]

((x - 1)*cosh(x) + sinh(x))/cosh(x)

________________________________________________________________________________________

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

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

[In]

integrate((1+cosh(x)**2)*sech(x)**2,x)

[Out]

Integral((cosh(x)**2 + 1)*sech(x)**2, x)

________________________________________________________________________________________

Giac [B]  time = 1.15911, size = 16, normalized size = 4. \begin{align*} x - \frac{2}{e^{\left (2 \, x\right )} + 1} \end{align*}

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

[In]

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

[Out]

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