Integrand size = 11, antiderivative size = 29 \[ \int (a \cot (x)+b \csc (x))^2 \, dx=-a^2 x-(b+a \cos (x)) (a+b \cos (x)) \csc (x)-a b \sin (x) \]
[Out]
Time = 0.06 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {4477, 2770, 2717} \[ \int (a \cot (x)+b \csc (x))^2 \, dx=a^2 (-x)-a b \sin (x)-\csc (x) (a \cos (x)+b) (a+b \cos (x)) \]
[In]
[Out]
Rule 2717
Rule 2770
Rule 4477
Rubi steps \begin{align*} \text {integral}& = \int (b+a \cos (x))^2 \csc ^2(x) \, dx \\ & = -((b+a \cos (x)) (a+b \cos (x)) \csc (x))-\int \left (a^2+a b \cos (x)\right ) \, dx \\ & = -a^2 x-(b+a \cos (x)) (a+b \cos (x)) \csc (x)-(a b) \int \cos (x) \, dx \\ & = -a^2 x-(b+a \cos (x)) (a+b \cos (x)) \csc (x)-a b \sin (x) \\ \end{align*}
Time = 0.16 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.83 \[ \int (a \cot (x)+b \csc (x))^2 \, dx=-\left (\left (a^2+b^2\right ) \cot (x)\right )-a (a x+2 b \csc (x)) \]
[In]
[Out]
Time = 1.12 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00
method | result | size |
default | \(-b^{2} \cot \left (x \right )-\frac {2 a b}{\sin \left (x \right )}+a^{2} \left (-\cot \left (x \right )-x \right )\) | \(29\) |
parts | \(a^{2} \left (-\cot \left (x \right )+\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (x \right )\right )\right )-b^{2} \cot \left (x \right )-2 b \csc \left (x \right ) a\) | \(32\) |
risch | \(-a^{2} x -\frac {2 i \left (2 a b \,{\mathrm e}^{i x}+a^{2}+b^{2}\right )}{{\mathrm e}^{2 i x}-1}\) | \(36\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.97 \[ \int (a \cot (x)+b \csc (x))^2 \, dx=-\frac {a^{2} x \sin \left (x\right ) + 2 \, a b + {\left (a^{2} + b^{2}\right )} \cos \left (x\right )}{\sin \left (x\right )} \]
[In]
[Out]
Time = 1.14 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.07 \[ \int (a \cot (x)+b \csc (x))^2 \, dx=- a^{2} x - \frac {a^{2} \cos {\left (x \right )}}{\sin {\left (x \right )}} - 2 a b \csc {\left (x \right )} - b^{2} \cot {\left (x \right )} \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00 \[ \int (a \cot (x)+b \csc (x))^2 \, dx=-a^{2} {\left (x + \frac {1}{\tan \left (x\right )}\right )} - \frac {2 \, a b}{\sin \left (x\right )} - \frac {b^{2}}{\tan \left (x\right )} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.79 \[ \int (a \cot (x)+b \csc (x))^2 \, dx=-a^{2} x + \frac {1}{2} \, a^{2} \tan \left (\frac {1}{2} \, x\right ) - a b \tan \left (\frac {1}{2} \, x\right ) + \frac {1}{2} \, b^{2} \tan \left (\frac {1}{2} \, x\right ) - \frac {a^{2} + 2 \, a b + b^{2}}{2 \, \tan \left (\frac {1}{2} \, x\right )} \]
[In]
[Out]
Time = 30.31 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.03 \[ \int (a \cot (x)+b \csc (x))^2 \, dx=-\frac {\cos \left (x\right )\,a^2+2\,a\,b+\cos \left (x\right )\,b^2}{\sin \left (x\right )}-a^2\,x \]
[In]
[Out]