Optimal. Leaf size=136 \[ -\frac {a^3 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {a \left (a^2-2 b^2\right ) \cos (c+d x)}{2 d}+\frac {b \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {1}{8} b x \left (12 a^2+b^2\right )+\frac {a \cos (c+d x) (a+b \sin (c+d x))^2}{4 d}+\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.41, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {2889, 3050, 3049, 3033, 3023, 2735, 3770} \[ \frac {a \left (a^2-2 b^2\right ) \cos (c+d x)}{2 d}+\frac {b \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {1}{8} b x \left (12 a^2+b^2\right )-\frac {a^3 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^2}{4 d}+\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2735
Rule 2889
Rule 3023
Rule 3033
Rule 3049
Rule 3050
Rule 3770
Rubi steps
\begin {align*} \int \cos (c+d x) \cot (c+d x) (a+b \sin (c+d x))^3 \, dx &=\int \csc (c+d x) (a+b \sin (c+d x))^3 \left (1-\sin ^2(c+d x)\right ) \, dx\\ &=\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 d}+\frac {1}{4} \int \csc (c+d x) (a+b \sin (c+d x))^2 \left (4 a+b \sin (c+d x)-3 a \sin ^2(c+d x)\right ) \, dx\\ &=\frac {a \cos (c+d x) (a+b \sin (c+d x))^2}{4 d}+\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 d}+\frac {1}{12} \int \csc (c+d x) (a+b \sin (c+d x)) \left (12 a^2+9 a b \sin (c+d x)-3 \left (2 a^2-b^2\right ) \sin ^2(c+d x)\right ) \, dx\\ &=\frac {b \left (2 a^2-b^2\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^2}{4 d}+\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 d}+\frac {1}{24} \int \csc (c+d x) \left (24 a^3+3 b \left (12 a^2+b^2\right ) \sin (c+d x)-12 a \left (a^2-2 b^2\right ) \sin ^2(c+d x)\right ) \, dx\\ &=\frac {a \left (a^2-2 b^2\right ) \cos (c+d x)}{2 d}+\frac {b \left (2 a^2-b^2\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^2}{4 d}+\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 d}+\frac {1}{24} \int \csc (c+d x) \left (24 a^3+3 b \left (12 a^2+b^2\right ) \sin (c+d x)\right ) \, dx\\ &=\frac {1}{8} b \left (12 a^2+b^2\right ) x+\frac {a \left (a^2-2 b^2\right ) \cos (c+d x)}{2 d}+\frac {b \left (2 a^2-b^2\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^2}{4 d}+\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 d}+a^3 \int \csc (c+d x) \, dx\\ &=\frac {1}{8} b \left (12 a^2+b^2\right ) x-\frac {a^3 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {a \left (a^2-2 b^2\right ) \cos (c+d x)}{2 d}+\frac {b \left (2 a^2-b^2\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^2}{4 d}+\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.29, size = 129, normalized size = 0.95 \[ \frac {32 a^3 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-32 a^3 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+8 a \left (4 a^2-3 b^2\right ) \cos (c+d x)+24 a^2 b \sin (2 (c+d x))+48 a^2 b c+48 a^2 b d x-8 a b^2 \cos (3 (c+d x))-b^3 \sin (4 (c+d x))+4 b^3 c+4 b^3 d x}{32 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.75, size = 116, normalized size = 0.85 \[ -\frac {8 \, a b^{2} \cos \left (d x + c\right )^{3} - 8 \, a^{3} \cos \left (d x + c\right ) + 4 \, a^{3} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 4 \, a^{3} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (12 \, a^{2} b + b^{3}\right )} d x + {\left (2 \, b^{3} \cos \left (d x + c\right )^{3} - {\left (12 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.23, size = 293, normalized size = 2.15 \[ \frac {8 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + {\left (12 \, a^{2} b + b^{3}\right )} {\left (d x + c\right )} - \frac {2 \, {\left (12 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 8 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 24 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 12 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 7 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 24 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 24 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 12 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 7 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 8 \, a^{3} + 8 \, a b^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.43, size = 150, normalized size = 1.10 \[ \frac {a^{3} \cos \left (d x +c \right )}{d}+\frac {a^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d}+\frac {3 a^{2} b \cos \left (d x +c \right ) \sin \left (d x +c \right )}{2 d}+\frac {3 a^{2} b x}{2}+\frac {3 a^{2} b c}{2 d}-\frac {a \,b^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{d}-\frac {b^{3} \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{4 d}+\frac {b^{3} \cos \left (d x +c \right ) \sin \left (d x +c \right )}{8 d}+\frac {b^{3} x}{8}+\frac {b^{3} c}{8 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 101, normalized size = 0.74 \[ -\frac {32 \, a b^{2} \cos \left (d x + c\right )^{3} - 24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} b - {\left (4 \, d x + 4 \, c - \sin \left (4 \, d x + 4 \, c\right )\right )} b^{3} - 16 \, a^{3} {\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 )}}{32 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.12, size = 567, normalized size = 4.17 \[ \frac {a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {2\,a\,b^2-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (3\,a^2\,b-\frac {b^3}{4}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,a\,b^2-6\,a^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (6\,a\,b^2-2\,a^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (6\,a\,b^2-6\,a^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (3\,a^2\,b-\frac {b^3}{4}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (3\,a^2\,b+\frac {7\,b^3}{4}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (3\,a^2\,b+\frac {7\,b^3}{4}\right )-2\,a^3}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {b\,\mathrm {atan}\left (\frac {\frac {b\,\left (12\,a^2+b^2\right )\,\left (3\,a^2\,b+\frac {b^3}{4}+2\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (12\,a^2+b^2\right )\,3{}\mathrm {i}}{4}\right )}{8}+\frac {b\,\left (12\,a^2+b^2\right )\,\left (3\,a^2\,b+\frac {b^3}{4}+2\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (12\,a^2+b^2\right )\,3{}\mathrm {i}}{4}\right )}{8}}{2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (9\,a^4\,b^2+\frac {3\,a^2\,b^4}{2}+\frac {b^6}{16}\right )+6\,a^5\,b+\frac {a^3\,b^3}{2}-\frac {b\,\left (12\,a^2+b^2\right )\,\left (3\,a^2\,b+\frac {b^3}{4}+2\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (12\,a^2+b^2\right )\,3{}\mathrm {i}}{4}\right )\,1{}\mathrm {i}}{8}+\frac {b\,\left (12\,a^2+b^2\right )\,\left (3\,a^2\,b+\frac {b^3}{4}+2\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (12\,a^2+b^2\right )\,3{}\mathrm {i}}{4}\right )\,1{}\mathrm {i}}{8}}\right )\,\left (12\,a^2+b^2\right )}{4\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sin {\left (c + d x \right )}\right )^{3} \cos ^{2}{\left (c + d x \right )} \csc {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________