Optimal. Leaf size=79 \[ \frac {b \tanh ^2(x)}{2 a^2}-\frac {b \left (a^2-b^2\right ) \log (\tanh (x))}{a^4}-\frac {b \left (a^2-b^2\right ) \log (a+b \coth (x))}{a^4}+\frac {\left (a^2-b^2\right ) \tanh (x)}{a^3}-\frac {\tanh ^3(x)}{3 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3516, 894} \[ \frac {\left (a^2-b^2\right ) \tanh (x)}{a^3}-\frac {b \left (a^2-b^2\right ) \log (\tanh (x))}{a^4}-\frac {b \left (a^2-b^2\right ) \log (a+b \coth (x))}{a^4}+\frac {b \tanh ^2(x)}{2 a^2}-\frac {\tanh ^3(x)}{3 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 894
Rule 3516
Rubi steps
\begin {align*} \int \frac {\text {sech}^4(x)}{a+b \coth (x)} \, dx &=-\left (b \operatorname {Subst}\left (\int \frac {-b^2+x^2}{x^4 (a+x)} \, dx,x,b \coth (x)\right )\right )\\ &=-\left (b \operatorname {Subst}\left (\int \left (-\frac {b^2}{a x^4}+\frac {b^2}{a^2 x^3}+\frac {a^2-b^2}{a^3 x^2}+\frac {-a^2+b^2}{a^4 x}+\frac {a^2-b^2}{a^4 (a+x)}\right ) \, dx,x,b \coth (x)\right )\right )\\ &=-\frac {b \left (a^2-b^2\right ) \log (a+b \coth (x))}{a^4}-\frac {b \left (a^2-b^2\right ) \log (\tanh (x))}{a^4}+\frac {\left (a^2-b^2\right ) \tanh (x)}{a^3}+\frac {b \tanh ^2(x)}{2 a^2}-\frac {\tanh ^3(x)}{3 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.31, size = 68, normalized size = 0.86 \[ \frac {\left (4 a^3-6 a b^2\right ) \tanh (x)-6 b \left (b^2-a^2\right ) (\log (\cosh (x))-\log (a \sinh (x)+b \cosh (x)))+a^2 \text {sech}^2(x) (2 a \tanh (x)-3 b)}{6 a^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.42, size = 909, normalized size = 11.51 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.13, size = 201, normalized size = 2.54 \[ -\frac {{\left (a^{3} b + a^{2} b^{2} - a b^{3} - b^{4}\right )} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} - a + b \right |}\right )}{a^{5} + a^{4} b} + \frac {{\left (a^{2} b - b^{3}\right )} \log \left (e^{\left (2 \, x\right )} + 1\right )}{a^{4}} - \frac {11 \, a^{2} b e^{\left (6 \, x\right )} - 11 \, b^{3} e^{\left (6 \, x\right )} + 45 \, a^{2} b e^{\left (4 \, x\right )} - 12 \, a b^{2} e^{\left (4 \, x\right )} - 33 \, b^{3} e^{\left (4 \, x\right )} + 24 \, a^{3} e^{\left (2 \, x\right )} + 45 \, a^{2} b e^{\left (2 \, x\right )} - 24 \, a b^{2} e^{\left (2 \, x\right )} - 33 \, b^{3} e^{\left (2 \, x\right )} + 8 \, a^{3} + 11 \, a^{2} b - 12 \, a b^{2} - 11 \, b^{3}}{6 \, a^{4} {\left (e^{\left (2 \, x\right )} + 1\right )}^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.16, size = 257, normalized size = 3.25 \[ -\frac {b \ln \left (\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b +2 a \tanh \left (\frac {x}{2}\right )+b \right )}{a^{2}}+\frac {b^{3} \ln \left (\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b +2 a \tanh \left (\frac {x}{2}\right )+b \right )}{a^{4}}+\frac {2 \left (\tanh ^{5}\left (\frac {x}{2}\right )\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}-\frac {2 \left (\tanh ^{5}\left (\frac {x}{2}\right )\right ) b^{2}}{a^{3} \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}+\frac {2 b \left (\tanh ^{4}\left (\frac {x}{2}\right )\right )}{a^{2} \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}+\frac {4 \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{3 a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}-\frac {4 \left (\tanh ^{3}\left (\frac {x}{2}\right )\right ) b^{2}}{a^{3} \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}+\frac {2 \left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b}{a^{2} \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}+\frac {2 \tanh \left (\frac {x}{2}\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}-\frac {2 \tanh \left (\frac {x}{2}\right ) b^{2}}{a^{3} \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}+\frac {b \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )}{a^{2}}-\frac {\ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right ) b^{3}}{a^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 133, normalized size = 1.68 \[ \frac {2 \, {\left (2 \, a^{2} - 3 \, b^{2} + 3 \, {\left (2 \, a^{2} - a b - 2 \, b^{2}\right )} e^{\left (-2 \, x\right )} - 3 \, {\left (a b + b^{2}\right )} e^{\left (-4 \, x\right )}\right )}}{3 \, {\left (3 \, a^{3} e^{\left (-2 \, x\right )} + 3 \, a^{3} e^{\left (-4 \, x\right )} + a^{3} e^{\left (-6 \, x\right )} + a^{3}\right )}} - \frac {{\left (a^{2} b - b^{3}\right )} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} + a + b\right )}{a^{4}} + \frac {{\left (a^{2} b - b^{3}\right )} \log \left (e^{\left (-2 \, x\right )} + 1\right )}{a^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.45, size = 123, normalized size = 1.56 \[ \frac {8}{3\,a\,\left (3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1\right )}-\frac {2\,\left (2\,a-b\right )}{a^2\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}-\frac {2\,b\,\left (a-b\right )}{a^3\,\left ({\mathrm {e}}^{2\,x}+1\right )}-\frac {b\,\ln \left (b-a+a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )\,\left (a+b\right )\,\left (a-b\right )}{a^4}+\frac {b\,\ln \left ({\mathrm {e}}^{2\,x}+1\right )\,\left (a+b\right )\,\left (a-b\right )}{a^4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\operatorname {sech}^{4}{\relax (x )}}{a + b \coth {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________