Optimal. Leaf size=64 \[ -\frac {\coth ^{-1}(a+b x)}{x}+\frac {b \log (x)}{1-a^2}-\frac {b \log (1-a-b x)}{2 (1-a)}-\frac {b \log (1+a+b x)}{2 (1+a)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {6245, 378, 720,
31, 647} \begin {gather*} \frac {b \log (x)}{1-a^2}-\frac {b \log (-a-b x+1)}{2 (1-a)}-\frac {b \log (a+b x+1)}{2 (a+1)}-\frac {\coth ^{-1}(a+b x)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 378
Rule 647
Rule 720
Rule 6245
Rubi steps
\begin {align*} \int \frac {\coth ^{-1}(a+b x)}{x^2} \, dx &=-\frac {\coth ^{-1}(a+b x)}{x}+b \int \frac {1}{x \left (1-(a+b x)^2\right )} \, dx\\ &=-\frac {\coth ^{-1}(a+b x)}{x}+b \text {Subst}\left (\int \frac {1}{(-a+x) \left (1-x^2\right )} \, dx,x,a+b x\right )\\ &=-\frac {\coth ^{-1}(a+b x)}{x}+\frac {b \text {Subst}\left (\int \frac {1}{-a+x} \, dx,x,a+b x\right )}{1-a^2}+\frac {b \text {Subst}\left (\int \frac {a+x}{1-x^2} \, dx,x,a+b x\right )}{1-a^2}\\ &=-\frac {\coth ^{-1}(a+b x)}{x}+\frac {b \log (x)}{1-a^2}+\frac {b \text {Subst}\left (\int \frac {1}{1-x} \, dx,x,a+b x\right )}{2 (1-a)}+\frac {b \text {Subst}\left (\int \frac {1}{-1-x} \, dx,x,a+b x\right )}{2 (1+a)}\\ &=-\frac {\coth ^{-1}(a+b x)}{x}+\frac {b \log (x)}{1-a^2}-\frac {b \log (1-a-b x)}{2 (1-a)}-\frac {b \log (1+a+b x)}{2 (1+a)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 55, normalized size = 0.86 \begin {gather*} -\frac {\coth ^{-1}(a+b x)}{x}+\frac {b (-2 \log (x)+(1+a) \log (1-a-b x)-(-1+a) \log (1+a+b x))}{2 \left (-1+a^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 66, normalized size = 1.03
method | result | size |
derivativedivides | \(b \left (-\frac {\mathrm {arccoth}\left (b x +a \right )}{b x}-\frac {\ln \left (-b x \right )}{\left (-1+a \right ) \left (1+a \right )}+\frac {\ln \left (b x +a -1\right )}{-2+2 a}-\frac {\ln \left (b x +a +1\right )}{2+2 a}\right )\) | \(66\) |
default | \(b \left (-\frac {\mathrm {arccoth}\left (b x +a \right )}{b x}-\frac {\ln \left (-b x \right )}{\left (-1+a \right ) \left (1+a \right )}+\frac {\ln \left (b x +a -1\right )}{-2+2 a}-\frac {\ln \left (b x +a +1\right )}{2+2 a}\right )\) | \(66\) |
risch | \(-\frac {\ln \left (b x +a +1\right )}{2 x}-\frac {\ln \left (b x +a +1\right ) a b x -\ln \left (-b x -a +1\right ) a b x -\ln \left (b x +a +1\right ) b x +2 \ln \left (-x \right ) b x -\ln \left (-b x -a +1\right ) b x -\ln \left (b x +a -1\right ) a^{2}+\ln \left (b x +a -1\right )}{2 x \left (-1+a \right ) \left (1+a \right )}\) | \(108\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 54, normalized size = 0.84 \begin {gather*} -\frac {1}{2} \, b {\left (\frac {\log \left (b x + a + 1\right )}{a + 1} - \frac {\log \left (b x + a - 1\right )}{a - 1} + \frac {2 \, \log \left (x\right )}{a^{2} - 1}\right )} - \frac {\operatorname {arcoth}\left (b x + a\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 68, normalized size = 1.06 \begin {gather*} -\frac {{\left (a - 1\right )} b x \log \left (b x + a + 1\right ) - {\left (a + 1\right )} b x \log \left (b x + a - 1\right ) + 2 \, b x \log \left (x\right ) + {\left (a^{2} - 1\right )} \log \left (\frac {b x + a + 1}{b x + a - 1}\right )}{2 \, {\left (a^{2} - 1\right )} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 144 vs.
\(2 (48) = 96\).
time = 0.62, size = 144, normalized size = 2.25 \begin {gather*} \begin {cases} \frac {b \operatorname {acoth}{\left (b x - 1 \right )}}{2} - \frac {\operatorname {acoth}{\left (b x - 1 \right )}}{x} - \frac {1}{2 x} & \text {for}\: a = -1 \\- \frac {b \operatorname {acoth}{\left (b x + 1 \right )}}{2} - \frac {\operatorname {acoth}{\left (b x + 1 \right )}}{x} + \frac {1}{2 x} & \text {for}\: a = 1 \\- \frac {a^{2} \operatorname {acoth}{\left (a + b x \right )}}{a^{2} x - x} - \frac {a b x \operatorname {acoth}{\left (a + b x \right )}}{a^{2} x - x} - \frac {b x \log {\left (x \right )}}{a^{2} x - x} + \frac {b x \log {\left (a + b x + 1 \right )}}{a^{2} x - x} - \frac {b x \operatorname {acoth}{\left (a + b x \right )}}{a^{2} x - x} + \frac {\operatorname {acoth}{\left (a + b x \right )}}{a^{2} x - x} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 259 vs.
\(2 (57) = 114\).
time = 0.40, size = 259, normalized size = 4.05 \begin {gather*} -\frac {1}{2} \, {\left ({\left (a + 1\right )} b - {\left (a - 1\right )} b\right )} {\left (\frac {{\left (a - 1\right )} \log \left ({\left | \frac {{\left (b x + a + 1\right )} a}{b x + a - 1} - a - \frac {b x + a + 1}{b x + a - 1} - 1 \right |}\right )}{a^{3} - a^{2} - a + 1} - \frac {\log \left (\frac {{\left | b x + a + 1 \right |}}{{\left | b x + a - 1 \right |}}\right )}{a^{2} - 1} - \frac {\log \left (-\frac {\frac {1}{a - \frac {{\left (\frac {{\left (b x + a + 1\right )} {\left (a - 1\right )}}{b x + a - 1} - a - 1\right )} b}{\frac {{\left (b x + a + 1\right )} b}{b x + a - 1} - b}} + 1}{\frac {1}{a - \frac {{\left (\frac {{\left (b x + a + 1\right )} {\left (a - 1\right )}}{b x + a - 1} - a - 1\right )} b}{\frac {{\left (b x + a + 1\right )} b}{b x + a - 1} - b}} - 1}\right )}{{\left (\frac {{\left (b x + a + 1\right )} a}{b x + a - 1} - a - \frac {b x + a + 1}{b x + a - 1} - 1\right )} {\left (a - 1\right )}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.73, size = 62, normalized size = 0.97 \begin {gather*} -\frac {\mathrm {acoth}\left (a+b\,x\right )}{x}-\frac {b\,x\,\ln \left (x\right )-\frac {b\,x\,\ln \left (a^2+2\,a\,b\,x+b^2\,x^2-1\right )}{2}+a\,b\,x\,\mathrm {acoth}\left (a+b\,x\right )}{x\,\left (a^2-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________