3.628 \(\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*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 = {3770, 3475} \[ \tan ^{-1}(\sinh (x))+i \log (\cosh (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 3475

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

Rule 3770

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.00, size = 17, normalized size = 1.55 \[ 2 \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )+i \log (\cosh (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 11, normalized size = 1.00 \[ -i \, x + 2 i \, \log \left (e^{x} + i\right ) \]

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)

________________________________________________________________________________________

giac [A]  time = 0.14, size = 18, normalized size = 1.64 \[ -i \, x + 2 \, \arctan \left (e^{x}\right ) + i \, \log \left (e^{\left (2 \, x\right )} + 1\right ) \]

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)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 11, normalized size = 1.00 \[ \arctan \left (\sinh \relax (x )\right )+i \ln \left (\cosh \relax (x )\right ) \]

Verification 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.31, size = 9, normalized size = 0.82 \[ \arctan \left (\sinh \relax (x)\right ) + i \, \log \left (\cosh \relax (x)\right ) \]

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

________________________________________________________________________________________

mupad [B]  time = 1.59, size = 14, normalized size = 1.27 \[ -x\,1{}\mathrm {i}+\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,2{}\mathrm {i} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (i \tanh {\relax (x )} + \operatorname {sech}{\relax (x )}\right )\, dx \]

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)

________________________________________________________________________________________