Integrand size = 13, antiderivative size = 76 \[ \int \frac {\coth ^3(x)}{a+b \tanh (x)} \, dx=-\frac {b x}{a^2-b^2}+\frac {b \coth (x)}{a^2}-\frac {\coth ^2(x)}{2 a}+\frac {\left (a^2+b^2\right ) \log (\sinh (x))}{a^3}+\frac {b^4 \log (a \cosh (x)+b \sinh (x))}{a^3 \left (a^2-b^2\right )} \]
[Out]
Time = 0.22 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3650, 3730, 3733, 3611, 3556} \[ \int \frac {\coth ^3(x)}{a+b \tanh (x)} \, dx=-\frac {b x}{a^2-b^2}+\frac {b \coth (x)}{a^2}+\frac {\left (a^2+b^2\right ) \log (\sinh (x))}{a^3}+\frac {b^4 \log (a \cosh (x)+b \sinh (x))}{a^3 \left (a^2-b^2\right )}-\frac {\coth ^2(x)}{2 a} \]
[In]
[Out]
Rule 3556
Rule 3611
Rule 3650
Rule 3730
Rule 3733
Rubi steps \begin{align*} \text {integral}& = -\frac {\coth ^2(x)}{2 a}-\frac {i \int \frac {\coth ^2(x) \left (-2 i b+2 i a \tanh (x)+2 i b \tanh ^2(x)\right )}{a+b \tanh (x)} \, dx}{2 a} \\ & = \frac {b \coth (x)}{a^2}-\frac {\coth ^2(x)}{2 a}-\frac {\int \frac {\coth (x) \left (-2 \left (a^2+b^2\right )+2 b^2 \tanh ^2(x)\right )}{a+b \tanh (x)} \, dx}{2 a^2} \\ & = -\frac {b x}{a^2-b^2}+\frac {b \coth (x)}{a^2}-\frac {\coth ^2(x)}{2 a}+\frac {\left (i b^4\right ) \int \frac {-i b-i a \tanh (x)}{a+b \tanh (x)} \, dx}{a^3 \left (a^2-b^2\right )}+\frac {\left (a^2+b^2\right ) \int \coth (x) \, dx}{a^3} \\ & = -\frac {b x}{a^2-b^2}+\frac {b \coth (x)}{a^2}-\frac {\coth ^2(x)}{2 a}+\frac {\left (a^2+b^2\right ) \log (\sinh (x))}{a^3}+\frac {b^4 \log (a \cosh (x)+b \sinh (x))}{a^3 \left (a^2-b^2\right )} \\ \end{align*}
Time = 0.25 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00 \[ \int \frac {\coth ^3(x)}{a+b \tanh (x)} \, dx=\frac {b \coth (x)}{a^2}-\frac {\coth ^2(x)}{2 a}-\frac {\log (1-\coth (x))}{2 (a+b)}-\frac {\log (1+\coth (x))}{2 (a-b)}+\frac {b^4 \log (b+a \coth (x))}{a^3 \left (a^2-b^2\right )} \]
[In]
[Out]
Time = 0.20 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.21
method | result | size |
parallelrisch | \(\frac {2 \ln \left (a +b \tanh \left (x \right )\right ) b^{4}-2 \ln \left (1-\tanh \left (x \right )\right ) a^{4}+\left (2 a^{4}-2 b^{4}\right ) \ln \left (\tanh \left (x \right )\right )-2 \left (\frac {\coth \left (x \right )^{2} a \left (a -b \right )}{2}-b \coth \left (x \right ) \left (a -b \right )+a^{2} x \right ) \left (a +b \right ) a}{2 a^{5}-2 a^{3} b^{2}}\) | \(92\) |
derivativedivides | \(-\frac {\ln \left (\tanh \left (x \right )-1\right )}{2 a +2 b}-\frac {\ln \left (1+\tanh \left (x \right )\right )}{2 a -2 b}+\frac {b^{4} \ln \left (a +b \tanh \left (x \right )\right )}{a^{3} \left (a +b \right ) \left (a -b \right )}+\frac {b}{a^{2} \tanh \left (x \right )}-\frac {\left (-a^{2}-b^{2}\right ) \ln \left (\tanh \left (x \right )\right )}{a^{3}}-\frac {1}{2 a \tanh \left (x \right )^{2}}\) | \(97\) |
default | \(-\frac {\ln \left (\tanh \left (x \right )-1\right )}{2 a +2 b}-\frac {\ln \left (1+\tanh \left (x \right )\right )}{2 a -2 b}+\frac {b^{4} \ln \left (a +b \tanh \left (x \right )\right )}{a^{3} \left (a +b \right ) \left (a -b \right )}+\frac {b}{a^{2} \tanh \left (x \right )}-\frac {\left (-a^{2}-b^{2}\right ) \ln \left (\tanh \left (x \right )\right )}{a^{3}}-\frac {1}{2 a \tanh \left (x \right )^{2}}\) | \(97\) |
risch | \(\frac {x}{a +b}-\frac {2 x}{a}-\frac {2 x \,b^{2}}{a^{3}}-\frac {2 x \,b^{4}}{a^{3} \left (a^{2}-b^{2}\right )}-\frac {2 \left (a \,{\mathrm e}^{2 x}-b \,{\mathrm e}^{2 x}+b \right )}{\left ({\mathrm e}^{2 x}-1\right )^{2} a^{2}}+\frac {\ln \left ({\mathrm e}^{2 x}-1\right )}{a}+\frac {\ln \left ({\mathrm e}^{2 x}-1\right ) b^{2}}{a^{3}}+\frac {b^{4} \ln \left ({\mathrm e}^{2 x}+\frac {a -b}{a +b}\right )}{a^{3} \left (a^{2}-b^{2}\right )}\) | \(132\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 641 vs. \(2 (74) = 148\).
Time = 0.27 (sec) , antiderivative size = 641, normalized size of antiderivative = 8.43 \[ \int \frac {\coth ^3(x)}{a+b \tanh (x)} \, dx=-\frac {{\left (a^{4} + a^{3} b\right )} x \cosh \left (x\right )^{4} + 4 \, {\left (a^{4} + a^{3} b\right )} x \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{4} + a^{3} b\right )} x \sinh \left (x\right )^{4} + 2 \, a^{3} b - 2 \, a b^{3} + 2 \, {\left (a^{4} - a^{3} b - a^{2} b^{2} + a b^{3} - {\left (a^{4} + a^{3} b\right )} x\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{4} - a^{3} b - a^{2} b^{2} + a b^{3} + 3 \, {\left (a^{4} + a^{3} b\right )} x \cosh \left (x\right )^{2} - {\left (a^{4} + a^{3} b\right )} x\right )} \sinh \left (x\right )^{2} + {\left (a^{4} + a^{3} b\right )} x - {\left (b^{4} \cosh \left (x\right )^{4} + 4 \, b^{4} \cosh \left (x\right ) \sinh \left (x\right )^{3} + b^{4} \sinh \left (x\right )^{4} - 2 \, b^{4} \cosh \left (x\right )^{2} + b^{4} + 2 \, {\left (3 \, b^{4} \cosh \left (x\right )^{2} - b^{4}\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b^{4} \cosh \left (x\right )^{3} - b^{4} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, {\left (a \cosh \left (x\right ) + b \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - {\left ({\left (a^{4} - b^{4}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{4} - b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{4} - b^{4}\right )} \sinh \left (x\right )^{4} + a^{4} - b^{4} - 2 \, {\left (a^{4} - b^{4}\right )} \cosh \left (x\right )^{2} - 2 \, {\left (a^{4} - b^{4} - 3 \, {\left (a^{4} - b^{4}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{2} + 4 \, {\left ({\left (a^{4} - b^{4}\right )} \cosh \left (x\right )^{3} - {\left (a^{4} - b^{4}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, \sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 4 \, {\left ({\left (a^{4} + a^{3} b\right )} x \cosh \left (x\right )^{3} + {\left (a^{4} - a^{3} b - a^{2} b^{2} + a b^{3} - {\left (a^{4} + a^{3} b\right )} x\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )}{a^{5} - a^{3} b^{2} + {\left (a^{5} - a^{3} b^{2}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{5} - a^{3} b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{5} - a^{3} b^{2}\right )} \sinh \left (x\right )^{4} - 2 \, {\left (a^{5} - a^{3} b^{2}\right )} \cosh \left (x\right )^{2} - 2 \, {\left (a^{5} - a^{3} b^{2} - 3 \, {\left (a^{5} - a^{3} b^{2}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{2} + 4 \, {\left ({\left (a^{5} - a^{3} b^{2}\right )} \cosh \left (x\right )^{3} - {\left (a^{5} - a^{3} b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )} \]
[In]
[Out]
\[ \int \frac {\coth ^3(x)}{a+b \tanh (x)} \, dx=\int \frac {\coth ^{3}{\left (x \right )}}{a + b \tanh {\left (x \right )}}\, dx \]
[In]
[Out]
none
Time = 0.21 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.59 \[ \int \frac {\coth ^3(x)}{a+b \tanh (x)} \, dx=\frac {b^{4} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} - a - b\right )}{a^{5} - a^{3} b^{2}} + \frac {2 \, {\left ({\left (a + b\right )} e^{\left (-2 \, x\right )} - b\right )}}{2 \, a^{2} e^{\left (-2 \, x\right )} - a^{2} e^{\left (-4 \, x\right )} - a^{2}} + \frac {x}{a + b} + \frac {{\left (a^{2} + b^{2}\right )} \log \left (e^{\left (-x\right )} + 1\right )}{a^{3}} + \frac {{\left (a^{2} + b^{2}\right )} \log \left (e^{\left (-x\right )} - 1\right )}{a^{3}} \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.28 \[ \int \frac {\coth ^3(x)}{a+b \tanh (x)} \, dx=\frac {b^{4} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b \right |}\right )}{a^{5} - a^{3} b^{2}} - \frac {x}{a - b} + \frac {{\left (a^{2} + b^{2}\right )} \log \left ({\left | e^{\left (2 \, x\right )} - 1 \right |}\right )}{a^{3}} - \frac {2 \, {\left (a b + {\left (a^{2} - a b\right )} e^{\left (2 \, x\right )}\right )}}{a^{3} {\left (e^{\left (2 \, x\right )} - 1\right )}^{2}} \]
[In]
[Out]
Time = 2.04 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.46 \[ \int \frac {\coth ^3(x)}{a+b \tanh (x)} \, dx=\frac {\ln \left ({\mathrm {e}}^{2\,x}-1\right )\,\left (a^2+b^2\right )}{a^3}-\frac {x}{a-b}-\frac {2}{a\,\left ({\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1\right )}+\frac {b^4\,\ln \left (a-b+a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{a^5-a^3\,b^2}-\frac {2\,\left (a^2-b^2\right )}{a^2\,\left (a+b\right )\,\left ({\mathrm {e}}^{2\,x}-1\right )} \]
[In]
[Out]