Optimal. Leaf size=78 \[ \frac {\left (a^2 (-B)+2 a A b-b^2 B\right ) \log (a-b \sinh (x)+b \cosh (x))}{2 a^2 b}+\frac {x (2 a A-b B)}{2 a^2}+\frac {B \sinh (x)}{2 a}+\frac {B \cosh (x)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {3132} \[ \frac {\left (a^2 (-B)+2 a A b-b^2 B\right ) \log (a-b \sinh (x)+b \cosh (x))}{2 a^2 b}+\frac {x (2 a A-b B)}{2 a^2}+\frac {B \sinh (x)}{2 a}+\frac {B \cosh (x)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3132
Rubi steps
\begin {align*} \int \frac {A+B \cosh (x)}{a+b \cosh (x)-b \sinh (x)} \, dx &=\frac {(2 a A-b B) x}{2 a^2}+\frac {B \cosh (x)}{2 a}+\frac {\left (2 a A b-a^2 B-b^2 B\right ) \log (a+b \cosh (x)-b \sinh (x))}{2 a^2 b}+\frac {B \sinh (x)}{2 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.16, size = 86, normalized size = 1.10 \[ \frac {x \left (a^2 B+2 a A b-b^2 B\right )-2 \left (a^2 B-2 a A b+b^2 B\right ) \log \left ((a-b) \sinh \left (\frac {x}{2}\right )+(a+b) \cosh \left (\frac {x}{2}\right )\right )+2 a b B \sinh (x)+2 a b B \cosh (x)}{4 a^2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 56, normalized size = 0.72 \[ \frac {B a^{2} x + B a b \cosh \relax (x) + B a b \sinh \relax (x) - {\left (B a^{2} - 2 \, A a b + B b^{2}\right )} \log \left (a \cosh \relax (x) + a \sinh \relax (x) + b\right )}{2 \, a^{2} b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 48, normalized size = 0.62 \[ \frac {B x}{2 \, b} + \frac {B e^{x}}{2 \, a} - \frac {{\left (B a^{2} - 2 \, A a b + B b^{2}\right )} \log \left ({\left | a e^{x} + b \right |}\right )}{2 \, a^{2} b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.19, size = 125, normalized size = 1.60 \[ -\frac {B}{a \left (\tanh \left (\frac {x}{2}\right )-1\right )}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right ) A}{a}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right ) B b}{2 a^{2}}+\frac {B \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2 b}+\frac {\ln \left (a \tanh \left (\frac {x}{2}\right )-\tanh \left (\frac {x}{2}\right ) b +a +b \right ) A}{a}-\frac {\ln \left (a \tanh \left (\frac {x}{2}\right )-\tanh \left (\frac {x}{2}\right ) b +a +b \right ) B}{2 b}-\frac {b \ln \left (a \tanh \left (\frac {x}{2}\right )-\tanh \left (\frac {x}{2}\right ) b +a +b \right ) B}{2 a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 62, normalized size = 0.79 \[ A {\left (\frac {x}{a} + \frac {\log \left (b e^{\left (-x\right )} + a\right )}{a}\right )} - \frac {1}{2} \, B {\left (\frac {b x}{a^{2}} - \frac {e^{x}}{a} + \frac {{\left (a^{2} + b^{2}\right )} \log \left (b e^{\left (-x\right )} + a\right )}{a^{2} b}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.59, size = 47, normalized size = 0.60 \[ \frac {B\,{\mathrm {e}}^x}{2\,a}+\frac {B\,x}{2\,b}-\frac {\ln \left (b+a\,{\mathrm {e}}^x\right )\,\left (B\,a^2-2\,A\,a\,b+B\,b^2\right )}{2\,a^2\,b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 5.26, size = 904, normalized size = 11.59 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________