Optimal. Leaf size=480 \[ -\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}+\frac {b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2}{1-c-d x}\right )}{f (d e+f-c f)}-\frac {a b d \log (1-c-d x)}{f (d e+f-c f)}-\frac {b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2}{1+c+d x}\right )}{f (d e-f-c f)}+\frac {2 b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2}{1+c+d x}\right )}{(d e+f-c f) (d e-(1+c) f)}+\frac {a b d \log (1+c+d x)}{f (d e-f-c f)}+\frac {2 a b d \log (e+f x)}{f^2-(d e-c f)^2}-\frac {2 b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2 d (e+f x)}{(d e+f-c f) (1+c+d x)}\right )}{(d e+f-c f) (d e-(1+c) f)}+\frac {b^2 d \text {PolyLog}\left (2,-\frac {1+c+d x}{1-c-d x}\right )}{2 f (d e+f-c f)}+\frac {b^2 d \text {PolyLog}\left (2,1-\frac {2}{1+c+d x}\right )}{2 f (d e-f-c f)}-\frac {b^2 d \text {PolyLog}\left (2,1-\frac {2}{1+c+d x}\right )}{(d e+f-c f) (d e-(1+c) f)}+\frac {b^2 d \text {PolyLog}\left (2,1-\frac {2 d (e+f x)}{(d e+f-c f) (1+c+d x)}\right )}{(d e+f-c f) (d e-(1+c) f)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 1.20, antiderivative size = 485, normalized size of antiderivative = 1.01, number of steps
used = 21, number of rules used = 19, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.950, Rules used = {6245, 2007,
719, 31, 646, 6873, 6257, 720, 647, 6820, 12, 6857, 84, 6874, 6056, 2449, 2352, 6058, 2497}
\begin {gather*} -\frac {a b d \log (-c-d x+1)}{f (-c f+d e+f)}+\frac {a b d \log (c+d x+1)}{f (-c f+d e-f)}-\frac {2 a b d \log (e+f x)}{(-c f+d e+f) (d e-(c+1) f)}-\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}+\frac {b^2 d \text {Li}_2\left (-\frac {c+d x+1}{-c-d x+1}\right )}{2 f (-c f+d e+f)}+\frac {b^2 d \text {Li}_2\left (1-\frac {2}{c+d x+1}\right )}{2 f (-c f+d e-f)}-\frac {b^2 d \text {Li}_2\left (1-\frac {2}{c+d x+1}\right )}{(-c f+d e+f) (d e-(c+1) f)}+\frac {b^2 d \text {Li}_2\left (1-\frac {2 d (e+f x)}{(d e-c f+f) (c+d x+1)}\right )}{(-c f+d e+f) (d e-(c+1) f)}+\frac {b^2 d \log \left (\frac {2}{-c-d x+1}\right ) \coth ^{-1}(c+d x)}{f (-c f+d e+f)}-\frac {b^2 d \log \left (\frac {2}{c+d x+1}\right ) \coth ^{-1}(c+d x)}{f (-c f+d e-f)}+\frac {2 b^2 d \log \left (\frac {2}{c+d x+1}\right ) \coth ^{-1}(c+d x)}{(-c f+d e+f) (d e-(c+1) f)}-\frac {2 b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2 d (e+f x)}{(c+d x+1) (-c f+d e+f)}\right )}{(-c f+d e+f) (d e-(c+1) f)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 31
Rule 84
Rule 646
Rule 647
Rule 719
Rule 720
Rule 2007
Rule 2352
Rule 2449
Rule 2497
Rule 6056
Rule 6058
Rule 6245
Rule 6257
Rule 6820
Rule 6857
Rule 6873
Rule 6874
Rubi steps
\begin {align*} \int \frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{(e+f x)^2} \, dx &=-\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}+\frac {(2 b d) \int \frac {a+b \coth ^{-1}(c+d x)}{(e+f x) \left (1-(c+d x)^2\right )} \, dx}{f}\\ &=-\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}+\frac {(2 b d) \int \frac {a+b \coth ^{-1}(c+d x)}{(e+f x) \left (1-c^2-2 c d x-d^2 x^2\right )} \, dx}{f}\\ &=-\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}+\frac {(2 b) \text {Subst}\left (\int \frac {a+b \coth ^{-1}(x)}{\left (\frac {d e-c f}{d}+\frac {f x}{d}\right ) \left (1-x^2\right )} \, dx,x,c+d x\right )}{f}\\ &=-\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}+\frac {(2 b) \text {Subst}\left (\int \frac {d \left (a+b \coth ^{-1}(x)\right )}{(d e-c f+f x) \left (1-x^2\right )} \, dx,x,c+d x\right )}{f}\\ &=-\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}+\frac {(2 b d) \text {Subst}\left (\int \frac {a+b \coth ^{-1}(x)}{(d e-c f+f x) \left (1-x^2\right )} \, dx,x,c+d x\right )}{f}\\ &=-\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}+\frac {(2 b d) \text {Subst}\left (\int \left (-\frac {a}{(-1+x) (1+x) (d e-c f+f x)}-\frac {b \coth ^{-1}(x)}{(-1+x) (1+x) (d e-c f+f x)}\right ) \, dx,x,c+d x\right )}{f}\\ &=-\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}-\frac {(2 a b d) \text {Subst}\left (\int \frac {1}{(-1+x) (1+x) (d e-c f+f x)} \, dx,x,c+d x\right )}{f}-\frac {\left (2 b^2 d\right ) \text {Subst}\left (\int \frac {\coth ^{-1}(x)}{(-1+x) (1+x) (d e-c f+f x)} \, dx,x,c+d x\right )}{f}\\ &=-\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}-\frac {(2 a b d) \text {Subst}\left (\int \left (\frac {1}{2 (d e+f-c f) (-1+x)}+\frac {1}{2 (-d e+(1+c) f) (1+x)}+\frac {f^2}{(d e+(1-c) f) (d e-f-c f) (d e-c f+f x)}\right ) \, dx,x,c+d x\right )}{f}-\frac {\left (2 b^2 d\right ) \text {Subst}\left (\int \left (\frac {\coth ^{-1}(x)}{2 (d e+f-c f) (-1+x)}+\frac {\coth ^{-1}(x)}{2 (-d e+(1+c) f) (1+x)}+\frac {f^2 \coth ^{-1}(x)}{(d e+(1-c) f) (d e-f-c f) (d e-c f+f x)}\right ) \, dx,x,c+d x\right )}{f}\\ &=-\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}-\frac {a b d \log (1-c-d x)}{f (d e+f-c f)}+\frac {a b d \log (1+c+d x)}{f (d e-f-c f)}-\frac {2 a b d \log (e+f x)}{(d e+f-c f) (d e-(1+c) f)}+\frac {\left (b^2 d\right ) \text {Subst}\left (\int \frac {\coth ^{-1}(x)}{1+x} \, dx,x,c+d x\right )}{f (d e-f-c f)}-\frac {\left (b^2 d\right ) \text {Subst}\left (\int \frac {\coth ^{-1}(x)}{-1+x} \, dx,x,c+d x\right )}{f (d e+f-c f)}-\frac {\left (2 b^2 d f\right ) \text {Subst}\left (\int \frac {\coth ^{-1}(x)}{d e-c f+f x} \, dx,x,c+d x\right )}{(d e+f-c f) (d e-(1+c) f)}\\ &=-\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}+\frac {b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2}{1-c-d x}\right )}{f (d e+f-c f)}-\frac {a b d \log (1-c-d x)}{f (d e+f-c f)}-\frac {b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2}{1+c+d x}\right )}{f (d e-f-c f)}+\frac {2 b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2}{1+c+d x}\right )}{(d e+f-c f) (d e-(1+c) f)}+\frac {a b d \log (1+c+d x)}{f (d e-f-c f)}-\frac {2 a b d \log (e+f x)}{(d e+f-c f) (d e-(1+c) f)}-\frac {2 b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2 d (e+f x)}{(d e+f-c f) (1+c+d x)}\right )}{(d e+f-c f) (d e-(1+c) f)}+\frac {\left (b^2 d\right ) \text {Subst}\left (\int \frac {\log \left (\frac {2}{1+x}\right )}{1-x^2} \, dx,x,c+d x\right )}{f (d e-f-c f)}-\frac {\left (b^2 d\right ) \text {Subst}\left (\int \frac {\log \left (\frac {2}{1-x}\right )}{1-x^2} \, dx,x,c+d x\right )}{f (d e+f-c f)}-\frac {\left (2 b^2 d\right ) \text {Subst}\left (\int \frac {\log \left (\frac {2}{1+x}\right )}{1-x^2} \, dx,x,c+d x\right )}{(d e+f-c f) (d e-(1+c) f)}+\frac {\left (2 b^2 d\right ) \text {Subst}\left (\int \frac {\log \left (\frac {2 (d e-c f+f x)}{(d e+f-c f) (1+x)}\right )}{1-x^2} \, dx,x,c+d x\right )}{(d e+f-c f) (d e-(1+c) f)}\\ &=-\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}+\frac {b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2}{1-c-d x}\right )}{f (d e+f-c f)}-\frac {a b d \log (1-c-d x)}{f (d e+f-c f)}-\frac {b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2}{1+c+d x}\right )}{f (d e-f-c f)}+\frac {2 b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2}{1+c+d x}\right )}{(d e+f-c f) (d e-(1+c) f)}+\frac {a b d \log (1+c+d x)}{f (d e-f-c f)}-\frac {2 a b d \log (e+f x)}{(d e+f-c f) (d e-(1+c) f)}-\frac {2 b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2 d (e+f x)}{(d e+f-c f) (1+c+d x)}\right )}{(d e+f-c f) (d e-(1+c) f)}+\frac {b^2 d \text {Li}_2\left (1-\frac {2 d (e+f x)}{(d e+f-c f) (1+c+d x)}\right )}{(d e+f-c f) (d e-(1+c) f)}+\frac {\left (b^2 d\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+c+d x}\right )}{f (d e-f-c f)}+\frac {\left (b^2 d\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-c-d x}\right )}{f (d e+f-c f)}-\frac {\left (2 b^2 d\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+c+d x}\right )}{(d e+f-c f) (d e-(1+c) f)}\\ &=-\frac {\left (a+b \coth ^{-1}(c+d x)\right )^2}{f (e+f x)}+\frac {b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2}{1-c-d x}\right )}{f (d e+f-c f)}-\frac {a b d \log (1-c-d x)}{f (d e+f-c f)}-\frac {b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2}{1+c+d x}\right )}{f (d e-f-c f)}+\frac {2 b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2}{1+c+d x}\right )}{(d e+f-c f) (d e-(1+c) f)}+\frac {a b d \log (1+c+d x)}{f (d e-f-c f)}-\frac {2 a b d \log (e+f x)}{(d e+f-c f) (d e-(1+c) f)}-\frac {2 b^2 d \coth ^{-1}(c+d x) \log \left (\frac {2 d (e+f x)}{(d e+f-c f) (1+c+d x)}\right )}{(d e+f-c f) (d e-(1+c) f)}+\frac {b^2 d \text {Li}_2\left (1-\frac {2}{1-c-d x}\right )}{2 f (d e+f-c f)}+\frac {b^2 d \text {Li}_2\left (1-\frac {2}{1+c+d x}\right )}{2 f (d e-f-c f)}-\frac {b^2 d \text {Li}_2\left (1-\frac {2}{1+c+d x}\right )}{(d e+f-c f) (d e-(1+c) f)}+\frac {b^2 d \text {Li}_2\left (1-\frac {2 d (e+f x)}{(d e+f-c f) (1+c+d x)}\right )}{(d e+f-c f) (d e-(1+c) f)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 5.49, size = 470, normalized size = 0.98 \begin {gather*} \frac {-\frac {a^2}{f}+\frac {2 a b \left (\left (f-c^2 f+d^2 e x+c d (e-f x)\right ) \coth ^{-1}(c+d x)-d (e+f x) \log \left (-\frac {d (e+f x)}{(c+d x) \sqrt {1-\frac {1}{(c+d x)^2}}}\right )\right )}{(d e+f-c f) (d e-(1+c) f)}+\frac {b^2 d (e+f x) \left (1-(c+d x)^2\right ) \left (\frac {e^{\tanh ^{-1}\left (\frac {f}{-d e+c f}\right )} \coth ^{-1}(c+d x)^2}{(-d e+c f) \sqrt {1-\frac {f^2}{(d e-c f)^2}}}+\frac {\coth ^{-1}(c+d x)^2}{d e+d f x}+\frac {f \left (-i \pi \log \left (1+e^{2 \coth ^{-1}(c+d x)}\right )-2 \tanh ^{-1}\left (\frac {f}{-d e+c f}\right ) \log \left (1-e^{-2 \left (\coth ^{-1}(c+d x)+\tanh ^{-1}\left (\frac {f}{d e-c f}\right )\right )}\right )+\coth ^{-1}(c+d x) \left (i \pi +2 \tanh ^{-1}\left (\frac {f}{d e-c f}\right )+2 \log \left (1-e^{-2 \left (\coth ^{-1}(c+d x)+\tanh ^{-1}\left (\frac {f}{d e-c f}\right )\right )}\right )\right )+i \pi \log \left (\frac {1}{\sqrt {1-\frac {1}{(c+d x)^2}}}\right )+2 \tanh ^{-1}\left (\frac {f}{-d e+c f}\right ) \log \left (i \sinh \left (\coth ^{-1}(c+d x)+\tanh ^{-1}\left (\frac {f}{d e-c f}\right )\right )\right )-\text {PolyLog}\left (2,e^{-2 \left (\coth ^{-1}(c+d x)+\tanh ^{-1}\left (\frac {f}{d e-c f}\right )\right )}\right )\right )}{d^2 e^2-2 c d e f+\left (-1+c^2\right ) f^2}\right )}{(c+d x)^2 \left (f-\frac {f}{(c+d x)^2}\right )}}{e+f x} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.57, size = 857, normalized size = 1.79 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \operatorname {acoth}{\left (c + d x \right )}\right )^{2}}{\left (e + f x\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+b\,\mathrm {acoth}\left (c+d\,x\right )\right )}^2}{{\left (e+f\,x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________