\(\int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx\) [47]

Optimal result
Mathematica [B] (warning: unable to verify)
Rubi [A] (verified)
Maple [B] (verified)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [B] (verification not implemented)
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 20, antiderivative size = 603 \[ \int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx=-\frac {3 i b^3 d (c+d x)^2}{2 f^2}-\frac {3 i a b^2 (c+d x)^3}{f}-\frac {b^3 (c+d x)^3}{2 f}+\frac {a^3 (c+d x)^4}{4 d}-\frac {3 i a^2 b (c+d x)^4}{4 d}-\frac {3 a b^2 (c+d x)^4}{4 d}+\frac {i b^3 (c+d x)^4}{4 d}-\frac {3 b^3 d (c+d x)^2 \cot (e+f x)}{2 f^2}-\frac {3 a b^2 (c+d x)^3 \cot (e+f x)}{f}-\frac {b^3 (c+d x)^3 \cot ^2(e+f x)}{2 f}+\frac {3 b^3 d^2 (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f^3}+\frac {9 a b^2 d (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right )}{f^2}+\frac {3 a^2 b (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {b^3 (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {3 i b^3 d^3 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^4}-\frac {9 i a b^2 d^2 (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^3}-\frac {9 i a^2 b d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {3 i b^3 d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {9 a b^2 d^3 \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^4}+\frac {9 a^2 b d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}-\frac {3 b^3 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}+\frac {9 i a^2 b d^3 \operatorname {PolyLog}\left (4,e^{2 i (e+f x)}\right )}{4 f^4}-\frac {3 i b^3 d^3 \operatorname {PolyLog}\left (4,e^{2 i (e+f x)}\right )}{4 f^4} \] Output:

-3/2*I*b^3*d*(d*x+c)^2/f^2-3*I*a*b^2*(d*x+c)^3/f-1/2*b^3*(d*x+c)^3/f+1/4*a 
^3*(d*x+c)^4/d-9/2*I*a^2*b*d*(d*x+c)^2*polylog(2,exp(2*I*(f*x+e)))/f^2-3/4 
*a*b^2*(d*x+c)^4/d-3/4*I*b^3*d^3*polylog(4,exp(2*I*(f*x+e)))/f^4-3/2*b^3*d 
*(d*x+c)^2*cot(f*x+e)/f^2-3*a*b^2*(d*x+c)^3*cot(f*x+e)/f-1/2*b^3*(d*x+c)^3 
*cot(f*x+e)^2/f+3*b^3*d^2*(d*x+c)*ln(1-exp(2*I*(f*x+e)))/f^3+9*a*b^2*d*(d* 
x+c)^2*ln(1-exp(2*I*(f*x+e)))/f^2+3*a^2*b*(d*x+c)^3*ln(1-exp(2*I*(f*x+e))) 
/f-b^3*(d*x+c)^3*ln(1-exp(2*I*(f*x+e)))/f+1/4*I*b^3*(d*x+c)^4/d+3/2*I*b^3* 
d*(d*x+c)^2*polylog(2,exp(2*I*(f*x+e)))/f^2-9*I*a*b^2*d^2*(d*x+c)*polylog( 
2,exp(2*I*(f*x+e)))/f^3+9/4*I*a^2*b*d^3*polylog(4,exp(2*I*(f*x+e)))/f^4+9/ 
2*a*b^2*d^3*polylog(3,exp(2*I*(f*x+e)))/f^4+9/2*a^2*b*d^2*(d*x+c)*polylog( 
3,exp(2*I*(f*x+e)))/f^3-3/2*b^3*d^2*(d*x+c)*polylog(3,exp(2*I*(f*x+e)))/f^ 
3-3/2*I*b^3*d^3*polylog(2,exp(2*I*(f*x+e)))/f^4-3/4*I*a^2*b*(d*x+c)^4/d
 

Mathematica [B] (warning: unable to verify)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(3129\) vs. \(2(603)=1206\).

Time = 7.42 (sec) , antiderivative size = 3129, normalized size of antiderivative = 5.19 \[ \int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx=\text {Result too large to show} \] Input:

Integrate[(c + d*x)^3*(a + b*Cot[e + f*x])^3,x]
 

Output:

((-(b^3*c^3) - 3*b^3*c^2*d*x - 3*b^3*c*d^2*x^2 - b^3*d^3*x^3)*Csc[e + f*x] 
^2)/(2*f) - (3*a*b^2*d^3*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*Poly 
Log[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))]))/(2*f^4) - (3*a^2* 
b*c*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*Lo 
g[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))]))/(2*f^3) + (b^3*c*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))]))/(2*f^3) - (3*a^2*b*d^3*E^(I*e)*Csc[e]*((f^4*x^4)/E^((2* 
I)*e) + (2*I)*(1 - E^((-2*I)*e))*f^3*x^3*Log[1 - E^((-I)*(e + f*x))] + ...
 

Rubi [A] (verified)

Time = 1.38 (sec) , antiderivative size = 603, 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)^3 (a+b \cot (e+f x))^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (c+d x)^3 \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)^3+3 a^2 b (c+d x)^3 \cot (e+f x)+3 a b^2 (c+d x)^3 \cot ^2(e+f x)+b^3 (c+d x)^3 \cot ^3(e+f x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^3 (c+d x)^4}{4 d}+\frac {9 a^2 b d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}-\frac {9 i a^2 b d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {3 a^2 b (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {3 i a^2 b (c+d x)^4}{4 d}+\frac {9 i a^2 b d^3 \operatorname {PolyLog}\left (4,e^{2 i (e+f x)}\right )}{4 f^4}-\frac {9 i a b^2 d^2 (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^3}+\frac {9 a b^2 d (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right )}{f^2}-\frac {3 a b^2 (c+d x)^3 \cot (e+f x)}{f}-\frac {3 i a b^2 (c+d x)^3}{f}-\frac {3 a b^2 (c+d x)^4}{4 d}+\frac {9 a b^2 d^3 \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^4}-\frac {3 b^3 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}+\frac {3 b^3 d^2 (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f^3}+\frac {3 i b^3 d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}-\frac {3 b^3 d (c+d x)^2 \cot (e+f x)}{2 f^2}-\frac {b^3 (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {b^3 (c+d x)^3 \cot ^2(e+f x)}{2 f}-\frac {3 i b^3 d (c+d x)^2}{2 f^2}-\frac {b^3 (c+d x)^3}{2 f}+\frac {i b^3 (c+d x)^4}{4 d}-\frac {3 i b^3 d^3 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^4}-\frac {3 i b^3 d^3 \operatorname {PolyLog}\left (4,e^{2 i (e+f x)}\right )}{4 f^4}\)

Input:

Int[(c + d*x)^3*(a + b*Cot[e + f*x])^3,x]
 

Output:

(((-3*I)/2)*b^3*d*(c + d*x)^2)/f^2 - ((3*I)*a*b^2*(c + d*x)^3)/f - (b^3*(c 
 + d*x)^3)/(2*f) + (a^3*(c + d*x)^4)/(4*d) - (((3*I)/4)*a^2*b*(c + d*x)^4) 
/d - (3*a*b^2*(c + d*x)^4)/(4*d) + ((I/4)*b^3*(c + d*x)^4)/d - (3*b^3*d*(c 
 + d*x)^2*Cot[e + f*x])/(2*f^2) - (3*a*b^2*(c + d*x)^3*Cot[e + f*x])/f - ( 
b^3*(c + d*x)^3*Cot[e + f*x]^2)/(2*f) + (3*b^3*d^2*(c + d*x)*Log[1 - E^((2 
*I)*(e + f*x))])/f^3 + (9*a*b^2*d*(c + d*x)^2*Log[1 - E^((2*I)*(e + f*x))] 
)/f^2 + (3*a^2*b*(c + d*x)^3*Log[1 - E^((2*I)*(e + f*x))])/f - (b^3*(c + d 
*x)^3*Log[1 - E^((2*I)*(e + f*x))])/f - (((3*I)/2)*b^3*d^3*PolyLog[2, E^(( 
2*I)*(e + f*x))])/f^4 - ((9*I)*a*b^2*d^2*(c + d*x)*PolyLog[2, E^((2*I)*(e 
+ f*x))])/f^3 - (((9*I)/2)*a^2*b*d*(c + d*x)^2*PolyLog[2, E^((2*I)*(e + f* 
x))])/f^2 + (((3*I)/2)*b^3*d*(c + d*x)^2*PolyLog[2, E^((2*I)*(e + f*x))])/ 
f^2 + (9*a*b^2*d^3*PolyLog[3, E^((2*I)*(e + f*x))])/(2*f^4) + (9*a^2*b*d^2 
*(c + d*x)*PolyLog[3, E^((2*I)*(e + f*x))])/(2*f^3) - (3*b^3*d^2*(c + d*x) 
*PolyLog[3, E^((2*I)*(e + f*x))])/(2*f^3) + (((9*I)/4)*a^2*b*d^3*PolyLog[4 
, E^((2*I)*(e + f*x))])/f^4 - (((3*I)/4)*b^3*d^3*PolyLog[4, E^((2*I)*(e + 
f*x))])/f^4
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4205
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]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 3160 vs. \(2 (535 ) = 1070\).

Time = 1.23 (sec) , antiderivative size = 3161, normalized size of antiderivative = 5.24

method result size
risch \(\text {Expression too large to display}\) \(3161\)

Input:

int((d*x+c)^3*(a+b*cot(f*x+e))^3,x,method=_RETURNVERBOSE)
 

Output:

-1/4*I/d*b^3*c^4+b^2*(3*I*b*c^2*d+6*I*a*c^3*f+2*b*d^3*f*x^3*exp(2*I*(f*x+e 
))+6*I*b*c*d^2*x+3*I*b*d^3*x^2+18*I*a*c^2*d*f*x+6*b*c*d^2*f*x^2*exp(2*I*(f 
*x+e))-3*I*b*d^3*x^2*exp(2*I*(f*x+e))-18*I*a*c^2*d*f*x*exp(2*I*(f*x+e))-6* 
I*a*d^3*f*x^3*exp(2*I*(f*x+e))+6*b*c^2*d*f*x*exp(2*I*(f*x+e))-18*I*a*c*d^2 
*f*x^2*exp(2*I*(f*x+e))-3*I*b*c^2*d*exp(2*I*(f*x+e))-6*I*b*c*d^2*x*exp(2*I 
*(f*x+e))+2*b*c^3*f*exp(2*I*(f*x+e))+18*I*a*c*d^2*f*x^2-6*I*a*c^3*f*exp(2* 
I*(f*x+e))+6*I*a*d^3*f*x^3)/f^2/(exp(2*I*(f*x+e))-1)^2+1/4*I*b^3*d^3*x^4-9 
/2*d*a*b^2*c^2*x^2+3*I*a^2*b*c^3*x+3/4*I/d*a^2*b*c^4+d^2*a^3*c*x^3+3/2*d*a 
^3*c^2*x^2+a^3*c^3*x-3/4*d^3*a*b^2*x^4-I*b^3*c^3*x-3*a*b^2*c^3*x-3/4/d*a*b 
^2*c^4-1/f*b^3*c^3*ln(exp(I*(f*x+e))-1)+2/f*b^3*c^3*ln(exp(I*(f*x+e)))-1/f 
*b^3*c^3*ln(exp(I*(f*x+e))+1)-3/4*I*d^3*a^2*b*x^4+3/2*I*b^3*d*c^2*x^2-3*d^ 
2*a*b^2*c*x^3+3/f^3*b^3*c*d^2*ln(exp(I*(f*x+e))+1)-6/f^3*b^3*c*d^2*polylog 
(3,exp(I*(f*x+e)))-6/f^3*b^3*c*d^2*polylog(3,-exp(I*(f*x+e)))+3/f*b*a^2*c^ 
3*ln(exp(I*(f*x+e))-1)-6/f*b*a^2*c^3*ln(exp(I*(f*x+e)))+3/f*b*a^2*c^3*ln(e 
xp(I*(f*x+e))+1)-6/f^3*b^3*d^3*polylog(3,exp(I*(f*x+e)))*x-6/f^3*b^3*d^3*p 
olylog(3,-exp(I*(f*x+e)))*x+3/f^3*b^3*d^3*ln(1-exp(I*(f*x+e)))*x+3/f^3*b^3 
*d^3*ln(exp(I*(f*x+e))+1)*x-1/f*b^3*d^3*ln(1-exp(I*(f*x+e)))*x^3-1/f*b^3*d 
^3*ln(exp(I*(f*x+e))+1)*x^3-1/f^4*b^3*d^3*ln(1-exp(I*(f*x+e)))*e^3-3/f^4*b 
^3*e*d^3*ln(exp(I*(f*x+e))-1)+6/f^4*b^3*e*d^3*ln(exp(I*(f*x+e)))+1/f^4*b^3 
*e^3*d^3*ln(exp(I*(f*x+e))-1)-2/f^4*b^3*e^3*d^3*ln(exp(I*(f*x+e)))+3/f^...
 

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 2749 vs. \(2 (521) = 1042\).

Time = 0.16 (sec) , antiderivative size = 2749, normalized size of antiderivative = 4.56 \[ \int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx=\text {Too large to display} \] Input:

integrate((d*x+c)^3*(a+b*cot(f*x+e))^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*e) - I*sin(2*f*x + 2*e)) + 4*(9*a*b^2*d^3*e^2 - 3*b^3*d^3 
*e - (3*a^2*b - b^3)*d^3*e^3 + (3*a^2*b - b^3)*c^3*f^3 + 3*(3*a*b^2*c^2*d 
- (3*a^2*b - b^3)*c^2*d*e)*f^2 - 3*(6*a*b^2*c*d^2*e - b^3*c*d^2 - (3*a^2*b 
 - b^3)*c*d^2*e^2)*f - (9*a*b^2*d^3*e^2 - 3*b^3*d^3*e - (3*a^2*b - b^3)*d^ 
3*e^3 + (3*a^2*b - b^3)*c^3*f^3 + 3*(3*a*b^2*c^2*d - (3*a^2*b - b^3)*c^2*d 
*e)*f^2 - 3*(6*a*b^2*c*d^2*e - b^3*c*d^2 - (3*a^2*b - b^3)*c*d^2*e^2)*f...
 

Sympy [F]

\[ \int (c+d x)^3 (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 )^{3}\, dx \] Input:

integrate((d*x+c)**3*(a+b*cot(f*x+e))**3,x)
 

Output:

Integral((a + b*cot(e + f*x))**3*(c + d*x)**3, x)
 

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 11252 vs. \(2 (521) = 1042\).

Time = 14.41 (sec) , antiderivative size = 11252, normalized size of antiderivative = 18.66 \[ \int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx=\text {Too large to display} \] Input:

integrate((d*x+c)^3*(a+b*cot(f*x+e))^3,x, algorithm="maxima")
 

Output:

1/4*(4*(f*x + e)*a^3*c^3 + (f*x + e)^4*a^3*d^3/f^3 - 4*(f*x + e)^3*a^3*d^3 
*e/f^3 + 6*(f*x + e)^2*a^3*d^3*e^2/f^3 - 4*(f*x + e)*a^3*d^3*e^3/f^3 + 4*( 
f*x + e)^3*a^3*c*d^2/f^2 - 12*(f*x + e)^2*a^3*c*d^2*e/f^2 + 12*(f*x + e)*a 
^3*c*d^2*e^2/f^2 + 6*(f*x + e)^2*a^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+ e) - 3*(b^3*c*d^2*e^2 + 6*a*b^2*c*d^2*e - b^3*c*d^ 
2)*f + (b^3*d^3*e^3 - b^3*c^3*f^3 + 9*a*b^2*d^3*e^2 + (3*a^2*b - b^3)*(...
 

Giac [F]

\[ \int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx=\int { {\left (d x + c\right )}^{3} {\left (b \cot \left (f x + e\right ) + a\right )}^{3} \,d x } \] Input:

integrate((d*x+c)^3*(a+b*cot(f*x+e))^3,x, algorithm="giac")
 

Output:

integrate((d*x + c)^3*(b*cot(f*x + e) + a)^3, x)
 

Mupad [F(-1)]

Timed out. \[ \int (c+d x)^3 (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 )}^3 \,d x \] Input:

int((a + b*cot(e + f*x))^3*(c + d*x)^3,x)
 

Output:

int((a + b*cot(e + f*x))^3*(c + d*x)^3, x)
 

Reduce [F]

\[ \int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx =\text {Too large to display} \] Input:

int((d*x+c)^3*(a+b*cot(f*x+e))^3,x)
 

Output:

( - 36*cos(e + f*x)*sin(e + f*x)*a*b**2*c**2*d*f*x - 12*cot(e + f*x)*sin(e 
 + f*x)**2*a*b**2*c**3*f + 12*int(cot(e + f*x)*x**3,x)*sin(e + f*x)**2*a** 
2*b*d**3*f**2 + 36*int(cot(e + f*x)*x**2,x)*sin(e + f*x)**2*a**2*b*c*d**2* 
f**2 + 36*int(cot(e + f*x)*x,x)*sin(e + f*x)**2*a**2*b*c**2*d*f**2 + 4*int 
(cot(e + f*x)**3*x**3,x)*sin(e + f*x)**2*b**3*d**3*f**2 + 12*int(cot(e + f 
*x)**3*x**2,x)*sin(e + f*x)**2*b**3*c*d**2*f**2 + 12*int(cot(e + f*x)**3*x 
,x)*sin(e + f*x)**2*b**3*c**2*d*f**2 + 12*int(cot(e + f*x)**2*x**3,x)*sin( 
e + f*x)**2*a*b**2*d**3*f**2 + 36*int(cot(e + f*x)**2*x**2,x)*sin(e + f*x) 
**2*a*b**2*c*d**2*f**2 - 12*log(tan((e + f*x)/2)**2 + 1)*sin(e + f*x)**2*a 
**2*b*c**3*f - 36*log(tan((e + f*x)/2)**2 + 1)*sin(e + f*x)**2*a*b**2*c**2 
*d + 4*log(tan((e + f*x)/2)**2 + 1)*sin(e + f*x)**2*b**3*c**3*f + 12*log(t 
an((e + f*x)/2))*sin(e + f*x)**2*a**2*b*c**3*f + 36*log(tan((e + f*x)/2))* 
sin(e + f*x)**2*a*b**2*c**2*d - 4*log(tan((e + f*x)/2))*sin(e + f*x)**2*b* 
*3*c**3*f + 4*sin(e + f*x)**2*a**3*c**3*f**2*x + 6*sin(e + f*x)**2*a**3*c* 
*2*d*f**2*x**2 + 4*sin(e + f*x)**2*a**3*c*d**2*f**2*x**3 + sin(e + f*x)**2 
*a**3*d**3*f**2*x**4 - 12*sin(e + f*x)**2*a*b**2*c**3*f**2*x - 18*sin(e + 
f*x)**2*a*b**2*c**2*d*f**2*x**2 + sin(e + f*x)**2*b**3*c**3*f - 2*b**3*c** 
3*f)/(4*sin(e + f*x)**2*f**2)