Integrand size = 11, antiderivative size = 36 \[ \int x^m \arctan (\cot (a+b x)) \, dx=\frac {b x^{2+m}}{2+3 m+m^2}+\frac {x^{1+m} \arctan (\cot (a+b x))}{1+m} \]
Time = 0.03 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.86 \[ \int x^m \arctan (\cot (a+b x)) \, dx=\frac {x^{1+m} (b x+(2+m) \arctan (\cot (a+b x)))}{(1+m) (2+m)} \]
Time = 0.19 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2599, 15}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int x^m \arctan (\cot (a+b x)) \, dx\) |
\(\Big \downarrow \) 2599 |
\(\displaystyle \frac {b \int x^{m+1}dx}{m+1}+\frac {x^{m+1} \arctan (\cot (a+b x))}{m+1}\) |
\(\Big \downarrow \) 15 |
\(\displaystyle \frac {x^{m+1} \arctan (\cot (a+b x))}{m+1}+\frac {b x^{m+2}}{(m+1) (m+2)}\) |
3.1.42.3.1 Defintions of rubi rules used
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
Int[(u_)^(m_)*(v_)^(n_.), x_Symbol] :> With[{a = Simplify[D[u, x]], b = Sim plify[D[v, x]]}, Simp[u^(m + 1)*(v^n/(a*(m + 1))), x] - Simp[b*(n/(a*(m + 1 ))) Int[u^(m + 1)*v^(n - 1), x], x] /; NeQ[b*u - a*v, 0]] /; FreeQ[{m, n} , x] && PiecewiseLinearQ[u, v, x] && NeQ[m, -1] && ((LtQ[m, -1] && GtQ[n, 0 ] && !(ILtQ[m + n, -2] && (FractionQ[m] || GeQ[2*n + m + 1, 0]))) || (IGtQ [n, 0] && IGtQ[m, 0] && LeQ[n, m]) || (IGtQ[n, 0] && !IntegerQ[m]) || (ILt Q[m, 0] && !IntegerQ[n]))
Time = 0.32 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.56
method | result | size |
default | \(\frac {\pi \,x^{1+m}}{2+2 m}-\frac {b \,x^{2} {\mathrm e}^{m \ln \left (x \right )}}{2+m}-\frac {\left (\operatorname {arccot}\left (\cot \left (b x +a \right )\right )-b x \right ) x \,{\mathrm e}^{m \ln \left (x \right )}}{1+m}\) | \(56\) |
parts | \(\frac {\pi \,x^{1+m}}{2+2 m}-\frac {b \,x^{2} {\mathrm e}^{m \ln \left (x \right )}}{2+m}-\frac {\left (\operatorname {arccot}\left (\cot \left (b x +a \right )\right )-b x \right ) x \,{\mathrm e}^{m \ln \left (x \right )}}{1+m}\) | \(56\) |
parallelrisch | \(\frac {2 \pi x \,x^{m}-4 \,\operatorname {arccot}\left (\cot \left (b x +a \right )\right ) x^{m} x +2 b \,x^{m} x^{2}+\pi x \,x^{m} m -2 \,\operatorname {arccot}\left (\cot \left (b x +a \right )\right ) x^{m} x m}{2 \left (1+m \right ) \left (2+m \right )}\) | \(64\) |
risch | \(\frac {i x \,x^{m} \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{1+m}+\frac {x \left (4 \pi +2 \pi m \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right )^{3}+\pi m \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (b x +a \right )}}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right )^{3}+2 m \pi -2 \pi \,\operatorname {csgn}\left (i {\mathrm e}^{2 i \left (b x +a \right )}\right ) \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (b x +a \right )}}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right )^{2}+2 \pi \operatorname {csgn}\left (i {\mathrm e}^{2 i \left (b x +a \right )}\right )^{3}-2 \pi \,\operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right ) \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (b x +a \right )}}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right )^{2}-4 \pi \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right )^{2}+4 \pi \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right )^{3}+2 \pi \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (b x +a \right )}}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right )^{3}+4 b x +\pi m \,\operatorname {csgn}\left (i {\mathrm e}^{2 i \left (b x +a \right )}\right ) \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right ) \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (b x +a \right )}}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right )-2 \pi m \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right )^{2}+\pi m \operatorname {csgn}\left (i {\mathrm e}^{2 i \left (b x +a \right )}\right )^{3}+2 \pi \operatorname {csgn}\left (i {\mathrm e}^{i \left (b x +a \right )}\right )^{2} \operatorname {csgn}\left (i {\mathrm e}^{2 i \left (b x +a \right )}\right )-4 \pi \,\operatorname {csgn}\left (i {\mathrm e}^{i \left (b x +a \right )}\right ) \operatorname {csgn}\left (i {\mathrm e}^{2 i \left (b x +a \right )}\right )^{2}-\pi m \,\operatorname {csgn}\left (i {\mathrm e}^{2 i \left (b x +a \right )}\right ) \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (b x +a \right )}}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right )^{2}-\pi m \,\operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right ) \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (b x +a \right )}}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right )^{2}+2 \pi \,\operatorname {csgn}\left (i {\mathrm e}^{2 i \left (b x +a \right )}\right ) \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right ) \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (b x +a \right )}}{{\mathrm e}^{2 i \left (b x +a \right )}-1}\right )+\pi m \operatorname {csgn}\left (i {\mathrm e}^{i \left (b x +a \right )}\right )^{2} \operatorname {csgn}\left (i {\mathrm e}^{2 i \left (b x +a \right )}\right )-2 \pi m \,\operatorname {csgn}\left (i {\mathrm e}^{i \left (b x +a \right )}\right ) \operatorname {csgn}\left (i {\mathrm e}^{2 i \left (b x +a \right )}\right )^{2}\right ) x^{m}}{4 \left (1+m \right ) \left (2+m \right )}\) | \(669\) |
Time = 0.26 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.17 \[ \int x^m \arctan (\cot (a+b x)) \, dx=-\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 )}} \]
Leaf count of result is larger than twice the leaf count of optimal. 160 vs. \(2 (34) = 68\).
Time = 1.86 (sec) , antiderivative size = 160, normalized size of antiderivative = 4.44 \[ \int x^m \arctan (\cot (a+b x)) \, dx=\begin {cases} - b \log {\left (x \right )} + \frac {\operatorname {acot}{\left (\cot {\left (a + b x \right )} \right )}}{x} - \frac {\pi }{2 x} & \text {for}\: m = -2 \\b x \log {\left (x \right )} - b x - \log {\left (x \right )} \operatorname {acot}{\left (\cot {\left (a + b x \right )} \right )} + \frac {\pi \log {\left (x \right )}}{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} \]
Piecewise((-b*log(x) + acot(cot(a + b*x))/x - pi/(2*x), Eq(m, -2)), (b*x*l og(x) - b*x - log(x)*acot(cot(a + b*x)) + pi*log(x)/2, Eq(m, -1)), (2*b*x* *2*x**m/(2*m**2 + 6*m + 4) - 2*m*x*x**m*acot(cot(a + b*x))/(2*m**2 + 6*m + 4) + pi*m*x*x**m/(2*m**2 + 6*m + 4) - 4*x*x**m*acot(cot(a + b*x))/(2*m**2 + 6*m + 4) + 2*pi*x*x**m/(2*m**2 + 6*m + 4), True))
Time = 0.19 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.11 \[ \int x^m \arctan (\cot (a+b x)) \, dx=-\frac {b x^{m + 2}}{m + 2} + \frac {\pi x^{m + 1}}{2 \, {\left (m + 1\right )}} - \frac {a x^{m + 1}}{m + 1} \]
Time = 0.28 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.72 \[ \int x^m \arctan (\cot (a+b x)) \, dx=-\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 )}} \]
-1/2*(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)/(m^2 + 3*m + 2)
Timed out. \[ \int x^m \arctan (\cot (a+b x)) \, dx=\int x^m\,\left (\frac {\Pi }{2}-\mathrm {acot}\left (\mathrm {cot}\left (a+b\,x\right )\right )\right ) \,d x \]