Optimal. Leaf size=79 \[ \frac {\left (a^2-b^2\right ) \text {ArcTan}(\sinh (x))}{\left (a^2+b^2\right )^2}-\frac {2 a b \log (\cosh (x))}{\left (a^2+b^2\right )^2}+\frac {2 a b \log (a+b \sinh (x))}{\left (a^2+b^2\right )^2}-\frac {b}{\left (a^2+b^2\right ) (a+b \sinh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.546, Rules used = {2747, 724, 815,
649, 209, 266} \begin {gather*} \frac {\left (a^2-b^2\right ) \text {ArcTan}(\sinh (x))}{\left (a^2+b^2\right )^2}-\frac {b}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac {2 a b \log (a+b \sinh (x))}{\left (a^2+b^2\right )^2}-\frac {2 a b \log (\cosh (x))}{\left (a^2+b^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 266
Rule 649
Rule 724
Rule 815
Rule 2747
Rubi steps
\begin {align*} \int \frac {\text {sech}(x)}{(a+b \sinh (x))^2} \, dx &=-\left (b \text {Subst}\left (\int \frac {1}{(a+x)^2 \left (-b^2-x^2\right )} \, dx,x,b \sinh (x)\right )\right )\\ &=-\frac {b}{\left (a^2+b^2\right ) (a+b \sinh (x))}-\frac {b \text {Subst}\left (\int \frac {a-x}{(a+x) \left (-b^2-x^2\right )} \, dx,x,b \sinh (x)\right )}{a^2+b^2}\\ &=-\frac {b}{\left (a^2+b^2\right ) (a+b \sinh (x))}-\frac {b \text {Subst}\left (\int \left (-\frac {2 a}{\left (a^2+b^2\right ) (a+x)}+\frac {-a^2+b^2+2 a x}{\left (a^2+b^2\right ) \left (b^2+x^2\right )}\right ) \, dx,x,b \sinh (x)\right )}{a^2+b^2}\\ &=\frac {2 a b \log (a+b \sinh (x))}{\left (a^2+b^2\right )^2}-\frac {b}{\left (a^2+b^2\right ) (a+b \sinh (x))}-\frac {b \text {Subst}\left (\int \frac {-a^2+b^2+2 a x}{b^2+x^2} \, dx,x,b \sinh (x)\right )}{\left (a^2+b^2\right )^2}\\ &=\frac {2 a b \log (a+b \sinh (x))}{\left (a^2+b^2\right )^2}-\frac {b}{\left (a^2+b^2\right ) (a+b \sinh (x))}-\frac {(2 a b) \text {Subst}\left (\int \frac {x}{b^2+x^2} \, dx,x,b \sinh (x)\right )}{\left (a^2+b^2\right )^2}+\frac {\left (b \left (a^2-b^2\right )\right ) \text {Subst}\left (\int \frac {1}{b^2+x^2} \, dx,x,b \sinh (x)\right )}{\left (a^2+b^2\right )^2}\\ &=\frac {\left (a^2-b^2\right ) \tan ^{-1}(\sinh (x))}{\left (a^2+b^2\right )^2}-\frac {2 a b \log (\cosh (x))}{\left (a^2+b^2\right )^2}+\frac {2 a b \log (a+b \sinh (x))}{\left (a^2+b^2\right )^2}-\frac {b}{\left (a^2+b^2\right ) (a+b \sinh (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.32, size = 121, normalized size = 1.53 \begin {gather*} -\frac {b \left (\left (2 a+\frac {-a^2+b^2}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}-b \sinh (x)\right )-4 a \log (a+b \sinh (x))+\left (2 a+\frac {a^2-b^2}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}+b \sinh (x)\right )+\frac {2 \left (a^2+b^2\right )}{a+b \sinh (x)}\right )}{2 \left (a^2+b^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.64, size = 123, normalized size = 1.56
method | result | size |
default | \(\frac {2 b \left (-\frac {b \left (a^{2}+b^{2}\right ) \tanh \left (\frac {x}{2}\right )}{a \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-2 b \tanh \left (\frac {x}{2}\right )-a \right )}+a \ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-2 b \tanh \left (\frac {x}{2}\right )-a \right )\right )}{\left (a^{2}+b^{2}\right )^{2}}+\frac {-2 a b \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )+2 \left (a^{2}-b^{2}\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a^{4}+2 a^{2} b^{2}+b^{4}}\) | \(123\) |
risch | \(-\frac {2 b \,{\mathrm e}^{x}}{\left (a^{2}+b^{2}\right ) \left (b \,{\mathrm e}^{2 x}+2 a \,{\mathrm e}^{x}-b \right )}-\frac {i \ln \left ({\mathrm e}^{x}-i\right ) a^{2}}{a^{4}+2 a^{2} b^{2}+b^{4}}+\frac {i \ln \left ({\mathrm e}^{x}-i\right ) b^{2}}{a^{4}+2 a^{2} b^{2}+b^{4}}-\frac {2 \ln \left ({\mathrm e}^{x}-i\right ) a b}{a^{4}+2 a^{2} b^{2}+b^{4}}+\frac {i \ln \left ({\mathrm e}^{x}+i\right ) a^{2}}{a^{4}+2 a^{2} b^{2}+b^{4}}-\frac {i \ln \left ({\mathrm e}^{x}+i\right ) b^{2}}{a^{4}+2 a^{2} b^{2}+b^{4}}-\frac {2 \ln \left ({\mathrm e}^{x}+i\right ) a b}{a^{4}+2 a^{2} b^{2}+b^{4}}+\frac {2 a b \ln \left ({\mathrm e}^{2 x}+\frac {2 a \,{\mathrm e}^{x}}{b}-1\right )}{a^{4}+2 a^{2} b^{2}+b^{4}}\) | \(239\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 149, normalized size = 1.89 \begin {gather*} \frac {2 \, a b \log \left (-2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} - b\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} - \frac {2 \, a b \log \left (e^{\left (-2 \, x\right )} + 1\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} - \frac {2 \, {\left (a^{2} - b^{2}\right )} \arctan \left (e^{\left (-x\right )}\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} - \frac {2 \, b e^{\left (-x\right )}}{a^{2} b + b^{3} + 2 \, {\left (a^{3} + a b^{2}\right )} e^{\left (-x\right )} - {\left (a^{2} b + b^{3}\right )} e^{\left (-2 \, x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 383 vs.
\(2 (79) = 158\).
time = 0.39, size = 383, normalized size = 4.85 \begin {gather*} \frac {2 \, {\left ({\left (a^{2} b - b^{3} - {\left (a^{2} b - b^{3}\right )} \cosh \left (x\right )^{2} - {\left (a^{2} b - b^{3}\right )} \sinh \left (x\right )^{2} - 2 \, {\left (a^{3} - a b^{2}\right )} \cosh \left (x\right ) - 2 \, {\left (a^{3} - a b^{2} + {\left (a^{2} b - b^{3}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) + {\left (a^{2} b + b^{3}\right )} \cosh \left (x\right ) - {\left (a b^{2} \cosh \left (x\right )^{2} + a b^{2} \sinh \left (x\right )^{2} + 2 \, a^{2} b \cosh \left (x\right ) - a b^{2} + 2 \, {\left (a b^{2} \cosh \left (x\right ) + a^{2} b\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, {\left (b \sinh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + {\left (a b^{2} \cosh \left (x\right )^{2} + a b^{2} \sinh \left (x\right )^{2} + 2 \, a^{2} b \cosh \left (x\right ) - a b^{2} + 2 \, {\left (a b^{2} \cosh \left (x\right ) + a^{2} b\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + {\left (a^{2} b + b^{3}\right )} \sinh \left (x\right )\right )}}{a^{4} b + 2 \, a^{2} b^{3} + b^{5} - {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \cosh \left (x\right )^{2} - {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \sinh \left (x\right )^{2} - 2 \, {\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} \cosh \left (x\right ) - 2 \, {\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4} + {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {sech}{\left (x \right )}}{\left (a + b \sinh {\left (x \right )}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 186 vs.
\(2 (79) = 158\).
time = 0.41, size = 186, normalized size = 2.35 \begin {gather*} \frac {2 \, a b^{2} \log \left ({\left | -b {\left (e^{\left (-x\right )} - e^{x}\right )} + 2 \, a \right |}\right )}{a^{4} b + 2 \, a^{2} b^{3} + b^{5}} - \frac {a b \log \left ({\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} + \frac {{\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, x\right )} - 1\right )} e^{\left (-x\right )}\right )\right )} {\left (a^{2} - b^{2}\right )}}{2 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )}} - \frac {2 \, {\left (a b^{2} {\left (e^{\left (-x\right )} - e^{x}\right )} - 3 \, a^{2} b - b^{3}\right )}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} {\left (b {\left (e^{\left (-x\right )} - e^{x}\right )} - 2 \, a\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.79, size = 186, normalized size = 2.35 \begin {gather*} \frac {2\,a\,b\,\ln \left (b^5\,{\mathrm {e}}^{2\,x}-a^4\,b-b^5-14\,a^2\,b^3+2\,a^5\,{\mathrm {e}}^x+14\,a^2\,b^3\,{\mathrm {e}}^{2\,x}+2\,a\,b^4\,{\mathrm {e}}^x+a^4\,b\,{\mathrm {e}}^{2\,x}+28\,a^3\,b^2\,{\mathrm {e}}^x\right )}{a^4+2\,a^2\,b^2+b^4}-\frac {2\,b^2\,{\mathrm {e}}^x}{\left (a^2\,b+b^3\right )\,\left (2\,a\,{\mathrm {e}}^x-b+b\,{\mathrm {e}}^{2\,x}\right )}-\frac {\ln \left (1+{\mathrm {e}}^x\,1{}\mathrm {i}\right )}{-a^2\,1{}\mathrm {i}+2\,a\,b+b^2\,1{}\mathrm {i}}-\frac {\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{-a^2+a\,b\,2{}\mathrm {i}+b^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________