\(\int \frac {(e+f x)^2 \cos ^2(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx\) [342]

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

Optimal result

Integrand size = 36, antiderivative size = 840 \[ \int \frac {(e+f x)^2 \cos ^2(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {i (e+f x)^2}{a d}-\frac {(e+f x)^3}{3 a f}-\frac {\left (a^2-b^2\right ) (e+f x)^3}{3 a b^2 f}+\frac {2 b (e+f x)^2 \text {arctanh}\left (e^{i (c+d x)}\right )}{a^2 d}+\frac {2 b f^2 \cos (c+d x)}{a^2 d^3}+\frac {2 \left (a^2-b^2\right ) f^2 \cos (c+d x)}{a^2 b d^3}-\frac {b (e+f x)^2 \cos (c+d x)}{a^2 d}-\frac {\left (a^2-b^2\right ) (e+f x)^2 \cos (c+d x)}{a^2 b d}-\frac {(e+f x)^2 \cot (c+d x)}{a d}-\frac {i \left (a^2-b^2\right )^{3/2} (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{a^2 b^2 d}+\frac {i \left (a^2-b^2\right )^{3/2} (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{a^2 b^2 d}+\frac {2 f (e+f x) \log \left (1-e^{2 i (c+d x)}\right )}{a d^2}-\frac {2 i b f (e+f x) \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{a^2 d^2}+\frac {2 i b f (e+f x) \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{a^2 d^2}-\frac {2 \left (a^2-b^2\right )^{3/2} f (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{a^2 b^2 d^2}+\frac {2 \left (a^2-b^2\right )^{3/2} f (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{a^2 b^2 d^2}-\frac {i f^2 \operatorname {PolyLog}\left (2,e^{2 i (c+d x)}\right )}{a d^3}+\frac {2 b f^2 \operatorname {PolyLog}\left (3,-e^{i (c+d x)}\right )}{a^2 d^3}-\frac {2 b f^2 \operatorname {PolyLog}\left (3,e^{i (c+d x)}\right )}{a^2 d^3}-\frac {2 i \left (a^2-b^2\right )^{3/2} f^2 \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{a^2 b^2 d^3}+\frac {2 i \left (a^2-b^2\right )^{3/2} f^2 \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{a^2 b^2 d^3}+\frac {2 b f (e+f x) \sin (c+d x)}{a^2 d^2}+\frac {2 \left (a^2-b^2\right ) f (e+f x) \sin (c+d x)}{a^2 b d^2} \] Output:

-I*f^2*polylog(2,exp(2*I*(d*x+c)))/a/d^3-1/3*(f*x+e)^3/a/f-1/3*(a^2-b^2)*( 
f*x+e)^3/a/b^2/f+2*b*(f*x+e)^2*arctanh(exp(I*(d*x+c)))/a^2/d+2*b*f^2*cos(d 
*x+c)/a^2/d^3+2*(a^2-b^2)*f^2*cos(d*x+c)/a^2/b/d^3-b*(f*x+e)^2*cos(d*x+c)/ 
a^2/d-(a^2-b^2)*(f*x+e)^2*cos(d*x+c)/a^2/b/d-(f*x+e)^2*cot(d*x+c)/a/d-I*(a 
^2-b^2)^(3/2)*(f*x+e)^2*ln(1-I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/a^2/b 
^2/d-2*I*(a^2-b^2)^(3/2)*f^2*polylog(3,I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/ 
2)))/a^2/b^2/d^3+2*f*(f*x+e)*ln(1-exp(2*I*(d*x+c)))/a/d^2-I*(f*x+e)^2/a/d- 
2*I*b*f*(f*x+e)*polylog(2,-exp(I*(d*x+c)))/a^2/d^2-2*(a^2-b^2)^(3/2)*f*(f* 
x+e)*polylog(2,I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/a^2/b^2/d^2+2*(a^2- 
b^2)^(3/2)*f*(f*x+e)*polylog(2,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/a^2 
/b^2/d^2+2*I*b*f*(f*x+e)*polylog(2,exp(I*(d*x+c)))/a^2/d^2+2*b*f^2*polylog 
(3,-exp(I*(d*x+c)))/a^2/d^3-2*b*f^2*polylog(3,exp(I*(d*x+c)))/a^2/d^3+I*(a 
^2-b^2)^(3/2)*(f*x+e)^2*ln(1-I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/a^2/b 
^2/d+2*I*(a^2-b^2)^(3/2)*f^2*polylog(3,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/ 
2)))/a^2/b^2/d^3+2*b*f*(f*x+e)*sin(d*x+c)/a^2/d^2+2*(a^2-b^2)*f*(f*x+e)*si 
n(d*x+c)/a^2/b/d^2
 

Mathematica [A] (warning: unable to verify)

Time = 9.11 (sec) , antiderivative size = 973, normalized size of antiderivative = 1.16 \[ \int \frac {(e+f x)^2 \cos ^2(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {12 \left (i d^2 e (b d e-2 a f) x-i d^2 e (b d e+2 a f) x-\frac {2 i a d^2 (e+f x)^2}{-1+e^{2 i c}}-2 d f (b d e-a f) x \log \left (1-e^{-i (c+d x)}\right )-b d^2 f^2 x^2 \log \left (1-e^{-i (c+d x)}\right )+2 d f (b d e+a f) x \log \left (1+e^{-i (c+d x)}\right )+b d^2 f^2 x^2 \log \left (1+e^{-i (c+d x)}\right )-d e (b d e-2 a f) \log \left (1-e^{i (c+d x)}\right )+d e (b d e+2 a f) \log \left (1+e^{i (c+d x)}\right )+2 i f (b d e+a f) \operatorname {PolyLog}\left (2,-e^{-i (c+d x)}\right )+2 i b d f^2 x \operatorname {PolyLog}\left (2,-e^{-i (c+d x)}\right )+2 i f (-b d e+a f) \operatorname {PolyLog}\left (2,e^{-i (c+d x)}\right )-2 i b d f^2 x \operatorname {PolyLog}\left (2,e^{-i (c+d x)}\right )+2 b f^2 \operatorname {PolyLog}\left (3,-e^{-i (c+d x)}\right )-2 b f^2 \operatorname {PolyLog}\left (3,e^{-i (c+d x)}\right )\right )-\frac {12 i \sqrt {-\left (a^2-b^2\right )^2} \left (-2 \sqrt {a^2-b^2} d f (e+f x) \operatorname {PolyLog}\left (2,\frac {b e^{i (c+d x)}}{-i a+\sqrt {-a^2+b^2}}\right )+2 \sqrt {a^2-b^2} d f (e+f x) \operatorname {PolyLog}\left (2,-\frac {b e^{i (c+d x)}}{i a+\sqrt {-a^2+b^2}}\right )-i \left (d^2 \left (2 \sqrt {-a^2+b^2} e^2 \arctan \left (\frac {i a+b e^{i (c+d x)}}{\sqrt {a^2-b^2}}\right )+\sqrt {a^2-b^2} f x (2 e+f x) \left (\log \left (1-\frac {b e^{i (c+d x)}}{-i a+\sqrt {-a^2+b^2}}\right )-\log \left (1+\frac {b e^{i (c+d x)}}{i a+\sqrt {-a^2+b^2}}\right )\right )\right )+2 \sqrt {a^2-b^2} f^2 \operatorname {PolyLog}\left (3,\frac {b e^{i (c+d x)}}{-i a+\sqrt {-a^2+b^2}}\right )-2 \sqrt {a^2-b^2} f^2 \operatorname {PolyLog}\left (3,-\frac {b e^{i (c+d x)}}{i a+\sqrt {-a^2+b^2}}\right )\right )\right )}{b^2}+\frac {a \csc (c) \csc (c+d x) \left (-2 a^2 d^3 x \left (3 e^2+3 e f x+f^2 x^2\right ) \cos (d x)+2 a^2 d^3 x \left (3 e^2+3 e f x+f^2 x^2\right ) \cos (2 c+d x)+3 b \left (-a \left (-2 f^2+d^2 (e+f x)^2\right ) \cos (c+2 d x)+a \left (-2 f^2+d^2 (e+f x)^2\right ) \cos (3 c+2 d x)+2 d (e+f x) \left (2 b d (e+f x) \sin (d x)+4 a f \sin (c) \sin ^2(c+d x)\right )\right )\right )}{b^2}}{12 a^2 d^3} \] Input:

Integrate[((e + f*x)^2*Cos[c + d*x]^2*Cot[c + d*x]^2)/(a + b*Sin[c + d*x]) 
,x]
 

Output:

(12*(I*d^2*e*(b*d*e - 2*a*f)*x - I*d^2*e*(b*d*e + 2*a*f)*x - ((2*I)*a*d^2* 
(e + f*x)^2)/(-1 + E^((2*I)*c)) - 2*d*f*(b*d*e - a*f)*x*Log[1 - E^((-I)*(c 
 + d*x))] - b*d^2*f^2*x^2*Log[1 - E^((-I)*(c + d*x))] + 2*d*f*(b*d*e + a*f 
)*x*Log[1 + E^((-I)*(c + d*x))] + b*d^2*f^2*x^2*Log[1 + E^((-I)*(c + d*x)) 
] - d*e*(b*d*e - 2*a*f)*Log[1 - E^(I*(c + d*x))] + d*e*(b*d*e + 2*a*f)*Log 
[1 + E^(I*(c + d*x))] + (2*I)*f*(b*d*e + a*f)*PolyLog[2, -E^((-I)*(c + d*x 
))] + (2*I)*b*d*f^2*x*PolyLog[2, -E^((-I)*(c + d*x))] + (2*I)*f*(-(b*d*e) 
+ a*f)*PolyLog[2, E^((-I)*(c + d*x))] - (2*I)*b*d*f^2*x*PolyLog[2, E^((-I) 
*(c + d*x))] + 2*b*f^2*PolyLog[3, -E^((-I)*(c + d*x))] - 2*b*f^2*PolyLog[3 
, E^((-I)*(c + d*x))]) - ((12*I)*Sqrt[-(a^2 - b^2)^2]*(-2*Sqrt[a^2 - b^2]* 
d*f*(e + f*x)*PolyLog[2, (b*E^(I*(c + d*x)))/((-I)*a + Sqrt[-a^2 + b^2])] 
+ 2*Sqrt[a^2 - b^2]*d*f*(e + f*x)*PolyLog[2, -((b*E^(I*(c + d*x)))/(I*a + 
Sqrt[-a^2 + b^2]))] - I*(d^2*(2*Sqrt[-a^2 + b^2]*e^2*ArcTan[(I*a + b*E^(I* 
(c + d*x)))/Sqrt[a^2 - b^2]] + Sqrt[a^2 - b^2]*f*x*(2*e + f*x)*(Log[1 - (b 
*E^(I*(c + d*x)))/((-I)*a + Sqrt[-a^2 + b^2])] - Log[1 + (b*E^(I*(c + d*x) 
))/(I*a + Sqrt[-a^2 + b^2])])) + 2*Sqrt[a^2 - b^2]*f^2*PolyLog[3, (b*E^(I* 
(c + d*x)))/((-I)*a + Sqrt[-a^2 + b^2])] - 2*Sqrt[a^2 - b^2]*f^2*PolyLog[3 
, -((b*E^(I*(c + d*x)))/(I*a + Sqrt[-a^2 + b^2]))])))/b^2 + (a*Csc[c]*Csc[ 
c + d*x]*(-2*a^2*d^3*x*(3*e^2 + 3*e*f*x + f^2*x^2)*Cos[d*x] + 2*a^2*d^3*x* 
(3*e^2 + 3*e*f*x + f^2*x^2)*Cos[2*c + d*x] + 3*b*(-(a*(-2*f^2 + d^2*(e ...
 

Rubi [F]

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 \frac {(e+f x)^2 \cos ^2(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx\)

\(\Big \downarrow \) 5054

\(\displaystyle \frac {\int (e+f x)^2 \cos ^2(c+d x) \cot ^2(c+d x)dx}{a}-\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}\)

\(\Big \downarrow \) 4908

\(\displaystyle \frac {\int (e+f x)^2 \cot ^2(c+d x)dx-\int (e+f x)^2 \cos ^2(c+d x)dx}{a}-\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int (e+f x)^2 \tan \left (c+d x+\frac {\pi }{2}\right )^2dx-\int (e+f x)^2 \sin \left (c+d x+\frac {\pi }{2}\right )^2dx}{a}-\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}\)

\(\Big \downarrow \) 3792

\(\displaystyle \frac {\frac {f^2 \int \cos ^2(c+d x)dx}{2 d^2}+\int (e+f x)^2 \tan \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {1}{2} \int (e+f x)^2dx-\frac {f (e+f x) \cos ^2(c+d x)}{2 d^2}-\frac {(e+f x)^2 \sin (c+d x) \cos (c+d x)}{2 d}}{a}-\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}\)

\(\Big \downarrow \) 17

\(\displaystyle \frac {\frac {f^2 \int \cos ^2(c+d x)dx}{2 d^2}+\int (e+f x)^2 \tan \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {f (e+f x) \cos ^2(c+d x)}{2 d^2}-\frac {(e+f x)^2 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {(e+f x)^3}{6 f}}{a}-\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {f^2 \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx}{2 d^2}+\int (e+f x)^2 \tan \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {f (e+f x) \cos ^2(c+d x)}{2 d^2}-\frac {(e+f x)^2 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {(e+f x)^3}{6 f}}{a}-\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}\)

\(\Big \downarrow \) 3115

\(\displaystyle \frac {\frac {f^2 \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )}{2 d^2}+\int (e+f x)^2 \tan \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {f (e+f x) \cos ^2(c+d x)}{2 d^2}-\frac {(e+f x)^2 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {(e+f x)^3}{6 f}}{a}-\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}\)

\(\Big \downarrow \) 24

\(\displaystyle \frac {\int (e+f x)^2 \tan \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {f (e+f x) \cos ^2(c+d x)}{2 d^2}+\frac {f^2 \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )}{2 d^2}-\frac {(e+f x)^2 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {(e+f x)^3}{6 f}}{a}-\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}\)

\(\Big \downarrow \) 4203

\(\displaystyle \frac {-\frac {2 f \int -((e+f x) \cot (c+d x))dx}{d}-\int (e+f x)^2dx-\frac {f (e+f x) \cos ^2(c+d x)}{2 d^2}+\frac {f^2 \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )}{2 d^2}-\frac {(e+f x)^2 \cot (c+d x)}{d}-\frac {(e+f x)^2 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {(e+f x)^3}{6 f}}{a}-\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}\)

\(\Big \downarrow \) 17

\(\displaystyle \frac {-\frac {2 f \int -((e+f x) \cot (c+d x))dx}{d}-\frac {f (e+f x) \cos ^2(c+d x)}{2 d^2}+\frac {f^2 \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )}{2 d^2}-\frac {(e+f x)^2 \cot (c+d x)}{d}-\frac {(e+f x)^2 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {(e+f x)^3}{2 f}}{a}-\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {2 f \int (e+f x) \cot (c+d x)dx}{d}-\frac {f (e+f x) \cos ^2(c+d x)}{2 d^2}+\frac {f^2 \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )}{2 d^2}-\frac {(e+f x)^2 \cot (c+d x)}{d}-\frac {(e+f x)^2 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {(e+f x)^3}{2 f}}{a}-\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {2 f \int -\left ((e+f x) \tan \left (c+d x+\frac {\pi }{2}\right )\right )dx}{d}-\frac {f (e+f x) \cos ^2(c+d x)}{2 d^2}+\frac {f^2 \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )}{2 d^2}-\frac {(e+f x)^2 \cot (c+d x)}{d}-\frac {(e+f x)^2 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {(e+f x)^3}{2 f}}{a}-\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {-\frac {2 f \int (e+f x) \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )dx}{d}-\frac {f (e+f x) \cos ^2(c+d x)}{2 d^2}+\frac {f^2 \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )}{2 d^2}-\frac {(e+f x)^2 \cot (c+d x)}{d}-\frac {(e+f x)^2 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {(e+f x)^3}{2 f}}{a}-\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}\)

\(\Big \downarrow \) 4202

\(\displaystyle -\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}+\frac {-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \int \frac {e^{i (2 c+2 d x+\pi )} (e+f x)}{1+e^{i (2 c+2 d x+\pi )}}dx\right )}{d}-\frac {f (e+f x) \cos ^2(c+d x)}{2 d^2}+\frac {f^2 \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )}{2 d^2}-\frac {(e+f x)^2 \cot (c+d x)}{d}-\frac {(e+f x)^2 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {(e+f x)^3}{2 f}}{a}\)

\(\Big \downarrow \) 2620

\(\displaystyle -\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}+\frac {-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (\frac {i f \int \log \left (1+e^{i (2 c+2 d x+\pi )}\right )dx}{2 d}-\frac {i (e+f x) \log \left (1+e^{i (2 c+2 d x+\pi )}\right )}{2 d}\right )\right )}{d}-\frac {f (e+f x) \cos ^2(c+d x)}{2 d^2}+\frac {f^2 \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )}{2 d^2}-\frac {(e+f x)^2 \cot (c+d x)}{d}-\frac {(e+f x)^2 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {(e+f x)^3}{2 f}}{a}\)

\(\Big \downarrow \) 2715

\(\displaystyle -\frac {b \int \frac {(e+f x)^2 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}+\frac {-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (\frac {f \int e^{-i (2 c+2 d x+\pi )} \log \left (1+e^{i (2 c+2 d x+\pi )}\right )de^{i (2 c+2 d x+\pi )}}{4 d^2}-\frac {i (e+f x) \log \left (1+e^{i (2 c+2 d x+\pi )}\right )}{2 d}\right )\right )}{d}-\frac {f (e+f x) \cos ^2(c+d x)}{2 d^2}+\frac {f^2 \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )}{2 d^2}-\frac {(e+f x)^2 \cot (c+d x)}{d}-\frac {(e+f x)^2 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {(e+f x)^3}{2 f}}{a}\)

\(\Big \downarrow \) 2838

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

\(\Big \downarrow \) 5054

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

\(\Big \downarrow \) 4908

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

\(\Big \downarrow \) 4905

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3791

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3777

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3118

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

\(\Big \downarrow \) 4908

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3777

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

Input:

Int[((e + f*x)^2*Cos[c + d*x]^2*Cot[c + d*x]^2)/(a + b*Sin[c + d*x]),x]
 

Output:

$Aborted
 

Defintions of rubi rules used

rule 17
Int[(c_.)*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[c*((a + b*x)^(m + 1 
)/(b*(m + 1))), x] /; FreeQ[{a, b, c, m}, x] && NeQ[m, -1]
 

rule 24
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
 

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 2620
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]
 

rule 2715
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] 
:> Simp[1/(d*e*n*Log[F])   Subst[Int[Log[a + b*x]/x, x], x, (F^(e*(c + d*x) 
))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
 

rule 2838
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 
, (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
 

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

rule 3115
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n)   Int[(b*Sin 
[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 
2*n]
 

rule 3118
Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ 
[{c, d}, x]
 

rule 3777
Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[( 
-(c + d*x)^m)*(Cos[e + f*x]/f), x] + Simp[d*(m/f)   Int[(c + d*x)^(m - 1)*C 
os[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
 

rule 3791
Int[((c_.) + (d_.)*(x_))*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> 
 Simp[d*((b*Sin[e + f*x])^n/(f^2*n^2)), x] + (-Simp[b*(c + d*x)*Cos[e + f*x 
]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x] + Simp[b^2*((n - 1)/n)   Int[(c + d* 
x)*(b*Sin[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 
 1]
 

rule 3792
Int[((c_.) + (d_.)*(x_))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbo 
l] :> Simp[d*m*(c + d*x)^(m - 1)*((b*Sin[e + f*x])^n/(f^2*n^2)), x] + (-Sim 
p[b*(c + d*x)^m*Cos[e + f*x]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x] + Simp[b^ 
2*((n - 1)/n)   Int[(c + d*x)^m*(b*Sin[e + f*x])^(n - 2), x], x] - Simp[d^2 
*m*((m - 1)/(f^2*n^2))   Int[(c + d*x)^(m - 2)*(b*Sin[e + f*x])^n, x], x]) 
/; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 1]
 

rule 4202
Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[I 
*((c + d*x)^(m + 1)/(d*(m + 1))), x] - Simp[2*I   Int[(c + d*x)^m*(E^(2*I*( 
e + f*x))/(1 + E^(2*I*(e + f*x)))), x], x] /; FreeQ[{c, d, e, f}, x] && IGt 
Q[m, 0]
 

rule 4203
Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symb 
ol] :> Simp[b*(c + d*x)^m*((b*Tan[e + f*x])^(n - 1)/(f*(n - 1))), x] + (-Si 
mp[b*d*(m/(f*(n - 1)))   Int[(c + d*x)^(m - 1)*(b*Tan[e + f*x])^(n - 1), x] 
, x] - Simp[b^2   Int[(c + d*x)^m*(b*Tan[e + f*x])^(n - 2), x], x]) /; Free 
Q[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 0]
 

rule 4905
Int[Cos[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.)*Sin[(a_.) + (b 
_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[a + b*x]^(n + 1)/(b*(n + 1 
))), x] + Simp[d*(m/(b*(n + 1)))   Int[(c + d*x)^(m - 1)*Cos[a + b*x]^(n + 
1), x], x] /; FreeQ[{a, b, c, d, n}, x] && IGtQ[m, 0] && NeQ[n, -1]
 

rule 4908
Int[Cos[(a_.) + (b_.)*(x_)]^(n_.)*Cot[(a_.) + (b_.)*(x_)]^(p_.)*((c_.) + (d 
_.)*(x_))^(m_.), x_Symbol] :> -Int[(c + d*x)^m*Cos[a + b*x]^n*Cot[a + b*x]^ 
(p - 2), x] + Int[(c + d*x)^m*Cos[a + b*x]^(n - 2)*Cot[a + b*x]^p, x] /; Fr 
eeQ[{a, b, c, d, m}, x] && IGtQ[n, 0] && IGtQ[p, 0]
 

rule 5054
Int[(Cos[(c_.) + (d_.)*(x_)]^(p_.)*Cot[(c_.) + (d_.)*(x_)]^(n_.)*((e_.) + ( 
f_.)*(x_))^(m_.))/((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp 
[1/a   Int[(e + f*x)^m*Cos[c + d*x]^p*Cot[c + d*x]^n, x], x] - Simp[b/a   I 
nt[(e + f*x)^m*Cos[c + d*x]^(p + 1)*(Cot[c + d*x]^(n - 1)/(a + b*Sin[c + d* 
x])), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[m, 0] && IGtQ[n, 0] && 
 IGtQ[p, 0]
 
Maple [F]

\[\int \frac {\left (f x +e \right )^{2} \cos \left (d x +c \right )^{2} \cot \left (d x +c \right )^{2}}{a +b \sin \left (d x +c \right )}d x\]

Input:

int((f*x+e)^2*cos(d*x+c)^2*cot(d*x+c)^2/(a+b*sin(d*x+c)),x)
 

Output:

int((f*x+e)^2*cos(d*x+c)^2*cot(d*x+c)^2/(a+b*sin(d*x+c)),x)
 

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. 3075 vs. \(2 (753) = 1506\).

Time = 0.44 (sec) , antiderivative size = 3075, normalized size of antiderivative = 3.66 \[ \int \frac {(e+f x)^2 \cos ^2(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Too large to display} \] Input:

integrate((f*x+e)^2*cos(d*x+c)^2*cot(d*x+c)^2/(a+b*sin(d*x+c)),x, algorith 
m="fricas")
 

Output:

Too large to include
 

Sympy [F]

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

integrate((f*x+e)**2*cos(d*x+c)**2*cot(d*x+c)**2/(a+b*sin(d*x+c)),x)
 

Output:

Integral((e + f*x)**2*cos(c + d*x)**2*cot(c + d*x)**2/(a + b*sin(c + d*x)) 
, x)
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {(e+f x)^2 \cos ^2(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Exception raised: ValueError} \] Input:

integrate((f*x+e)^2*cos(d*x+c)^2*cot(d*x+c)^2/(a+b*sin(d*x+c)),x, algorith 
m="maxima")
 

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f 
or more de
 

Giac [F(-1)]

Timed out. \[ \int \frac {(e+f x)^2 \cos ^2(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Timed out} \] Input:

integrate((f*x+e)^2*cos(d*x+c)^2*cot(d*x+c)^2/(a+b*sin(d*x+c)),x, algorith 
m="giac")
 

Output:

Timed out
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(e+f x)^2 \cos ^2(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Hanged} \] Input:

int((cos(c + d*x)^2*cot(c + d*x)^2*(e + f*x)^2)/(a + b*sin(c + d*x)),x)
 

Output:

\text{Hanged}
                                                                                    
                                                                                    
 

Reduce [F]

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

int((f*x+e)^2*cos(d*x+c)^2*cot(d*x+c)^2/(a+b*sin(d*x+c)),x)
 

Output:

int((f*x+e)^2*cos(d*x+c)^2*cot(d*x+c)^2/(a+b*sin(d*x+c)),x)