Optimal. Leaf size=52 \[ \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} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, 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 = {5152, 4947,
272, 45} \begin {gather*} \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} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 272
Rule 4947
Rule 5152
Rubi steps
\begin {align*} \int (a+b x)^2 \cot ^{-1}(a+b x) \, dx &=\frac {\text {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 {\text {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 {\text {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 {\text {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 \begin {gather*} \frac {(a+b x)^2+2 (a+b x)^3 \cot ^{-1}(a+b x)-\log \left (1+(a+b x)^2\right )}{6 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 42, normalized size = 0.81
method | result | size |
derivativedivides | \(\frac {\frac {\mathrm {arccot}\left (b x +a \right ) \left (b x +a \right )^{3}}{3}+\frac {\left (b x +a \right )^{2}}{6}-\frac {\ln \left (1+\left (b x +a \right )^{2}\right )}{6}}{b}\) | \(42\) |
default | \(\frac {\frac {\mathrm {arccot}\left (b x +a \right ) \left (b x +a \right )^{3}}{3}+\frac {\left (b x +a \right )^{2}}{6}-\frac {\ln \left (1+\left (b x +a \right )^{2}\right )}{6}}{b}\) | \(42\) |
risch | \(\frac {i \left (b x +a \right )^{3} \ln \left (1+i \left (b x +a \right )\right )}{6 b}-\frac {i b^{2} x^{3} \ln \left (1-i \left (b x +a \right )\right )}{6}+\frac {\pi \,b^{2} x^{3}}{6}-\frac {i b a \,x^{2} \ln \left (1-i \left (b x +a \right )\right )}{2}+\frac {b \pi a \,x^{2}}{2}-\frac {i a^{2} x \ln \left (1-i \left (b x +a \right )\right )}{2}+\frac {x \,a^{2} \pi }{2}-\frac {i a^{3} \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{12 b}-\frac {a^{3} \arctan \left (b x +a \right )}{6 b}+\frac {x^{2} b}{6}+\frac {a x}{3}-\frac {\ln \left (-b^{2} x^{2}-2 a b x -a^{2}-1\right )}{6 b}\) | \(184\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 93 vs.
\(2 (46) = 92\).
time = 0.45, size = 93, normalized size = 1.79 \begin {gather*} -\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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.39, size = 81, normalized size = 1.56 \begin {gather*} \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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 6.07, size = 99, normalized size = 1.90 \begin {gather*} \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}{\left (a \right )} & \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. 203 vs.
\(2 (46) = 92\).
time = 0.49, size = 203, normalized size = 3.90 \begin {gather*} -\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}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.15, size = 85, normalized size = 1.63 \begin {gather*} \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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________