Optimal. Leaf size=275 \[ -\frac {a \left (a^2+18 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{16 d}+\frac {\left (35 a^2-2 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^3}{120 a^2 d}+\frac {b \left (39 a^2-2 b^2\right ) \cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2}{120 a^2 d}+\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^4}{15 a^2 d}-\frac {b \left (36 a^4-43 a^2 b^2+2 b^4\right ) \cot (c+d x)}{60 a^2 d}-\frac {\left (15 a^4-84 a^2 b^2+4 b^4\right ) \cot (c+d x) \csc (c+d x)}{240 a d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{6 a d}+b^3 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.76, antiderivative size = 275, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {2893, 3047, 3031, 3021, 2735, 3770} \[ -\frac {b \left (-43 a^2 b^2+36 a^4+2 b^4\right ) \cot (c+d x)}{60 a^2 d}-\frac {a \left (a^2+18 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{16 d}-\frac {\left (-84 a^2 b^2+15 a^4+4 b^4\right ) \cot (c+d x) \csc (c+d x)}{240 a d}+\frac {\left (35 a^2-2 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^3}{120 a^2 d}+\frac {b \left (39 a^2-2 b^2\right ) \cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2}{120 a^2 d}+\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^4}{15 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{6 a d}+b^3 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2735
Rule 2893
Rule 3021
Rule 3031
Rule 3047
Rule 3770
Rubi steps
\begin {align*} \int \cot ^4(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^3 \, dx &=\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^4}{15 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{6 a d}-\frac {\int \csc ^5(c+d x) (a+b \sin (c+d x))^3 \left (35 a^2-2 b^2+3 a b \sin (c+d x)-30 a^2 \sin ^2(c+d x)\right ) \, dx}{30 a^2}\\ &=\frac {\left (35 a^2-2 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^3}{120 a^2 d}+\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^4}{15 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{6 a d}-\frac {\int \csc ^4(c+d x) (a+b \sin (c+d x))^2 \left (3 b \left (39 a^2-2 b^2\right )-3 a \left (5 a^2-2 b^2\right ) \sin (c+d x)-120 a^2 b \sin ^2(c+d x)\right ) \, dx}{120 a^2}\\ &=\frac {b \left (39 a^2-2 b^2\right ) \cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2}{120 a^2 d}+\frac {\left (35 a^2-2 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^3}{120 a^2 d}+\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^4}{15 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{6 a d}-\frac {\int \csc ^3(c+d x) (a+b \sin (c+d x)) \left (-3 \left (15 a^4-84 a^2 b^2+4 b^4\right )-3 a b \left (57 a^2-2 b^2\right ) \sin (c+d x)-360 a^2 b^2 \sin ^2(c+d x)\right ) \, dx}{360 a^2}\\ &=-\frac {\left (15 a^4-84 a^2 b^2+4 b^4\right ) \cot (c+d x) \csc (c+d x)}{240 a d}+\frac {b \left (39 a^2-2 b^2\right ) \cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2}{120 a^2 d}+\frac {\left (35 a^2-2 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^3}{120 a^2 d}+\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^4}{15 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{6 a d}+\frac {\int \csc ^2(c+d x) \left (12 b \left (36 a^4-43 a^2 b^2+2 b^4\right )+45 a^3 \left (a^2+18 b^2\right ) \sin (c+d x)+720 a^2 b^3 \sin ^2(c+d x)\right ) \, dx}{720 a^2}\\ &=-\frac {b \left (36 a^4-43 a^2 b^2+2 b^4\right ) \cot (c+d x)}{60 a^2 d}-\frac {\left (15 a^4-84 a^2 b^2+4 b^4\right ) \cot (c+d x) \csc (c+d x)}{240 a d}+\frac {b \left (39 a^2-2 b^2\right ) \cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2}{120 a^2 d}+\frac {\left (35 a^2-2 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^3}{120 a^2 d}+\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^4}{15 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{6 a d}+\frac {\int \csc (c+d x) \left (45 a^3 \left (a^2+18 b^2\right )+720 a^2 b^3 \sin (c+d x)\right ) \, dx}{720 a^2}\\ &=b^3 x-\frac {b \left (36 a^4-43 a^2 b^2+2 b^4\right ) \cot (c+d x)}{60 a^2 d}-\frac {\left (15 a^4-84 a^2 b^2+4 b^4\right ) \cot (c+d x) \csc (c+d x)}{240 a d}+\frac {b \left (39 a^2-2 b^2\right ) \cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2}{120 a^2 d}+\frac {\left (35 a^2-2 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^3}{120 a^2 d}+\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^4}{15 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{6 a d}+\frac {1}{16} \left (a \left (a^2+18 b^2\right )\right ) \int \csc (c+d x) \, dx\\ &=b^3 x-\frac {a \left (a^2+18 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{16 d}-\frac {b \left (36 a^4-43 a^2 b^2+2 b^4\right ) \cot (c+d x)}{60 a^2 d}-\frac {\left (15 a^4-84 a^2 b^2+4 b^4\right ) \cot (c+d x) \csc (c+d x)}{240 a d}+\frac {b \left (39 a^2-2 b^2\right ) \cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2}{120 a^2 d}+\frac {\left (35 a^2-2 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^3}{120 a^2 d}+\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^4}{15 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{6 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.87, size = 408, normalized size = 1.48 \[ \frac {-30 \left (a^3-30 a b^2\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )+5 a^3 \sec ^6\left (\frac {1}{2} (c+d x)\right )-30 a^3 \sec ^4\left (\frac {1}{2} (c+d x)\right )+30 a^3 \sec ^2\left (\frac {1}{2} (c+d x)\right )+120 a^3 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-120 a^3 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-64 \left (9 a^2 b-20 b^3\right ) \cot \left (\frac {1}{2} (c+d x)\right )+576 a^2 b \tan \left (\frac {1}{2} (c+d x)\right )-a^2 \csc ^6\left (\frac {1}{2} (c+d x)\right ) (5 a+18 b \sin (c+d x))-2016 a^2 b \sin ^4\left (\frac {1}{2} (c+d x)\right ) \csc ^3(c+d x)+36 a^2 b \tan \left (\frac {1}{2} (c+d x)\right ) \sec ^4\left (\frac {1}{2} (c+d x)\right )+2 \csc ^4\left (\frac {1}{2} (c+d x)\right ) \left (15 \left (a^3-3 a b^2\right )+b \left (63 a^2-20 b^2\right ) \sin (c+d x)\right )+90 a b^2 \sec ^4\left (\frac {1}{2} (c+d x)\right )-900 a b^2 \sec ^2\left (\frac {1}{2} (c+d x)\right )+2160 a b^2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-2160 a b^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-1280 b^3 \tan \left (\frac {1}{2} (c+d x)\right )+640 b^3 \sin ^4\left (\frac {1}{2} (c+d x)\right ) \csc ^3(c+d x)+1920 b^3 c+1920 b^3 d x}{1920 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.85, size = 373, normalized size = 1.36 \[ \frac {480 \, b^{3} d x \cos \left (d x + c\right )^{6} - 1440 \, b^{3} d x \cos \left (d x + c\right )^{4} + 1440 \, b^{3} d x \cos \left (d x + c\right )^{2} + 30 \, {\left (a^{3} - 30 \, a b^{2}\right )} \cos \left (d x + c\right )^{5} - 480 \, b^{3} d x + 80 \, {\left (a^{3} + 18 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} - 30 \, {\left (a^{3} + 18 \, a b^{2}\right )} \cos \left (d x + c\right ) - 15 \, {\left ({\left (a^{3} + 18 \, a b^{2}\right )} \cos \left (d x + c\right )^{6} - 3 \, {\left (a^{3} + 18 \, a b^{2}\right )} \cos \left (d x + c\right )^{4} - a^{3} - 18 \, a b^{2} + 3 \, {\left (a^{3} + 18 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 15 \, {\left ({\left (a^{3} + 18 \, a b^{2}\right )} \cos \left (d x + c\right )^{6} - 3 \, {\left (a^{3} + 18 \, a b^{2}\right )} \cos \left (d x + c\right )^{4} - a^{3} - 18 \, a b^{2} + 3 \, {\left (a^{3} + 18 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 32 \, {\left (35 \, b^{3} \cos \left (d x + c\right )^{3} + {\left (9 \, a^{2} b - 20 \, b^{3}\right )} \cos \left (d x + c\right )^{5} - 15 \, b^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{480 \, {\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.36, size = 399, normalized size = 1.45 \[ \frac {5 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 36 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 90 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 180 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 80 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 720 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1920 \, {\left (d x + c\right )} b^{3} + 360 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1200 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 120 \, {\left (a^{3} + 18 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {294 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 5292 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 360 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 1200 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 720 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 180 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 80 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 90 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 36 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6}}}{1920 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.51, size = 302, normalized size = 1.10 \[ -\frac {a^{3} \left (\cos ^{5}\left (d x +c \right )\right )}{6 d \sin \left (d x +c \right )^{6}}-\frac {a^{3} \left (\cos ^{5}\left (d x +c \right )\right )}{24 d \sin \left (d x +c \right )^{4}}+\frac {a^{3} \left (\cos ^{5}\left (d x +c \right )\right )}{48 d \sin \left (d x +c \right )^{2}}+\frac {a^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{48 d}+\frac {a^{3} \cos \left (d x +c \right )}{16 d}+\frac {a^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{16 d}-\frac {3 a^{2} b \left (\cos ^{5}\left (d x +c \right )\right )}{5 d \sin \left (d x +c \right )^{5}}-\frac {3 a \,b^{2} \left (\cos ^{5}\left (d x +c \right )\right )}{4 d \sin \left (d x +c \right )^{4}}+\frac {3 a \,b^{2} \left (\cos ^{5}\left (d x +c \right )\right )}{8 d \sin \left (d x +c \right )^{2}}+\frac {3 a \,b^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{8 d}+\frac {9 a \,b^{2} \cos \left (d x +c \right )}{8 d}+\frac {9 a \,b^{2} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8 d}-\frac {b^{3} \left (\cot ^{3}\left (d x +c \right )\right )}{3 d}+\frac {\cot \left (d x +c \right ) b^{3}}{d}+b^{3} x +\frac {b^{3} c}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 217, normalized size = 0.79 \[ \frac {160 \, {\left (3 \, d x + 3 \, c + \frac {3 \, \tan \left (d x + c\right )^{2} - 1}{\tan \left (d x + c\right )^{3}}\right )} b^{3} + 5 \, a^{3} {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{5} + 8 \, \cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - 1} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 90 \, a b^{2} {\left (\frac {2 \, {\left (5 \, \cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} + 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - \frac {288 \, a^{2} b}{\tan \left (d x + c\right )^{5}}}{480 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.93, size = 446, normalized size = 1.62 \[ \frac {2\,b^3\,\mathrm {atan}\left (\frac {4\,b^6}{\frac {a^3\,b^3}{4}+\frac {9\,a\,b^5}{2}-4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^6}+\frac {9\,a\,b^5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,\left (\frac {a^3\,b^3}{4}+\frac {9\,a\,b^5}{2}-4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^6\right )}+\frac {a^3\,b^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,\left (\frac {a^3\,b^3}{4}+\frac {9\,a\,b^5}{2}-4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^6\right )}\right )}{d}+\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{384\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {a^3}{128}+\frac {3\,a\,b^2}{8}\right )}{d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {3\,a\,b^2}{64}-\frac {a^3}{128}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {3\,a^2\,b}{32}-\frac {b^3}{24}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (3\,a\,b^2-\frac {a^3}{2}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {a^3}{2}+24\,a\,b^2\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (6\,a^2\,b-\frac {8\,b^3}{3}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (12\,a^2\,b-40\,b^3\right )+\frac {a^3}{6}+\frac {6\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{5}}{64\,d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,a^2\,b}{16}-\frac {5\,b^3}{8}\right )}{d}+\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (a^2+18\,b^2\right )}{16\,d}+\frac {3\,a^2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________