### 3.638 $$\int (\text{sech}(x)-i \tanh (x)) \, dx$$

Optimal. Leaf size=11 $\tan ^{-1}(\sinh (x))-i \log (\cosh (x))$

[Out]

ArcTan[Sinh[x]] - I*Log[Cosh[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.008347, antiderivative size = 11, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 9, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.222, Rules used = {3770, 3475} $\tan ^{-1}(\sinh (x))-i \log (\cosh (x))$

Antiderivative was successfully veriﬁed.

[In]

Int[Sech[x] - I*Tanh[x],x]

[Out]

ArcTan[Sinh[x]] - I*Log[Cosh[x]]

Rule 3770

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

Rule 3475

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

Rubi steps

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

Mathematica [A]  time = 0.0040074, size = 17, normalized size = 1.55 $2 \tan ^{-1}\left (\tanh \left (\frac{x}{2}\right )\right )-i \log (\cosh (x))$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Sech[x] - I*Tanh[x],x]

[Out]

2*ArcTan[Tanh[x/2]] - I*Log[Cosh[x]]

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 11, normalized size = 1. \begin{align*} \arctan \left ( \sinh \left ( x \right ) \right ) -i\ln \left ( \cosh \left ( x \right ) \right ) \end{align*}

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

[In]

int(sech(x)-I*tanh(x),x)

[Out]

arctan(sinh(x))-I*ln(cosh(x))

________________________________________________________________________________________

Maxima [A]  time = 0.990642, size = 12, normalized size = 1.09 \begin{align*} \arctan \left (\sinh \left (x\right )\right ) - i \, \log \left (\cosh \left (x\right )\right ) \end{align*}

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

[In]

integrate(sech(x)-I*tanh(x),x, algorithm="maxima")

[Out]

arctan(sinh(x)) - I*log(cosh(x))

________________________________________________________________________________________

Fricas [A]  time = 2.08936, size = 32, normalized size = 2.91 \begin{align*} i \, x - 2 i \, \log \left (e^{x} - i\right ) \end{align*}

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

[In]

integrate(sech(x)-I*tanh(x),x, algorithm="fricas")

[Out]

I*x - 2*I*log(e^x - I)

________________________________________________________________________________________

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

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

[In]

integrate(sech(x)-I*tanh(x),x)

[Out]

Integral(-I*tanh(x) + sech(x), x)

________________________________________________________________________________________

Giac [A]  time = 1.13755, size = 24, normalized size = 2.18 \begin{align*} i \, x + 2 \, \arctan \left (e^{x}\right ) - i \, \log \left (e^{\left (2 \, x\right )} + 1\right ) \end{align*}

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

[In]

integrate(sech(x)-I*tanh(x),x, algorithm="giac")

[Out]

I*x + 2*arctan(e^x) - I*log(e^(2*x) + 1)