Optimal. Leaf size=212 \[ \frac {b \left (6 a^2+5 b^2\right ) \cot (c+d x)}{15 d}+\frac {a \left (a^2+6 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{16 d}+\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}+\frac {b \left (3 a^2-b^2\right ) \cot (c+d x) \csc ^2(c+d x)}{15 d}+\frac {a \left (a^2+6 b^2\right ) \cot (c+d x) \csc (c+d x)}{16 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.60, antiderivative size = 212, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 10, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.345, Rules used = {2889, 3048, 3047, 3031, 3021, 2748, 3768, 3770, 3767, 8} \[ \frac {b \left (6 a^2+5 b^2\right ) \cot (c+d x)}{15 d}+\frac {a \left (a^2+6 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{16 d}+\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}+\frac {b \left (3 a^2-b^2\right ) \cot (c+d x) \csc ^2(c+d x)}{15 d}+\frac {a \left (a^2+6 b^2\right ) \cot (c+d x) \csc (c+d x)}{16 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2748
Rule 2889
Rule 3021
Rule 3031
Rule 3047
Rule 3048
Rule 3767
Rule 3768
Rule 3770
Rubi steps
\begin {align*} \int \cot ^2(c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3 \, dx &=\int \csc ^7(c+d x) (a+b \sin (c+d x))^3 \left (1-\sin ^2(c+d x)\right ) \, dx\\ &=-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}+\frac {1}{6} \int \csc ^6(c+d x) (a+b \sin (c+d x))^2 \left (3 b-a \sin (c+d x)-4 b \sin ^2(c+d x)\right ) \, dx\\ &=-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}+\frac {1}{30} \int \csc ^5(c+d x) (a+b \sin (c+d x)) \left (-5 a^2+6 b^2-13 a b \sin (c+d x)-14 b^2 \sin ^2(c+d x)\right ) \, dx\\ &=\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}-\frac {1}{120} \int \csc ^4(c+d x) \left (24 b \left (3 a^2-b^2\right )+15 a \left (a^2+6 b^2\right ) \sin (c+d x)+56 b^3 \sin ^2(c+d x)\right ) \, dx\\ &=\frac {b \left (3 a^2-b^2\right ) \cot (c+d x) \csc ^2(c+d x)}{15 d}+\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}-\frac {1}{360} \int \csc ^3(c+d x) \left (45 a \left (a^2+6 b^2\right )+24 b \left (6 a^2+5 b^2\right ) \sin (c+d x)\right ) \, dx\\ &=\frac {b \left (3 a^2-b^2\right ) \cot (c+d x) \csc ^2(c+d x)}{15 d}+\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}-\frac {1}{15} \left (b \left (6 a^2+5 b^2\right )\right ) \int \csc ^2(c+d x) \, dx-\frac {1}{8} \left (a \left (a^2+6 b^2\right )\right ) \int \csc ^3(c+d x) \, dx\\ &=\frac {a \left (a^2+6 b^2\right ) \cot (c+d x) \csc (c+d x)}{16 d}+\frac {b \left (3 a^2-b^2\right ) \cot (c+d x) \csc ^2(c+d x)}{15 d}+\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}-\frac {1}{16} \left (a \left (a^2+6 b^2\right )\right ) \int \csc (c+d x) \, dx+\frac {\left (b \left (6 a^2+5 b^2\right )\right ) \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{15 d}\\ &=\frac {a \left (a^2+6 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{16 d}+\frac {b \left (6 a^2+5 b^2\right ) \cot (c+d x)}{15 d}+\frac {a \left (a^2+6 b^2\right ) \cot (c+d x) \csc (c+d x)}{16 d}+\frac {b \left (3 a^2-b^2\right ) \cot (c+d x) \csc ^2(c+d x)}{15 d}+\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 2.10, size = 369, normalized size = 1.74 \[ -\frac {-30 \left (a^3+6 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 ^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 (6 a^2 b+5 b^3\right ) \cot \left (\frac {1}{2} (c+d x)\right )+2 b \csc ^4\left (\frac {1}{2} (c+d x)\right ) \left (\left (20 b^2-3 a^2\right ) \sin (c+d x)+45 a b\right )+384 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))+96 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 )-90 a b^2 \sec ^4\left (\frac {1}{2} (c+d x)\right )+180 a b^2 \sec ^2\left (\frac {1}{2} (c+d x)\right )+720 a b^2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-720 a b^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+320 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 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.78, size = 310, normalized size = 1.46 \[ \frac {80 \, a^{3} \cos \left (d x + c\right )^{3} - 30 \, {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{5} + 30 \, {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right ) + 15 \, {\left ({\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{6} - 3 \, {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{4} - a^{3} - 6 \, a b^{2} + 3 \, {\left (a^{3} + 6 \, 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} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{6} - 3 \, {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{4} - a^{3} - 6 \, a b^{2} + 3 \, {\left (a^{3} + 6 \, 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 ({\left (6 \, a^{2} b + 5 \, b^{3}\right )} \cos \left (d x + c\right )^{5} - 5 \, {\left (3 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{3}\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.29, size = 354, normalized size = 1.67 \[ \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} + 60 \, 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} - 360 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 240 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 120 \, {\left (a^{3} + 6 \, 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} + 1764 \, 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} + 240 \, 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} - 60 \, 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.48, size = 276, normalized size = 1.30 \[ -\frac {a^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{6 d \sin \left (d x +c \right )^{6}}-\frac {a^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{8 d \sin \left (d x +c \right )^{4}}-\frac {a^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{16 d \sin \left (d x +c \right )^{2}}-\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 ^{3}\left (d x +c \right )\right )}{5 d \sin \left (d x +c \right )^{5}}-\frac {2 a^{2} b \left (\cos ^{3}\left (d x +c \right )\right )}{5 d \sin \left (d x +c \right )^{3}}-\frac {3 a \,b^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{4 d \sin \left (d x +c \right )^{4}}-\frac {3 a \,b^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{8 d \sin \left (d x +c \right )^{2}}-\frac {3 a \,b^{2} \cos \left (d x +c \right )}{8 d}-\frac {3 a \,b^{2} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8 d}-\frac {b^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{3 d \sin \left (d x +c \right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 202, normalized size = 0.95 \[ -\frac {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 (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac {160 \, b^{3}}{\tan \left (d x + c\right )^{3}} + \frac {96 \, {\left (5 \, \tan \left (d x + c\right )^{2} + 3\right )} 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.69, size = 292, normalized size = 1.38 \[ \frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{384\,d}-\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{128\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {a^3}{2}+3\,a\,b^2\right )-\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (2\,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+8\,b^3\right )+\frac {a^3}{6}+\frac {6\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{5}\right )}{64\,d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {a^3}{128}+\frac {3\,a\,b^2}{64}\right )}{d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {a^2\,b}{32}+\frac {b^3}{24}\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (\frac {a^3}{16}+\frac {3\,a\,b^2}{8}\right )}{d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,a^2\,b}{16}+\frac {b^3}{8}\right )}{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]
________________________________________________________________________________________