Integrand size = 13, antiderivative size = 36 \[ \int \sec (a+b x) \sec (c+b x) \, dx=-\frac {\csc (a-c) \log (\cos (a+b x))}{b}+\frac {\csc (a-c) \log (\cos (c+b x))}{b} \]
[Out]
Time = 0.02 (sec) , antiderivative size = 36, 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.154, Rules used = {4706, 3556} \[ \int \sec (a+b x) \sec (c+b x) \, dx=\frac {\csc (a-c) \log (\cos (b x+c))}{b}-\frac {\csc (a-c) \log (\cos (a+b x))}{b} \]
[In]
[Out]
Rule 3556
Rule 4706
Rubi steps \begin{align*} \text {integral}& = \csc (a-c) \int \tan (a+b x) \, dx-\csc (a-c) \int \tan (c+b x) \, dx \\ & = -\frac {\csc (a-c) \log (\cos (a+b x))}{b}+\frac {\csc (a-c) \log (\cos (c+b x))}{b} \\ \end{align*}
Time = 0.17 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.78 \[ \int \sec (a+b x) \sec (c+b x) \, dx=-\frac {\csc (a-c) (\log (\cos (a+b x))-\log (\cos (c+b x)))}{b} \]
[In]
[Out]
Time = 1.42 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.50
method | result | size |
default | \(\frac {\ln \left (\tan \left (x b +a \right ) \sin \left (a \right ) \cos \left (c \right )-\tan \left (x b +a \right ) \cos \left (a \right ) \sin \left (c \right )+\cos \left (a \right ) \cos \left (c \right )+\sin \left (a \right ) \sin \left (c \right )\right )}{b \left (\sin \left (a \right ) \cos \left (c \right )-\cos \left (a \right ) \sin \left (c \right )\right )}\) | \(54\) |
risch | \(\frac {2 i \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+{\mathrm e}^{2 i \left (a -c \right )}\right ) {\mathrm e}^{i \left (a +c \right )}}{\left ({\mathrm e}^{2 i a}-{\mathrm e}^{2 i c}\right ) b}-\frac {2 i \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) {\mathrm e}^{i \left (a +c \right )}}{\left ({\mathrm e}^{2 i a}-{\mathrm e}^{2 i c}\right ) b}\) | \(90\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 107 vs. \(2 (36) = 72\).
Time = 0.26 (sec) , antiderivative size = 107, normalized size of antiderivative = 2.97 \[ \int \sec (a+b x) \sec (c+b x) \, dx=-\frac {\log \left (\cos \left (b x + c\right )^{2}\right ) - \log \left (\frac {4 \, {\left (2 \, \cos \left (b x + c\right ) \cos \left (-a + c\right ) \sin \left (b x + c\right ) \sin \left (-a + c\right ) + {\left (2 \, \cos \left (-a + c\right )^{2} - 1\right )} \cos \left (b x + c\right )^{2} - \cos \left (-a + c\right )^{2} + 1\right )}}{\cos \left (-a + c\right )^{2} + 2 \, \cos \left (-a + c\right ) + 1}\right )}{2 \, b \sin \left (-a + c\right )} \]
[In]
[Out]
\[ \int \sec (a+b x) \sec (c+b x) \, dx=\int \sec {\left (a + b x \right )} \sec {\left (b x + c \right )}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 349 vs. \(2 (36) = 72\).
Time = 0.22 (sec) , antiderivative size = 349, normalized size of antiderivative = 9.69 \[ \int \sec (a+b x) \sec (c+b x) \, dx=-\frac {2 \, {\left ({\left (\cos \left (2 \, a\right ) - \cos \left (2 \, c\right )\right )} \cos \left (a + c\right ) + {\left (\sin \left (2 \, a\right ) - \sin \left (2 \, c\right )\right )} \sin \left (a + c\right )\right )} \arctan \left (\sin \left (2 \, b x\right ) - \sin \left (2 \, a\right ), \cos \left (2 \, b x\right ) + \cos \left (2 \, a\right )\right ) - 2 \, {\left ({\left (\cos \left (2 \, a\right ) - \cos \left (2 \, c\right )\right )} \cos \left (a + c\right ) + {\left (\sin \left (2 \, a\right ) - \sin \left (2 \, c\right )\right )} \sin \left (a + c\right )\right )} \arctan \left (\sin \left (2 \, b x\right ) - \sin \left (2 \, c\right ), \cos \left (2 \, b x\right ) + \cos \left (2 \, c\right )\right ) - {\left ({\left (\sin \left (2 \, a\right ) - \sin \left (2 \, c\right )\right )} \cos \left (a + c\right ) - {\left (\cos \left (2 \, a\right ) - \cos \left (2 \, c\right )\right )} \sin \left (a + c\right )\right )} \log \left (\cos \left (2 \, b x\right )^{2} + 2 \, \cos \left (2 \, b x\right ) \cos \left (2 \, a\right ) + \cos \left (2 \, a\right )^{2} + \sin \left (2 \, b x\right )^{2} - 2 \, \sin \left (2 \, b x\right ) \sin \left (2 \, a\right ) + \sin \left (2 \, a\right )^{2}\right ) + {\left ({\left (\sin \left (2 \, a\right ) - \sin \left (2 \, c\right )\right )} \cos \left (a + c\right ) - {\left (\cos \left (2 \, a\right ) - \cos \left (2 \, c\right )\right )} \sin \left (a + c\right )\right )} \log \left (\cos \left (2 \, b x\right )^{2} + 2 \, \cos \left (2 \, b x\right ) \cos \left (2 \, c\right ) + \cos \left (2 \, c\right )^{2} + \sin \left (2 \, b x\right )^{2} - 2 \, \sin \left (2 \, b x\right ) \sin \left (2 \, c\right ) + \sin \left (2 \, c\right )^{2}\right )}{2 \, b \cos \left (2 \, a\right ) \cos \left (2 \, c\right ) - b \cos \left (2 \, c\right )^{2} + 2 \, b \sin \left (2 \, a\right ) \sin \left (2 \, c\right ) - b \sin \left (2 \, c\right )^{2} - {\left (\cos \left (2 \, a\right )^{2} + \sin \left (2 \, a\right )^{2}\right )} b} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 171 vs. \(2 (36) = 72\).
Time = 0.30 (sec) , antiderivative size = 171, normalized size of antiderivative = 4.75 \[ \int \sec (a+b x) \sec (c+b x) \, dx=\frac {{\left (\tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, a\right )^{2} + \tan \left (\frac {1}{2} \, c\right )^{2} + 1\right )} \log \left ({\left | 2 \, \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right ) - 2 \, \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} + 2 \, \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, a\right ) - \tan \left (\frac {1}{2} \, a\right )^{2} - 2 \, \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, c\right ) + 4 \, \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right ) - \tan \left (\frac {1}{2} \, c\right )^{2} + 1 \right |}\right )}{2 \, {\left (\tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right ) - \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, a\right ) - \tan \left (\frac {1}{2} \, c\right )\right )} b} \]
[In]
[Out]
Time = 32.33 (sec) , antiderivative size = 249, normalized size of antiderivative = 6.92 \[ \int \sec (a+b x) \sec (c+b x) \, dx=\frac {2\,\sqrt {-{\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}}\,\left (\ln \left (-\frac {2\,\sqrt {-{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}}\,\left (4\,b\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}+2\,b\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}+2\,b\,{\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}\right )}{b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}-1\right )}+{\mathrm {e}}^{a\,1{}\mathrm {i}}\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,1{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}\,4{}\mathrm {i}\right )-\ln \left (-\frac {2\,\sqrt {-{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}}\,\left (4\,b\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}+2\,b\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}+2\,b\,{\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}\right )}{b-b\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}}+{\mathrm {e}}^{a\,1{}\mathrm {i}}\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,1{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}\,4{}\mathrm {i}\right )\right )}{b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}-1\right )} \]
[In]
[Out]