Optimal. Leaf size=27 \[ \frac{A \cosh (x)}{1+i \sinh (x)}-B \log (-\sinh (x)+i) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0865139, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {4401, 2648, 2667, 31} \[ \frac{A \cosh (x)}{1+i \sinh (x)}-B \log (-\sinh (x)+i) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4401
Rule 2648
Rule 2667
Rule 31
Rubi steps
\begin{align*} \int \frac{A+B \cosh (x)}{i-\sinh (x)} \, dx &=\int \left (-\frac{i A}{1+i \sinh (x)}-\frac{i B \cosh (x)}{1+i \sinh (x)}\right ) \, dx\\ &=-\left ((i A) \int \frac{1}{1+i \sinh (x)} \, dx\right )-(i B) \int \frac{\cosh (x)}{1+i \sinh (x)} \, dx\\ &=\frac{A \cosh (x)}{1+i \sinh (x)}-B \operatorname{Subst}\left (\int \frac{1}{1+x} \, dx,x,i \sinh (x)\right )\\ &=-B \log (i-\sinh (x))+\frac{A \cosh (x)}{1+i \sinh (x)}\\ \end{align*}
Mathematica [B] time = 0.0881459, size = 81, normalized size = 3. \[ -\frac{\left (\cosh \left (\frac{x}{2}\right )+i \sinh \left (\frac{x}{2}\right )\right ) \left (\sinh \left (\frac{x}{2}\right ) \left (2 A+2 i B \tan ^{-1}\left (\tanh \left (\frac{x}{2}\right )\right )+B \log (\cosh (x))\right )+B \cosh \left (\frac{x}{2}\right ) \left (2 \tan ^{-1}\left (\tanh \left (\frac{x}{2}\right )\right )-i \log (\cosh (x))\right )\right )}{\sinh (x)-i} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.037, size = 44, normalized size = 1.6 \begin{align*} B\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) -{2\,iA \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-1}}-2\,B\ln \left ( \tanh \left ( x/2 \right ) -i \right ) +B\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.05507, size = 27, normalized size = 1. \begin{align*} -B \log \left (\sinh \left (x\right ) - i\right ) + \frac{2 \, A}{e^{\left (-x\right )} + i} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.08174, size = 89, normalized size = 3.3 \begin{align*} \frac{B x e^{x} - i \, B x - 2 \,{\left (B e^{x} - i \, B\right )} \log \left (e^{x} - i\right ) + 2 \, A}{e^{x} - i} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.366195, size = 20, normalized size = 0.74 \begin{align*} \frac{2 A}{e^{x} - i} + B x - 2 B \log{\left (e^{x} - i \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14116, size = 28, normalized size = 1.04 \begin{align*} B x - 2 \, B \log \left (e^{x} - i\right ) + \frac{2 \, A}{e^{x} - i} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]