Optimal. Leaf size=136 \[ \frac {\left (a^4+6 a^2 b^2-3 b^4\right ) \text {ArcTan}(\sinh (x))}{2 \left (a^2+b^2\right )^3}-\frac {4 a b^3 \log (\cosh (x))}{\left (a^2+b^2\right )^3}+\frac {4 a b^3 \log (a+b \sinh (x))}{\left (a^2+b^2\right )^3}+\frac {b \left (a^2-3 b^2\right )}{2 \left (a^2+b^2\right )^2 (a+b \sinh (x))}+\frac {\text {sech}^2(x) (b+a \sinh (x))}{2 \left (a^2+b^2\right ) (a+b \sinh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {2747, 755, 815,
649, 209, 266} \begin {gather*} \frac {b \left (a^2-3 b^2\right )}{2 \left (a^2+b^2\right )^2 (a+b \sinh (x))}+\frac {\text {sech}^2(x) (a \sinh (x)+b)}{2 \left (a^2+b^2\right ) (a+b \sinh (x))}+\frac {4 a b^3 \log (a+b \sinh (x))}{\left (a^2+b^2\right )^3}-\frac {4 a b^3 \log (\cosh (x))}{\left (a^2+b^2\right )^3}+\frac {\left (a^4+6 a^2 b^2-3 b^4\right ) \text {ArcTan}(\sinh (x))}{2 \left (a^2+b^2\right )^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 266
Rule 649
Rule 755
Rule 815
Rule 2747
Rubi steps
\begin {align*} \int \frac {\text {sech}^3(x)}{(a+b \sinh (x))^2} \, dx &=b^3 \text {Subst}\left (\int \frac {1}{(a+x)^2 \left (-b^2-x^2\right )^2} \, dx,x,b \sinh (x)\right )\\ &=\frac {\text {sech}^2(x) (b+a \sinh (x))}{2 \left (a^2+b^2\right ) (a+b \sinh (x))}-\frac {b \text {Subst}\left (\int \frac {a^2+3 b^2+2 a x}{(a+x)^2 \left (-b^2-x^2\right )} \, dx,x,b \sinh (x)\right )}{2 \left (a^2+b^2\right )}\\ &=\frac {\text {sech}^2(x) (b+a \sinh (x))}{2 \left (a^2+b^2\right ) (a+b \sinh (x))}-\frac {b \text {Subst}\left (\int \left (\frac {a^2-3 b^2}{\left (a^2+b^2\right ) (a+x)^2}-\frac {8 a b^2}{\left (a^2+b^2\right )^2 (a+x)}+\frac {-a^4-6 a^2 b^2+3 b^4+8 a b^2 x}{\left (a^2+b^2\right )^2 \left (b^2+x^2\right )}\right ) \, dx,x,b \sinh (x)\right )}{2 \left (a^2+b^2\right )}\\ &=\frac {4 a b^3 \log (a+b \sinh (x))}{\left (a^2+b^2\right )^3}+\frac {b \left (a^2-3 b^2\right )}{2 \left (a^2+b^2\right )^2 (a+b \sinh (x))}+\frac {\text {sech}^2(x) (b+a \sinh (x))}{2 \left (a^2+b^2\right ) (a+b \sinh (x))}-\frac {b \text {Subst}\left (\int \frac {-a^4-6 a^2 b^2+3 b^4+8 a b^2 x}{b^2+x^2} \, dx,x,b \sinh (x)\right )}{2 \left (a^2+b^2\right )^3}\\ &=\frac {4 a b^3 \log (a+b \sinh (x))}{\left (a^2+b^2\right )^3}+\frac {b \left (a^2-3 b^2\right )}{2 \left (a^2+b^2\right )^2 (a+b \sinh (x))}+\frac {\text {sech}^2(x) (b+a \sinh (x))}{2 \left (a^2+b^2\right ) (a+b \sinh (x))}-\frac {\left (4 a b^3\right ) \text {Subst}\left (\int \frac {x}{b^2+x^2} \, dx,x,b \sinh (x)\right )}{\left (a^2+b^2\right )^3}+\frac {\left (b \left (a^4+6 a^2 b^2-3 b^4\right )\right ) \text {Subst}\left (\int \frac {1}{b^2+x^2} \, dx,x,b \sinh (x)\right )}{2 \left (a^2+b^2\right )^3}\\ &=\frac {\left (a^4+6 a^2 b^2-3 b^4\right ) \tan ^{-1}(\sinh (x))}{2 \left (a^2+b^2\right )^3}-\frac {4 a b^3 \log (\cosh (x))}{\left (a^2+b^2\right )^3}+\frac {4 a b^3 \log (a+b \sinh (x))}{\left (a^2+b^2\right )^3}+\frac {b \left (a^2-3 b^2\right )}{2 \left (a^2+b^2\right )^2 (a+b \sinh (x))}+\frac {\text {sech}^2(x) (b+a \sinh (x))}{2 \left (a^2+b^2\right ) (a+b \sinh (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.58, size = 260, normalized size = 1.91 \begin {gather*} -\frac {-\frac {2 \text {sech}^2(x) (b+a \sinh (x))}{a+b \sinh (x)}+\frac {b \left (\frac {2 a \left (a^2+b^2\right ) \left (\left (-a+\sqrt {-b^2}\right ) \log \left (\sqrt {-b^2}-b \sinh (x)\right )-2 \sqrt {-b^2} \log (a+b \sinh (x))+\left (a+\sqrt {-b^2}\right ) \log \left (\sqrt {-b^2}+b \sinh (x)\right )\right )}{\sqrt {-b^2}}+\left (-a^2+3 b^2\right ) \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 )\right )}{\left (a^2+b^2\right )^2}}{4 \left (a^2+b^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.81, size = 212, normalized size = 1.56
method | result | size |
default | \(\frac {\frac {2 \left (\left (-\frac {a^{4}}{2}+\frac {b^{4}}{2}\right ) \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )+\left (-2 a^{3} b -2 a \,b^{3}\right ) \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+\left (\frac {a^{4}}{2}-\frac {b^{4}}{2}\right ) \tanh \left (\frac {x}{2}\right )\right )}{\left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}-4 a \,b^{3} \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )+\left (a^{4}+6 a^{2} b^{2}-3 b^{4}\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \left (a^{2}+b^{2}\right )}+\frac {2 b^{3} \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 )}+2 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 )^{3}}\) | \(212\) |
risch | \(\frac {{\mathrm e}^{x} \left (a^{2} b \,{\mathrm e}^{4 x}-3 b^{3} {\mathrm e}^{4 x}+2 a^{3} {\mathrm e}^{3 x}+2 a \,b^{2} {\mathrm e}^{3 x}+6 a^{2} b \,{\mathrm e}^{2 x}-2 b^{3} {\mathrm e}^{2 x}-2 a^{3} {\mathrm e}^{x}-2 a \,b^{2} {\mathrm e}^{x}+a^{2} b -3 b^{3}\right )}{\left (a^{2}+b^{2}\right )^{2} \left (1+{\mathrm e}^{2 x}\right )^{2} \left (b \,{\mathrm e}^{2 x}+2 a \,{\mathrm e}^{x}-b \right )}-\frac {i \ln \left ({\mathrm e}^{x}-i\right ) a^{4}}{2 \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {3 i \ln \left ({\mathrm e}^{x}-i\right ) a^{2} b^{2}}{a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}}+\frac {3 i \ln \left ({\mathrm e}^{x}-i\right ) b^{4}}{2 \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {4 \ln \left ({\mathrm e}^{x}-i\right ) a \,b^{3}}{a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}}+\frac {i \ln \left ({\mathrm e}^{x}+i\right ) a^{4}}{2 a^{6}+6 a^{4} b^{2}+6 a^{2} b^{4}+2 b^{6}}+\frac {3 i \ln \left ({\mathrm e}^{x}+i\right ) a^{2} b^{2}}{a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}}-\frac {3 i \ln \left ({\mathrm e}^{x}+i\right ) b^{4}}{2 \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {4 \ln \left ({\mathrm e}^{x}+i\right ) a \,b^{3}}{a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}}+\frac {4 a \,b^{3} \ln \left ({\mathrm e}^{2 x}+\frac {2 a \,{\mathrm e}^{x}}{b}-1\right )}{a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}}\) | \(469\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 375 vs.
\(2 (130) = 260\).
time = 0.52, size = 375, normalized size = 2.76 \begin {gather*} \frac {4 \, a b^{3} \log \left (-2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} - b\right )}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} - \frac {4 \, a b^{3} \log \left (e^{\left (-2 \, x\right )} + 1\right )}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} - \frac {{\left (a^{4} + 6 \, a^{2} b^{2} - 3 \, b^{4}\right )} \arctan \left (e^{\left (-x\right )}\right )}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} + \frac {{\left (a^{2} b - 3 \, b^{3}\right )} e^{\left (-x\right )} + 2 \, {\left (a^{3} + a b^{2}\right )} e^{\left (-2 \, x\right )} + 2 \, {\left (3 \, a^{2} b - b^{3}\right )} e^{\left (-3 \, x\right )} - 2 \, {\left (a^{3} + a b^{2}\right )} e^{\left (-4 \, x\right )} + {\left (a^{2} b - 3 \, b^{3}\right )} e^{\left (-5 \, x\right )}}{a^{4} b + 2 \, a^{2} b^{3} + b^{5} + 2 \, {\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} e^{\left (-x\right )} + {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} e^{\left (-2 \, x\right )} + 4 \, {\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} e^{\left (-3 \, x\right )} - {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} e^{\left (-4 \, x\right )} + 2 \, {\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} e^{\left (-5 \, x\right )} - {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} e^{\left (-6 \, 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. 2615 vs.
\(2 (130) = 260\).
time = 0.44, size = 2615, normalized size = 19.23 \begin {gather*} \text {Too large to display} \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}^{3}{\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. 295 vs.
\(2 (130) = 260\).
time = 0.45, size = 295, normalized size = 2.17 \begin {gather*} \frac {4 \, a b^{4} \log \left ({\left | -b {\left (e^{\left (-x\right )} - e^{x}\right )} + 2 \, a \right |}\right )}{a^{6} b + 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} + b^{7}} - \frac {2 \, a b^{3} \log \left ({\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4\right )}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} + \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^{4} + 6 \, a^{2} b^{2} - 3 \, b^{4}\right )}}{4 \, {\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )}} - \frac {a^{2} b {\left (e^{\left (-x\right )} - e^{x}\right )}^{2} - 3 \, b^{3} {\left (e^{\left (-x\right )} - e^{x}\right )}^{2} - 2 \, a^{3} {\left (e^{\left (-x\right )} - e^{x}\right )} - 2 \, a b^{2} {\left (e^{\left (-x\right )} - e^{x}\right )} + 8 \, a^{2} b - 8 \, b^{3}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} {\left (b {\left (e^{\left (-x\right )} - e^{x}\right )}^{3} - 2 \, a {\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4 \, b {\left (e^{\left (-x\right )} - e^{x}\right )} - 8 \, a\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.07, size = 519, normalized size = 3.82 \begin {gather*} \frac {\frac {4\,\left (a^7\,b+3\,a^5\,b^3+3\,a^3\,b^5+a\,b^7\right )}{\left (a^2+b^2\right )\,{\left (a^4+2\,a^2\,b^2+b^4\right )}^2}+\frac {{\mathrm {e}}^x\,\left (a^8+2\,a^6\,b^2-2\,a^2\,b^6-b^8\right )}{\left (a^2+b^2\right )\,{\left (a^4+2\,a^2\,b^2+b^4\right )}^2}}{{\mathrm {e}}^{2\,x}+1}-\frac {\frac {4\,a\,b}{a^4+2\,a^2\,b^2+b^4}+\frac {2\,{\mathrm {e}}^x\,\left (a^2-b^2\right )}{a^4+2\,a^2\,b^2+b^4}}{2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1}+\frac {\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,\left (a-b\,3{}\mathrm {i}\right )}{2\,\left (-a^3\,1{}\mathrm {i}-3\,a^2\,b+a\,b^2\,3{}\mathrm {i}+b^3\right )}+\frac {\ln \left (1+{\mathrm {e}}^x\,1{}\mathrm {i}\right )\,\left (-3\,b+a\,1{}\mathrm {i}\right )}{2\,\left (-a^3-a^2\,b\,3{}\mathrm {i}+3\,a\,b^2+b^3\,1{}\mathrm {i}\right )}+\frac {4\,a\,b^3\,\ln \left (9\,b^9\,{\mathrm {e}}^{2\,x}-a^8\,b-9\,b^9-220\,a^2\,b^7-30\,a^4\,b^5-12\,a^6\,b^3+2\,a^9\,{\mathrm {e}}^x+220\,a^2\,b^7\,{\mathrm {e}}^{2\,x}+30\,a^4\,b^5\,{\mathrm {e}}^{2\,x}+12\,a^6\,b^3\,{\mathrm {e}}^{2\,x}+18\,a\,b^8\,{\mathrm {e}}^x+a^8\,b\,{\mathrm {e}}^{2\,x}+440\,a^3\,b^6\,{\mathrm {e}}^x+60\,a^5\,b^4\,{\mathrm {e}}^x+24\,a^7\,b^2\,{\mathrm {e}}^x\right )}{a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6}-\frac {2\,{\mathrm {e}}^x\,\left (a^4\,b^6+2\,a^2\,b^8+b^{10}\right )}{b^2\,\left (a^2\,b+b^3\right )\,\left (a^2+b^2\right )\,\left (2\,a\,{\mathrm {e}}^x-b+b\,{\mathrm {e}}^{2\,x}\right )\,\left (a^4+2\,a^2\,b^2+b^4\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________