3.7.38 \(\int (\text {sech}(x)-i \tanh (x)) \, dx\) [638]

Optimal. Leaf size=11 \[ \text {ArcTan}(\sinh (x))-i \log (\cosh (x)) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 11, normalized size of antiderivative = 1.00, 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 = {3855, 3556} \begin {gather*} \text {ArcTan}(\sinh (x))-i \log (\cosh (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], 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 (\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.01, size = 17, normalized size = 1.55 \begin {gather*} 2 \text {ArcTan}\left (\tanh \left (\frac {x}{2}\right )\right )-i \log (\cosh (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.52, size = 11, normalized size = 1.00

method result size
default \(\arctan \left (\sinh \left (x \right )\right )-i \ln \left (\cosh \left (x \right )\right )\) \(11\)
risch \(i \ln \left ({\mathrm e}^{x}+i\right )-i \ln \left ({\mathrm e}^{x}-i\right )+i x -i \ln \left (1+{\mathrm e}^{2 x}\right )\) \(34\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(x)-I*tanh(x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 9, normalized size = 0.82 \begin {gather*} \arctan \left (\sinh \left (x\right )\right ) - i \, \log \left (\cosh \left (x\right )\right ) \end {gather*}

Verification 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 = 0.39, size = 11, normalized size = 1.00 \begin {gather*} i \, x - 2 i \, \log \left (e^{x} - i\right ) \end {gather*}

Verification 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.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (- i \tanh {\left (x \right )} + \operatorname {sech}{\left (x \right )}\right )\, dx \end {gather*}

Verification 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 = 0.42, size = 18, normalized size = 1.64 \begin {gather*} i \, x + 2 \, \arctan \left (e^{x}\right ) - i \, \log \left (e^{\left (2 \, x\right )} + 1\right ) \end {gather*}

Verification 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)

________________________________________________________________________________________

Mupad [B]
time = 1.47, size = 14, normalized size = 1.27 \begin {gather*} x\,1{}\mathrm {i}-\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,2{}\mathrm {i} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/cosh(x) - tanh(x)*1i,x)

[Out]

x*1i - log(exp(x) - 1i)*2i

________________________________________________________________________________________