Optimal. Leaf size=58 \[ \frac {d x^2}{6 a}+c x \cot ^{-1}(a x)+\frac {1}{3} d x^3 \cot ^{-1}(a x)+\frac {\left (3 a^2 c-d\right ) \log \left (1+a^2 x^2\right )}{6 a^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5033, 1607,
455, 45} \begin {gather*} \frac {\left (3 a^2 c-d\right ) \log \left (a^2 x^2+1\right )}{6 a^3}+c x \cot ^{-1}(a x)+\frac {1}{3} d x^3 \cot ^{-1}(a x)+\frac {d x^2}{6 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 455
Rule 1607
Rule 5033
Rubi steps
\begin {align*} \int \left (c+d x^2\right ) \cot ^{-1}(a x) \, dx &=c x \cot ^{-1}(a x)+\frac {1}{3} d x^3 \cot ^{-1}(a x)+a \int \frac {c x+\frac {d x^3}{3}}{1+a^2 x^2} \, dx\\ &=c x \cot ^{-1}(a x)+\frac {1}{3} d x^3 \cot ^{-1}(a x)+a \int \frac {x \left (c+\frac {d x^2}{3}\right )}{1+a^2 x^2} \, dx\\ &=c x \cot ^{-1}(a x)+\frac {1}{3} d x^3 \cot ^{-1}(a x)+\frac {1}{2} a \text {Subst}\left (\int \frac {c+\frac {d x}{3}}{1+a^2 x} \, dx,x,x^2\right )\\ &=c x \cot ^{-1}(a x)+\frac {1}{3} d x^3 \cot ^{-1}(a x)+\frac {1}{2} a \text {Subst}\left (\int \left (\frac {d}{3 a^2}+\frac {3 a^2 c-d}{3 a^2 \left (1+a^2 x\right )}\right ) \, dx,x,x^2\right )\\ &=\frac {d x^2}{6 a}+c x \cot ^{-1}(a x)+\frac {1}{3} d x^3 \cot ^{-1}(a x)+\frac {\left (3 a^2 c-d\right ) \log \left (1+a^2 x^2\right )}{6 a^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 67, normalized size = 1.16 \begin {gather*} \frac {d x^2}{6 a}+c x \cot ^{-1}(a x)+\frac {1}{3} d x^3 \cot ^{-1}(a x)+\frac {c \log \left (1+a^2 x^2\right )}{2 a}-\frac {d \log \left (1+a^2 x^2\right )}{6 a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 62, normalized size = 1.07
method | result | size |
derivativedivides | \(\frac {\mathrm {arccot}\left (a x \right ) c a x +\frac {a \,\mathrm {arccot}\left (a x \right ) d \,x^{3}}{3}+\frac {\frac {d \,a^{2} x^{2}}{2}+\frac {\left (3 a^{2} c -d \right ) \ln \left (a^{2} x^{2}+1\right )}{2}}{3 a^{2}}}{a}\) | \(62\) |
default | \(\frac {\mathrm {arccot}\left (a x \right ) c a x +\frac {a \,\mathrm {arccot}\left (a x \right ) d \,x^{3}}{3}+\frac {\frac {d \,a^{2} x^{2}}{2}+\frac {\left (3 a^{2} c -d \right ) \ln \left (a^{2} x^{2}+1\right )}{2}}{3 a^{2}}}{a}\) | \(62\) |
risch | \(\frac {i \left (d \,x^{3}+3 c x \right ) \ln \left (i a x +1\right )}{6}-\frac {i d \,x^{3} \ln \left (-i a x +1\right )}{6}+\frac {\pi d \,x^{3}}{6}-\frac {i c x \ln \left (-i a x +1\right )}{2}+\frac {\pi c x}{2}+\frac {d \,x^{2}}{6 a}+\frac {\ln \left (-a^{2} x^{2}-1\right ) c}{2 a}-\frac {\ln \left (-a^{2} x^{2}-1\right ) d}{6 a^{3}}\) | \(106\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 53, normalized size = 0.91 \begin {gather*} \frac {1}{6} \, a {\left (\frac {d x^{2}}{a^{2}} + \frac {{\left (3 \, a^{2} c - d\right )} \log \left (a^{2} x^{2} + 1\right )}{a^{4}}\right )} + \frac {1}{3} \, {\left (d x^{3} + 3 \, c x\right )} \operatorname {arccot}\left (a x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.05, size = 57, normalized size = 0.98 \begin {gather*} \frac {a^{2} d x^{2} + 2 \, {\left (a^{3} d x^{3} + 3 \, a^{3} c x\right )} \operatorname {arccot}\left (a x\right ) + {\left (3 \, a^{2} c - d\right )} \log \left (a^{2} x^{2} + 1\right )}{6 \, a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.19, size = 73, normalized size = 1.26 \begin {gather*} \begin {cases} c x \operatorname {acot}{\left (a x \right )} + \frac {d x^{3} \operatorname {acot}{\left (a x \right )}}{3} + \frac {c \log {\left (x^{2} + \frac {1}{a^{2}} \right )}}{2 a} + \frac {d x^{2}}{6 a} - \frac {d \log {\left (x^{2} + \frac {1}{a^{2}} \right )}}{6 a^{3}} & \text {for}\: a \neq 0 \\\frac {\pi \left (c x + \frac {d x^{3}}{3}\right )}{2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 99, normalized size = 1.71 \begin {gather*} \frac {1}{6} \, {\left (\frac {2 \, {\left (d + \frac {3 \, c}{x^{2}}\right )} x^{3} \arctan \left (\frac {1}{a x}\right )}{a} + \frac {{\left (d + \frac {3 \, c}{x^{2}} - \frac {d}{a^{2} x^{2}}\right )} x^{2}}{a^{2}} + \frac {{\left (3 \, a^{2} c - d\right )} \log \left (\frac {1}{a^{2} x^{2}} + 1\right )}{a^{4}} - \frac {{\left (3 \, a^{2} c - d\right )} \log \left (\frac {1}{a^{2} x^{2}}\right )}{a^{4}}\right )} a \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.79, size = 62, normalized size = 1.07 \begin {gather*} \frac {d\,x^3\,\mathrm {acot}\left (a\,x\right )}{3}-\frac {\frac {d\,\ln \left (a^2\,x^2+1\right )}{6}-a^2\,\left (\frac {c\,\ln \left (a^2\,x^2+1\right )}{2}+\frac {d\,x^2}{6}\right )}{a^3}+c\,x\,\mathrm {acot}\left (a\,x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________