Optimal. Leaf size=68 \[ -\frac {1}{d \left (a^2 \sin (c+d x)+a^2\right )}-\frac {\csc (c+d x)}{a^2 d}-\frac {2 \log (\sin (c+d x))}{a^2 d}+\frac {2 \log (\sin (c+d x)+1)}{a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2833, 12, 44} \[ -\frac {1}{d \left (a^2 \sin (c+d x)+a^2\right )}-\frac {\csc (c+d x)}{a^2 d}-\frac {2 \log (\sin (c+d x))}{a^2 d}+\frac {2 \log (\sin (c+d x)+1)}{a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 44
Rule 2833
Rubi steps
\begin {align*} \int \frac {\cot (c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {a^2}{x^2 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {a \operatorname {Subst}\left (\int \frac {1}{x^2 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a \operatorname {Subst}\left (\int \left (\frac {1}{a^2 x^2}-\frac {2}{a^3 x}+\frac {1}{a^2 (a+x)^2}+\frac {2}{a^3 (a+x)}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac {\csc (c+d x)}{a^2 d}-\frac {2 \log (\sin (c+d x))}{a^2 d}+\frac {2 \log (1+\sin (c+d x))}{a^2 d}-\frac {1}{d \left (a^2+a^2 \sin (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.16, size = 45, normalized size = 0.66 \[ -\frac {\frac {1}{\sin (c+d x)+1}+\csc (c+d x)+2 \log (\sin (c+d x))-2 \log (\sin (c+d x)+1)}{a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.50, size = 104, normalized size = 1.53 \[ -\frac {2 \, {\left (\cos \left (d x + c\right )^{2} - \sin \left (d x + c\right ) - 1\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 2 \, {\left (\cos \left (d x + c\right )^{2} - \sin \left (d x + c\right ) - 1\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 2 \, \sin \left (d x + c\right ) - 1}{a^{2} d \cos \left (d x + c\right )^{2} - a^{2} d \sin \left (d x + c\right ) - a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 69, normalized size = 1.01 \[ -\frac {\frac {2 \, \log \left ({\left | -\frac {a}{a \sin \left (d x + c\right ) + a} + 1 \right |}\right )}{a^{2}} + \frac {1}{{\left (a \sin \left (d x + c\right ) + a\right )} a} - \frac {1}{a^{2} {\left (\frac {a}{a \sin \left (d x + c\right ) + a} - 1\right )}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.26, size = 68, normalized size = 1.00 \[ -\frac {1}{a^{2} d \sin \left (d x +c \right )}-\frac {2 \ln \left (\sin \left (d x +c \right )\right )}{a^{2} d}-\frac {1}{d \,a^{2} \left (1+\sin \left (d x +c \right )\right )}+\frac {2 \ln \left (1+\sin \left (d x +c \right )\right )}{a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 68, normalized size = 1.00 \[ -\frac {\frac {2 \, \sin \left (d x + c\right ) + 1}{a^{2} \sin \left (d x + c\right )^{2} + a^{2} \sin \left (d x + c\right )} - \frac {2 \, \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{2}} + \frac {2 \, \log \left (\sin \left (d x + c\right )\right )}{a^{2}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.61, size = 136, normalized size = 2.00 \[ \frac {4\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}{a^2\,d}-\frac {2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1}{d\,\left (2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,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 {\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]
________________________________________________________________________________________