Integrand size = 17, antiderivative size = 8 \[ \int \frac {1+\cos ^2(x)}{1-\cos ^2(x)} \, dx=-x-2 \cot (x) \]
[Out]
Time = 0.05 (sec) , antiderivative size = 8, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {3250, 3254, 3852, 8} \[ \int \frac {1+\cos ^2(x)}{1-\cos ^2(x)} \, dx=-x-2 \cot (x) \]
[In]
[Out]
Rule 8
Rule 3250
Rule 3254
Rule 3852
Rubi steps \begin{align*} \text {integral}& = -x+2 \int \frac {1}{1-\cos ^2(x)} \, dx \\ & = -x+2 \int \csc ^2(x) \, dx \\ & = -x-2 \text {Subst}(\int 1 \, dx,x,\cot (x)) \\ & = -x-2 \cot (x) \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.02 (sec) , antiderivative size = 23, normalized size of antiderivative = 2.88 \[ \int \frac {1+\cos ^2(x)}{1-\cos ^2(x)} \, dx=-\cot (x)-\cot (x) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-\tan ^2(x)\right ) \]
[In]
[Out]
Time = 0.29 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.12
method | result | size |
parallelrisch | \(-x -2 \cot \left (x \right )\) | \(9\) |
default | \(-\frac {2}{\tan \left (x \right )}-\arctan \left (\tan \left (x \right )\right )\) | \(13\) |
risch | \(-x -\frac {4 i}{{\mathrm e}^{2 i x}-1}\) | \(17\) |
norman | \(\frac {-1+\tan \left (\frac {x}{2}\right )^{4}+\tan \left (\frac {x}{2}\right )^{6}-\tan \left (\frac {x}{2}\right )^{2}-x \tan \left (\frac {x}{2}\right )-2 x \tan \left (\frac {x}{2}\right )^{3}-x \tan \left (\frac {x}{2}\right )^{5}}{\left (1+\tan \left (\frac {x}{2}\right )^{2}\right )^{2} \tan \left (\frac {x}{2}\right )}\) | \(65\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.88 \[ \int \frac {1+\cos ^2(x)}{1-\cos ^2(x)} \, dx=-\frac {x \sin \left (x\right ) + 2 \, \cos \left (x\right )}{\sin \left (x\right )} \]
[In]
[Out]
Time = 0.35 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.50 \[ \int \frac {1+\cos ^2(x)}{1-\cos ^2(x)} \, dx=- x + \tan {\left (\frac {x}{2} \right )} - \frac {1}{\tan {\left (\frac {x}{2} \right )}} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.25 \[ \int \frac {1+\cos ^2(x)}{1-\cos ^2(x)} \, dx=-x - \frac {2}{\tan \left (x\right )} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 16, normalized size of antiderivative = 2.00 \[ \int \frac {1+\cos ^2(x)}{1-\cos ^2(x)} \, dx=-x - \frac {1}{\tan \left (\frac {1}{2} \, x\right )} + \tan \left (\frac {1}{2} \, x\right ) \]
[In]
[Out]
Time = 25.79 (sec) , antiderivative size = 8, normalized size of antiderivative = 1.00 \[ \int \frac {1+\cos ^2(x)}{1-\cos ^2(x)} \, dx=-x-2\,\mathrm {cot}\left (x\right ) \]
[In]
[Out]