Integrand size = 20, antiderivative size = 423 \[ \int (c+d x)^2 (a+b \cot (e+f x))^3 \, dx=-\frac {3 i a b^2 (c+d x)^2}{f}-\frac {b^3 (c+d x)^2}{2 f}+\frac {a^3 (c+d x)^3}{3 d}-\frac {i a^2 b (c+d x)^3}{d}-\frac {a b^2 (c+d x)^3}{d}+\frac {i b^3 (c+d x)^3}{3 d}-\frac {b^3 d (c+d x) \cot (e+f x)}{f^2}-\frac {3 a b^2 (c+d x)^2 \cot (e+f x)}{f}-\frac {b^3 (c+d x)^2 \cot ^2(e+f x)}{2 f}+\frac {6 a b^2 d (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f^2}+\frac {3 a^2 b (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {b^3 (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right )}{f}+\frac {b^3 d^2 \log (\sin (e+f x))}{f^3}-\frac {3 i a b^2 d^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^3}-\frac {3 i a^2 b d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^2}+\frac {i b^3 d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^2}+\frac {3 a^2 b d^2 \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}-\frac {b^3 d^2 \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3} \] Output:
-3*I*a*b^2*d^2*polylog(2,exp(2*I*(f*x+e)))/f^3-1/2*b^3*(d*x+c)^2/f+1/3*a^3 *(d*x+c)^3/d-3*I*a^2*b*d*(d*x+c)*polylog(2,exp(2*I*(f*x+e)))/f^2-a*b^2*(d* x+c)^3/d-3*I*a*b^2*(d*x+c)^2/f-b^3*d*(d*x+c)*cot(f*x+e)/f^2-3*a*b^2*(d*x+c )^2*cot(f*x+e)/f-1/2*b^3*(d*x+c)^2*cot(f*x+e)^2/f+6*a*b^2*d*(d*x+c)*ln(1-e xp(2*I*(f*x+e)))/f^2+3*a^2*b*(d*x+c)^2*ln(1-exp(2*I*(f*x+e)))/f-b^3*(d*x+c )^2*ln(1-exp(2*I*(f*x+e)))/f+b^3*d^2*ln(sin(f*x+e))/f^3-I*a^2*b*(d*x+c)^3/ d+I*b^3*d*(d*x+c)*polylog(2,exp(2*I*(f*x+e)))/f^2+1/3*I*b^3*(d*x+c)^3/d+3/ 2*a^2*b*d^2*polylog(3,exp(2*I*(f*x+e)))/f^3-1/2*b^3*d^2*polylog(3,exp(2*I* (f*x+e)))/f^3
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(2029\) vs. \(2(423)=846\).
Time = 7.07 (sec) , antiderivative size = 2029, normalized size of antiderivative = 4.80 \[ \int (c+d x)^2 (a+b \cot (e+f x))^3 \, dx=\text {Result too large to show} \] Input:
Integrate[(c + d*x)^2*(a + b*Cot[e + f*x])^3,x]
Output:
-1/2*(a^2*b*d^2*E^(I*e)*Csc[e]*((2*f^3*x^3)/E^((2*I)*e) + (3*I)*(1 - E^((- 2*I)*e))*f^2*x^2*Log[1 - E^((-I)*(e + f*x))] + (3*I)*(1 - E^((-2*I)*e))*f^ 2*x^2*Log[1 + E^((-I)*(e + f*x))] - 6*(1 - E^((-2*I)*e))*f*x*PolyLog[2, -E ^((-I)*(e + f*x))] - 6*(1 - E^((-2*I)*e))*f*x*PolyLog[2, E^((-I)*(e + f*x) )] + (6*I)*(1 - E^((-2*I)*e))*PolyLog[3, -E^((-I)*(e + f*x))] + (6*I)*(1 - E^((-2*I)*e))*PolyLog[3, E^((-I)*(e + f*x))]))/f^3 + (b^3*d^2*E^(I*e)*Csc [e]*((2*f^3*x^3)/E^((2*I)*e) + (3*I)*(1 - E^((-2*I)*e))*f^2*x^2*Log[1 - E^ ((-I)*(e + f*x))] + (3*I)*(1 - E^((-2*I)*e))*f^2*x^2*Log[1 + E^((-I)*(e + f*x))] - 6*(1 - E^((-2*I)*e))*f*x*PolyLog[2, -E^((-I)*(e + f*x))] - 6*(1 - E^((-2*I)*e))*f*x*PolyLog[2, E^((-I)*(e + f*x))] + (6*I)*(1 - E^((-2*I)*e ))*PolyLog[3, -E^((-I)*(e + f*x))] + (6*I)*(1 - E^((-2*I)*e))*PolyLog[3, E ^((-I)*(e + f*x))]))/(6*f^3) + (b^3*d^2*Csc[e]*(-(f*x*Cos[e]) + Log[Cos[f* x]*Sin[e] + Cos[e]*Sin[f*x]]*Sin[e]))/(f^3*(Cos[e]^2 + Sin[e]^2)) + (6*a*b ^2*c*d*Csc[e]*(-(f*x*Cos[e]) + Log[Cos[f*x]*Sin[e] + Cos[e]*Sin[f*x]]*Sin[ e]))/(f^2*(Cos[e]^2 + Sin[e]^2)) + (3*a^2*b*c^2*Csc[e]*(-(f*x*Cos[e]) + Lo g[Cos[f*x]*Sin[e] + Cos[e]*Sin[f*x]]*Sin[e]))/(f*(Cos[e]^2 + Sin[e]^2)) - (b^3*c^2*Csc[e]*(-(f*x*Cos[e]) + Log[Cos[f*x]*Sin[e] + Cos[e]*Sin[f*x]]*Si n[e]))/(f*(Cos[e]^2 + Sin[e]^2)) + (Csc[e]*Csc[e + f*x]^2*(6*b^3*c*d*Cos[e ] + 18*a*b^2*c^2*f*Cos[e] + 6*b^3*d^2*x*Cos[e] + 36*a*b^2*c*d*f*x*Cos[e] + 18*a^2*b*c^2*f^2*x*Cos[e] - 6*b^3*c^2*f^2*x*Cos[e] + 18*a*b^2*d^2*f*x^...
Time = 1.01 (sec) , antiderivative size = 423, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3042, 4205, 2009}
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 (c+d x)^2 (a+b \cot (e+f x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x)^2 \left (a-b \tan \left (e+f x+\frac {\pi }{2}\right )\right )^3dx\) |
\(\Big \downarrow \) 4205 |
\(\displaystyle \int \left (a^3 (c+d x)^2+3 a^2 b (c+d x)^2 \cot (e+f x)+3 a b^2 (c+d x)^2 \cot ^2(e+f x)+b^3 (c+d x)^2 \cot ^3(e+f x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^3 (c+d x)^3}{3 d}-\frac {3 i a^2 b d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^2}+\frac {3 a^2 b (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {i a^2 b (c+d x)^3}{d}+\frac {3 a^2 b d^2 \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}+\frac {6 a b^2 d (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f^2}-\frac {3 a b^2 (c+d x)^2 \cot (e+f x)}{f}-\frac {3 i a b^2 (c+d x)^2}{f}-\frac {a b^2 (c+d x)^3}{d}-\frac {3 i a b^2 d^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^3}+\frac {i b^3 d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^2}-\frac {b^3 d (c+d x) \cot (e+f x)}{f^2}-\frac {b^3 (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {b^3 (c+d x)^2 \cot ^2(e+f x)}{2 f}-\frac {b^3 (c+d x)^2}{2 f}+\frac {i b^3 (c+d x)^3}{3 d}-\frac {b^3 d^2 \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}+\frac {b^3 d^2 \log (\sin (e+f x))}{f^3}\) |
Input:
Int[(c + d*x)^2*(a + b*Cot[e + f*x])^3,x]
Output:
((-3*I)*a*b^2*(c + d*x)^2)/f - (b^3*(c + d*x)^2)/(2*f) + (a^3*(c + d*x)^3) /(3*d) - (I*a^2*b*(c + d*x)^3)/d - (a*b^2*(c + d*x)^3)/d + ((I/3)*b^3*(c + d*x)^3)/d - (b^3*d*(c + d*x)*Cot[e + f*x])/f^2 - (3*a*b^2*(c + d*x)^2*Cot [e + f*x])/f - (b^3*(c + d*x)^2*Cot[e + f*x]^2)/(2*f) + (6*a*b^2*d*(c + d* x)*Log[1 - E^((2*I)*(e + f*x))])/f^2 + (3*a^2*b*(c + d*x)^2*Log[1 - E^((2* I)*(e + f*x))])/f - (b^3*(c + d*x)^2*Log[1 - E^((2*I)*(e + f*x))])/f + (b^ 3*d^2*Log[Sin[e + f*x]])/f^3 - ((3*I)*a*b^2*d^2*PolyLog[2, E^((2*I)*(e + f *x))])/f^3 - ((3*I)*a^2*b*d*(c + d*x)*PolyLog[2, E^((2*I)*(e + f*x))])/f^2 + (I*b^3*d*(c + d*x)*PolyLog[2, E^((2*I)*(e + f*x))])/f^2 + (3*a^2*b*d^2* PolyLog[3, E^((2*I)*(e + f*x))])/(2*f^3) - (b^3*d^2*PolyLog[3, E^((2*I)*(e + f*x))])/(2*f^3)
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1787 vs. \(2 (389 ) = 778\).
Time = 1.06 (sec) , antiderivative size = 1788, normalized size of antiderivative = 4.23
Input:
int((d*x+c)^2*(a+b*cot(f*x+e))^3,x,method=_RETURNVERBOSE)
Output:
d*a^3*c*x^2+a^3*c^2*x-d^2*a*b^2*x^3-I*b^3*c^2*x-3*a*b^2*c^2*x-1/d*a*b^2*c^ 3-1/3*I/d*b^3*c^3+2*b^2*(-3*I*a*d^2*f*x^2*exp(2*I*(f*x+e))-6*I*a*c*d*f*x*e xp(2*I*(f*x+e))+b*d^2*f*x^2*exp(2*I*(f*x+e))-3*I*a*c^2*f*exp(2*I*(f*x+e))+ 3*I*a*d^2*f*x^2-I*b*d^2*x*exp(2*I*(f*x+e))+2*b*c*d*f*x*exp(2*I*(f*x+e))+6* I*a*c*d*f*x-I*b*c*d*exp(2*I*(f*x+e))+b*c^2*f*exp(2*I*(f*x+e))+3*I*a*c^2*f+ I*b*d^2*x+I*b*c*d)/f^2/(exp(2*I*(f*x+e))-1)^2-12*I/f*b*a^2*c*d*e*x-1/f*b^3 *c^2*ln(exp(I*(f*x+e))-1)+2/f*b^3*c^2*ln(exp(I*(f*x+e)))-1/f*b^3*c^2*ln(ex p(I*(f*x+e))+1)-2/f^3*b^3*d^2*polylog(3,exp(I*(f*x+e)))+1/f^3*b^3*d^2*ln(e xp(I*(f*x+e))-1)-2/f^3*b^3*d^2*ln(exp(I*(f*x+e)))+1/f^3*b^3*d^2*ln(exp(I*( f*x+e))+1)-2/f^3*b^3*d^2*polylog(3,-exp(I*(f*x+e)))+1/3*I*b^3*d^2*x^3-6*I/ f^2*b*a^2*d^2*polylog(2,exp(I*(f*x+e)))*x+1/3*d^2*a^3*x^3+1/3/d*a^3*c^3-3* d*a*b^2*c*x^2+I/d*a^2*b*c^3+3*I*a^2*b*c^2*x-I*d^2*a^2*b*x^3-1/f*b^3*d^2*ln (1-exp(I*(f*x+e)))*x^2-1/f*b^3*d^2*ln(exp(I*(f*x+e))+1)*x^2+3/f*b*a^2*c^2* ln(exp(I*(f*x+e))-1)-6/f*b*a^2*c^2*ln(exp(I*(f*x+e)))+3/f*b*a^2*c^2*ln(exp (I*(f*x+e))+1)-1/f^3*b^3*e^2*d^2*ln(exp(I*(f*x+e))-1)+2/f^3*b^3*e^2*d^2*ln (exp(I*(f*x+e)))+1/f^3*b^3*d^2*ln(1-exp(I*(f*x+e)))*e^2+6/f^3*b*a^2*d^2*po lylog(3,exp(I*(f*x+e)))+6/f^3*b*a^2*d^2*polylog(3,-exp(I*(f*x+e)))+I*b^3*c *d*x^2-4/3*I/f^3*b^3*d^2*e^3+6/f^2*b*a^2*c*d*ln(1-exp(I*(f*x+e)))*e+6/f*b* a^2*c*d*ln(exp(I*(f*x+e))+1)*x+12/f^2*b*e*d*a^2*c*ln(exp(I*(f*x+e)))-6/f^2 *b*e*d*a^2*c*ln(exp(I*(f*x+e))-1)+6/f*b*a^2*c*d*ln(1-exp(I*(f*x+e)))*x+...
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1564 vs. \(2 (380) = 760\).
Time = 0.12 (sec) , antiderivative size = 1564, normalized size of antiderivative = 3.70 \[ \int (c+d x)^2 (a+b \cot (e+f x))^3 \, dx=\text {Too large to display} \] Input:
integrate((d*x+c)^2*(a+b*cot(f*x+e))^3,x, algorithm="fricas")
Output:
-1/12*(4*(a^3 - 3*a*b^2)*d^2*f^3*x^3 - 12*b^3*c^2*f^2 - 12*(b^3*d^2*f^2 - (a^3 - 3*a*b^2)*c*d*f^3)*x^2 - 12*(2*b^3*c*d*f^2 - (a^3 - 3*a*b^2)*c^2*f^3 )*x - 4*((a^3 - 3*a*b^2)*d^2*f^3*x^3 + 3*(a^3 - 3*a*b^2)*c*d*f^3*x^2 + 3*( a^3 - 3*a*b^2)*c^2*f^3*x)*cos(2*f*x + 2*e) + 6*(-3*I*a*b^2*d^2 - I*(3*a^2* b - b^3)*d^2*f*x - I*(3*a^2*b - b^3)*c*d*f + (3*I*a*b^2*d^2 + I*(3*a^2*b - b^3)*d^2*f*x + I*(3*a^2*b - b^3)*c*d*f)*cos(2*f*x + 2*e))*dilog(cos(2*f*x + 2*e) + I*sin(2*f*x + 2*e)) + 6*(3*I*a*b^2*d^2 + I*(3*a^2*b - b^3)*d^2*f *x + I*(3*a^2*b - b^3)*c*d*f + (-3*I*a*b^2*d^2 - I*(3*a^2*b - b^3)*d^2*f*x - I*(3*a^2*b - b^3)*c*d*f)*cos(2*f*x + 2*e))*dilog(cos(2*f*x + 2*e) - I*s in(2*f*x + 2*e)) - 6*(6*a*b^2*d^2*e - b^3*d^2 - (3*a^2*b - b^3)*d^2*e^2 - (3*a^2*b - b^3)*c^2*f^2 - 2*(3*a*b^2*c*d - (3*a^2*b - b^3)*c*d*e)*f - (6*a *b^2*d^2*e - b^3*d^2 - (3*a^2*b - b^3)*d^2*e^2 - (3*a^2*b - b^3)*c^2*f^2 - 2*(3*a*b^2*c*d - (3*a^2*b - b^3)*c*d*e)*f)*cos(2*f*x + 2*e))*log(-1/2*cos (2*f*x + 2*e) + 1/2*I*sin(2*f*x + 2*e) + 1/2) - 6*(6*a*b^2*d^2*e - b^3*d^2 - (3*a^2*b - b^3)*d^2*e^2 - (3*a^2*b - b^3)*c^2*f^2 - 2*(3*a*b^2*c*d - (3 *a^2*b - b^3)*c*d*e)*f - (6*a*b^2*d^2*e - b^3*d^2 - (3*a^2*b - b^3)*d^2*e^ 2 - (3*a^2*b - b^3)*c^2*f^2 - 2*(3*a*b^2*c*d - (3*a^2*b - b^3)*c*d*e)*f)*c os(2*f*x + 2*e))*log(-1/2*cos(2*f*x + 2*e) - 1/2*I*sin(2*f*x + 2*e) + 1/2) + 6*((3*a^2*b - b^3)*d^2*f^2*x^2 + 6*a*b^2*d^2*e - (3*a^2*b - b^3)*d^2*e^ 2 + 2*(3*a^2*b - b^3)*c*d*e*f + 2*(3*a*b^2*d^2*f + (3*a^2*b - b^3)*c*d*...
\[ \int (c+d x)^2 (a+b \cot (e+f x))^3 \, dx=\int \left (a + b \cot {\left (e + f x \right )}\right )^{3} \left (c + d x\right )^{2}\, dx \] Input:
integrate((d*x+c)**2*(a+b*cot(f*x+e))**3,x)
Output:
Integral((a + b*cot(e + f*x))**3*(c + d*x)**2, x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 5429 vs. \(2 (380) = 760\).
Time = 2.31 (sec) , antiderivative size = 5429, normalized size of antiderivative = 12.83 \[ \int (c+d x)^2 (a+b \cot (e+f x))^3 \, dx=\text {Too large to display} \] Input:
integrate((d*x+c)^2*(a+b*cot(f*x+e))^3,x, algorithm="maxima")
Output:
1/3*(3*(f*x + e)*a^3*c^2 + (f*x + e)^3*a^3*d^2/f^2 - 3*(f*x + e)^2*a^3*d^2 *e/f^2 + 3*(f*x + e)*a^3*d^2*e^2/f^2 + 3*(f*x + e)^2*a^3*c*d/f - 6*(f*x + e)*a^3*c*d*e/f + 9*a^2*b*c^2*log(sin(f*x + e)) + 9*a^2*b*d^2*e^2*log(sin(f *x + e))/f^2 - 18*a^2*b*c*d*e*log(sin(f*x + e))/f + 3*(36*a*b^2*d^2*e^2 + 36*a*b^2*c^2*f^2 - 2*(3*a^2*b - 3*I*a*b^2 - b^3)*(f*x + e)^3*d^2 - 12*b^3* d^2*e + 6*((3*a^2*b - 3*I*a*b^2 - b^3)*d^2*e - (3*a^2*b - 3*I*a*b^2 - b^3) *c*d*f)*(f*x + e)^2 + 6*((3*I*a*b^2 + b^3)*d^2*e^2 + 2*(-3*I*a*b^2 - b^3)* c*d*e*f + (3*I*a*b^2 + b^3)*c^2*f^2)*(f*x + e) - 12*(6*a*b^2*c*d*e - b^3*c *d)*f - 6*(b^3*d^2*e^2 + b^3*c^2*f^2 + 6*a*b^2*d^2*e - (3*a^2*b - b^3)*(f* x + e)^2*d^2 - b^3*d^2 - 2*(3*a*b^2*d^2 - (3*a^2*b - b^3)*d^2*e + (3*a^2*b - b^3)*c*d*f)*(f*x + e) - 2*(b^3*c*d*e + 3*a*b^2*c*d)*f + (b^3*d^2*e^2 + b^3*c^2*f^2 + 6*a*b^2*d^2*e - (3*a^2*b - b^3)*(f*x + e)^2*d^2 - b^3*d^2 - 2*(3*a*b^2*d^2 - (3*a^2*b - b^3)*d^2*e + (3*a^2*b - b^3)*c*d*f)*(f*x + e) - 2*(b^3*c*d*e + 3*a*b^2*c*d)*f)*cos(4*f*x + 4*e) - 2*(b^3*d^2*e^2 + b^3*c ^2*f^2 + 6*a*b^2*d^2*e - (3*a^2*b - b^3)*(f*x + e)^2*d^2 - b^3*d^2 - 2*(3* a*b^2*d^2 - (3*a^2*b - b^3)*d^2*e + (3*a^2*b - b^3)*c*d*f)*(f*x + e) - 2*( b^3*c*d*e + 3*a*b^2*c*d)*f)*cos(2*f*x + 2*e) - (-I*b^3*d^2*e^2 - I*b^3*c^2 *f^2 - 6*I*a*b^2*d^2*e + (3*I*a^2*b - I*b^3)*(f*x + e)^2*d^2 + I*b^3*d^2 + 2*(3*I*a*b^2*d^2 + (-3*I*a^2*b + I*b^3)*d^2*e + (3*I*a^2*b - I*b^3)*c*d*f )*(f*x + e) + 2*(I*b^3*c*d*e + 3*I*a*b^2*c*d)*f)*sin(4*f*x + 4*e) - 2*(...
\[ \int (c+d x)^2 (a+b \cot (e+f x))^3 \, dx=\int { {\left (d x + c\right )}^{2} {\left (b \cot \left (f x + e\right ) + a\right )}^{3} \,d x } \] Input:
integrate((d*x+c)^2*(a+b*cot(f*x+e))^3,x, algorithm="giac")
Output:
integrate((d*x + c)^2*(b*cot(f*x + e) + a)^3, x)
Timed out. \[ \int (c+d x)^2 (a+b \cot (e+f x))^3 \, dx=\int {\left (a+b\,\mathrm {cot}\left (e+f\,x\right )\right )}^3\,{\left (c+d\,x\right )}^2 \,d x \] Input:
int((a + b*cot(e + f*x))^3*(c + d*x)^2,x)
Output:
int((a + b*cot(e + f*x))^3*(c + d*x)^2, x)
\[ \int (c+d x)^2 (a+b \cot (e+f x))^3 \, dx=\frac {-72 \cos \left (f x +e \right ) \sin \left (f x +e \right ) a \,b^{2} c d f x -36 \cot \left (f x +e \right ) \sin \left (f x +e \right )^{2} a \,b^{2} c^{2} f +36 \left (\int \cot \left (f x +e \right ) x^{2}d x \right ) \sin \left (f x +e \right )^{2} a^{2} b \,d^{2} f^{2}+72 \left (\int \cot \left (f x +e \right ) x d x \right ) \sin \left (f x +e \right )^{2} a^{2} b c d \,f^{2}+12 \left (\int \cot \left (f x +e \right )^{3} x^{2}d x \right ) \sin \left (f x +e \right )^{2} b^{3} d^{2} f^{2}+24 \left (\int \cot \left (f x +e \right )^{3} x d x \right ) \sin \left (f x +e \right )^{2} b^{3} c d \,f^{2}+36 \left (\int \cot \left (f x +e \right )^{2} x^{2}d x \right ) \sin \left (f x +e \right )^{2} a \,b^{2} d^{2} f^{2}-36 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) \sin \left (f x +e \right )^{2} a^{2} b \,c^{2} f -72 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) \sin \left (f x +e \right )^{2} a \,b^{2} c d +12 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) \sin \left (f x +e \right )^{2} b^{3} c^{2} f +36 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \sin \left (f x +e \right )^{2} a^{2} b \,c^{2} f +72 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \sin \left (f x +e \right )^{2} a \,b^{2} c d -12 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \sin \left (f x +e \right )^{2} b^{3} c^{2} f +12 \sin \left (f x +e \right )^{2} a^{3} c^{2} f^{2} x +12 \sin \left (f x +e \right )^{2} a^{3} c d \,f^{2} x^{2}+4 \sin \left (f x +e \right )^{2} a^{3} d^{2} f^{2} x^{3}-36 \sin \left (f x +e \right )^{2} a \,b^{2} c^{2} f^{2} x -36 \sin \left (f x +e \right )^{2} a \,b^{2} c d \,f^{2} x^{2}+3 \sin \left (f x +e \right )^{2} b^{3} c^{2} f -6 b^{3} c^{2} f}{12 \sin \left (f x +e \right )^{2} f^{2}} \] Input:
int((d*x+c)^2*(a+b*cot(f*x+e))^3,x)
Output:
( - 72*cos(e + f*x)*sin(e + f*x)*a*b**2*c*d*f*x - 36*cot(e + f*x)*sin(e + f*x)**2*a*b**2*c**2*f + 36*int(cot(e + f*x)*x**2,x)*sin(e + f*x)**2*a**2*b *d**2*f**2 + 72*int(cot(e + f*x)*x,x)*sin(e + f*x)**2*a**2*b*c*d*f**2 + 12 *int(cot(e + f*x)**3*x**2,x)*sin(e + f*x)**2*b**3*d**2*f**2 + 24*int(cot(e + f*x)**3*x,x)*sin(e + f*x)**2*b**3*c*d*f**2 + 36*int(cot(e + f*x)**2*x** 2,x)*sin(e + f*x)**2*a*b**2*d**2*f**2 - 36*log(tan((e + f*x)/2)**2 + 1)*si n(e + f*x)**2*a**2*b*c**2*f - 72*log(tan((e + f*x)/2)**2 + 1)*sin(e + f*x) **2*a*b**2*c*d + 12*log(tan((e + f*x)/2)**2 + 1)*sin(e + f*x)**2*b**3*c**2 *f + 36*log(tan((e + f*x)/2))*sin(e + f*x)**2*a**2*b*c**2*f + 72*log(tan(( e + f*x)/2))*sin(e + f*x)**2*a*b**2*c*d - 12*log(tan((e + f*x)/2))*sin(e + f*x)**2*b**3*c**2*f + 12*sin(e + f*x)**2*a**3*c**2*f**2*x + 12*sin(e + f* x)**2*a**3*c*d*f**2*x**2 + 4*sin(e + f*x)**2*a**3*d**2*f**2*x**3 - 36*sin( e + f*x)**2*a*b**2*c**2*f**2*x - 36*sin(e + f*x)**2*a*b**2*c*d*f**2*x**2 + 3*sin(e + f*x)**2*b**3*c**2*f - 6*b**3*c**2*f)/(12*sin(e + f*x)**2*f**2)