Optimal. Leaf size=25 \[ B \log (\sinh (x)+i)-\frac {A \cosh (x)}{1-i \sinh (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {4401, 2648, 2667, 31} \[ B \log (\sinh (x)+i)-\frac {A \cosh (x)}{1-i \sinh (x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2648
Rule 2667
Rule 4401
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\\ &=(i A) \int \frac {1}{-1+i \sinh (x)} \, dx+(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 [A] time = 0.07, size = 48, normalized size = 1.92 \[ -\frac {2 i A \sinh \left (\frac {x}{2}\right )}{\cosh \left (\frac {x}{2}\right )-i \sinh \left (\frac {x}{2}\right )}-2 i B \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )+B \log (\cosh (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 2.00, size = 37, normalized size = 1.48 \[ -\frac {B x e^{x} + i \, B x - {\left (2 \, B e^{x} + 2 i \, B\right )} \log \left (e^{x} + i\right ) + 2 \, A}{e^{x} + i} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.24, size = 22, normalized size = 0.88 \[ -B x + 2 \, B \log \left (e^{x} + i\right ) - \frac {2 \, A}{e^{x} + i} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 46, normalized size = 1.84 \[ -B \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-B \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )+2 B \ln \left (\tanh \left (\frac {x}{2}\right )+i\right )-\frac {2 i A}{\tanh \left (\frac {x}{2}\right )+i} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.36, size = 19, normalized size = 0.76 \[ B \log \left (\sinh \relax (x) + i\right ) - \frac {2 \, A}{e^{\left (-x\right )} - i} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.14, size = 24, normalized size = 0.96 \[ -B\,x-\frac {2\,A}{{\mathrm {e}}^x+1{}\mathrm {i}}+2\,B\,\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.17, size = 24, normalized size = 0.96 \[ \frac {2 A}{- e^{x} - i} + 3 B x - 2 B \log {\left (e^{x} + i \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________