Integrand size = 11, antiderivative size = 51 \[ \int \frac {\tanh (x)}{a+b \coth (x)} \, dx=-\frac {b x}{a^2-b^2}+\frac {\log (\cosh (x))}{a}+\frac {b^2 \log (b \cosh (x)+a \sinh (x))}{a \left (a^2-b^2\right )} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {3652, 3611, 3556} \[ \int \frac {\tanh (x)}{a+b \coth (x)} \, dx=-\frac {b x}{a^2-b^2}+\frac {b^2 \log (a \sinh (x)+b \cosh (x))}{a \left (a^2-b^2\right )}+\frac {\log (\cosh (x))}{a} \]
[In]
[Out]
Rule 3556
Rule 3611
Rule 3652
Rubi steps \begin{align*} \text {integral}& = -\frac {b x}{a^2-b^2}+\frac {\int \tanh (x) \, dx}{a}+\frac {\left (i b^2\right ) \int \frac {-i b-i a \coth (x)}{a+b \coth (x)} \, dx}{a \left (a^2-b^2\right )} \\ & = -\frac {b x}{a^2-b^2}+\frac {\log (\cosh (x))}{a}+\frac {b^2 \log (b \cosh (x)+a \sinh (x))}{a \left (a^2-b^2\right )} \\ \end{align*}
Time = 0.27 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.29 \[ \int \frac {\tanh (x)}{a+b \coth (x)} \, dx=-\frac {\log (1-\coth (x))}{2 (a+b)}-\frac {\log (1+\coth (x))}{2 (a-b)}+\frac {b^2 \log (a+b \coth (x))}{a \left (a^2-b^2\right )}-\frac {\log (\tanh (x))}{a} \]
[In]
[Out]
Time = 0.12 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.86
method | result | size |
parallelrisch | \(\frac {b^{2} \ln \left (b +a \tanh \left (x \right )\right )-\left (a \ln \left (1-\tanh \left (x \right )\right )+\left (a +b \right ) x \right ) a}{a^{3}-a \,b^{2}}\) | \(44\) |
derivativedivides | \(-\frac {\ln \left (1+\coth \left (x \right )\right )}{2 a -2 b}+\frac {b^{2} \ln \left (a +b \coth \left (x \right )\right )}{a \left (a +b \right ) \left (a -b \right )}-\frac {\ln \left (\coth \left (x \right )-1\right )}{2 a +2 b}+\frac {\ln \left (\coth \left (x \right )\right )}{a}\) | \(67\) |
default | \(-\frac {\ln \left (1+\coth \left (x \right )\right )}{2 a -2 b}+\frac {b^{2} \ln \left (a +b \coth \left (x \right )\right )}{a \left (a +b \right ) \left (a -b \right )}-\frac {\ln \left (\coth \left (x \right )-1\right )}{2 a +2 b}+\frac {\ln \left (\coth \left (x \right )\right )}{a}\) | \(67\) |
risch | \(\frac {x}{a +b}-\frac {2 x}{a}-\frac {2 x \,b^{2}}{a \left (a^{2}-b^{2}\right )}+\frac {\ln \left (1+{\mathrm e}^{2 x}\right )}{a}+\frac {b^{2} \ln \left ({\mathrm e}^{2 x}-\frac {a -b}{a +b}\right )}{a \left (a^{2}-b^{2}\right )}\) | \(82\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.43 \[ \int \frac {\tanh (x)}{a+b \coth (x)} \, dx=\frac {b^{2} \log \left (\frac {2 \, {\left (b \cosh \left (x\right ) + a \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - {\left (a^{2} + a b\right )} x + {\left (a^{2} - b^{2}\right )} \log \left (\frac {2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a^{3} - a b^{2}} \]
[In]
[Out]
\[ \int \frac {\tanh (x)}{a+b \coth (x)} \, dx=\int \frac {\tanh {\left (x \right )}}{a + b \coth {\left (x \right )}}\, dx \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.98 \[ \int \frac {\tanh (x)}{a+b \coth (x)} \, dx=\frac {b^{2} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} + a + b\right )}{a^{3} - a b^{2}} + \frac {x}{a + b} + \frac {\log \left (e^{\left (-2 \, x\right )} + 1\right )}{a} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.12 \[ \int \frac {\tanh (x)}{a+b \coth (x)} \, dx=\frac {b^{2} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} - a + b \right |}\right )}{a^{3} - a b^{2}} - \frac {x}{a - b} + \frac {\log \left (e^{\left (2 \, x\right )} + 1\right )}{a} \]
[In]
[Out]
Time = 0.35 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.14 \[ \int \frac {\tanh (x)}{a+b \coth (x)} \, dx=\frac {\ln \left ({\mathrm {e}}^{2\,x}+1\right )}{a}-\frac {x}{a-b}-\frac {b^2\,\ln \left (b-a+a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{a\,b^2-a^3} \]
[In]
[Out]