Integrand size = 9, antiderivative size = 12 \[ \int (a \cot (x)+b \csc (x)) \, dx=-b \text {arctanh}(\cos (x))+a \log (\sin (x)) \]
[Out]
Time = 0.01 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3556, 3855} \[ \int (a \cot (x)+b \csc (x)) \, dx=a \log (\sin (x))-b \text {arctanh}(\cos (x)) \]
[In]
[Out]
Rule 3556
Rule 3855
Rubi steps \begin{align*} \text {integral}& = a \int \cot (x) \, dx+b \int \csc (x) \, dx \\ & = -b \text {arctanh}(\cos (x))+a \log (\sin (x)) \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(30\) vs. \(2(12)=24\).
Time = 0.00 (sec) , antiderivative size = 30, normalized size of antiderivative = 2.50 \[ \int (a \cot (x)+b \csc (x)) \, dx=-b \log \left (\cos \left (\frac {x}{2}\right )\right )+a \log (\cos (x))+b \log \left (\sin \left (\frac {x}{2}\right )\right )+a \log (\tan (x)) \]
[In]
[Out]
Time = 0.30 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.33
method | result | size |
default | \(a \ln \left (\sin \left (x \right )\right )-b \ln \left (\cot \left (x \right )+\csc \left (x \right )\right )\) | \(16\) |
parts | \(a \ln \left (\sin \left (x \right )\right )-b \ln \left (\cot \left (x \right )+\csc \left (x \right )\right )\) | \(16\) |
norman | \(a \ln \left (\tan \left (x \right )\right )+b \ln \left (\tan \left (\frac {x}{2}\right )\right )-\frac {a \ln \left (1+\tan \left (x \right )^{2}\right )}{2}\) | \(24\) |
parallelrisch | \(a \left (\ln \left (\tan \left (x \right )\right )+\ln \left (\frac {1}{\sqrt {\sec \left (x \right )^{2}}}\right )\right )+b \ln \left (\csc \left (x \right )-\cot \left (x \right )\right )\) | \(25\) |
risch | \(-i a x +a \ln \left ({\mathrm e}^{2 i x}-1\right )+b \ln \left ({\mathrm e}^{i x}-1\right )-b \ln \left ({\mathrm e}^{i x}+1\right )\) | \(38\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 27 vs. \(2 (12) = 24\).
Time = 0.25 (sec) , antiderivative size = 27, normalized size of antiderivative = 2.25 \[ \int (a \cot (x)+b \csc (x)) \, dx=\frac {1}{2} \, {\left (a - b\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + \frac {1}{2} \, {\left (a + b\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) \]
[In]
[Out]
Time = 0.05 (sec) , antiderivative size = 24, normalized size of antiderivative = 2.00 \[ \int (a \cot (x)+b \csc (x)) \, dx=a \log {\left (\sin {\left (x \right )} \right )} + b \left (\frac {\log {\left (\cos {\left (x \right )} - 1 \right )}}{2} - \frac {\log {\left (\cos {\left (x \right )} + 1 \right )}}{2}\right ) \]
[In]
[Out]
none
Time = 0.22 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.25 \[ \int (a \cot (x)+b \csc (x)) \, dx=-b \log \left (\cot \left (x\right ) + \csc \left (x\right )\right ) + a \log \left (\sin \left (x\right )\right ) \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.25 \[ \int (a \cot (x)+b \csc (x)) \, dx=a \log \left ({\left | \sin \left (x\right ) \right |}\right ) + b \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right ) \]
[In]
[Out]
Time = 30.15 (sec) , antiderivative size = 27, normalized size of antiderivative = 2.25 \[ \int (a \cot (x)+b \csc (x)) \, dx=a\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )-a\,\ln \left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+1\right )+b\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right ) \]
[In]
[Out]