Optimal. Leaf size=52 \[ -\frac {a \cot (c+d x)}{d}+\frac {a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {a \cot (c+d x) \csc (c+d x)}{2 d}-a x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2838, 2611, 3770, 3473, 8} \[ -\frac {a \cot (c+d x)}{d}+\frac {a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {a \cot (c+d x) \csc (c+d x)}{2 d}-a x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2611
Rule 2838
Rule 3473
Rule 3770
Rubi steps
\begin {align*} \int \cot ^2(c+d x) \csc (c+d x) (a+a \sin (c+d x)) \, dx &=a \int \cot ^2(c+d x) \, dx+a \int \cot ^2(c+d x) \csc (c+d x) \, dx\\ &=-\frac {a \cot (c+d x)}{d}-\frac {a \cot (c+d x) \csc (c+d x)}{2 d}-\frac {1}{2} a \int \csc (c+d x) \, dx-a \int 1 \, dx\\ &=-a x+\frac {a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {a \cot (c+d x)}{d}-\frac {a \cot (c+d x) \csc (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.04, size = 109, normalized size = 2.10 \[ -\frac {a \cot (c+d x) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};-\tan ^2(c+d x)\right )}{d}-\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}+\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}-\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.53, size = 114, normalized size = 2.19 \[ -\frac {4 \, a d x \cos \left (d x + c\right )^{2} - 4 \, a d x - 4 \, a \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - {\left (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 ) + {\left (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 )}{4 \, {\left (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.16, size = 95, normalized size = 1.83 \[ \frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 8 \, {\left (d x + c\right )} a - 4 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {6 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.25, size = 81, normalized size = 1.56 \[ -a x -\frac {a \cot \left (d x +c \right )}{d}-\frac {c a}{d}-\frac {a \left (\cos ^{3}\left (d x +c \right )\right )}{2 d \sin \left (d x +c \right )^{2}}-\frac {a \cos \left (d x +c \right )}{2 d}-\frac {a \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 66, normalized size = 1.27 \[ -\frac {4 \, {\left (d x + c + \frac {1}{\tan \left (d x + c\right )}\right )} a - a {\left (\frac {2 \, \cos \left (d x + c\right )}{\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 )}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.68, size = 145, normalized size = 2.79 \[ \frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}-\frac {a\,\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}-\frac {2\,a\,\mathrm {atan}\left (\frac {2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {a\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2\,d}-\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a \left (\int \cos ^{2}{\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}\, dx + \int \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________