Optimal. Leaf size=25 \[ B \log (i+\sinh (x))-\frac {A \cosh (x)}{1-i \sinh (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, 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 = {4486, 2727,
2746, 31} \begin {gather*} B \log (\sinh (x)+i)-\frac {A \cosh (x)}{1-i \sinh (x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2727
Rule 2746
Rule 4486
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 \text {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.05, size = 48, normalized size = 1.92 \begin {gather*} -2 i B \text {ArcTan}\left (\tanh \left (\frac {x}{2}\right )\right )+B \log (\cosh (x))-\frac {2 i A \sinh \left (\frac {x}{2}\right )}{\cosh \left (\frac {x}{2}\right )-i \sinh \left (\frac {x}{2}\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.59, size = 46, normalized size = 1.84
method | result | size |
risch | \(-B x -\frac {2 A}{{\mathrm e}^{x}+i}+2 B \ln \left ({\mathrm e}^{x}+i\right )\) | \(25\) |
default | \(-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}-B \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )\) | \(46\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 19, normalized size = 0.76 \begin {gather*} B \log \left (\sinh \left (x\right ) + i\right ) - \frac {2 \, A}{e^{\left (-x\right )} - i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 36, normalized size = 1.44 \begin {gather*} -\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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.08, size = 20, normalized size = 0.80 \begin {gather*} - \frac {2 A}{e^{x} + i} - B x + 2 B \log {\left (e^{x} + i \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 22, normalized size = 0.88 \begin {gather*} -B x + 2 \, B \log \left (e^{x} + i\right ) - \frac {2 \, A}{e^{x} + i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.14, size = 24, normalized size = 0.96 \begin {gather*} -B\,x-\frac {2\,A}{{\mathrm {e}}^x+1{}\mathrm {i}}+2\,B\,\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________