Optimal. Leaf size=59 \[ \frac {2 (b+c) \tanh ^{-1}\left (\frac {\sqrt {a+b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b}}\right )}{\sqrt {a-b} \sqrt {a+b}}-\frac {\log (a-b \cosh (x))}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4401, 2659, 208, 2668, 31} \[ \frac {2 (b+c) \tanh ^{-1}\left (\frac {\sqrt {a+b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b}}\right )}{\sqrt {a-b} \sqrt {a+b}}-\frac {\log (a-b \cosh (x))}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 208
Rule 2659
Rule 2668
Rule 4401
Rubi steps
\begin {align*} \int \frac {b+c+\sinh (x)}{a-b \cosh (x)} \, dx &=\int \left (\frac {-b-c}{-a+b \cosh (x)}+\frac {\sinh (x)}{a-b \cosh (x)}\right ) \, dx\\ &=(-b-c) \int \frac {1}{-a+b \cosh (x)} \, dx+\int \frac {\sinh (x)}{a-b \cosh (x)} \, dx\\ &=-\frac {\operatorname {Subst}\left (\int \frac {1}{a+x} \, dx,x,-b \cosh (x)\right )}{b}-(2 (b+c)) \operatorname {Subst}\left (\int \frac {1}{-a+b-(-a-b) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )\\ &=\frac {2 (b+c) \tanh ^{-1}\left (\frac {\sqrt {a+b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b}}\right )}{\sqrt {a-b} \sqrt {a+b}}-\frac {\log (a-b \cosh (x))}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 56, normalized size = 0.95 \[ -\frac {2 (b+c) \tan ^{-1}\left (\frac {(a+b) \tanh \left (\frac {x}{2}\right )}{\sqrt {b^2-a^2}}\right )}{\sqrt {b^2-a^2}}-\frac {\log (a-b \cosh (x))}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.45, size = 299, normalized size = 5.07 \[ \left [\frac {\sqrt {a^{2} - b^{2}} {\left (b^{2} + b c\right )} \log \left (\frac {b^{2} \cosh \relax (x)^{2} + b^{2} \sinh \relax (x)^{2} - 2 \, a b \cosh \relax (x) + 2 \, a^{2} - b^{2} + 2 \, {\left (b^{2} \cosh \relax (x) - a b\right )} \sinh \relax (x) + 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cosh \relax (x) + b \sinh \relax (x) - a\right )}}{b \cosh \relax (x)^{2} + b \sinh \relax (x)^{2} - 2 \, a \cosh \relax (x) + 2 \, {\left (b \cosh \relax (x) - a\right )} \sinh \relax (x) + b}\right ) + {\left (a^{2} - b^{2}\right )} x - {\left (a^{2} - b^{2}\right )} \log \left (\frac {2 \, {\left (b \cosh \relax (x) - a\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right )}{a^{2} b - b^{3}}, \frac {2 \, \sqrt {-a^{2} + b^{2}} {\left (b^{2} + b c\right )} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cosh \relax (x) + b \sinh \relax (x) - a\right )}}{a^{2} - b^{2}}\right ) + {\left (a^{2} - b^{2}\right )} x - {\left (a^{2} - b^{2}\right )} \log \left (\frac {2 \, {\left (b \cosh \relax (x) - a\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right )}{a^{2} b - b^{3}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 62, normalized size = 1.05 \[ -\frac {2 \, {\left (b + c\right )} \arctan \left (\frac {b e^{x} - a}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}}} + \frac {x}{b} - \frac {\log \left (b e^{\left (2 \, x\right )} - 2 \, a e^{x} + b\right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.13, size = 154, normalized size = 2.61 \[ -\frac {\ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b -a +b \right ) a}{b \left (a +b \right )}-\frac {\ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b -a +b \right )}{a +b}+\frac {2 b \arctanh \left (\frac {\left (a +b \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}+\frac {2 \arctanh \left (\frac {\left (a +b \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right ) c}{\sqrt {\left (a +b \right ) \left (a -b \right )}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{b}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.73, size = 199, normalized size = 3.37 \[ \frac {x}{b}-\frac {\ln \left (b\,\sqrt {\left (a+b\right )\,\left (a-b\right )}+a^2\,{\mathrm {e}}^x-b^2\,{\mathrm {e}}^x-a\,{\mathrm {e}}^x\,\sqrt {\left (a+b\right )\,\left (a-b\right )}\right )\,\left (b^2\,\sqrt {\left (a+b\right )\,\left (a-b\right )}+a^2-b^2+b\,c\,\sqrt {\left (a+b\right )\,\left (a-b\right )}\right )}{a^2\,b-b^3}+\frac {\ln \left (b\,\sqrt {\left (a+b\right )\,\left (a-b\right )}-a^2\,{\mathrm {e}}^x+b^2\,{\mathrm {e}}^x-a\,{\mathrm {e}}^x\,\sqrt {\left (a+b\right )\,\left (a-b\right )}\right )\,\left (b^2\,\sqrt {\left (a+b\right )\,\left (a-b\right )}-a^2+b^2+b\,c\,\sqrt {\left (a+b\right )\,\left (a-b\right )}\right )}{a^2\,b-b^3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 29.67, size = 840, normalized size = 14.24 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________