Optimal. Leaf size=37 \[ \frac {x^{m+1} \tan ^{-1}(\tan (a+b x))}{m+1}-\frac {b x^{m+2}}{m^2+3 m+2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 37, 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}(\tan (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}(\tan (a+b x)) \, dx &=\frac {x^{1+m} \tan ^{-1}(\tan (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}(\tan (a+b x))}{1+m}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 34, normalized size = 0.92 \[ x^m \left (\frac {x \left (\tan ^{-1}(\tan (a+b x))-b x\right )}{m+1}+\frac {b x^2}{m+2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.52, size = 33, normalized size = 0.89 \[ \frac {{\left ({\left (b m + b\right )} x^{2} + {\left (a m + 2 \, a\right )} x\right )} x^{m}}{m^{2} + 3 \, m + 2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.18, size = 41, normalized size = 1.11 \[ \frac {b \,x^{2} {\mathrm e}^{m \ln \relax (x )}}{2+m}+\frac {\left (\arctan \left (\tan \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.34, size = 38, normalized size = 1.03 \[ -\frac {b x^{2} x^{m}}{{\left (m + 2\right )} {\left (m + 1\right )}} + \frac {x^{m + 1} \arctan \left (\tan \left (b x + a\right )\right )}{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\,\mathrm {atan}\left (\mathrm {tan}\left (a+b\,x\right )\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.70, size = 158, normalized size = 4.27 \[ \begin {cases} b \log {\relax (x )} - \frac {\operatorname {atan}{\left (\tan {\left (a + b x \right )} \right )} + \pi \left \lfloor {\frac {a + b x - \frac {\pi }{2}}{\pi }}\right \rfloor }{x} & \text {for}\: m = -2 \\- b x \log {\relax (x )} + b x + \left (\operatorname {atan}{\left (\tan {\left (a + b x \right )} \right )} + 2 \pi \left \lfloor {\frac {a + b x - \frac {\pi }{2}}{\pi }}\right \rfloor \right ) \log {\relax (x )} & \text {for}\: m = -1 \\- \frac {b x^{2} x^{m}}{m^{2} + 3 m + 2} + \frac {m x x^{m} \left (\operatorname {atan}{\left (\tan {\left (a + b x \right )} \right )} + \pi \left \lfloor {\frac {a + b x - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{m^{2} + 3 m + 2} + \frac {2 x x^{m} \left (\operatorname {atan}{\left (\tan {\left (a + b x \right )} \right )} + \pi \left \lfloor {\frac {a + b x - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{m^{2} + 3 m + 2} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________