Optimal. Leaf size=57 \[ \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.13272, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.357, 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 4401
Rule 2659
Rule 208
Rule 2668
Rule 31
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.0940014, size = 56, normalized size = 0.98 \[ \frac{\log (a+b \cosh (x))}{b}-\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}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.018, size = 127, normalized size = 2.2 \begin{align*} -{\frac{1}{b}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }+{\frac{1}{b}\ln \left ( a \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}- \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}b-a-b \right ) }+2\,{\frac{b}{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}{\it Artanh} \left ({\frac{ \left ( a-b \right ) \tanh \left ( x/2 \right ) }{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}} \right ) }+2\,{\frac{c}{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}{\it Artanh} \left ({\frac{ \left ( a-b \right ) \tanh \left ( x/2 \right ) }{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}} \right ) }-{\frac{1}{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 [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.52639, size = 717, normalized size = 12.58 \begin{align*} \left [\frac{\sqrt{a^{2} - b^{2}}{\left (b^{2} + b c\right )} \log \left (\frac{b^{2} \cosh \left (x\right )^{2} + b^{2} \sinh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) + 2 \, a^{2} - b^{2} + 2 \,{\left (b^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right ) - 2 \, \sqrt{a^{2} - b^{2}}{\left (b \cosh \left (x\right ) + b \sinh \left (x\right ) + a\right )}}{b \cosh \left (x\right )^{2} + b \sinh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + 2 \,{\left (b \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) + b}\right ) -{\left (a^{2} - b^{2}\right )} x +{\left (a^{2} - b^{2}\right )} \log \left (\frac{2 \,{\left (b \cosh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\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 \left (x\right ) + b \sinh \left (x\right ) + 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 \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a^{2} b - b^{3}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.17219, size = 81, normalized size = 1.42 \begin{align*} \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} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]