Integrand size = 15, antiderivative size = 399 \[ \int x^2 \arctan (c+d \cot (a+b x)) \, dx=\frac {1}{3} x^3 \arctan (c+d \cot (a+b x))+\frac {1}{6} i x^3 \log \left (1-\frac {(1+i c-d) e^{2 i a+2 i b x}}{1+i c+d}\right )-\frac {1}{6} i x^3 \log \left (1-\frac {(c+i (1+d)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )+\frac {x^2 \operatorname {PolyLog}\left (2,\frac {(1+i c-d) e^{2 i a+2 i b x}}{1+i c+d}\right )}{4 b}-\frac {x^2 \operatorname {PolyLog}\left (2,\frac {(c+i (1+d)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{4 b}+\frac {i x \operatorname {PolyLog}\left (3,\frac {(1+i c-d) e^{2 i a+2 i b x}}{1+i c+d}\right )}{4 b^2}-\frac {i x \operatorname {PolyLog}\left (3,\frac {(c+i (1+d)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{4 b^2}-\frac {\operatorname {PolyLog}\left (4,\frac {(1+i c-d) e^{2 i a+2 i b x}}{1+i c+d}\right )}{8 b^3}+\frac {\operatorname {PolyLog}\left (4,\frac {(c+i (1+d)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{8 b^3} \]
1/3*x^3*arctan(c+d*cot(b*x+a))+1/6*I*x^3*ln(1-(1+I*c-d)*exp(2*I*a+2*I*b*x) /(1+I*c+d))-1/6*I*x^3*ln(1-(c+I*(1+d))*exp(2*I*a+2*I*b*x)/(c+I*(1-d)))+1/4 *x^2*polylog(2,(1+I*c-d)*exp(2*I*a+2*I*b*x)/(1+I*c+d))/b-1/4*x^2*polylog(2 ,(c+I*(1+d))*exp(2*I*a+2*I*b*x)/(c+I*(1-d)))/b+1/4*I*x*polylog(3,(1+I*c-d) *exp(2*I*a+2*I*b*x)/(1+I*c+d))/b^2-1/4*I*x*polylog(3,(c+I*(1+d))*exp(2*I*a +2*I*b*x)/(c+I*(1-d)))/b^2-1/8*polylog(4,(1+I*c-d)*exp(2*I*a+2*I*b*x)/(1+I *c+d))/b^3+1/8*polylog(4,(c+I*(1+d))*exp(2*I*a+2*I*b*x)/(c+I*(1-d)))/b^3
Time = 3.07 (sec) , antiderivative size = 360, normalized size of antiderivative = 0.90 \[ \int x^2 \arctan (c+d \cot (a+b x)) \, dx=\frac {8 b^3 x^3 \arctan (c+d \cot (a+b x))+4 i b^3 x^3 \log \left (1+\frac {(-c+i (1+d)) e^{-2 i (a+b x)}}{c+i (-1+d)}\right )-4 i b^3 x^3 \log \left (1+\frac {(-c+i (-1+d)) e^{-2 i (a+b x)}}{c+i (1+d)}\right )-6 b^2 x^2 \operatorname {PolyLog}\left (2,\frac {(c-i (1+d)) e^{-2 i (a+b x)}}{c+i (-1+d)}\right )+6 b^2 x^2 \operatorname {PolyLog}\left (2,\frac {(i+c-i d) e^{-2 i (a+b x)}}{c+i (1+d)}\right )+6 i b x \operatorname {PolyLog}\left (3,\frac {(c-i (1+d)) e^{-2 i (a+b x)}}{c+i (-1+d)}\right )-6 i b x \operatorname {PolyLog}\left (3,\frac {(i+c-i d) e^{-2 i (a+b x)}}{c+i (1+d)}\right )+3 \operatorname {PolyLog}\left (4,\frac {(c-i (1+d)) e^{-2 i (a+b x)}}{c+i (-1+d)}\right )-3 \operatorname {PolyLog}\left (4,\frac {(i+c-i d) e^{-2 i (a+b x)}}{c+i (1+d)}\right )}{24 b^3} \]
(8*b^3*x^3*ArcTan[c + d*Cot[a + b*x]] + (4*I)*b^3*x^3*Log[1 + (-c + I*(1 + d))/((c + I*(-1 + d))*E^((2*I)*(a + b*x)))] - (4*I)*b^3*x^3*Log[1 + (-c + I*(-1 + d))/((c + I*(1 + d))*E^((2*I)*(a + b*x)))] - 6*b^2*x^2*PolyLog[2, (c - I*(1 + d))/((c + I*(-1 + d))*E^((2*I)*(a + b*x)))] + 6*b^2*x^2*PolyL og[2, (I + c - I*d)/((c + I*(1 + d))*E^((2*I)*(a + b*x)))] + (6*I)*b*x*Pol yLog[3, (c - I*(1 + d))/((c + I*(-1 + d))*E^((2*I)*(a + b*x)))] - (6*I)*b* x*PolyLog[3, (I + c - I*d)/((c + I*(1 + d))*E^((2*I)*(a + b*x)))] + 3*Poly Log[4, (c - I*(1 + d))/((c + I*(-1 + d))*E^((2*I)*(a + b*x)))] - 3*PolyLog [4, (I + c - I*d)/((c + I*(1 + d))*E^((2*I)*(a + b*x)))])/(24*b^3)
Time = 1.59 (sec) , antiderivative size = 515, normalized size of antiderivative = 1.29, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {5700, 2620, 3011, 7163, 2720, 7143}
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^2 \arctan (d \cot (a+b x)+c) \, dx\) |
\(\Big \downarrow \) 5700 |
\(\displaystyle \frac {1}{3} b (i c-d+1) \int \frac {e^{2 i a+2 i b x} x^3}{i c-(i c-d+1) e^{2 i a+2 i b x}+d+1}dx-\frac {1}{3} b (-i c+d+1) \int \frac {e^{2 i a+2 i b x} x^3}{-i c-(-i c+d+1) e^{2 i a+2 i b x}-d+1}dx+\frac {1}{3} x^3 \arctan (d \cot (a+b x)+c)\) |
\(\Big \downarrow \) 2620 |
\(\displaystyle \frac {1}{3} b (i c-d+1) \left (\frac {x^3 \log \left (1-\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )}{2 b (c-i (1-d))}-\frac {3 \int x^2 \log \left (1-\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )dx}{2 b (c-i (1-d))}\right )-\frac {1}{3} b (-i c+d+1) \left (\frac {3 \int x^2 \log \left (1-\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )dx}{2 b (c+i (d+1))}-\frac {x^3 \log \left (1-\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{2 b (c+i (d+1))}\right )+\frac {1}{3} x^3 \arctan (d \cot (a+b x)+c)\) |
\(\Big \downarrow \) 3011 |
\(\displaystyle \frac {1}{3} b (i c-d+1) \left (\frac {x^3 \log \left (1-\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )}{2 b (c-i (1-d))}-\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )}{2 b}-\frac {i \int x \operatorname {PolyLog}\left (2,\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )dx}{b}\right )}{2 b (c-i (1-d))}\right )-\frac {1}{3} b (-i c+d+1) \left (\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{2 b}-\frac {i \int x \operatorname {PolyLog}\left (2,\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )dx}{b}\right )}{2 b (c+i (d+1))}-\frac {x^3 \log \left (1-\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{2 b (c+i (d+1))}\right )+\frac {1}{3} x^3 \arctan (d \cot (a+b x)+c)\) |
\(\Big \downarrow \) 7163 |
\(\displaystyle \frac {1}{3} b (i c-d+1) \left (\frac {x^3 \log \left (1-\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )}{2 b (c-i (1-d))}-\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )}{2 b}-\frac {i \left (\frac {i \int \operatorname {PolyLog}\left (3,\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )dx}{2 b}-\frac {i x \operatorname {PolyLog}\left (3,\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )}{2 b}\right )}{b}\right )}{2 b (c-i (1-d))}\right )-\frac {1}{3} b (-i c+d+1) \left (\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{2 b}-\frac {i \left (\frac {i \int \operatorname {PolyLog}\left (3,\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )dx}{2 b}-\frac {i x \operatorname {PolyLog}\left (3,\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{2 b}\right )}{b}\right )}{2 b (c+i (d+1))}-\frac {x^3 \log \left (1-\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{2 b (c+i (d+1))}\right )+\frac {1}{3} x^3 \arctan (d \cot (a+b x)+c)\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle \frac {1}{3} b (i c-d+1) \left (\frac {x^3 \log \left (1-\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )}{2 b (c-i (1-d))}-\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )}{2 b}-\frac {i \left (\frac {\int e^{-2 i a-2 i b x} \operatorname {PolyLog}\left (3,\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )de^{2 i a+2 i b x}}{4 b^2}-\frac {i x \operatorname {PolyLog}\left (3,\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )}{2 b}\right )}{b}\right )}{2 b (c-i (1-d))}\right )-\frac {1}{3} b (-i c+d+1) \left (\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{2 b}-\frac {i \left (\frac {\int e^{-2 i a-2 i b x} \operatorname {PolyLog}\left (3,\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )de^{2 i a+2 i b x}}{4 b^2}-\frac {i x \operatorname {PolyLog}\left (3,\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{2 b}\right )}{b}\right )}{2 b (c+i (d+1))}-\frac {x^3 \log \left (1-\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{2 b (c+i (d+1))}\right )+\frac {1}{3} x^3 \arctan (d \cot (a+b x)+c)\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle \frac {1}{3} x^3 \arctan (d \cot (a+b x)+c)+\frac {1}{3} b (i c-d+1) \left (\frac {x^3 \log \left (1-\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )}{2 b (c-i (1-d))}-\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )}{2 b}-\frac {i \left (\frac {\operatorname {PolyLog}\left (4,\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )}{4 b^2}-\frac {i x \operatorname {PolyLog}\left (3,\frac {(i c-d+1) e^{2 i a+2 i b x}}{i c+d+1}\right )}{2 b}\right )}{b}\right )}{2 b (c-i (1-d))}\right )-\frac {1}{3} b (-i c+d+1) \left (\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{2 b}-\frac {i \left (\frac {\operatorname {PolyLog}\left (4,\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{4 b^2}-\frac {i x \operatorname {PolyLog}\left (3,\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{2 b}\right )}{b}\right )}{2 b (c+i (d+1))}-\frac {x^3 \log \left (1-\frac {(c+i (d+1)) e^{2 i a+2 i b x}}{c+i (1-d)}\right )}{2 b (c+i (d+1))}\right )\) |
(x^3*ArcTan[c + d*Cot[a + b*x]])/3 + (b*(1 + I*c - d)*((x^3*Log[1 - ((1 + I*c - d)*E^((2*I)*a + (2*I)*b*x))/(1 + I*c + d)])/(2*b*(c - I*(1 - d))) - (3*(((I/2)*x^2*PolyLog[2, ((1 + I*c - d)*E^((2*I)*a + (2*I)*b*x))/(1 + I*c + d)])/b - (I*(((-1/2*I)*x*PolyLog[3, ((1 + I*c - d)*E^((2*I)*a + (2*I)*b *x))/(1 + I*c + d)])/b + PolyLog[4, ((1 + I*c - d)*E^((2*I)*a + (2*I)*b*x) )/(1 + I*c + d)]/(4*b^2)))/b))/(2*b*(c - I*(1 - d)))))/3 - (b*(1 - I*c + d )*(-1/2*(x^3*Log[1 - ((c + I*(1 + d))*E^((2*I)*a + (2*I)*b*x))/(c + I*(1 - d))])/(b*(c + I*(1 + d))) + (3*(((I/2)*x^2*PolyLog[2, ((c + I*(1 + d))*E^ ((2*I)*a + (2*I)*b*x))/(c + I*(1 - d))])/b - (I*(((-1/2*I)*x*PolyLog[3, (( c + I*(1 + d))*E^((2*I)*a + (2*I)*b*x))/(c + I*(1 - d))])/b + PolyLog[4, ( (c + I*(1 + d))*E^((2*I)*a + (2*I)*b*x))/(c + I*(1 - d))]/(4*b^2)))/b))/(2 *b*(c + I*(1 + d)))))/3
3.1.61.3.1 Defintions of rubi rules used
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ ((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp [((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si mp[d*(m/(b*f*g*n*Log[F])) Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x )))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct ionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ [{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) *(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) *(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F])) Int[(f + g*x)^( m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e , f, g, n}, x] && GtQ[m, 0]
Int[ArcTan[(c_.) + Cot[(a_.) + (b_.)*(x_)]*(d_.)]*((e_.) + (f_.)*(x_))^(m_. ), x_Symbol] :> Simp[(e + f*x)^(m + 1)*(ArcTan[c + d*Cot[a + b*x]]/(f*(m + 1))), x] + (Simp[b*((1 + I*c - d)/(f*(m + 1))) Int[(e + f*x)^(m + 1)*(E^( 2*I*a + 2*I*b*x)/(1 + I*c + d - (1 + I*c - d)*E^(2*I*a + 2*I*b*x))), x], x] - Simp[b*((1 - I*c + d)/(f*(m + 1))) Int[(e + f*x)^(m + 1)*(E^(2*I*a + 2 *I*b*x)/(1 - I*c - d - (1 - I*c + d)*E^(2*I*a + 2*I*b*x))), x], x]) /; Free Q[{a, b, c, d, e, f}, x] && IGtQ[m, 0] && NeQ[(c - I*d)^2, -1]
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d , e, n, p}, x] && EqQ[b*d, a*e]
Int[((e_.) + (f_.)*(x_))^(m_.)*PolyLog[n_, (d_.)*((F_)^((c_.)*((a_.) + (b_. )*(x_))))^(p_.)], x_Symbol] :> Simp[(e + f*x)^m*(PolyLog[n + 1, d*(F^(c*(a + b*x)))^p]/(b*c*p*Log[F])), x] - Simp[f*(m/(b*c*p*Log[F])) Int[(e + f*x) ^(m - 1)*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p], x], x] /; FreeQ[{F, a, b, c , d, e, f, n, p}, x] && GtQ[m, 0]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 30.66 (sec) , antiderivative size = 7869, normalized size of antiderivative = 19.72
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1589 vs. \(2 (283) = 566\).
Time = 0.43 (sec) , antiderivative size = 1589, normalized size of antiderivative = 3.98 \[ \int x^2 \arctan (c+d \cot (a+b x)) \, dx=\text {Too large to display} \]
1/48*(16*b^3*x^3*arctan(d*cot(b*x + a) + c) + 6*b^2*x^2*dilog(-(c^2 + d^2 - (c^2 + 2*I*c*d - d^2 + 1)*cos(2*b*x + 2*a) + (-I*c^2 + 2*c*d + I*d^2 - I )*sin(2*b*x + 2*a) + 2*d + 1)/(c^2 + d^2 + 2*d + 1) + 1) + 6*b^2*x^2*dilog (-(c^2 + d^2 - (c^2 - 2*I*c*d - d^2 + 1)*cos(2*b*x + 2*a) + (I*c^2 + 2*c*d - I*d^2 + I)*sin(2*b*x + 2*a) + 2*d + 1)/(c^2 + d^2 + 2*d + 1) + 1) - 6*b ^2*x^2*dilog(-(c^2 + d^2 - (c^2 + 2*I*c*d - d^2 + 1)*cos(2*b*x + 2*a) + (- I*c^2 + 2*c*d + I*d^2 - I)*sin(2*b*x + 2*a) - 2*d + 1)/(c^2 + d^2 - 2*d + 1) + 1) - 6*b^2*x^2*dilog(-(c^2 + d^2 - (c^2 - 2*I*c*d - d^2 + 1)*cos(2*b* x + 2*a) + (I*c^2 + 2*c*d - I*d^2 + I)*sin(2*b*x + 2*a) - 2*d + 1)/(c^2 + d^2 - 2*d + 1) + 1) - 4*I*a^3*log(1/2*c^2 + I*c*d - 1/2*d^2 - 1/2*(c^2 + d ^2 + 2*d + 1)*cos(2*b*x + 2*a) + 1/2*(I*c^2 + I*d^2 + 2*I*d + I)*sin(2*b*x + 2*a) + 1/2) + 4*I*a^3*log(1/2*c^2 + I*c*d - 1/2*d^2 - 1/2*(c^2 + d^2 - 2*d + 1)*cos(2*b*x + 2*a) + 1/2*(I*c^2 + I*d^2 - 2*I*d + I)*sin(2*b*x + 2* a) + 1/2) + 4*I*a^3*log(-1/2*c^2 + I*c*d + 1/2*d^2 + 1/2*(c^2 + d^2 + 2*d + 1)*cos(2*b*x + 2*a) + 1/2*(I*c^2 + I*d^2 + 2*I*d + I)*sin(2*b*x + 2*a) - 1/2) - 4*I*a^3*log(-1/2*c^2 + I*c*d + 1/2*d^2 + 1/2*(c^2 + d^2 - 2*d + 1) *cos(2*b*x + 2*a) + 1/2*(I*c^2 + I*d^2 - 2*I*d + I)*sin(2*b*x + 2*a) - 1/2 ) + 6*I*b*x*polylog(3, ((c^2 + 2*I*c*d - d^2 + 1)*cos(2*b*x + 2*a) + (I*c^ 2 - 2*c*d - I*d^2 + I)*sin(2*b*x + 2*a))/(c^2 + d^2 + 2*d + 1)) - 6*I*b*x* polylog(3, ((c^2 + 2*I*c*d - d^2 + 1)*cos(2*b*x + 2*a) + (I*c^2 - 2*c*d...
Timed out. \[ \int x^2 \arctan (c+d \cot (a+b x)) \, dx=\text {Timed out} \]
\[ \int x^2 \arctan (c+d \cot (a+b x)) \, dx=\int { x^{2} \arctan \left (d \cot \left (b x + a\right ) + c\right ) \,d x } \]
-1/6*x^3*arctan2(-c*cos(2*b*x + 2*a) + (d + 1)*sin(2*b*x + 2*a) + c, (d + 1)*cos(2*b*x + 2*a) + c*sin(2*b*x + 2*a) + d - 1) - 1/6*x^3*arctan2(-c*cos (2*b*x + 2*a) + (d - 1)*sin(2*b*x + 2*a) + c, -(d - 1)*cos(2*b*x + 2*a) - c*sin(2*b*x + 2*a) - d - 1) + 4*b*d*integrate(1/3*(2*(c^2 + d^2 + 1)*x^3*c os(2*b*x + 2*a)^2 + 2*c*d*x^3*sin(2*b*x + 2*a) + 2*(c^2 + d^2 + 1)*x^3*sin (2*b*x + 2*a)^2 - (c^2 - d^2 + 1)*x^3*cos(2*b*x + 2*a) - (2*c*d*x^3*sin(2* b*x + 2*a) + (c^2 - d^2 + 1)*x^3*cos(2*b*x + 2*a))*cos(4*b*x + 4*a) + (2*c *d*x^3*cos(2*b*x + 2*a) - (c^2 - d^2 + 1)*x^3*sin(2*b*x + 2*a))*sin(4*b*x + 4*a))/(c^4 + d^4 + 2*(c^2 - 1)*d^2 + (c^4 + d^4 + 2*(c^2 - 1)*d^2 + 2*c^ 2 + 1)*cos(4*b*x + 4*a)^2 + 4*(c^4 + d^4 + 2*(c^2 + 1)*d^2 + 2*c^2 + 1)*co s(2*b*x + 2*a)^2 + (c^4 + d^4 + 2*(c^2 - 1)*d^2 + 2*c^2 + 1)*sin(4*b*x + 4 *a)^2 + 4*(c^4 + d^4 + 2*(c^2 + 1)*d^2 + 2*c^2 + 1)*sin(2*b*x + 2*a)^2 + 2 *c^2 + 2*(c^4 + d^4 - 2*(3*c^2 + 1)*d^2 + 2*c^2 - 2*(c^4 - d^4 + 2*c^2 + 1 )*cos(2*b*x + 2*a) - 4*(c*d^3 + (c^3 + c)*d)*sin(2*b*x + 2*a) + 1)*cos(4*b *x + 4*a) - 4*(c^4 - d^4 + 2*c^2 + 1)*cos(2*b*x + 2*a) + 4*(2*c*d^3 - 2*(c ^3 + c)*d + 2*(c*d^3 + (c^3 + c)*d)*cos(2*b*x + 2*a) - (c^4 - d^4 + 2*c^2 + 1)*sin(2*b*x + 2*a))*sin(4*b*x + 4*a) + 8*(c*d^3 + (c^3 + c)*d)*sin(2*b* x + 2*a) + 1), x)
\[ \int x^2 \arctan (c+d \cot (a+b x)) \, dx=\int { x^{2} \arctan \left (d \cot \left (b x + a\right ) + c\right ) \,d x } \]
Timed out. \[ \int x^2 \arctan (c+d \cot (a+b x)) \, dx=\int x^2\,\mathrm {atan}\left (c+d\,\mathrm {cot}\left (a+b\,x\right )\right ) \,d x \]