Optimal. Leaf size=28 \[ \frac {(b c-a d) \log (c+d \cot (x))}{d^2}-\frac {b \cot (x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {4344, 43} \[ \frac {(b c-a d) \log (c+d \cot (x))}{d^2}-\frac {b \cot (x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 4344
Rubi steps
\begin {align*} \int \frac {(a+b \cot (x)) \csc ^2(x)}{c+d \cot (x)} \, dx &=-\operatorname {Subst}\left (\int \frac {a+b x}{c+d x} \, dx,x,\cot (x)\right )\\ &=-\operatorname {Subst}\left (\int \left (\frac {b}{d}+\frac {-b c+a d}{d (c+d x)}\right ) \, dx,x,\cot (x)\right )\\ &=-\frac {b \cot (x)}{d}+\frac {(b c-a d) \log (c+d \cot (x))}{d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.38, size = 56, normalized size = 2.00 \[ \frac {\sin (x) (a+b \cot (x)) (-(b c-a d) (\log (\sin (x))-\log (c \sin (x)+d \cos (x)))-b d \cot (x))}{d^2 (a \sin (x)+b \cos (x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.17, size = 76, normalized size = 2.71 \[ -\frac {2 \, b d \cos \relax (x) - {\left (b c - a d\right )} \log \left (2 \, c d \cos \relax (x) \sin \relax (x) - {\left (c^{2} - d^{2}\right )} \cos \relax (x)^{2} + c^{2}\right ) \sin \relax (x) + {\left (b c - a d\right )} \log \left (-\frac {1}{4} \, \cos \relax (x)^{2} + \frac {1}{4}\right ) \sin \relax (x)}{2 \, d^{2} \sin \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.15, size = 68, normalized size = 2.43 \[ -\frac {{\left (b c - a d\right )} \log \left ({\left | \tan \relax (x) \right |}\right )}{d^{2}} + \frac {{\left (b c^{2} - a c d\right )} \log \left ({\left | c \tan \relax (x) + d \right |}\right )}{c d^{2}} + \frac {b c \tan \relax (x) - a d \tan \relax (x) - b d}{d^{2} \tan \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 56, normalized size = 2.00 \[ -\frac {b}{d \tan \relax (x )}+\frac {\ln \left (\tan \relax (x )\right ) a}{d}-\frac {\ln \left (\tan \relax (x )\right ) c b}{d^{2}}-\frac {\ln \left (c \tan \relax (x )+d \right ) a}{d}+\frac {\ln \left (c \tan \relax (x )+d \right ) c b}{d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 46, normalized size = 1.64 \[ \frac {{\left (b c - a d\right )} \log \left (c \tan \relax (x) + d\right )}{d^{2}} - \frac {{\left (b c - a d\right )} \log \left (\tan \relax (x)\right )}{d^{2}} - \frac {b}{d \tan \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.07, size = 35, normalized size = 1.25 \[ -\frac {b}{d\,\mathrm {tan}\relax (x)}-\frac {2\,\mathrm {atanh}\left (\frac {2\,c\,\mathrm {tan}\relax (x)}{d}+1\right )\,\left (a\,d-b\,c\right )}{d^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 26.52, size = 31, normalized size = 1.11 \[ - \frac {b \cot {\relax (x )}}{d} - \frac {\left (a d - b c\right ) \left (\begin {cases} \frac {\cot {\relax (x )}}{c} & \text {for}\: d = 0 \\\frac {\log {\left (c + d \cot {\relax (x )} \right )}}{d} & \text {otherwise} \end {cases}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________