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} \] Output:
csc(a+c)*ln(cos(b*x-c))/b-csc(a+c)*ln(cos(b*x+a))/b
Time = 0.16 (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} \] Input:
Integrate[Sec[c - b*x]*Sec[a + b*x],x]
Output:
(Csc[a + c]*(Log[Cos[c - b*x]] - Log[Cos[a + b*x]]))/b
Time = 0.22 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {5121, 3042, 3956}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec (a+b x) \sec (c-b x) \, dx\) |
\(\Big \downarrow \) 5121 |
\(\displaystyle \csc (a+c) \int \tan (c-b x)dx+\csc (a+c) \int \tan (a+b x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \csc (a+c) \int \tan (c-b x)dx+\csc (a+c) \int \tan (a+b x)dx\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {\csc (a+c) \log (\cos (c-b x))}{b}-\frac {\csc (a+c) \log (\cos (a+b x))}{b}\) |
Input:
Int[Sec[c - b*x]*Sec[a + b*x],x]
Output:
(Csc[a + c]*Log[Cos[c - b*x]])/b - (Csc[a + c]*Log[Cos[a + b*x]])/b
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[Sec[(a_.) + (b_.)*(x_)]*Sec[(c_) + (d_.)*(x_)], x_Symbol] :> Simp[-Csc[ (b*c - a*d)/d] Int[Tan[a + b*x], x], x] + Simp[Csc[(b*c - a*d)/b] Int[T an[c + d*x], x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[b^2 - d^2, 0] && NeQ[b *c - a*d, 0]
Time = 0.58 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.61
method | result | size |
default | \(\frac {\ln \left (\tan \left (b x +a \right ) \sin \left (a \right ) \cos \left (c \right )+\tan \left (b x +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 (b x +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 (b x +a \right )}\right ) {\mathrm e}^{i \left (a +c \right )}}{\left ({\mathrm e}^{2 i \left (a +c \right )}-1\right ) b}\) | \(80\) |
Input:
int(sec(b*x-c)*sec(b*x+a),x,method=_RETURNVERBOSE)
Output:
1/b/(sin(a)*cos(c)+cos(a)*sin(c))*ln(tan(b*x+a)*sin(a)*cos(c)+tan(b*x+a)*c os(a)*sin(c)+cos(a)*cos(c)-sin(a)*sin(c))
Leaf count of result is larger than twice the leaf count of optimal. 93 vs. \(2 (34) = 68\).
Time = 0.08 (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 )} \] Input:
integrate(sec(b*x-c)*sec(b*x+a),x, algorithm="fricas")
Output:
-1/2*(log(cos(b*x + a)^2) - log(4*(2*cos(b*x + a)*cos(a + c)*sin(b*x + a)* sin(a + c) + (2*cos(a + c)^2 - 1)*cos(b*x + a)^2 - cos(a + c)^2 + 1)/(cos( a + c)^2 + 2*cos(a + c) + 1)))/(b*sin(a + c))
\[ \int \sec (c-b x) \sec (a+b x) \, dx=\int \sec {\left (a + b x \right )} \sec {\left (b x - c \right )}\, dx \] Input:
integrate(sec(b*x-c)*sec(b*x+a),x)
Output:
Integral(sec(a + b*x)*sec(b*x - c), x)
Leaf count of result is larger than twice the leaf count of optimal. 322 vs. \(2 (34) = 68\).
Time = 0.05 (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} \] Input:
integrate(sec(b*x-c)*sec(b*x+a),x, algorithm="maxima")
Output:
(2*(cos(2*a + 2*c)*cos(a + c) + sin(2*a + 2*c)*sin(a + c) - cos(a + c))*ar ctan2(sin(2*b*x) - sin(2*a), cos(2*b*x) + cos(2*a)) - 2*(cos(2*a + 2*c)*co s(a + c) + sin(2*a + 2*c)*sin(a + c) - cos(a + c))*arctan2(sin(2*b*x) + si n(2*c), cos(2*b*x) + cos(2*c)) - (cos(a + c)*sin(2*a + 2*c) - cos(2*a + 2* c)*sin(a + c) + sin(a + c))*log(cos(2*b*x)^2 + 2*cos(2*b*x)*cos(2*a) + cos (2*a)^2 + sin(2*b*x)^2 - 2*sin(2*b*x)*sin(2*a) + sin(2*a)^2) + (cos(a + c) *sin(2*a + 2*c) - cos(2*a + 2*c)*sin(a + c) + sin(a + c))*log(cos(2*b*x)^2 + 2*cos(2*b*x)*cos(2*c) + cos(2*c)^2 + sin(2*b*x)^2 + 2*sin(2*b*x)*sin(2* c) + sin(2*c)^2))/(b*cos(2*a + 2*c)^2 + b*sin(2*a + 2*c)^2 - 2*b*cos(2*a + 2*c) + b)
Leaf count of result is larger than twice the leaf count of optimal. 169 vs. \(2 (34) = 68\).
Time = 0.15 (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} \] Input:
integrate(sec(b*x-c)*sec(b*x+a),x, algorithm="giac")
Output:
-1/2*(tan(1/2*a)^2*tan(1/2*c)^2 + tan(1/2*a)^2 + tan(1/2*c)^2 + 1)*log(abs (2*tan(b*x + a)*tan(1/2*a)^2*tan(1/2*c) + 2*tan(b*x + a)*tan(1/2*a)*tan(1/ 2*c)^2 - tan(1/2*a)^2*tan(1/2*c)^2 - 2*tan(b*x + a)*tan(1/2*a) + tan(1/2*a )^2 - 2*tan(b*x + a)*tan(1/2*c) + 4*tan(1/2*a)*tan(1/2*c) + tan(1/2*c)^2 - 1))/((tan(1/2*a)^2*tan(1/2*c) + tan(1/2*a)*tan(1/2*c)^2 - tan(1/2*a) - ta n(1/2*c))*b)
Time = 25.22 (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 )} \] Input:
int(1/(cos(a + b*x)*cos(c - b*x)),x)
Output:
(2*(-exp(a*2i + c*2i))^(1/2)*(log(exp(a*1i)*exp(a*2i)*exp(c*1i)*exp(b*x*2i )*4i - (2*(-exp(a*2i)*exp(c*2i))^(1/2)*(4*b*exp(a*2i)*exp(c*2i) + 2*b*exp( a*2i)*exp(b*x*2i) + 2*b*exp(a*4i)*exp(c*2i)*exp(b*x*2i)))/(b*(exp(a*2i)*ex p(c*2i) - 1))) - log(exp(a*1i)*exp(a*2i)*exp(c*1i)*exp(b*x*2i)*4i - (2*(-e xp(a*2i)*exp(c*2i))^(1/2)*(4*b*exp(a*2i)*exp(c*2i) + 2*b*exp(a*2i)*exp(b*x *2i) + 2*b*exp(a*4i)*exp(c*2i)*exp(b*x*2i)))/(b - b*exp(a*2i)*exp(c*2i)))) )/(b*(exp(a*2i + c*2i) - 1))
\[ \int \sec (c-b x) \sec (a+b x) \, dx=\frac {4 \left (\int \frac {1}{\tan \left (\frac {b x}{2}-\frac {c}{2}\right )^{2} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}-\tan \left (\frac {b x}{2}-\frac {c}{2}\right )^{2}-\tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}+1}d x \right ) b +\mathrm {log}\left (\tan \left (\frac {b x}{2}-\frac {c}{2}\right )-1\right )-\mathrm {log}\left (\tan \left (\frac {b x}{2}-\frac {c}{2}\right )+1\right )+\mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )-\mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right )-b x}{b} \] Input:
int(sec(b*x-c)*sec(b*x+a),x)
Output:
(4*int(1/(tan((b*x - c)/2)**2*tan((a + b*x)/2)**2 - tan((b*x - c)/2)**2 - tan((a + b*x)/2)**2 + 1),x)*b + log(tan((b*x - c)/2) - 1) - log(tan((b*x - c)/2) + 1) + log(tan((a + b*x)/2) - 1) - log(tan((a + b*x)/2) + 1) - b*x) /b