Optimal. Leaf size=78 \[ \frac{\left (a^2-b^2\right ) \coth (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 \tanh (x))}{a^4}+\frac{b \coth ^2(x)}{2 a^2}-\frac{\coth ^3(x)}{3 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0997105, antiderivative size = 78, normalized size of antiderivative = 1., 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 ) \coth (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 \tanh (x))}{a^4}+\frac{b \coth ^2(x)}{2 a^2}-\frac{\coth ^3(x)}{3 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3516
Rule 894
Rubi steps
\begin{align*} \int \frac{\text{csch}^4(x)}{a+b \tanh (x)} \, dx &=-\left (b \operatorname{Subst}\left (\int \frac{-b^2+x^2}{x^4 (a+x)} \, dx,x,b \tanh (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 \tanh (x)\right )\right )\\ &=\frac{\left (a^2-b^2\right ) \coth (x)}{a^3}+\frac{b \coth ^2(x)}{2 a^2}-\frac{\coth ^3(x)}{3 a}+\frac{b \left (a^2-b^2\right ) \log (\tanh (x))}{a^4}-\frac{b \left (a^2-b^2\right ) \log (a+b \tanh (x))}{a^4}\\ \end{align*}
Mathematica [A] time = 0.239268, size = 70, normalized size = 0.9 \[ \frac{-2 \coth (x) \left (a^3 \text{csch}^2(x)-2 a^3+3 a b^2\right )+6 b \left (a^2-b^2\right ) (\log (\sinh (x))-\log (a \cosh (x)+b \sinh (x)))+3 a^2 b \text{csch}^2(x)}{6 a^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.045, size = 166, normalized size = 2.1 \begin{align*} -{\frac{1}{24\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{3}}+{\frac{b}{8\,{a}^{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}}+{\frac{3}{8\,a}\tanh \left ({\frac{x}{2}} \right ) }-{\frac{{b}^{2}}{2\,{a}^{3}}\tanh \left ({\frac{x}{2}} \right ) }-{\frac{b}{{a}^{2}}\ln \left ( a \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+2\,\tanh \left ( x/2 \right ) b+a \right ) }+{\frac{{b}^{3}}{{a}^{4}}\ln \left ( a \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+2\,\tanh \left ( x/2 \right ) b+a \right ) }-{\frac{1}{24\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-3}}+{\frac{3}{8\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-1}}-{\frac{{b}^{2}}{2\,{a}^{3}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-1}}+{\frac{b}{8\,{a}^{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-2}}+{\frac{b}{{a}^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) }-{\frac{{b}^{3}}{{a}^{4}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.12194, size = 217, normalized size = 2.78 \begin{align*} -\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 (-x\right )} + 1\right )}{a^{4}} + \frac{{\left (a^{2} b - b^{3}\right )} \log \left (e^{\left (-x\right )} - 1\right )}{a^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.46359, size = 2186, normalized size = 28.03 \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{csch}^{4}{\left (x \right )}}{a + b \tanh{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.2955, size = 273, normalized size = 3.5 \begin{align*} -\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 ({\left | e^{\left (2 \, x\right )} - 1 \right |}\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}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]