Integrand size = 31, antiderivative size = 102 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=\frac {1}{2} a^2 (2 A+3 B) x+\frac {2 a^2 (2 A+3 B) \sin (c+d x)}{3 d}+\frac {a^2 (2 A+3 B) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d} \] Output:
1/2*a^2*(2*A+3*B)*x+2/3*a^2*(2*A+3*B)*sin(d*x+c)/d+1/6*a^2*(2*A+3*B)*cos(d *x+c)*sin(d*x+c)/d+1/3*A*cos(d*x+c)^2*(a+a*sec(d*x+c))^2*sin(d*x+c)/d
Time = 0.31 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.82 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=\frac {a^2 \sin (c+d x) \left (11 A+12 B+3 (2 A+B) \cos (c+d x)+A \cos (2 (c+d x))+\frac {6 (2 A+3 B) \arcsin \left (\sqrt {\sin ^2\left (\frac {1}{2} (c+d x)\right )}\right )}{\sqrt {\sin ^2(c+d x)}}\right )}{6 d} \] Input:
Integrate[Cos[c + d*x]^3*(a + a*Sec[c + d*x])^2*(A + B*Sec[c + d*x]),x]
Output:
(a^2*Sin[c + d*x]*(11*A + 12*B + 3*(2*A + B)*Cos[c + d*x] + A*Cos[2*(c + d *x)] + (6*(2*A + 3*B)*ArcSin[Sqrt[Sin[(c + d*x)/2]^2]])/Sqrt[Sin[c + d*x]^ 2]))/(6*d)
Time = 0.56 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.89, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.258, Rules used = {3042, 4501, 3042, 4275, 3042, 3117, 4533, 24}
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(c+d x) (a \sec (c+d x)+a)^2 (A+B \sec (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 4501 |
\(\displaystyle \frac {1}{3} (2 A+3 B) \int \cos ^2(c+d x) (\sec (c+d x) a+a)^2dx+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} (2 A+3 B) \int \frac {\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 4275 |
\(\displaystyle \frac {1}{3} (2 A+3 B) \left (2 a^2 \int \cos (c+d x)dx+\int \cos ^2(c+d x) \left (\sec ^2(c+d x) a^2+a^2\right )dx\right )+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} (2 A+3 B) \left (2 a^2 \int \sin \left (c+d x+\frac {\pi }{2}\right )dx+\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^2 a^2+a^2}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx\right )+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle \frac {1}{3} (2 A+3 B) \left (\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^2 a^2+a^2}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx+\frac {2 a^2 \sin (c+d x)}{d}\right )+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 4533 |
\(\displaystyle \frac {1}{3} (2 A+3 B) \left (\frac {3 a^2 \int 1dx}{2}+\frac {2 a^2 \sin (c+d x)}{d}+\frac {a^2 \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{3} (2 A+3 B) \left (\frac {2 a^2 \sin (c+d x)}{d}+\frac {a^2 \sin (c+d x) \cos (c+d x)}{2 d}+\frac {3 a^2 x}{2}\right )+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
Input:
Int[Cos[c + d*x]^3*(a + a*Sec[c + d*x])^2*(A + B*Sec[c + d*x]),x]
Output:
(A*Cos[c + d*x]^2*(a + a*Sec[c + d*x])^2*Sin[c + d*x])/(3*d) + ((2*A + 3*B )*((3*a^2*x)/2 + (2*a^2*Sin[c + d*x])/d + (a^2*Cos[c + d*x]*Sin[c + d*x])/ (2*d)))/3
Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^2, x_Symbol] :> Simp[2*a*(b/d) Int[(d*Csc[e + f*x])^(n + 1), x], x] + Int[(d*Csc[e + f*x])^n*(a^2 + b^2*Csc[e + f*x]^2), x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[A*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(f*n)), x] - Simp[(a*A*m - b*B*n)/(b*d*n) Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n + 1), x] , x] /; FreeQ[{a, b, d, e, f, A, B, m, n}, x] && NeQ[A*b - a*B, 0] && EqQ[a ^2 - b^2, 0] && EqQ[m + n + 1, 0] && !LeQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[A*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*m)), x] + Simp[(C*m + A*(m + 1))/(b^2*m) Int[(b*Csc[e + f*x])^(m + 2), x], x] /; Fr eeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]
Time = 0.41 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.59
method | result | size |
parallelrisch | \(\frac {a^{2} \left (\left (\frac {A}{2}+\frac {B}{4}\right ) \sin \left (2 d x +2 c \right )+\frac {A \sin \left (3 d x +3 c \right )}{12}+\left (\frac {7 A}{4}+2 B \right ) \sin \left (d x +c \right )+d x \left (A +\frac {3 B}{2}\right )\right )}{d}\) | \(60\) |
risch | \(a^{2} A x +\frac {3 a^{2} x B}{2}+\frac {7 a^{2} A \sin \left (d x +c \right )}{4 d}+\frac {2 \sin \left (d x +c \right ) B \,a^{2}}{d}+\frac {A \,a^{2} \sin \left (3 d x +3 c \right )}{12 d}+\frac {A \,a^{2} \sin \left (2 d x +2 c \right )}{2 d}+\frac {\sin \left (2 d x +2 c \right ) B \,a^{2}}{4 d}\) | \(99\) |
derivativedivides | \(\frac {A \,a^{2} \sin \left (d x +c \right )+B \,a^{2} \left (d x +c \right )+2 A \,a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 B \,a^{2} \sin \left (d x +c \right )+\frac {A \,a^{2} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+B \,a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(116\) |
default | \(\frac {A \,a^{2} \sin \left (d x +c \right )+B \,a^{2} \left (d x +c \right )+2 A \,a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 B \,a^{2} \sin \left (d x +c \right )+\frac {A \,a^{2} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+B \,a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(116\) |
norman | \(\frac {\frac {a^{2} \left (2 A +3 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}+\frac {a^{2} \left (6 A +5 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {a^{2} \left (2 A +3 B \right ) x}{2}-\frac {8 a^{2} \left (A +3 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 d}+\frac {2 a^{2} \left (2 A +3 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 d}+\frac {a^{2} \left (2 A +3 B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{2}-a^{2} \left (2 A +3 B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-a^{2} \left (2 A +3 B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {a^{2} \left (2 A +3 B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{2}+\frac {a^{2} \left (2 A +3 B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{2}-\frac {2 a^{2} \left (10 A +3 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2}}\) | \(290\) |
Input:
int(cos(d*x+c)^3*(a+a*sec(d*x+c))^2*(A+B*sec(d*x+c)),x,method=_RETURNVERBO SE)
Output:
a^2*((1/2*A+1/4*B)*sin(2*d*x+2*c)+1/12*A*sin(3*d*x+3*c)+(7/4*A+2*B)*sin(d* x+c)+d*x*(A+3/2*B))/d
Time = 0.09 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.69 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=\frac {3 \, {\left (2 \, A + 3 \, B\right )} a^{2} d x + {\left (2 \, A a^{2} \cos \left (d x + c\right )^{2} + 3 \, {\left (2 \, A + B\right )} a^{2} \cos \left (d x + c\right ) + 2 \, {\left (5 \, A + 6 \, B\right )} a^{2}\right )} \sin \left (d x + c\right )}{6 \, d} \] Input:
integrate(cos(d*x+c)^3*(a+a*sec(d*x+c))^2*(A+B*sec(d*x+c)),x, algorithm="f ricas")
Output:
1/6*(3*(2*A + 3*B)*a^2*d*x + (2*A*a^2*cos(d*x + c)^2 + 3*(2*A + B)*a^2*cos (d*x + c) + 2*(5*A + 6*B)*a^2)*sin(d*x + c))/d
\[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=a^{2} \left (\int A \cos ^{3}{\left (c + d x \right )}\, dx + \int 2 A \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int A \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int B \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 2 B \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int B \cos ^{3}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(cos(d*x+c)**3*(a+a*sec(d*x+c))**2*(A+B*sec(d*x+c)),x)
Output:
a**2*(Integral(A*cos(c + d*x)**3, x) + Integral(2*A*cos(c + d*x)**3*sec(c + d*x), x) + Integral(A*cos(c + d*x)**3*sec(c + d*x)**2, x) + Integral(B*c os(c + d*x)**3*sec(c + d*x), x) + Integral(2*B*cos(c + d*x)**3*sec(c + d*x )**2, x) + Integral(B*cos(c + d*x)**3*sec(c + d*x)**3, x))
Time = 0.04 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.08 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=-\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{2} - 6 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} - 12 \, {\left (d x + c\right )} B a^{2} - 12 \, A a^{2} \sin \left (d x + c\right ) - 24 \, B a^{2} \sin \left (d x + c\right )}{12 \, d} \] Input:
integrate(cos(d*x+c)^3*(a+a*sec(d*x+c))^2*(A+B*sec(d*x+c)),x, algorithm="m axima")
Output:
-1/12*(4*(sin(d*x + c)^3 - 3*sin(d*x + c))*A*a^2 - 6*(2*d*x + 2*c + sin(2* d*x + 2*c))*A*a^2 - 3*(2*d*x + 2*c + sin(2*d*x + 2*c))*B*a^2 - 12*(d*x + c )*B*a^2 - 12*A*a^2*sin(d*x + c) - 24*B*a^2*sin(d*x + c))/d
Time = 0.17 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.39 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=\frac {3 \, {\left (2 \, A a^{2} + 3 \, B a^{2}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (6 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 9 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 16 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 24 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 18 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \] Input:
integrate(cos(d*x+c)^3*(a+a*sec(d*x+c))^2*(A+B*sec(d*x+c)),x, algorithm="g iac")
Output:
1/6*(3*(2*A*a^2 + 3*B*a^2)*(d*x + c) + 2*(6*A*a^2*tan(1/2*d*x + 1/2*c)^5 + 9*B*a^2*tan(1/2*d*x + 1/2*c)^5 + 16*A*a^2*tan(1/2*d*x + 1/2*c)^3 + 24*B*a ^2*tan(1/2*d*x + 1/2*c)^3 + 18*A*a^2*tan(1/2*d*x + 1/2*c) + 15*B*a^2*tan(1 /2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^3)/d
Time = 11.37 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.96 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=A\,a^2\,x+\frac {3\,B\,a^2\,x}{2}+\frac {7\,A\,a^2\,\sin \left (c+d\,x\right )}{4\,d}+\frac {2\,B\,a^2\,\sin \left (c+d\,x\right )}{d}+\frac {A\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{2\,d}+\frac {A\,a^2\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {B\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \] Input:
int(cos(c + d*x)^3*(A + B/cos(c + d*x))*(a + a/cos(c + d*x))^2,x)
Output:
A*a^2*x + (3*B*a^2*x)/2 + (7*A*a^2*sin(c + d*x))/(4*d) + (2*B*a^2*sin(c + d*x))/d + (A*a^2*sin(2*c + 2*d*x))/(2*d) + (A*a^2*sin(3*c + 3*d*x))/(12*d) + (B*a^2*sin(2*c + 2*d*x))/(4*d)
Time = 0.15 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.76 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=\frac {a^{2} \left (6 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a +3 \cos \left (d x +c \right ) \sin \left (d x +c \right ) b -2 \sin \left (d x +c \right )^{3} a +12 \sin \left (d x +c \right ) a +12 \sin \left (d x +c \right ) b +6 a d x +9 b d x \right )}{6 d} \] Input:
int(cos(d*x+c)^3*(a+a*sec(d*x+c))^2*(A+B*sec(d*x+c)),x)
Output:
(a**2*(6*cos(c + d*x)*sin(c + d*x)*a + 3*cos(c + d*x)*sin(c + d*x)*b - 2*s in(c + d*x)**3*a + 12*sin(c + d*x)*a + 12*sin(c + d*x)*b + 6*a*d*x + 9*b*d *x))/(6*d)