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.0818833, antiderivative size = 28, normalized size of antiderivative = 1., 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 4344
Rule 43
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.329919, size = 56, normalized size = 2. \[ \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]
________________________________________________________________________________________
Maple [A] time = 0.046, size = 56, normalized size = 2. \begin{align*} -{\frac{b}{d\tan \left ( x \right ) }}+{\frac{\ln \left ( \tan \left ( x \right ) \right ) a}{d}}-{\frac{\ln \left ( \tan \left ( x \right ) \right ) cb}{{d}^{2}}}-{\frac{\ln \left ( c\tan \left ( x \right ) +d \right ) a}{d}}+{\frac{\ln \left ( c\tan \left ( x \right ) +d \right ) cb}{{d}^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.979703, size = 62, normalized size = 2.21 \begin{align*} \frac{{\left (b c - a d\right )} \log \left (c \tan \left (x\right ) + d\right )}{d^{2}} - \frac{{\left (b c - a d\right )} \log \left (\tan \left (x\right )\right )}{d^{2}} - \frac{b}{d \tan \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.95262, size = 209, normalized size = 7.46 \begin{align*} -\frac{2 \, b d \cos \left (x\right ) -{\left (b c - a d\right )} \log \left (2 \, c d \cos \left (x\right ) \sin \left (x\right ) -{\left (c^{2} - d^{2}\right )} \cos \left (x\right )^{2} + c^{2}\right ) \sin \left (x\right ) +{\left (b c - a d\right )} \log \left (-\frac{1}{4} \, \cos \left (x\right )^{2} + \frac{1}{4}\right ) \sin \left (x\right )}{2 \, d^{2} \sin \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 11.5975, size = 31, normalized size = 1.11 \begin{align*} - \frac{b \cot{\left (x \right )}}{d} - \frac{\left (a d - b c\right ) \left (\begin{cases} \frac{\cot{\left (x \right )}}{c} & \text{for}\: d = 0 \\\frac{\log{\left (c + d \cot{\left (x \right )} \right )}}{d} & \text{otherwise} \end{cases}\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.15447, size = 92, normalized size = 3.29 \begin{align*} -\frac{{\left (b c - a d\right )} \log \left ({\left | \tan \left (x\right ) \right |}\right )}{d^{2}} + \frac{{\left (b c^{2} - a c d\right )} \log \left ({\left | c \tan \left (x\right ) + d \right |}\right )}{c d^{2}} + \frac{b c \tan \left (x\right ) - a d \tan \left (x\right ) - b d}{d^{2} \tan \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]