Integrand size = 18, antiderivative size = 86 \[ \int \cos ^2(a+b x) \sec ^3(c-b x) \, dx=-\frac {\text {arctanh}(\sin (c-b x)) \cos (2 (a+c))}{b}-\frac {\text {arctanh}(\sin (c-b x)) \sin ^2(a+c)}{2 b}-\frac {\sec (c-b x) \sin (2 (a+c))}{b}-\frac {\sec (c-b x) \sin ^2(a+c) \tan (c-b x)}{2 b} \] Output:
arctanh(sin(b*x-c))*cos(2*a+2*c)/b+1/2*arctanh(sin(b*x-c))*sin(a+c)^2/b-se c(b*x-c)*sin(2*a+2*c)/b+1/2*sec(b*x-c)*sin(a+c)^2*tan(b*x-c)/b
Time = 1.92 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.95 \[ \int \cos ^2(a+b x) \sec ^3(c-b x) \, dx=\frac {\log \left (\cos \left (\frac {1}{2} (c-b x)\right )-\sin \left (\frac {1}{2} (c-b x)\right )\right )+3 \cos (2 (a+c)) \left (\log \left (\cos \left (\frac {1}{2} (c-b x)\right )-\sin \left (\frac {1}{2} (c-b x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c-b x)\right )+\sin \left (\frac {1}{2} (c-b x)\right )\right )\right )-\log \left (\cos \left (\frac {1}{2} (c-b x)\right )+\sin \left (\frac {1}{2} (c-b x)\right )\right )+4 \sec (c) \sin (2 (a+c))-4 \sec (c-b x) \sin (2 (a+c))-2 \sec (c-b x) \sin ^2(a+c) \tan (c-b x)}{4 b} \] Input:
Integrate[Cos[a + b*x]^2*Sec[c - b*x]^3,x]
Output:
(Log[Cos[(c - b*x)/2] - Sin[(c - b*x)/2]] + 3*Cos[2*(a + c)]*(Log[Cos[(c - b*x)/2] - Sin[(c - b*x)/2]] - Log[Cos[(c - b*x)/2] + Sin[(c - b*x)/2]]) - Log[Cos[(c - b*x)/2] + Sin[(c - b*x)/2]] + 4*Sec[c]*Sin[2*(a + c)] - 4*Se c[c - b*x]*Sin[2*(a + c)] - 2*Sec[c - b*x]*Sin[a + c]^2*Tan[c - b*x])/(4*b )
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 \cos ^2(a+b x) \sec ^3(c-b x) \, dx\) |
\(\Big \downarrow \) 7299 |
\(\displaystyle \int \cos ^2(a+b x) \sec ^3(c-b x)dx\) |
Input:
Int[Cos[a + b*x]^2*Sec[c - b*x]^3,x]
Output:
$Aborted
Result contains complex when optimal does not.
Time = 7.95 (sec) , antiderivative size = 240, normalized size of antiderivative = 2.79
method | result | size |
risch | \(\frac {i \left (3 \,{\mathrm e}^{i \left (b x +6 a +5 c \right )}+5 \,{\mathrm e}^{3 i \left (b x +2 a +c \right )}+2 \,{\mathrm e}^{i \left (b x +4 a +3 c \right )}-2 \,{\mathrm e}^{i \left (3 b x +4 a +c \right )}-5 \,{\mathrm e}^{i \left (b x +2 a +c \right )}-3 \,{\mathrm e}^{i \left (3 b x +2 a -c \right )}\right )}{4 \left ({\mathrm e}^{2 i \left (a +c \right )}+{\mathrm e}^{2 i \left (b x +a \right )}\right )^{2} b}-\frac {\ln \left ({\mathrm e}^{i \left (b x +a \right )}-i {\mathrm e}^{i \left (a +c \right )}\right )}{4 b}-\frac {3 \ln \left ({\mathrm e}^{i \left (b x +a \right )}-i {\mathrm e}^{i \left (a +c \right )}\right ) \cos \left (2 a +2 c \right )}{4 b}+\frac {\ln \left ({\mathrm e}^{i \left (b x +a \right )}+i {\mathrm e}^{i \left (a +c \right )}\right )}{4 b}+\frac {3 \ln \left ({\mathrm e}^{i \left (b x +a \right )}+i {\mathrm e}^{i \left (a +c \right )}\right ) \cos \left (2 a +2 c \right )}{4 b}\) | \(240\) |
default | \(\text {Expression too large to display}\) | \(1489\) |
Input:
int(cos(b*x+a)^2*sec(b*x-c)^3,x,method=_RETURNVERBOSE)
Output:
1/4*I/(exp(2*I*(a+c))+exp(2*I*(b*x+a)))^2/b*(3*exp(I*(b*x+6*a+5*c))+5*exp( 3*I*(b*x+2*a+c))+2*exp(I*(b*x+4*a+3*c))-2*exp(I*(3*b*x+4*a+c))-5*exp(I*(b* x+2*a+c))-3*exp(I*(3*b*x+2*a-c)))-1/4/b*ln(exp(I*(b*x+a))-I*exp(I*(a+c)))- 3/4/b*ln(exp(I*(b*x+a))-I*exp(I*(a+c)))*cos(2*a+2*c)+1/4/b*ln(exp(I*(b*x+a ))+I*exp(I*(a+c)))+3/4/b*ln(exp(I*(b*x+a))+I*exp(I*(a+c)))*cos(2*a+2*c)
Leaf count of result is larger than twice the leaf count of optimal. 337 vs. \(2 (90) = 180\).
Time = 0.09 (sec) , antiderivative size = 337, normalized size of antiderivative = 3.92 \[ \int \cos ^2(a+b x) \sec ^3(c-b x) \, dx=-\frac {2 \, {\left (3 \, \cos \left (a + c\right )^{2} + 1\right )} \cos \left (b x + a\right ) \sin \left (a + c\right ) + {\left (3 \, \cos \left (a + c\right )^{4} - 2 \, {\left (3 \, \cos \left (a + c\right )^{3} - \cos \left (a + c\right )\right )} \cos \left (b x + a\right ) \sin \left (b x + a\right ) \sin \left (a + c\right ) - {\left (6 \, \cos \left (a + c\right )^{4} - 5 \, \cos \left (a + c\right )^{2} + 1\right )} \cos \left (b x + a\right )^{2} - 4 \, \cos \left (a + c\right )^{2} + 1\right )} \log \left (\frac {2 \, {\left (\cos \left (a + c\right ) \sin \left (b x + a\right ) - \cos \left (b x + a\right ) \sin \left (a + c\right ) + 1\right )}}{\cos \left (a + c\right ) + 1}\right ) - {\left (3 \, \cos \left (a + c\right )^{4} - 2 \, {\left (3 \, \cos \left (a + c\right )^{3} - \cos \left (a + c\right )\right )} \cos \left (b x + a\right ) \sin \left (b x + a\right ) \sin \left (a + c\right ) - {\left (6 \, \cos \left (a + c\right )^{4} - 5 \, \cos \left (a + c\right )^{2} + 1\right )} \cos \left (b x + a\right )^{2} - 4 \, \cos \left (a + c\right )^{2} + 1\right )} \log \left (-\frac {2 \, {\left (\cos \left (a + c\right ) \sin \left (b x + a\right ) - \cos \left (b x + a\right ) \sin \left (a + c\right ) - 1\right )}}{\cos \left (a + c\right ) + 1}\right ) - 6 \, {\left (\cos \left (a + c\right )^{3} - \cos \left (a + c\right )\right )} \sin \left (b x + a\right )}{4 \, {\left (2 \, b \cos \left (b x + a\right ) \cos \left (a + c\right ) \sin \left (b x + a\right ) \sin \left (a + c\right ) + {\left (2 \, b \cos \left (a + c\right )^{2} - b\right )} \cos \left (b x + a\right )^{2} - b \cos \left (a + c\right )^{2} + b\right )}} \] Input:
integrate(cos(b*x+a)^2*sec(b*x-c)^3,x, algorithm="fricas")
Output:
-1/4*(2*(3*cos(a + c)^2 + 1)*cos(b*x + a)*sin(a + c) + (3*cos(a + c)^4 - 2 *(3*cos(a + c)^3 - cos(a + c))*cos(b*x + a)*sin(b*x + a)*sin(a + c) - (6*c os(a + c)^4 - 5*cos(a + c)^2 + 1)*cos(b*x + a)^2 - 4*cos(a + c)^2 + 1)*log (2*(cos(a + c)*sin(b*x + a) - cos(b*x + a)*sin(a + c) + 1)/(cos(a + c) + 1 )) - (3*cos(a + c)^4 - 2*(3*cos(a + c)^3 - cos(a + c))*cos(b*x + a)*sin(b* x + a)*sin(a + c) - (6*cos(a + c)^4 - 5*cos(a + c)^2 + 1)*cos(b*x + a)^2 - 4*cos(a + c)^2 + 1)*log(-2*(cos(a + c)*sin(b*x + a) - cos(b*x + a)*sin(a + c) - 1)/(cos(a + c) + 1)) - 6*(cos(a + c)^3 - cos(a + c))*sin(b*x + a))/ (2*b*cos(b*x + a)*cos(a + c)*sin(b*x + a)*sin(a + c) + (2*b*cos(a + c)^2 - b)*cos(b*x + a)^2 - b*cos(a + c)^2 + b)
Timed out. \[ \int \cos ^2(a+b x) \sec ^3(c-b x) \, dx=\text {Timed out} \] Input:
integrate(cos(b*x+a)**2*sec(b*x-c)**3,x)
Output:
Timed out
Leaf count of result is larger than twice the leaf count of optimal. 1217 vs. \(2 (90) = 180\).
Time = 0.21 (sec) , antiderivative size = 1217, normalized size of antiderivative = 14.15 \[ \int \cos ^2(a+b x) \sec ^3(c-b x) \, dx=\text {Too large to display} \] Input:
integrate(cos(b*x+a)^2*sec(b*x-c)^3,x, algorithm="maxima")
Output:
1/8*(2*(3*sin(3*b*x) - 5*sin(3*b*x + 4*a + 4*c) + 2*sin(3*b*x + 2*a + 2*c) - 3*sin(b*x + 4*a + 6*c) - 2*sin(b*x + 2*a + 4*c) + 5*sin(b*x + 2*c))*cos (4*b*x + 2*a + c) + 10*(2*sin(2*b*x + 2*a + 3*c) + sin(2*a + 5*c))*cos(3*b *x + 4*a + 4*c) - 4*(2*sin(2*b*x + 2*a + 3*c) + sin(2*a + 5*c))*cos(3*b*x + 2*a + 2*c) + 4*(3*sin(3*b*x) - 3*sin(b*x + 4*a + 6*c) - 2*sin(b*x + 2*a + 4*c) + 5*sin(b*x + 2*c))*cos(2*b*x + 2*a + 3*c) - ((3*cos(2*a + 2*c) + 1 )*cos(4*b*x + 2*a + c)^2 + 4*(3*cos(2*a + 2*c) + 1)*cos(2*b*x + 2*a + 3*c) ^2 + 4*(3*cos(2*a + 2*c) + 1)*cos(2*b*x + 2*a + 3*c)*cos(2*a + 5*c) + (3*c os(2*a + 2*c) + 1)*cos(2*a + 5*c)^2 + (3*cos(2*a + 2*c) + 1)*sin(4*b*x + 2 *a + c)^2 + 4*(3*cos(2*a + 2*c) + 1)*sin(2*b*x + 2*a + 3*c)^2 + 4*(3*cos(2 *a + 2*c) + 1)*sin(2*b*x + 2*a + 3*c)*sin(2*a + 5*c) + (3*cos(2*a + 2*c) + 1)*sin(2*a + 5*c)^2 + 2*(2*(3*cos(2*a + 2*c) + 1)*cos(2*b*x + 2*a + 3*c) + (3*cos(2*a + 2*c) + 1)*cos(2*a + 5*c))*cos(4*b*x + 2*a + c) + 2*(2*(3*co s(2*a + 2*c) + 1)*sin(2*b*x + 2*a + 3*c) + (3*cos(2*a + 2*c) + 1)*sin(2*a + 5*c))*sin(4*b*x + 2*a + c))*log((cos(b*x)^2 + cos(c)^2 - 2*cos(c)*sin(b* x) + sin(b*x)^2 + 2*cos(b*x)*sin(c) + sin(c)^2)/(cos(b*x)^2 + cos(c)^2 + 2 *cos(c)*sin(b*x) + sin(b*x)^2 - 2*cos(b*x)*sin(c) + sin(c)^2)) + 6*cos(2*a + 5*c)*sin(3*b*x) - 2*(3*cos(3*b*x) - 5*cos(3*b*x + 4*a + 4*c) + 2*cos(3* b*x + 2*a + 2*c) - 3*cos(b*x + 4*a + 6*c) - 2*cos(b*x + 2*a + 4*c) + 5*cos (b*x + 2*c))*sin(4*b*x + 2*a + c) - 10*(2*cos(2*b*x + 2*a + 3*c) + cos(...
Leaf count of result is larger than twice the leaf count of optimal. 6975 vs. \(2 (90) = 180\).
Time = 0.44 (sec) , antiderivative size = 6975, normalized size of antiderivative = 81.10 \[ \int \cos ^2(a+b x) \sec ^3(c-b x) \, dx=\text {Too large to display} \] Input:
integrate(cos(b*x+a)^2*sec(b*x-c)^3,x, algorithm="giac")
Output:
((tan(1/2*a)^5*tan(1/2*c)^5 - tan(1/2*a)^5*tan(1/2*c)^4 - tan(1/2*a)^4*tan (1/2*c)^5 - 4*tan(1/2*a)^5*tan(1/2*c)^3 - 13*tan(1/2*a)^4*tan(1/2*c)^4 - 4 *tan(1/2*a)^3*tan(1/2*c)^5 + 4*tan(1/2*a)^5*tan(1/2*c)^2 + 16*tan(1/2*a)^4 *tan(1/2*c)^3 + 16*tan(1/2*a)^3*tan(1/2*c)^4 + 4*tan(1/2*a)^2*tan(1/2*c)^5 + tan(1/2*a)^5*tan(1/2*c) + 16*tan(1/2*a)^4*tan(1/2*c)^2 + 40*tan(1/2*a)^ 3*tan(1/2*c)^3 + 16*tan(1/2*a)^2*tan(1/2*c)^4 + tan(1/2*a)*tan(1/2*c)^5 - tan(1/2*a)^5 - 13*tan(1/2*a)^4*tan(1/2*c) - 40*tan(1/2*a)^3*tan(1/2*c)^2 - 40*tan(1/2*a)^2*tan(1/2*c)^3 - 13*tan(1/2*a)*tan(1/2*c)^4 - tan(1/2*c)^5 - tan(1/2*a)^4 - 16*tan(1/2*a)^3*tan(1/2*c) - 40*tan(1/2*a)^2*tan(1/2*c)^2 - 16*tan(1/2*a)*tan(1/2*c)^3 - tan(1/2*c)^4 + 4*tan(1/2*a)^3 + 16*tan(1/2 *a)^2*tan(1/2*c) + 16*tan(1/2*a)*tan(1/2*c)^2 + 4*tan(1/2*c)^3 + 4*tan(1/2 *a)^2 + 13*tan(1/2*a)*tan(1/2*c) + 4*tan(1/2*c)^2 - tan(1/2*a) - tan(1/2*c ) - 1)*log(abs(-tan(1/2*b*x + 1/2*a)*tan(1/2*a)*tan(1/2*c) + tan(1/2*b*x + 1/2*a)*tan(1/2*a) + tan(1/2*b*x + 1/2*a)*tan(1/2*c) - tan(1/2*a)*tan(1/2* c) + tan(1/2*b*x + 1/2*a) - tan(1/2*a) - tan(1/2*c) + 1))/(tan(1/2*a)^5*ta n(1/2*c)^5 - tan(1/2*a)^5*tan(1/2*c)^4 - tan(1/2*a)^4*tan(1/2*c)^5 + 2*tan (1/2*a)^5*tan(1/2*c)^3 - tan(1/2*a)^4*tan(1/2*c)^4 + 2*tan(1/2*a)^3*tan(1/ 2*c)^5 - 2*tan(1/2*a)^5*tan(1/2*c)^2 - 2*tan(1/2*a)^4*tan(1/2*c)^3 - 2*tan (1/2*a)^3*tan(1/2*c)^4 - 2*tan(1/2*a)^2*tan(1/2*c)^5 + tan(1/2*a)^5*tan(1/ 2*c) - 2*tan(1/2*a)^4*tan(1/2*c)^2 + 4*tan(1/2*a)^3*tan(1/2*c)^3 - 2*ta...
Timed out. \[ \int \cos ^2(a+b x) \sec ^3(c-b x) \, dx=\text {Hanged} \] Input:
int(cos(a + b*x)^2/cos(c - b*x)^3,x)
Output:
\text{Hanged}
\[ \int \cos ^2(a+b x) \sec ^3(c-b x) \, dx=\int \cos \left (b x +a \right )^{2} \sec \left (b x -c \right )^{3}d x \] Input:
int(cos(b*x+a)^2*sec(b*x-c)^3,x)
Output:
int(cos(a + b*x)**2*sec(b*x - c)**3,x)