Optimal. Leaf size=90 \[ -\frac {a \cot ^5(c+d x)}{5 d}-\frac {a \cot ^3(c+d x)}{3 d}+\frac {a \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac {a \cot (c+d x) \csc (c+d x)}{8 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2838, 2607, 14, 2611, 3768, 3770} \[ -\frac {a \cot ^5(c+d x)}{5 d}-\frac {a \cot ^3(c+d x)}{3 d}+\frac {a \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac {a \cot (c+d x) \csc (c+d x)}{8 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2607
Rule 2611
Rule 2838
Rule 3768
Rule 3770
Rubi steps
\begin {align*} \int \cot ^2(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x)) \, dx &=a \int \cot ^2(c+d x) \csc ^3(c+d x) \, dx+a \int \cot ^2(c+d x) \csc ^4(c+d x) \, dx\\ &=-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {1}{4} a \int \csc ^3(c+d x) \, dx+\frac {a \operatorname {Subst}\left (\int x^2 \left (1+x^2\right ) \, dx,x,-\cot (c+d x)\right )}{d}\\ &=\frac {a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {1}{8} a \int \csc (c+d x) \, dx+\frac {a \operatorname {Subst}\left (\int \left (x^2+x^4\right ) \, dx,x,-\cot (c+d x)\right )}{d}\\ &=\frac {a \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {a \cot ^3(c+d x)}{3 d}-\frac {a \cot ^5(c+d x)}{5 d}+\frac {a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 177, normalized size = 1.97 \[ \frac {2 a \cot (c+d x)}{15 d}-\frac {a \csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {a \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}+\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {a \cot (c+d x) \csc ^4(c+d x)}{5 d}+\frac {a \cot (c+d x) \csc ^2(c+d x)}{15 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.54, size = 169, normalized size = 1.88 \[ \frac {32 \, a \cos \left (d x + c\right )^{5} - 80 \, a \cos \left (d x + c\right )^{3} + 15 \, {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 15 \, {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 30 \, {\left (a \cos \left (d x + c\right )^{3} + a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )} \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 144, normalized size = 1.60 \[ \frac {6 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 10 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 120 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 60 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {274 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 60 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 10 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{960 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.22, size = 124, normalized size = 1.38 \[ -\frac {a \left (\cos ^{3}\left (d x +c \right )\right )}{4 d \sin \left (d x +c \right )^{4}}-\frac {a \left (\cos ^{3}\left (d x +c \right )\right )}{8 d \sin \left (d x +c \right )^{2}}-\frac {a \cos \left (d x +c \right )}{8 d}-\frac {a \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8 d}-\frac {a \left (\cos ^{3}\left (d x +c \right )\right )}{5 d \sin \left (d x +c \right )^{5}}-\frac {2 a \left (\cos ^{3}\left (d x +c \right )\right )}{15 d \sin \left (d x +c \right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 92, normalized size = 1.02 \[ -\frac {15 \, a {\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 {16 \, {\left (5 \, \tan \left (d x + c\right )^{2} + 3\right )} a}{\tan \left (d x + c\right )^{5}}}{240 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.65, size = 143, normalized size = 1.59 \[ \frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{96\,d}-\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d}-\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (-2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}+\frac {a}{5}\right )}{32\,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]
________________________________________________________________________________________