Integrand size = 9, antiderivative size = 14 \[ \int (-\sec (x)+\tan (x))^2 \, dx=-x-\frac {2 \cos (x)}{1+\sin (x)} \]
[Out]
Time = 0.06 (sec) , antiderivative size = 14, 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.444, Rules used = {4476, 2749, 2759, 8} \[ \int (-\sec (x)+\tan (x))^2 \, dx=-x-\frac {2 \cos (x)}{\sin (x)+1} \]
[In]
[Out]
Rule 8
Rule 2749
Rule 2759
Rule 4476
Rubi steps \begin{align*} \text {integral}& = \int \sec ^2(x) (-1+\sin (x))^2 \, dx \\ & = \int \frac {\cos ^2(x)}{(-1-\sin (x))^2} \, dx \\ & = -\frac {2 \cos (x)}{1+\sin (x)}-\int 1 \, dx \\ & = -x-\frac {2 \cos (x)}{1+\sin (x)} \\ \end{align*}
Time = 0.01 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00 \[ \int (-\sec (x)+\tan (x))^2 \, dx=-\arctan (\tan (x))-2 \sec (x)+2 \tan (x) \]
[In]
[Out]
Time = 0.44 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.07
method | result | size |
default | \(-x +2 \tan \left (x \right )-\frac {2}{\cos \left (x \right )}\) | \(15\) |
parts | \(2 \tan \left (x \right )-\arctan \left (\tan \left (x \right )\right )-2 \sec \left (x \right )\) | \(15\) |
risch | \(-x -\frac {4}{i+{\mathrm e}^{i x}}\) | \(17\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.79 \[ \int (-\sec (x)+\tan (x))^2 \, dx=-\frac {{\left (x + 2\right )} \cos \left (x\right ) + {\left (x - 2\right )} \sin \left (x\right ) + x + 2}{\cos \left (x\right ) + \sin \left (x\right ) + 1} \]
[In]
[Out]
Time = 0.33 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.71 \[ \int (-\sec (x)+\tan (x))^2 \, dx=- x + 2 \tan {\left (x \right )} - 2 \sec {\left (x \right )} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00 \[ \int (-\sec (x)+\tan (x))^2 \, dx=-x - \frac {2}{\cos \left (x\right )} + 2 \, \tan \left (x\right ) \]
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00 \[ \int (-\sec (x)+\tan (x))^2 \, dx=-x - \frac {4}{\tan \left (\frac {1}{2} \, x\right ) + 1} \]
[In]
[Out]
Time = 0.30 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00 \[ \int (-\sec (x)+\tan (x))^2 \, dx=-x-\frac {4}{\mathrm {tan}\left (\frac {x}{2}\right )+1} \]
[In]
[Out]