3.7.80 \(\int (-\cosh (x)+\text {sech}(x)) \, dx\) [680]

Optimal. Leaf size=8 \[ \text {ArcTan}(\sinh (x))-\sinh (x) \]

[Out]

arctan(sinh(x))-sinh(x)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 8, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2717, 3855} \begin {gather*} \text {ArcTan}(\sinh (x))-\sinh (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[-Cosh[x] + Sech[x],x]

[Out]

ArcTan[Sinh[x]] - Sinh[x]

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3855

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

Rubi steps

\begin {align*} \int (-\cosh (x)+\text {sech}(x)) \, dx &=-\int \cosh (x) \, dx+\int \text {sech}(x) \, dx\\ &=\tan ^{-1}(\sinh (x))-\sinh (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 14, normalized size = 1.75 \begin {gather*} 2 \text {ArcTan}\left (\tanh \left (\frac {x}{2}\right )\right )-\sinh (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[-Cosh[x] + Sech[x],x]

[Out]

2*ArcTan[Tanh[x/2]] - Sinh[x]

________________________________________________________________________________________

Maple [A]
time = 0.40, size = 9, normalized size = 1.12

method result size
default \(\arctan \left (\sinh \left (x \right )\right )-\sinh \left (x \right )\) \(9\)
risch \(-\frac {{\mathrm e}^{x}}{2}+\frac {{\mathrm e}^{-x}}{2}+i \ln \left ({\mathrm e}^{x}+i\right )-i \ln \left ({\mathrm e}^{x}-i\right )\) \(30\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-cosh(x)+sech(x),x,method=_RETURNVERBOSE)

[Out]

arctan(sinh(x))-sinh(x)

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 8, normalized size = 1.00 \begin {gather*} \arctan \left (\sinh \left (x\right )\right ) - \sinh \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-cosh(x)+sech(x),x, algorithm="maxima")

[Out]

arctan(sinh(x)) - sinh(x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 42 vs. \(2 (8) = 16\).
time = 0.39, size = 42, normalized size = 5.25 \begin {gather*} \frac {4 \, {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) - \cosh \left (x\right )^{2} - 2 \, \cosh \left (x\right ) \sinh \left (x\right ) - \sinh \left (x\right )^{2} + 1}{2 \, {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-cosh(x)+sech(x),x, algorithm="fricas")

[Out]

1/2*(4*(cosh(x) + sinh(x))*arctan(cosh(x) + sinh(x)) - cosh(x)^2 - 2*cosh(x)*sinh(x) - sinh(x)^2 + 1)/(cosh(x)
 + sinh(x))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (- \cosh {\left (x \right )} + \operatorname {sech}{\left (x \right )}\right )\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-cosh(x)+sech(x),x)

[Out]

Integral(-cosh(x) + sech(x), x)

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 16, normalized size = 2.00 \begin {gather*} 2 \, \arctan \left (e^{x}\right ) + \frac {1}{2} \, e^{\left (-x\right )} - \frac {1}{2} \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-cosh(x)+sech(x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 1.49, size = 16, normalized size = 2.00 \begin {gather*} \frac {{\mathrm {e}}^{-x}}{2}+2\,\mathrm {atan}\left ({\mathrm {e}}^x\right )-\frac {{\mathrm {e}}^x}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/cosh(x) - cosh(x),x)

[Out]

exp(-x)/2 + 2*atan(exp(x)) - exp(x)/2

________________________________________________________________________________________