Optimal. Leaf size=36 \[ \frac {x^{m+1} \tan ^{-1}(\cot (a+b x))}{m+1}+\frac {b x^{m+2}}{m^2+3 m+2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2168, 30} \[ \frac {x^{m+1} \tan ^{-1}(\cot (a+b x))}{m+1}+\frac {b x^{m+2}}{m^2+3 m+2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2168
Rubi steps
\begin {align*} \int x^m \tan ^{-1}(\cot (a+b x)) \, dx &=\frac {x^{1+m} \tan ^{-1}(\cot (a+b x))}{1+m}+\frac {b \int x^{1+m} \, dx}{1+m}\\ &=\frac {b x^{2+m}}{2+3 m+m^2}+\frac {x^{1+m} \tan ^{-1}(\cot (a+b x))}{1+m}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 31, normalized size = 0.86 \[ \frac {x^{m+1} \left ((m+2) \tan ^{-1}(\cot (a+b x))+b x\right )}{(m+1) (m+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 42, normalized size = 1.17 \[ -\frac {{\left (2 \, {\left (b m + b\right )} x^{2} - {\left (\pi {\left (m + 2\right )} - 2 \, a m - 4 \, a\right )} x\right )} x^{m}}{2 \, {\left (m^{2} + 3 \, m + 2\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 62, normalized size = 1.72 \[ -\frac {2 \, b m x^{2} x^{m} - \pi m x x^{m} + 2 \, a m x x^{m} + 2 \, b x^{2} x^{m} - 2 \, \pi x x^{m} + 4 \, a x x^{m}}{2 \, {\left (m^{2} + 3 \, m + 2\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.31, size = 56, normalized size = 1.56 \[ \frac {\pi \,x^{1+m}}{2+2 m}-\frac {b \,x^{2} {\mathrm e}^{m \ln \relax (x )}}{2+m}-\frac {\left (\mathrm {arccot}\left (\cot \left (b x +a \right )\right )-b x \right ) x \,{\mathrm e}^{m \ln \relax (x )}}{1+m} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 40, normalized size = 1.11 \[ -\frac {b x^{m + 2}}{m + 2} + \frac {\pi x^{m + 1}}{2 \, {\left (m + 1\right )}} - \frac {a x^{m + 1}}{m + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.03 \[ \int x^m\,\left (\frac {\Pi }{2}-\mathrm {acot}\left (\mathrm {cot}\left (a+b\,x\right )\right )\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 6.61, size = 160, normalized size = 4.44 \[ \begin {cases} - b \log {\relax (x )} + \frac {\operatorname {acot}{\left (\cot {\left (a + b x \right )} \right )}}{x} - \frac {\pi }{2 x} & \text {for}\: m = -2 \\b x \log {\relax (x )} - b x - \log {\relax (x )} \operatorname {acot}{\left (\cot {\left (a + b x \right )} \right )} + \frac {\pi \log {\relax (x )}}{2} & \text {for}\: m = -1 \\\frac {2 b x^{2} x^{m}}{2 m^{2} + 6 m + 4} - \frac {2 m x x^{m} \operatorname {acot}{\left (\cot {\left (a + b x \right )} \right )}}{2 m^{2} + 6 m + 4} + \frac {\pi m x x^{m}}{2 m^{2} + 6 m + 4} - \frac {4 x x^{m} \operatorname {acot}{\left (\cot {\left (a + b x \right )} \right )}}{2 m^{2} + 6 m + 4} + \frac {2 \pi x x^{m}}{2 m^{2} + 6 m + 4} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________