3.732 \(\int \frac{\cosh (x)-i \sinh (x)}{\cosh (x)+i \sinh (x)} \, dx\)

Optimal. Leaf size=14 \[ -i \log (\cosh (x)+i \sinh (x)) \]

[Out]

(-I)*Log[Cosh[x] + I*Sinh[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.0266594, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.048, Rules used = {3133} \[ -i \log (\cosh (x)+i \sinh (x)) \]

Antiderivative was successfully verified.

[In]

Int[(Cosh[x] - I*Sinh[x])/(Cosh[x] + I*Sinh[x]),x]

[Out]

(-I)*Log[Cosh[x] + I*Sinh[x]]

Rule 3133

Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_)]*(
b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[((b*B + c*C)*x)/(b^2 + c^2), x] + Simp[((c*B - b*C)*L
og[a + b*Cos[d + e*x] + c*Sin[d + e*x]])/(e*(b^2 + c^2)), x] /; FreeQ[{a, b, c, d, e, A, B, C}, x] && NeQ[b^2
+ c^2, 0] && EqQ[A*(b^2 + c^2) - a*(b*B + c*C), 0]

Rubi steps

\begin{align*} \int \frac{\cosh (x)-i \sinh (x)}{\cosh (x)+i \sinh (x)} \, dx &=-i \log (\cosh (x)+i \sinh (x))\\ \end{align*}

Mathematica [A]  time = 0.0337679, size = 15, normalized size = 1.07 \[ \tan ^{-1}(\tanh (x))-\frac{1}{2} i \log (\cosh (2 x)) \]

Antiderivative was successfully verified.

[In]

Integrate[(Cosh[x] - I*Sinh[x])/(Cosh[x] + I*Sinh[x]),x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.027, size = 13, normalized size = 0.9 \begin{align*} -i\ln \left ( \cosh \left ( x \right ) +i\sinh \left ( x \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cosh(x)-I*sinh(x))/(cosh(x)+I*sinh(x)),x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.0486, size = 14, normalized size = 1. \begin{align*} -i \, \log \left (\cosh \left (x\right ) + i \, \sinh \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cosh(x)-I*sinh(x))/(cosh(x)+I*sinh(x)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cosh(x)-I*sinh(x))/(cosh(x)+I*sinh(x)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: PolynomialDivisionFailed} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cosh(x)-I*sinh(x))/(cosh(x)+I*sinh(x)),x)

[Out]

Exception raised: PolynomialDivisionFailed

________________________________________________________________________________________

Giac [A]  time = 1.11476, size = 18, normalized size = 1.29 \begin{align*} i \, x - i \, \log \left (e^{\left (2 \, x\right )} - i\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cosh(x)-I*sinh(x))/(cosh(x)+I*sinh(x)),x, algorithm="giac")

[Out]

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