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

Optimal result
Mathematica [B] (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 = 1144 \[ \int \frac {(e+f x)^3 \cos ^2(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx =\text {Too large to display} \] Output:

-6*(a^2-b^2)*f^3*sin(d*x+c)/a^2/b/d^4+3*b*f*(f*x+e)^2*sin(d*x+c)/a^2/d^2+6 
*b*f^2*(f*x+e)*cos(d*x+c)/a^2/d^3-6*(a^2-b^2)^(3/2)*f^3*polylog(4,I*b*exp( 
I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/a^2/b^2/d^4+6*(a^2-b^2)^(3/2)*f^3*polylog( 
4,I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/a^2/b^2/d^4+6*b*f^2*(f*x+e)*poly 
log(3,-exp(I*(d*x+c)))/a^2/d^3+3/2*f^3*polylog(3,exp(2*I*(d*x+c)))/a/d^4-I 
*(f*x+e)^3/a/d+3*(a^2-b^2)^(3/2)*f*(f*x+e)^2*polylog(2,I*b*exp(I*(d*x+c))/ 
(a+(a^2-b^2)^(1/2)))/a^2/b^2/d^2-3*(a^2-b^2)^(3/2)*f*(f*x+e)^2*polylog(2,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*x+ 
e)^3*ln(1-I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/a^2/b^2/d+I*(a^2-b^2)^(3 
/2)*(f*x+e)^3*ln(1-I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/a^2/b^2/d-b*(f* 
x+e)^3*cos(d*x+c)/a^2/d-(a^2-b^2)*(f*x+e)^3*cos(d*x+c)/a^2/b/d+3*(a^2-b^2) 
*f*(f*x+e)^2*sin(d*x+c)/a^2/b/d^2+6*(a^2-b^2)*f^2*(f*x+e)*cos(d*x+c)/a^2/b 
/d^3-3*I*b*f*(f*x+e)^2*polylog(2,-exp(I*(d*x+c)))/a^2/d^2+2*b*(f*x+e)^3*ar 
ctanh(exp(I*(d*x+c)))/a^2/d-6*I*(a^2-b^2)^(3/2)*f^2*(f*x+e)*polylog(3,I*b* 
exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/a^2/b^2/d^3+6*I*(a^2-b^2)^(3/2)*f^2*(f 
*x+e)*polylog(3,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/a^2/b^2/d^3-6*b*f^ 
2*(f*x+e)*polylog(3,exp(I*(d*x+c)))/a^2/d^3-6*I*b*f^3*polylog(4,exp(I*(d*x 
+c)))/a^2/d^4-(f*x+e)^3*cot(d*x+c)/a/d+6*I*b*f^3*polylog(4,-exp(I*(d*x+c)) 
)/a^2/d^4+3*I*b*f*(f*x+e)^2*polylog(2,exp(I*(d*x+c)))/a^2/d^2-1/4*(f*x+e)^ 
4/a/f+3*f*(f*x+e)^2*ln(1-exp(2*I*(d*x+c)))/a/d^2-3*I*f^2*(f*x+e)*polylo...
 

Mathematica [B] (warning: unable to verify)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(3915\) vs. \(2(1144)=2288\).

Time = 9.84 (sec) , antiderivative size = 3915, normalized size of antiderivative = 3.42 \[ \int \frac {(e+f x)^3 \cos ^2(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Result too large to show} \] Input:

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

Output:

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

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

\(\Big \downarrow \) 3792

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

\(\Big \downarrow \) 17

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3791

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

\(\Big \downarrow \) 17

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

\(\Big \downarrow \) 4203

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

\(\Big \downarrow \) 17

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 25

\(\displaystyle \frac {-\frac {3 f \int (e+f x)^2 \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )dx}{d}+\frac {3 f^2 \left (\frac {f \cos ^2(c+d x)}{4 d^2}+\frac {(e+f x) \sin (c+d x) \cos (c+d x)}{2 d}+\frac {(e+f x)^2}{4 f}\right )}{2 d^2}-\frac {3 f (e+f x)^2 \cos ^2(c+d x)}{4 d^2}-\frac {(e+f x)^3 \cot (c+d x)}{d}-\frac {(e+f x)^3 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {3 (e+f x)^4}{8 f}}{a}-\frac {b \int \frac {(e+f x)^3 \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)^3 \cos ^3(c+d x) \cot (c+d x)}{a+b \sin (c+d x)}dx}{a}+\frac {-\frac {3 f \left (\frac {i (e+f x)^3}{3 f}-2 i \int \frac {e^{i (2 c+2 d x+\pi )} (e+f x)^2}{1+e^{i (2 c+2 d x+\pi )}}dx\right )}{d}+\frac {3 f^2 \left (\frac {f \cos ^2(c+d x)}{4 d^2}+\frac {(e+f x) \sin (c+d x) \cos (c+d x)}{2 d}+\frac {(e+f x)^2}{4 f}\right )}{2 d^2}-\frac {3 f (e+f x)^2 \cos ^2(c+d x)}{4 d^2}-\frac {(e+f x)^3 \cot (c+d x)}{d}-\frac {(e+f x)^3 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {3 (e+f x)^4}{8 f}}{a}\)

\(\Big \downarrow \) 2620

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

\(\Big \downarrow \) 3011

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

\(\Big \downarrow \) 2720

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

\(\Big \downarrow \) 5054

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

\(\Big \downarrow \) 4908

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

\(\Big \downarrow \) 4905

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3792

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3113

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

\(\Big \downarrow \) 2009

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

\(\Big \downarrow \) 3777

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3777

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

\(\Big \downarrow \) 3042

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

Input:

Int[((e + f*x)^3*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 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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

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 2720
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]]]
 

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

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

rule 3113
Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1)   Subst[Int[Exp 
and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] 
 && IGtQ[(n - 1)/2, 0]
 

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 )^{3} \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)^3*cos(d*x+c)^2*cot(d*x+c)^2/(a+b*sin(d*x+c)),x)
 

Output:

int((f*x+e)^3*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. 4706 vs. \(2 (1029) = 2058\).

Time = 0.55 (sec) , antiderivative size = 4706, normalized size of antiderivative = 4.11 \[ \int \frac {(e+f x)^3 \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)^3*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)^3 \cos ^2(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\int \frac {\left (e + f x\right )^{3} \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)**3*cos(d*x+c)**2*cot(d*x+c)**2/(a+b*sin(d*x+c)),x)
 

Output:

Integral((e + f*x)**3*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)^3 \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)^3*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)^3 \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)^3*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)^3 \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)^3)/(a + b*sin(c + d*x)),x)
 

Output:

\text{Hanged}
 

Reduce [F]

\[ \int \frac {(e+f x)^3 \cos ^2(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\int \frac {\left (f x +e \right )^{3} \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)^3*cos(d*x+c)^2*cot(d*x+c)^2/(a+b*sin(d*x+c)),x)
 

Output:

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