Optimal. Leaf size=93 \[ -\frac{6 a b^2 \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{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (\left (a^2-2 b^2\right ) \sinh (x)+3 a b\right )}{\left (a^2+b^2\right )^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.170352, antiderivative size = 93, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.462, Rules used = {2694, 2866, 12, 2660, 618, 206} \[ -\frac{6 a b^2 \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{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (\left (a^2-2 b^2\right ) \sinh (x)+3 a b\right )}{\left (a^2+b^2\right )^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2694
Rule 2866
Rule 12
Rule 2660
Rule 618
Rule 206
Rubi steps
\begin{align*} \int \frac{\text{sech}^2(x)}{(a+b \sinh (x))^2} \, dx &=-\frac{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}-\frac{\int \frac{\text{sech}^2(x) (-a+2 b \sinh (x))}{a+b \sinh (x)} \, dx}{a^2+b^2}\\ &=-\frac{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (3 a b+\left (a^2-2 b^2\right ) \sinh (x)\right )}{\left (a^2+b^2\right )^2}+\frac{\int \frac{3 a b^2}{a+b \sinh (x)} \, dx}{\left (a^2+b^2\right )^2}\\ &=-\frac{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (3 a b+\left (a^2-2 b^2\right ) \sinh (x)\right )}{\left (a^2+b^2\right )^2}+\frac{\left (3 a b^2\right ) \int \frac{1}{a+b \sinh (x)} \, dx}{\left (a^2+b^2\right )^2}\\ &=-\frac{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (3 a b+\left (a^2-2 b^2\right ) \sinh (x)\right )}{\left (a^2+b^2\right )^2}+\frac{\left (6 a b^2\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{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (3 a b+\left (a^2-2 b^2\right ) \sinh (x)\right )}{\left (a^2+b^2\right )^2}-\frac{\left (12 a b^2\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{6 a b^2 \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{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (3 a b+\left (a^2-2 b^2\right ) \sinh (x)\right )}{\left (a^2+b^2\right )^2}\\ \end{align*}
Mathematica [A] time = 0.241977, size = 94, normalized size = 1.01 \[ \frac{\frac{6 a b^2 \tan ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{-a^2-b^2}}\right )}{\sqrt{-a^2-b^2}}+a^2 \tanh (x)-\frac{b^3 \cosh (x)}{a+b \sinh (x)}+2 a b \text{sech}(x)-b^2 \tanh (x)}{\left (a^2+b^2\right )^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.041, size = 138, normalized size = 1.5 \begin{align*} -2\,{\frac{ \left ( -{a}^{2}+{b}^{2} \right ) \tanh \left ( x/2 \right ) -2\,ab}{ \left ({a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4} \right ) \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) }}-2\,{\frac{{b}^{2}}{ \left ({a}^{2}+{b}^{2} \right ) ^{2}} \left ({\frac{1}{a \left ( \tanh \left ( x/2 \right ) \right ) ^{2}-2\,\tanh \left ( x/2 \right ) b-a} \left ( -{\frac{{b}^{2}\tanh \left ( x/2 \right ) }{a}}-b \right ) }-3\,{\frac{a}{\sqrt{{a}^{2}+{b}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,a\tanh \left ( x/2 \right ) -2\,b}{\sqrt{{a}^{2}+{b}^{2}}}} \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.15832, size = 1916, normalized size = 20.6 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\operatorname{sech}^{2}{\left (x \right )}}{\left (a + b \sinh{\left (x \right )}\right )^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15158, size = 225, normalized size = 2.42 \begin{align*} \frac{3 \, a b^{2} \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 )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt{a^{2} + b^{2}}} + \frac{2 \,{\left (3 \, a b^{2} e^{\left (3 \, x\right )} + 3 \, a^{2} b e^{\left (2 \, x\right )} - 2 \, a^{3} e^{x} + a b^{2} e^{x} + a^{2} b - 2 \, b^{3}\right )}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )}{\left (b e^{\left (4 \, x\right )} + 2 \, a e^{\left (3 \, x\right )} + 2 \, a e^{x} - b\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]