Optimal. Leaf size=52 \[ \frac {(a+b x)^2}{6 b}-\frac {\log \left ((a+b x)^2+1\right )}{6 b}+\frac {(a+b x)^3 \cot ^{-1}(a+b x)}{3 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {5044, 4853, 266, 43} \[ \frac {(a+b x)^2}{6 b}-\frac {\log \left ((a+b x)^2+1\right )}{6 b}+\frac {(a+b x)^3 \cot ^{-1}(a+b x)}{3 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 266
Rule 4853
Rule 5044
Rubi steps
\begin {align*} \int (a+b x)^2 \cot ^{-1}(a+b x) \, dx &=\frac {\operatorname {Subst}\left (\int x^2 \cot ^{-1}(x) \, dx,x,a+b x\right )}{b}\\ &=\frac {(a+b x)^3 \cot ^{-1}(a+b x)}{3 b}+\frac {\operatorname {Subst}\left (\int \frac {x^3}{1+x^2} \, dx,x,a+b x\right )}{3 b}\\ &=\frac {(a+b x)^3 \cot ^{-1}(a+b x)}{3 b}+\frac {\operatorname {Subst}\left (\int \frac {x}{1+x} \, dx,x,(a+b x)^2\right )}{6 b}\\ &=\frac {(a+b x)^3 \cot ^{-1}(a+b x)}{3 b}+\frac {\operatorname {Subst}\left (\int \left (1+\frac {1}{-1-x}\right ) \, dx,x,(a+b x)^2\right )}{6 b}\\ &=\frac {(a+b x)^2}{6 b}+\frac {(a+b x)^3 \cot ^{-1}(a+b x)}{3 b}-\frac {\log \left (1+(a+b x)^2\right )}{6 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 42, normalized size = 0.81 \[ \frac {(a+b x)^2-\log \left ((a+b x)^2+1\right )+2 (a+b x)^3 \cot ^{-1}(a+b x)}{6 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 81, normalized size = 1.56 \[ \frac {b^{2} x^{2} - 2 \, a^{3} \arctan \left (b x + a\right ) + 2 \, a b x + 2 \, {\left (b^{3} x^{3} + 3 \, a b^{2} x^{2} + 3 \, a^{2} b x\right )} \operatorname {arccot}\left (b x + a\right ) - \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{6 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.31, size = 203, normalized size = 3.90 \[ -\frac {\arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{6} - 3 \, \arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{4} - \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{5} - 4 \, \log \left (\frac {16 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2}}{\tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{3} + 3 \, \arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} - 2 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{3} - \arctan \left (\frac {1}{b x + a}\right ) - \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )}{24 \, b \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 86, normalized size = 1.65 \[ \frac {b^{2} \mathrm {arccot}\left (b x +a \right ) x^{3}}{3}+b \,\mathrm {arccot}\left (b x +a \right ) x^{2} a +\mathrm {arccot}\left (b x +a \right ) x \,a^{2}+\frac {\mathrm {arccot}\left (b x +a \right ) a^{3}}{3 b}+\frac {b \,x^{2}}{6}+\frac {a x}{3}+\frac {a^{2}}{6 b}-\frac {\ln \left (1+\left (b x +a \right )^{2}\right )}{6 b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 93, normalized size = 1.79 \[ -\frac {1}{6} \, {\left (\frac {2 \, a^{3} \arctan \left (\frac {b^{2} x + a b}{b}\right )}{b^{2}} - \frac {b x^{2} + 2 \, a x}{b} + \frac {\log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{b^{2}}\right )} b + \frac {1}{3} \, {\left (b^{2} x^{3} + 3 \, a b x^{2} + 3 \, a^{2} x\right )} \operatorname {arccot}\left (b x + a\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.15, size = 85, normalized size = 1.63 \[ \frac {a\,x}{3}-\frac {\ln \left (a^2+2\,a\,b\,x+b^2\,x^2+1\right )}{6\,b}+\frac {b\,x^2}{6}-\frac {a^3\,\mathrm {atan}\left (a+b\,x\right )}{3\,b}+\frac {b^2\,x^3\,\mathrm {acot}\left (a+b\,x\right )}{3}+a^2\,x\,\mathrm {acot}\left (a+b\,x\right )+a\,b\,x^2\,\mathrm {acot}\left (a+b\,x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.91, size = 99, normalized size = 1.90 \[ \begin {cases} \frac {a^{3} \operatorname {acot}{\left (a + b x \right )}}{3 b} + a^{2} x \operatorname {acot}{\left (a + b x \right )} + a b x^{2} \operatorname {acot}{\left (a + b x \right )} + \frac {a x}{3} + \frac {b^{2} x^{3} \operatorname {acot}{\left (a + b x \right )}}{3} + \frac {b x^{2}}{6} - \frac {\log {\left (\frac {a}{b} + x - \frac {i}{b} \right )}}{3 b} - \frac {i \operatorname {acot}{\left (a + b x \right )}}{3 b} & \text {for}\: b \neq 0 \\a^{2} x \operatorname {acot}{\relax (a )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________