Integrand size = 31, antiderivative size = 19 \[ \int \frac {-\csc (a+b x)+\sec (a+b x)}{\csc (a+b x)+\sec (a+b x)} \, dx=-\frac {\log (\cos (a+b x)+\sin (a+b x))}{b} \]
[Out]
Time = 0.37 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {815, 266} \[ \int \frac {-\csc (a+b x)+\sec (a+b x)}{\csc (a+b x)+\sec (a+b x)} \, dx=-\frac {\log (\sin (a+b x)+\cos (a+b x))}{b} \]
[In]
[Out]
Rule 266
Rule 815
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {-1+x}{(1+x) \left (1+x^2\right )} \, dx,x,\tan (a+b x)\right )}{b} \\ & = \frac {\text {Subst}\left (\int \left (\frac {1}{-1-x}+\frac {x}{1+x^2}\right ) \, dx,x,\tan (a+b x)\right )}{b} \\ & = -\frac {\log (1+\tan (a+b x))}{b}+\frac {\text {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,\tan (a+b x)\right )}{b} \\ & = -\frac {\log (\cos (a+b x))}{b}-\frac {\log (1+\tan (a+b x))}{b} \\ \end{align*}
Time = 0.41 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {-\csc (a+b x)+\sec (a+b x)}{\csc (a+b x)+\sec (a+b x)} \, dx=-\frac {\log (\cos (a+b x)+\sin (a+b x))}{b} \]
[In]
[Out]
Time = 1.01 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.58
method | result | size |
derivativedivides | \(\frac {-\ln \left (1+\tan \left (x b +a \right )\right )+\frac {\ln \left (1+\tan \left (x b +a \right )^{2}\right )}{2}}{b}\) | \(30\) |
default | \(\frac {-\ln \left (1+\tan \left (x b +a \right )\right )+\frac {\ln \left (1+\tan \left (x b +a \right )^{2}\right )}{2}}{b}\) | \(30\) |
risch | \(i x +\frac {2 i a}{b}-\frac {\ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+i\right )}{b}\) | \(31\) |
parallelrisch | \(\frac {\ln \left (\sec \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}\right )-\ln \left (\tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}-2 \tan \left (\frac {a}{2}+\frac {x b}{2}\right )-1\right )}{b}\) | \(45\) |
norman | \(\frac {\ln \left (1+\tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}\right )}{b}-\frac {\ln \left (\tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}-2 \tan \left (\frac {a}{2}+\frac {x b}{2}\right )-1\right )}{b}\) | \(50\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.16 \[ \int \frac {-\csc (a+b x)+\sec (a+b x)}{\csc (a+b x)+\sec (a+b x)} \, dx=-\frac {\log \left (2 \, \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 1\right )}{2 \, b} \]
[In]
[Out]
\[ \int \frac {-\csc (a+b x)+\sec (a+b x)}{\csc (a+b x)+\sec (a+b x)} \, dx=- \int \frac {\csc {\left (a + b x \right )}}{\csc {\left (a + b x \right )} + \sec {\left (a + b x \right )}}\, dx - \int \left (- \frac {\sec {\left (a + b x \right )}}{\csc {\left (a + b x \right )} + \sec {\left (a + b x \right )}}\right )\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 70 vs. \(2 (19) = 38\).
Time = 0.29 (sec) , antiderivative size = 70, normalized size of antiderivative = 3.68 \[ \int \frac {-\csc (a+b x)+\sec (a+b x)}{\csc (a+b x)+\sec (a+b x)} \, dx=-\frac {\log \left (-\frac {2 \, \sin \left (b x + a\right )}{\cos \left (b x + a\right ) + 1} + \frac {\sin \left (b x + a\right )^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} - 1\right ) - \log \left (\frac {\sin \left (b x + a\right )^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} + 1\right )}{b} \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.53 \[ \int \frac {-\csc (a+b x)+\sec (a+b x)}{\csc (a+b x)+\sec (a+b x)} \, dx=\frac {\log \left (\tan \left (b x + a\right )^{2} + 1\right ) - 2 \, \log \left ({\left | \tan \left (b x + a\right ) + 1 \right |}\right )}{2 \, b} \]
[In]
[Out]
Time = 27.57 (sec) , antiderivative size = 50, normalized size of antiderivative = 2.63 \[ \int \frac {-\csc (a+b x)+\sec (a+b x)}{\csc (a+b x)+\sec (a+b x)} \, dx=-\frac {2\,\mathrm {atanh}\left (\frac {128\,\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )+128}{16\,{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^2+32\,\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )+48}-3\right )}{b} \]
[In]
[Out]