Optimal. Leaf size=128 \[ -\frac{\left (2 a^2 A+3 a b B-A b^2\right ) \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2}}-\frac{\cosh (x) \left (a^2 (-B)+3 a A b+2 b^2 B\right )}{2 \left (a^2+b^2\right )^2 (a+b \sinh (x))}-\frac{\cosh (x) (A b-a B)}{2 \left (a^2+b^2\right ) (a+b \sinh (x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.17506, antiderivative size = 128, normalized size of antiderivative = 1., 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 = {2754, 12, 2660, 618, 206} \[ -\frac{\left (2 a^2 A+3 a b B-A b^2\right ) \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2}}-\frac{\cosh (x) \left (a^2 (-B)+3 a A b+2 b^2 B\right )}{2 \left (a^2+b^2\right )^2 (a+b \sinh (x))}-\frac{\cosh (x) (A b-a B)}{2 \left (a^2+b^2\right ) (a+b \sinh (x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2754
Rule 12
Rule 2660
Rule 618
Rule 206
Rubi steps
\begin{align*} \int \frac{A+B \sinh (x)}{(a+b \sinh (x))^3} \, dx &=-\frac{(A b-a B) \cosh (x)}{2 \left (a^2+b^2\right ) (a+b \sinh (x))^2}-\frac{\int \frac{-2 (a A+b B)+(A b-a B) \sinh (x)}{(a+b \sinh (x))^2} \, dx}{2 \left (a^2+b^2\right )}\\ &=-\frac{(A b-a B) \cosh (x)}{2 \left (a^2+b^2\right ) (a+b \sinh (x))^2}-\frac{\left (3 a A b-a^2 B+2 b^2 B\right ) \cosh (x)}{2 \left (a^2+b^2\right )^2 (a+b \sinh (x))}+\frac{\int \frac{2 a^2 A-A b^2+3 a b B}{a+b \sinh (x)} \, dx}{2 \left (a^2+b^2\right )^2}\\ &=-\frac{(A b-a B) \cosh (x)}{2 \left (a^2+b^2\right ) (a+b \sinh (x))^2}-\frac{\left (3 a A b-a^2 B+2 b^2 B\right ) \cosh (x)}{2 \left (a^2+b^2\right )^2 (a+b \sinh (x))}+\frac{\left (2 a^2 A-A b^2+3 a b B\right ) \int \frac{1}{a+b \sinh (x)} \, dx}{2 \left (a^2+b^2\right )^2}\\ &=-\frac{(A b-a B) \cosh (x)}{2 \left (a^2+b^2\right ) (a+b \sinh (x))^2}-\frac{\left (3 a A b-a^2 B+2 b^2 B\right ) \cosh (x)}{2 \left (a^2+b^2\right )^2 (a+b \sinh (x))}+\frac{\left (2 a^2 A-A b^2+3 a b B\right ) \operatorname{Subst}\left (\int \frac{1}{a+2 b x-a x^2} \, dx,x,\tanh \left (\frac{x}{2}\right )\right )}{\left (a^2+b^2\right )^2}\\ &=-\frac{(A b-a B) \cosh (x)}{2 \left (a^2+b^2\right ) (a+b \sinh (x))^2}-\frac{\left (3 a A b-a^2 B+2 b^2 B\right ) \cosh (x)}{2 \left (a^2+b^2\right )^2 (a+b \sinh (x))}-\frac{\left (2 \left (2 a^2 A-A b^2+3 a b B\right )\right ) \operatorname{Subst}\left (\int \frac{1}{4 \left (a^2+b^2\right )-x^2} \, dx,x,2 b-2 a \tanh \left (\frac{x}{2}\right )\right )}{\left (a^2+b^2\right )^2}\\ &=-\frac{\left (2 a^2 A-A b^2+3 a b B\right ) \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2}}-\frac{(A b-a B) \cosh (x)}{2 \left (a^2+b^2\right ) (a+b \sinh (x))^2}-\frac{\left (3 a A b-a^2 B+2 b^2 B\right ) \cosh (x)}{2 \left (a^2+b^2\right )^2 (a+b \sinh (x))}\\ \end{align*}
Mathematica [A] time = 0.270176, size = 131, normalized size = 1.02 \[ \frac{\frac{2 \left (2 a^2 A+3 a b B-A b^2\right ) \tan ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{-a^2-b^2}}\right )}{\sqrt{-a^2-b^2}}+\frac{\cosh (x) \left (a^2 B-3 a A b-2 b^2 B\right )}{a+b \sinh (x)}+\frac{\left (a^2+b^2\right ) \cosh (x) (a B-A b)}{(a+b \sinh (x))^2}}{2 \left (a^2+b^2\right )^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.036, size = 314, normalized size = 2.5 \begin{align*} -2\,{\frac{1}{ \left ( a \left ( \tanh \left ( x/2 \right ) \right ) ^{2}-2\,\tanh \left ( x/2 \right ) b-a \right ) ^{2}} \left ( -1/2\,{\frac{b \left ( 5\,A{a}^{2}b+2\,A{b}^{3}-3\,{a}^{3}B \right ) \left ( \tanh \left ( x/2 \right ) \right ) ^{3}}{a \left ({a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4} \right ) }}-1/2\,{\frac{ \left ( 4\,A{a}^{4}b-7\,A{a}^{2}{b}^{3}-2\,A{b}^{5}-2\,B{a}^{5}+5\,B{a}^{3}{b}^{2}-2\,Ba{b}^{4} \right ) \left ( \tanh \left ( x/2 \right ) \right ) ^{2}}{ \left ({a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4} \right ){a}^{2}}}+1/2\,{\frac{b \left ( 11\,A{a}^{2}b+2\,A{b}^{3}-5\,{a}^{3}B+4\,Ba{b}^{2} \right ) \tanh \left ( x/2 \right ) }{a \left ({a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4} \right ) }}+1/2\,{\frac{4\,A{a}^{2}b+A{b}^{3}-2\,{a}^{3}B+Ba{b}^{2}}{{a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4}}} \right ) }+{\frac{2\,{a}^{2}A-A{b}^{2}+3\,bBa}{{a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4}}{\it Artanh} \left ({\frac{1}{2} \left ( 2\,a\tanh \left ( x/2 \right ) -2\,b \right ){\frac{1}{\sqrt{{a}^{2}+{b}^{2}}}}} \right ){\frac{1}{\sqrt{{a}^{2}+{b}^{2}}}}} \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.03506, size = 3617, normalized size = 28.26 \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 [B] time = 1.27497, size = 377, normalized size = 2.95 \begin{align*} -\frac{{\left (2 \, A a^{2} + 3 \, B a b - A b^{2}\right )} \log \left (\frac{{\left | -2 \, b e^{x} - 2 \, a - 2 \, \sqrt{a^{2} + b^{2}} \right |}}{{\left | -2 \, b e^{x} - 2 \, a + 2 \, \sqrt{a^{2} + b^{2}} \right |}}\right )}{2 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt{a^{2} + b^{2}}} + \frac{2 \, A a^{2} b^{2} e^{\left (3 \, x\right )} + 3 \, B a b^{3} e^{\left (3 \, x\right )} - A b^{4} e^{\left (3 \, x\right )} - 2 \, B a^{4} e^{\left (2 \, x\right )} + 6 \, A a^{3} b e^{\left (2 \, x\right )} + 5 \, B a^{2} b^{2} e^{\left (2 \, x\right )} - 3 \, A a b^{3} e^{\left (2 \, x\right )} - 2 \, B b^{4} e^{\left (2 \, x\right )} + 4 \, B a^{3} b e^{x} - 10 \, A a^{2} b^{2} e^{x} - 5 \, B a b^{3} e^{x} - A b^{4} e^{x} - B a^{2} b^{2} + 3 \, A a b^{3} + 2 \, B b^{4}}{{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )}{\left (b e^{\left (2 \, x\right )} + 2 \, a e^{x} - b\right )}^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]