Integrand size = 14, antiderivative size = 33 \[ \int \sec (c-b x) \sec (a+b x) \, dx=\frac {\csc (a+c) \log (\cos (c-b x))}{b}-\frac {\csc (a+c) \log (\cos (a+b x))}{b} \]
[Out]
Time = 0.03 (sec) , antiderivative size = 33, 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.143, Rules used = {4706, 3556} \[ \int \sec (c-b x) \sec (a+b x) \, dx=\frac {\csc (a+c) \log (\cos (c-b x))}{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 (c-b x) \, dx+\csc (a+c) \int \tan (a+b x) \, dx \\ & = \frac {\csc (a+c) \log (\cos (c-b x))}{b}-\frac {\csc (a+c) \log (\cos (a+b x))}{b} \\ \end{align*}
Time = 0.17 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.79 \[ \int \sec (c-b x) \sec (a+b x) \, dx=\frac {\csc (a+c) (\log (\cos (c-b x))-\log (\cos (a+b x)))}{b} \]
[In]
[Out]
Time = 1.38 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.61
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 )}\) | \(53\) |
risch | \(-\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 \left (a +c \right )}-1\right ) b}+\frac {2 i \ln \left ({\mathrm e}^{2 i \left (a +c \right )}+{\mathrm e}^{2 i \left (x b +a \right )}\right ) {\mathrm e}^{i \left (a +c \right )}}{\left ({\mathrm e}^{2 i \left (a +c \right )}-1\right ) b}\) | \(80\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 93 vs. \(2 (34) = 68\).
Time = 0.27 (sec) , antiderivative size = 93, normalized size of antiderivative = 2.82 \[ \int \sec (c-b x) \sec (a+b x) \, dx=-\frac {\log \left (\cos \left (b x + a\right )^{2}\right ) - \log \left (\frac {4 \, {\left (2 \, \cos \left (b x + a\right ) \cos \left (a + c\right ) \sin \left (b x + a\right ) \sin \left (a + c\right ) + {\left (2 \, \cos \left (a + c\right )^{2} - 1\right )} \cos \left (b x + a\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 (c-b x) \sec (a+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. 322 vs. \(2 (34) = 68\).
Time = 0.22 (sec) , antiderivative size = 322, normalized size of antiderivative = 9.76 \[ \int \sec (c-b x) \sec (a+b x) \, dx=\frac {2 \, {\left (\cos \left (2 \, a + 2 \, c\right ) \cos \left (a + c\right ) + \sin \left (2 \, a + 2 \, c\right ) \sin \left (a + c\right ) - \cos \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 (\cos \left (2 \, a + 2 \, c\right ) \cos \left (a + c\right ) + \sin \left (2 \, a + 2 \, c\right ) \sin \left (a + c\right ) - \cos \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 (\cos \left (a + c\right ) \sin \left (2 \, a + 2 \, c\right ) - \cos \left (2 \, a + 2 \, c\right ) \sin \left (a + c\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 (\cos \left (a + c\right ) \sin \left (2 \, a + 2 \, c\right ) - \cos \left (2 \, a + 2 \, c\right ) \sin \left (a + c\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 )}{b \cos \left (2 \, a + 2 \, c\right )^{2} + b \sin \left (2 \, a + 2 \, c\right )^{2} - 2 \, b \cos \left (2 \, a + 2 \, c\right ) + b} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 169 vs. \(2 (34) = 68\).
Time = 0.31 (sec) , antiderivative size = 169, normalized size of antiderivative = 5.12 \[ \int \sec (c-b x) \sec (a+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 = 33.69 (sec) , antiderivative size = 249, normalized size of antiderivative = 7.55 \[ \int \sec (c-b x) \sec (a+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]