Optimal. Leaf size=39 \[ \frac {a \log (a \sinh (x)+b \cosh (x))}{a^2-b^2}-\frac {b x}{a^2-b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3531, 3530} \[ \frac {a \log (a \sinh (x)+b \cosh (x))}{a^2-b^2}-\frac {b x}{a^2-b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3530
Rule 3531
Rubi steps
\begin {align*} \int \frac {\coth (x)}{a+b \coth (x)} \, dx &=-\frac {b x}{a^2-b^2}+\frac {(i a) \int \frac {-i b-i a \coth (x)}{a+b \coth (x)} \, dx}{a^2-b^2}\\ &=-\frac {b x}{a^2-b^2}+\frac {a \log (b \cosh (x)+a \sinh (x))}{a^2-b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 29, normalized size = 0.74 \[ \frac {a \log (a \sinh (x)+b \cosh (x))-b x}{a^2-b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 43, normalized size = 1.10 \[ -\frac {{\left (a + b\right )} x - a \log \left (\frac {2 \, {\left (b \cosh \relax (x) + a \sinh \relax (x)\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right )}{a^{2} - b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.11, size = 43, normalized size = 1.10 \[ \frac {a \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} - a + b \right |}\right )}{a^{2} - b^{2}} - \frac {x}{a - b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 55, normalized size = 1.41 \[ -\frac {\ln \left (\coth \relax (x )-1\right )}{2 b +2 a}-\frac {\ln \left (1+\coth \relax (x )\right )}{2 a -2 b}+\frac {a \ln \left (a +b \coth \relax (x )\right )}{\left (a +b \right ) \left (a -b \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.63, size = 36, normalized size = 0.92 \[ \frac {a \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} + a + b\right )}{a^{2} - b^{2}} + \frac {x}{a + b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.06, size = 42, normalized size = 1.08 \[ \frac {a\,\ln \left (b-a+a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{a^2-b^2}-\frac {x}{a-b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.93, size = 134, normalized size = 3.44 \[ \begin {cases} \tilde {\infty } x & \text {for}\: a = 0 \wedge b = 0 \\\frac {x \tanh {\relax (x )}}{2 b \tanh {\relax (x )} - 2 b} - \frac {x}{2 b \tanh {\relax (x )} - 2 b} - \frac {1}{2 b \tanh {\relax (x )} - 2 b} & \text {for}\: a = - b \\\frac {x \tanh {\relax (x )}}{2 b \tanh {\relax (x )} + 2 b} + \frac {x}{2 b \tanh {\relax (x )} + 2 b} - \frac {1}{2 b \tanh {\relax (x )} + 2 b} & \text {for}\: a = b \\\frac {x}{b} & \text {for}\: a = 0 \\\frac {a x}{a^{2} - b^{2}} - \frac {a \log {\left (\tanh {\relax (x )} + 1 \right )}}{a^{2} - b^{2}} + \frac {a \log {\left (\tanh {\relax (x )} + \frac {b}{a} \right )}}{a^{2} - b^{2}} - \frac {b x}{a^{2} - b^{2}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________