Optimal. Leaf size=89 \[ \frac {a \cos ^3(c+d x)}{3 d}+\frac {a \cos (c+d x)}{d}-\frac {a \tanh ^{-1}(\cos (c+d x))}{d}+\frac {b \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3 b \sin (c+d x) \cos (c+d x)}{8 d}+\frac {3 b x}{8} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {2838, 2592, 302, 206, 2635, 8} \[ \frac {a \cos ^3(c+d x)}{3 d}+\frac {a \cos (c+d x)}{d}-\frac {a \tanh ^{-1}(\cos (c+d x))}{d}+\frac {b \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3 b \sin (c+d x) \cos (c+d x)}{8 d}+\frac {3 b x}{8} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 206
Rule 302
Rule 2592
Rule 2635
Rule 2838
Rubi steps
\begin {align*} \int \cos ^3(c+d x) \cot (c+d x) (a+b \sin (c+d x)) \, dx &=a \int \cos ^3(c+d x) \cot (c+d x) \, dx+b \int \cos ^4(c+d x) \, dx\\ &=\frac {b \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{4} (3 b) \int \cos ^2(c+d x) \, dx-\frac {a \operatorname {Subst}\left (\int \frac {x^4}{1-x^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=\frac {3 b \cos (c+d x) \sin (c+d x)}{8 d}+\frac {b \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{8} (3 b) \int 1 \, dx-\frac {a \operatorname {Subst}\left (\int \left (-1-x^2+\frac {1}{1-x^2}\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=\frac {3 b x}{8}+\frac {a \cos (c+d x)}{d}+\frac {a \cos ^3(c+d x)}{3 d}+\frac {3 b \cos (c+d x) \sin (c+d x)}{8 d}+\frac {b \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {a \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=\frac {3 b x}{8}-\frac {a \tanh ^{-1}(\cos (c+d x))}{d}+\frac {a \cos (c+d x)}{d}+\frac {a \cos ^3(c+d x)}{3 d}+\frac {3 b \cos (c+d x) \sin (c+d x)}{8 d}+\frac {b \cos ^3(c+d x) \sin (c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.12, size = 109, normalized size = 1.22 \[ \frac {5 a \cos (c+d x)}{4 d}+\frac {a \cos (3 (c+d x))}{12 d}+\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}-\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {3 b (c+d x)}{8 d}+\frac {b \sin (2 (c+d x))}{4 d}+\frac {b \sin (4 (c+d x))}{32 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.81, size = 88, normalized size = 0.99 \[ \frac {8 \, a \cos \left (d x + c\right )^{3} + 9 \, b d x + 24 \, a \cos \left (d x + c\right ) - 12 \, a \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 12 \, a \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 3 \, {\left (2 \, b \cos \left (d x + c\right )^{3} + 3 \, b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 145, normalized size = 1.63 \[ \frac {9 \, {\left (d x + c\right )} b + 24 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {2 \, {\left (15 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 48 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 9 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 96 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 9 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 80 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 15 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 32 \, a\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.42, size = 97, normalized size = 1.09 \[ \frac {a \left (\cos ^{3}\left (d x +c \right )\right )}{3 d}+\frac {a \cos \left (d x +c \right )}{d}+\frac {a \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d}+\frac {b \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{4 d}+\frac {3 b \cos \left (d x +c \right ) \sin \left (d x +c \right )}{8 d}+\frac {3 b x}{8}+\frac {3 b c}{8 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 81, normalized size = 0.91 \[ \frac {16 \, {\left (2 \, \cos \left (d x + c\right )^{3} + 6 \, \cos \left (d x + c\right ) - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} a + 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} b}{96 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 10.82, size = 242, normalized size = 2.72 \[ \frac {3\,b\,\mathrm {atan}\left (\frac {9\,b^2}{16\,\left (\frac {3\,a\,b}{2}-\frac {9\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}+\frac {3\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,\left (\frac {3\,a\,b}{2}-\frac {9\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}\right )}{4\,d}+\frac {-\frac {5\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+8\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-\frac {3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4}+\frac {20\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+\frac {5\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}+\frac {8\,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 {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{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 ) \cos ^{4}{\left (c + d x \right )} \csc {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________