Optimal. Leaf size=82 \[ \frac{2 (a A-b B) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{x}{2}\right )}{\sqrt{a+b}}\right )}{(a-b)^{3/2} (a+b)^{3/2}}-\frac{\sinh (x) (A b-a B)}{\left (a^2-b^2\right ) (a+b \cosh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0782561, antiderivative size = 82, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.267, Rules used = {2754, 12, 2659, 208} \[ \frac{2 (a A-b B) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{x}{2}\right )}{\sqrt{a+b}}\right )}{(a-b)^{3/2} (a+b)^{3/2}}-\frac{\sinh (x) (A b-a B)}{\left (a^2-b^2\right ) (a+b \cosh (x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2754
Rule 12
Rule 2659
Rule 208
Rubi steps
\begin{align*} \int \frac{A+B \cosh (x)}{(a+b \cosh (x))^2} \, dx &=-\frac{(A b-a B) \sinh (x)}{\left (a^2-b^2\right ) (a+b \cosh (x))}+\frac{\int \frac{-a A+b B}{a+b \cosh (x)} \, dx}{-a^2+b^2}\\ &=-\frac{(A b-a B) \sinh (x)}{\left (a^2-b^2\right ) (a+b \cosh (x))}+\frac{(a A-b B) \int \frac{1}{a+b \cosh (x)} \, dx}{a^2-b^2}\\ &=-\frac{(A b-a B) \sinh (x)}{\left (a^2-b^2\right ) (a+b \cosh (x))}+\frac{(2 (a A-b B)) \operatorname{Subst}\left (\int \frac{1}{a+b-(a-b) x^2} \, dx,x,\tanh \left (\frac{x}{2}\right )\right )}{a^2-b^2}\\ &=\frac{2 (a A-b B) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{x}{2}\right )}{\sqrt{a+b}}\right )}{(a-b)^{3/2} (a+b)^{3/2}}-\frac{(A b-a B) \sinh (x)}{\left (a^2-b^2\right ) (a+b \cosh (x))}\\ \end{align*}
Mathematica [A] time = 0.167068, size = 81, normalized size = 0.99 \[ \frac{2 (a A-b B) \tan ^{-1}\left (\frac{(a-b) \tanh \left (\frac{x}{2}\right )}{\sqrt{b^2-a^2}}\right )}{\left (b^2-a^2\right )^{3/2}}+\frac{\sinh (x) (a B-A b)}{(a-b) (a+b) (a+b \cosh (x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.018, size = 108, normalized size = 1.3 \begin{align*} 2\,{\frac{ \left ( Ab-aB \right ) \tanh \left ( x/2 \right ) }{ \left ({a}^{2}-{b}^{2} \right ) \left ( a \left ( \tanh \left ( x/2 \right ) \right ) ^{2}- \left ( \tanh \left ( x/2 \right ) \right ) ^{2}b-a-b \right ) }}+2\,{\frac{Aa-Bb}{ \left ( a+b \right ) \left ( a-b \right ) \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 ) } \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.30036, size = 1914, normalized size = 23.34 \begin{align*} \text{result too large to display} \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.1565, size = 144, normalized size = 1.76 \begin{align*} \frac{2 \,{\left (A a - B b\right )} \arctan \left (\frac{b e^{x} + a}{\sqrt{-a^{2} + b^{2}}}\right )}{{\left (a^{2} - b^{2}\right )} \sqrt{-a^{2} + b^{2}}} - \frac{2 \,{\left (B a^{2} e^{x} - A a b e^{x} + B a b - A b^{2}\right )}}{{\left (a^{2} b - b^{3}\right )}{\left (b e^{\left (2 \, x\right )} + 2 \, a e^{x} + b\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]