Optimal. Leaf size=116 \[ -\frac {4 a^4 \cos ^3(c+d x)}{3 d}+\frac {4 a^4 \cos (c+d x)}{d}-\frac {a^4 \cot (c+d x)}{d}+\frac {a^4 \sin ^3(c+d x) \cos (c+d x)}{4 d}+\frac {23 a^4 \sin (c+d x) \cos (c+d x)}{8 d}-\frac {4 a^4 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {17 a^4 x}{8} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.17, antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2709, 3770, 3767, 8, 2635, 2633} \[ -\frac {4 a^4 \cos ^3(c+d x)}{3 d}+\frac {4 a^4 \cos (c+d x)}{d}-\frac {a^4 \cot (c+d x)}{d}+\frac {a^4 \sin ^3(c+d x) \cos (c+d x)}{4 d}+\frac {23 a^4 \sin (c+d x) \cos (c+d x)}{8 d}-\frac {4 a^4 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {17 a^4 x}{8} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2633
Rule 2635
Rule 2709
Rule 3767
Rule 3770
Rubi steps
\begin {align*} \int \cot ^2(c+d x) (a+a \sin (c+d x))^4 \, dx &=\frac {\int \left (5 a^6+4 a^6 \csc (c+d x)+a^6 \csc ^2(c+d x)-5 a^6 \sin ^2(c+d x)-4 a^6 \sin ^3(c+d x)-a^6 \sin ^4(c+d x)\right ) \, dx}{a^2}\\ &=5 a^4 x+a^4 \int \csc ^2(c+d x) \, dx-a^4 \int \sin ^4(c+d x) \, dx+\left (4 a^4\right ) \int \csc (c+d x) \, dx-\left (4 a^4\right ) \int \sin ^3(c+d x) \, dx-\left (5 a^4\right ) \int \sin ^2(c+d x) \, dx\\ &=5 a^4 x-\frac {4 a^4 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {5 a^4 \cos (c+d x) \sin (c+d x)}{2 d}+\frac {a^4 \cos (c+d x) \sin ^3(c+d x)}{4 d}-\frac {1}{4} \left (3 a^4\right ) \int \sin ^2(c+d x) \, dx-\frac {1}{2} \left (5 a^4\right ) \int 1 \, dx-\frac {a^4 \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}+\frac {\left (4 a^4\right ) \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=\frac {5 a^4 x}{2}-\frac {4 a^4 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {4 a^4 \cos (c+d x)}{d}-\frac {4 a^4 \cos ^3(c+d x)}{3 d}-\frac {a^4 \cot (c+d x)}{d}+\frac {23 a^4 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^4 \cos (c+d x) \sin ^3(c+d x)}{4 d}-\frac {1}{8} \left (3 a^4\right ) \int 1 \, dx\\ &=\frac {17 a^4 x}{8}-\frac {4 a^4 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {4 a^4 \cos (c+d x)}{d}-\frac {4 a^4 \cos ^3(c+d x)}{3 d}-\frac {a^4 \cot (c+d x)}{d}+\frac {23 a^4 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^4 \cos (c+d x) \sin ^3(c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.63, size = 136, normalized size = 1.17 \[ \frac {a^4 \csc \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {1}{2} (c+d x)\right ) \left (408 c \sin (c+d x)+408 d x \sin (c+d x)+320 \sin (2 (c+d x))-32 \sin (4 (c+d x))-48 \cos (c+d x)-147 \cos (3 (c+d x))+3 \cos (5 (c+d x))+768 \sin (c+d x) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-768 \sin (c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )}{384 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.52, size = 135, normalized size = 1.16 \[ \frac {6 \, a^{4} \cos \left (d x + c\right )^{5} - 81 \, a^{4} \cos \left (d x + c\right )^{3} - 48 \, a^{4} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 48 \, a^{4} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 51 \, a^{4} \cos \left (d x + c\right ) - {\left (32 \, a^{4} \cos \left (d x + c\right )^{3} - 51 \, a^{4} d x - 96 \, a^{4} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, d \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 194, normalized size = 1.67 \[ \frac {51 \, {\left (d x + c\right )} a^{4} + 96 \, a^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 12 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {12 \, {\left (8 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{4}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} - \frac {2 \, {\left (69 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 93 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 192 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 93 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 256 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 69 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 64 \, a^{4}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.32, size = 127, normalized size = 1.09 \[ -\frac {a^{4} \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{4 d}+\frac {25 a^{4} \cos \left (d x +c \right ) \sin \left (d x +c \right )}{8 d}+\frac {17 a^{4} x}{8}+\frac {17 a^{4} c}{8 d}-\frac {4 a^{4} \left (\cos ^{3}\left (d x +c \right )\right )}{3 d}+\frac {4 a^{4} \cos \left (d x +c \right )}{d}+\frac {4 a^{4} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d}-\frac {a^{4} \cot \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.43, size = 117, normalized size = 1.01 \[ -\frac {128 \, a^{4} \cos \left (d x + c\right )^{3} - 3 \, {\left (4 \, d x + 4 \, c - \sin \left (4 \, d x + 4 \, c\right )\right )} a^{4} - 144 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{4} + 96 \, {\left (d x + c + \frac {1}{\tan \left (d x + c\right )}\right )} a^{4} - 192 \, a^{4} {\left (2 \, \cos \left (d x + c\right ) - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{96 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.83, size = 295, normalized size = 2.54 \[ \frac {4\,a^4\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {17\,a^4\,\mathrm {atan}\left (\frac {289\,a^8}{16\,\left (34\,a^8-\frac {289\,a^8\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}+\frac {34\,a^8\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{34\,a^8-\frac {289\,a^8\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}}\right )}{4\,d}+\frac {-\frac {25\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{2}-\frac {39\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{2}+32\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\frac {19\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}+\frac {128\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+\frac {15\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+\frac {32\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}-a^4}{d\,\left (2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}+\frac {a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,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]
________________________________________________________________________________________