Integrand size = 17, antiderivative size = 78 \[ \int \cos ^3(a+b x) \sec ^2(c+b x) \, dx=\frac {\cos (b x) \sin (3 a-2 c)}{b}+\frac {3 \text {arctanh}(\sin (c+b x)) \cos (a-c) \sin ^2(a-c)}{b}-\frac {\sec (c+b x) \sin ^3(a-c)}{b}+\frac {\cos (3 a-2 c) \sin (b x)}{b} \] Output:
cos(b*x)*sin(3*a-2*c)/b+3*arctanh(sin(b*x+c))*cos(a-c)*sin(a-c)^2/b-sec(b* x+c)*sin(a-c)^3/b+cos(3*a-2*c)*sin(b*x)/b
Result contains complex when optimal does not.
Time = 0.13 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.68 \[ \int \cos ^3(a+b x) \sec ^2(c+b x) \, dx=\frac {\cos (b x) \sin (3 a-2 c)}{b}-\frac {6 i \arctan \left (\frac {(i \cos (c)+\sin (c)) \left (\cos \left (\frac {b x}{2}\right ) \sin (c)+\cos (c) \sin \left (\frac {b x}{2}\right )\right )}{\cos (c) \cos \left (\frac {b x}{2}\right )-i \cos \left (\frac {b x}{2}\right ) \sin (c)}\right ) \cos (a-c) \sin ^2(a-c)}{b}-\frac {\sec (c+b x) \sin ^3(a-c)}{b}+\frac {\cos (3 a-2 c) \sin (b x)}{b} \] Input:
Integrate[Cos[a + b*x]^3*Sec[c + b*x]^2,x]
Output:
(Cos[b*x]*Sin[3*a - 2*c])/b - ((6*I)*ArcTan[((I*Cos[c] + Sin[c])*(Cos[(b*x )/2]*Sin[c] + Cos[c]*Sin[(b*x)/2]))/(Cos[c]*Cos[(b*x)/2] - I*Cos[(b*x)/2]* Sin[c])]*Cos[a - c]*Sin[a - c]^2)/b - (Sec[c + b*x]*Sin[a - c]^3)/b + (Cos [3*a - 2*c]*Sin[b*x])/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 ^3(a+b x) \sec ^2(b x+c) \, dx\) |
\(\Big \downarrow \) 7299 |
\(\displaystyle \int \cos ^3(a+b x) \sec ^2(b x+c)dx\) |
Input:
Int[Cos[a + b*x]^3*Sec[c + b*x]^2,x]
Output:
$Aborted
Result contains complex when optimal does not.
Time = 6.82 (sec) , antiderivative size = 238, normalized size of antiderivative = 3.05
method | result | size |
risch | \(-\frac {i \left ({\mathrm e}^{i \left (b x +5 a -2 c \right )}-3 \,{\mathrm e}^{i \left (b x +3 a \right )}+3 \,{\mathrm e}^{i \left (b x +a +2 c \right )}-{\mathrm e}^{-i \left (-b x +a -4 c \right )}\right )}{4 \left ({\mathrm e}^{2 i \left (b x +a +c \right )}+{\mathrm e}^{2 i a}\right ) b}+\frac {3 \ln \left ({\mathrm e}^{i \left (b x +a \right )}+i {\mathrm e}^{i \left (a -c \right )}\right ) \cos \left (a -c \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 (3 a -3 c \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 (a -c \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 (3 a -3 c \right )}{4 b}+\frac {\sin \left (b x +3 a -2 c \right )}{b}\) | \(238\) |
default | \(\text {Expression too large to display}\) | \(688\) |
Input:
int(cos(b*x+a)^3*sec(b*x+c)^2,x,method=_RETURNVERBOSE)
Output:
-1/4*I/(exp(2*I*(b*x+a+c))+exp(2*I*a))/b*(exp(I*(b*x+5*a-2*c))-3*exp(I*(b* x+3*a))+3*exp(I*(b*x+a+2*c))-exp(-I*(-b*x+a-4*c)))+3/4*ln(exp(I*(b*x+a))+I *exp(I*(a-c)))/b*cos(a-c)-3/4*ln(exp(I*(b*x+a))+I*exp(I*(a-c)))/b*cos(3*a- 3*c)-3/4*ln(exp(I*(b*x+a))-I*exp(I*(a-c)))/b*cos(a-c)+3/4*ln(exp(I*(b*x+a) )-I*exp(I*(a-c)))/b*cos(3*a-3*c)+sin(b*x+3*a-2*c)/b
Time = 0.09 (sec) , antiderivative size = 156, normalized size of antiderivative = 2.00 \[ \int \cos ^3(a+b x) \sec ^2(c+b x) \, dx=-\frac {3 \, {\left (\cos \left (-a + c\right )^{3} - \cos \left (-a + c\right )\right )} \cos \left (b x + c\right ) \log \left (\sin \left (b x + c\right ) + 1\right ) - 3 \, {\left (\cos \left (-a + c\right )^{3} - \cos \left (-a + c\right )\right )} \cos \left (b x + c\right ) \log \left (-\sin \left (b x + c\right ) + 1\right ) - 2 \, {\left (4 \, \cos \left (-a + c\right )^{3} - 3 \, \cos \left (-a + c\right )\right )} \cos \left (b x + c\right ) \sin \left (b x + c\right ) + 2 \, {\left ({\left (4 \, \cos \left (-a + c\right )^{2} - 1\right )} \cos \left (b x + c\right )^{2} + \cos \left (-a + c\right )^{2} - 1\right )} \sin \left (-a + c\right )}{2 \, b \cos \left (b x + c\right )} \] Input:
integrate(cos(b*x+a)^3*sec(b*x+c)^2,x, algorithm="fricas")
Output:
-1/2*(3*(cos(-a + c)^3 - cos(-a + c))*cos(b*x + c)*log(sin(b*x + c) + 1) - 3*(cos(-a + c)^3 - cos(-a + c))*cos(b*x + c)*log(-sin(b*x + c) + 1) - 2*( 4*cos(-a + c)^3 - 3*cos(-a + c))*cos(b*x + c)*sin(b*x + c) + 2*((4*cos(-a + c)^2 - 1)*cos(b*x + c)^2 + cos(-a + c)^2 - 1)*sin(-a + c))/(b*cos(b*x + c))
Exception generated. \[ \int \cos ^3(a+b x) \sec ^2(c+b x) \, dx=\text {Exception raised: HeuristicGCDFailed} \] Input:
integrate(cos(b*x+a)**3*sec(b*x+c)**2,x)
Output:
Exception raised: HeuristicGCDFailed >> no luck
Leaf count of result is larger than twice the leaf count of optimal. 883 vs. \(2 (78) = 156\).
Time = 0.22 (sec) , antiderivative size = 883, normalized size of antiderivative = 11.32 \[ \int \cos ^3(a+b x) \sec ^2(c+b x) \, dx=\text {Too large to display} \] Input:
integrate(cos(b*x+a)^3*sec(b*x+c)^2,x, algorithm="maxima")
Output:
-1/8*(4*(sin(3*b*x + 3*a + 4*c) + sin(b*x + 3*a + 2*c))*cos(4*b*x + 6*a + 2*c) - 2*(3*sin(2*b*x + 6*a) - 3*sin(2*b*x + 4*a + 2*c) + 3*sin(2*b*x + 2* a + 4*c) - 3*sin(2*b*x + 6*c) - 2*sin(4*c))*cos(3*b*x + 3*a + 4*c) + 3*((c os(-a + c) - cos(-3*a + 3*c))*cos(3*b*x + 3*a + 4*c)^2 + 2*(cos(-a + c) - cos(-3*a + 3*c))*cos(3*b*x + 3*a + 4*c)*cos(b*x + 3*a + 2*c) + (cos(-a + c ) - cos(-3*a + 3*c))*cos(b*x + 3*a + 2*c)^2 + (cos(-a + c) - cos(-3*a + 3* c))*sin(3*b*x + 3*a + 4*c)^2 + 2*(cos(-a + c) - cos(-3*a + 3*c))*sin(3*b*x + 3*a + 4*c)*sin(b*x + 3*a + 2*c) + (cos(-a + c) - cos(-3*a + 3*c))*sin(b *x + 3*a + 2*c)^2)*log((cos(b*x + 2*c)^2 + cos(c)^2 - 2*cos(c)*sin(b*x + 2 *c) + sin(b*x + 2*c)^2 + 2*cos(b*x + 2*c)*sin(c) + sin(c)^2)/(cos(b*x + 2* c)^2 + cos(c)^2 + 2*cos(c)*sin(b*x + 2*c) + sin(b*x + 2*c)^2 - 2*cos(b*x + 2*c)*sin(c) + sin(c)^2)) - 4*(cos(3*b*x + 3*a + 4*c) + cos(b*x + 3*a + 2* c))*sin(4*b*x + 6*a + 2*c) + 2*(3*cos(2*b*x + 6*a) - 3*cos(2*b*x + 4*a + 2 *c) + 3*cos(2*b*x + 2*a + 4*c) - 3*cos(2*b*x + 6*c) - 2*cos(4*c))*sin(3*b* x + 3*a + 4*c) - 6*cos(b*x + 3*a + 2*c)*sin(2*b*x + 6*a) + 6*cos(b*x + 3*a + 2*c)*sin(2*b*x + 4*a + 2*c) - 6*cos(b*x + 3*a + 2*c)*sin(2*b*x + 2*a + 4*c) + 6*cos(b*x + 3*a + 2*c)*sin(2*b*x + 6*c) + 6*cos(2*b*x + 6*a)*sin(b* x + 3*a + 2*c) - 6*cos(2*b*x + 4*a + 2*c)*sin(b*x + 3*a + 2*c) + 6*cos(2*b *x + 2*a + 4*c)*sin(b*x + 3*a + 2*c) - 6*cos(2*b*x + 6*c)*sin(b*x + 3*a + 2*c) - 4*cos(4*c)*sin(b*x + 3*a + 2*c) + 4*cos(b*x + 3*a + 2*c)*sin(4*c...
Leaf count of result is larger than twice the leaf count of optimal. 6607 vs. \(2 (78) = 156\).
Time = 0.64 (sec) , antiderivative size = 6607, normalized size of antiderivative = 84.71 \[ \int \cos ^3(a+b x) \sec ^2(c+b x) \, dx=\text {Too large to display} \] Input:
integrate(cos(b*x+a)^3*sec(b*x+c)^2,x, algorithm="giac")
Output:
2*(6*(tan(1/2*a)^7*tan(1/2*c)^5 - 2*tan(1/2*a)^6*tan(1/2*c)^6 + tan(1/2*a) ^5*tan(1/2*c)^7 + tan(1/2*a)^7*tan(1/2*c)^4 - 3*tan(1/2*a)^6*tan(1/2*c)^5 + 3*tan(1/2*a)^5*tan(1/2*c)^6 - tan(1/2*a)^4*tan(1/2*c)^7 - tan(1/2*a)^7*t an(1/2*c)^3 + 9*tan(1/2*a)^6*tan(1/2*c)^4 - 16*tan(1/2*a)^5*tan(1/2*c)^5 + 9*tan(1/2*a)^4*tan(1/2*c)^6 - tan(1/2*a)^3*tan(1/2*c)^7 - tan(1/2*a)^7*ta n(1/2*c)^2 + 9*tan(1/2*a)^6*tan(1/2*c)^3 - 22*tan(1/2*a)^5*tan(1/2*c)^4 + 22*tan(1/2*a)^4*tan(1/2*c)^5 - 9*tan(1/2*a)^3*tan(1/2*c)^6 + tan(1/2*a)^2* tan(1/2*c)^7 - 3*tan(1/2*a)^6*tan(1/2*c)^2 + 22*tan(1/2*a)^5*tan(1/2*c)^3 - 38*tan(1/2*a)^4*tan(1/2*c)^4 + 22*tan(1/2*a)^3*tan(1/2*c)^5 - 3*tan(1/2* a)^2*tan(1/2*c)^6 - 2*tan(1/2*a)^6*tan(1/2*c) + 16*tan(1/2*a)^5*tan(1/2*c) ^2 - 38*tan(1/2*a)^4*tan(1/2*c)^3 + 38*tan(1/2*a)^3*tan(1/2*c)^4 - 16*tan( 1/2*a)^2*tan(1/2*c)^5 + 2*tan(1/2*a)*tan(1/2*c)^6 - 3*tan(1/2*a)^5*tan(1/2 *c) + 22*tan(1/2*a)^4*tan(1/2*c)^2 - 38*tan(1/2*a)^3*tan(1/2*c)^3 + 22*tan (1/2*a)^2*tan(1/2*c)^4 - 3*tan(1/2*a)*tan(1/2*c)^5 - tan(1/2*a)^5 + 9*tan( 1/2*a)^4*tan(1/2*c) - 22*tan(1/2*a)^3*tan(1/2*c)^2 + 22*tan(1/2*a)^2*tan(1 /2*c)^3 - 9*tan(1/2*a)*tan(1/2*c)^4 + tan(1/2*c)^5 - tan(1/2*a)^4 + 9*tan( 1/2*a)^3*tan(1/2*c) - 16*tan(1/2*a)^2*tan(1/2*c)^2 + 9*tan(1/2*a)*tan(1/2* c)^3 - tan(1/2*c)^4 + tan(1/2*a)^3 - 3*tan(1/2*a)^2*tan(1/2*c) + 3*tan(1/2 *a)*tan(1/2*c)^2 - tan(1/2*c)^3 + tan(1/2*a)^2 - 2*tan(1/2*a)*tan(1/2*c) + tan(1/2*c)^2)*log(abs(tan(1/2*b*x + 1/2*a)*tan(1/2*a)*tan(1/2*c) + tan...
Time = 24.67 (sec) , antiderivative size = 399, normalized size of antiderivative = 5.12 \[ \int \cos ^3(a+b x) \sec ^2(c+b x) \, dx =\text {Too large to display} \] Input:
int(cos(a + b*x)^3/cos(c + b*x)^2,x)
Output:
(exp(c*2i - a*3i - b*x*1i)*1i)/(2*b) - (exp(a*3i - c*2i + b*x*1i)*1i)/(2*b ) + (exp(c*2i - a*1i + b*x*1i)*(3*exp(a*2i - c*2i) - 3*exp(a*4i - c*4i) + exp(a*6i - c*6i) - 1))/(4*b*(exp(a*2i - c*2i)*1i + exp(a*2i + b*x*2i)*1i)) + (3*log(- (3*exp(a*1i)*exp(b*x*1i)*(sin(2*a - 2*c)*1i - sin(2*a - 2*c)*e xp(a*2i)*exp(-c*2i)*1i))/2 - (sin(2*a - 2*c)*exp(a*2i)*exp(-c*2i)*(exp(a*2 i)*exp(-c*2i) - 1)*3i)/(2*(-exp(a*2i)*exp(-c*2i))^(1/2)))*sin(2*a - 2*c)*( exp(a*2i - c*2i) - 1))/(4*b*(-exp(a*2i - c*2i))^(1/2)) - (3*log((sin(2*a - 2*c)*exp(a*2i)*exp(-c*2i)*(exp(a*2i)*exp(-c*2i) - 1)*3i)/(2*(-exp(a*2i)*e xp(-c*2i))^(1/2)) - (3*exp(a*1i)*exp(b*x*1i)*(sin(2*a - 2*c)*1i - sin(2*a - 2*c)*exp(a*2i)*exp(-c*2i)*1i))/2)*sin(2*a - 2*c)*(exp(a*2i - c*2i) - 1)) /(4*b*(-exp(a*2i - c*2i))^(1/2))
\[ \int \cos ^3(a+b x) \sec ^2(c+b x) \, dx=\int \cos \left (b x +a \right )^{3} \sec \left (b x +c \right )^{2}d x \] Input:
int(cos(b*x+a)^3*sec(b*x+c)^2,x)
Output:
int(cos(a + b*x)**3*sec(b*x + c)**2,x)