Optimal. Leaf size=35 \[ -\frac {\cot (c+d x)}{a^2 d}+\frac {2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac {x}{a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {2869, 2757, 3770, 3767, 8} \[ -\frac {\cot (c+d x)}{a^2 d}+\frac {2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac {x}{a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2757
Rule 2869
Rule 3767
Rule 3770
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x) \cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \csc ^2(c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4}\\ &=\frac {\int \left (a^2-2 a^2 \csc (c+d x)+a^2 \csc ^2(c+d x)\right ) \, dx}{a^4}\\ &=\frac {x}{a^2}+\frac {\int \csc ^2(c+d x) \, dx}{a^2}-\frac {2 \int \csc (c+d x) \, dx}{a^2}\\ &=\frac {x}{a^2}+\frac {2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac {\operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^2 d}\\ &=\frac {x}{a^2}+\frac {2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac {\cot (c+d x)}{a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.37, size = 98, normalized size = 2.80 \[ \frac {\left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )^4 \left (2 (c+d x)+\tan \left (\frac {1}{2} (c+d x)\right )-\cot \left (\frac {1}{2} (c+d x)\right )-4 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )}{2 d (a \sin (c+d x)+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 70, normalized size = 2.00 \[ \frac {d x \sin \left (d x + c\right ) + \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - \cos \left (d x + c\right )}{a^{2} d \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.19, size = 73, normalized size = 2.09 \[ \frac {\frac {2 \, {\left (d x + c\right )}}{a^{2}} - \frac {4 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} + \frac {\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{2}} + \frac {4 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.54, size = 74, normalized size = 2.11 \[ \frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d \,a^{2}}+\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}-\frac {1}{2 d \,a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.45, size = 93, normalized size = 2.66 \[ \frac {\frac {4 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {4 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {\cos \left (d x + c\right ) + 1}{a^{2} \sin \left (d x + c\right )} + \frac {\sin \left (d x + c\right )}{a^{2} {\left (\cos \left (d x + c\right ) + 1\right )}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.83, size = 95, normalized size = 2.71 \[ -\frac {2\,\mathrm {atan}\left (\frac {\sqrt {5}\,\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{5\,\cos \left (\frac {c}{2}-\mathrm {atan}\left (\frac {1}{2}\right )+\frac {d\,x}{2}\right )}\right )}{a^2\,d}-\frac {\mathrm {cot}\left (c+d\,x\right )}{a^2\,d}-\frac {2\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{a^2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\cos ^{4}{\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} + 2 \sin {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________