Integrand size = 21, antiderivative size = 87 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {7 a^2 x}{8}+\frac {2 a^2 \sin (c+d x)}{d}+\frac {7 a^2 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^2 \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d} \] Output:
7/8*a^2*x+2*a^2*sin(d*x+c)/d+7/8*a^2*cos(d*x+c)*sin(d*x+c)/d+1/4*a^2*cos(d *x+c)^3*sin(d*x+c)/d-2/3*a^2*sin(d*x+c)^3/d
Time = 0.10 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.61 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^2 (84 d x+144 \sin (c+d x)+48 \sin (2 (c+d x))+16 \sin (3 (c+d x))+3 \sin (4 (c+d x)))}{96 d} \] Input:
Integrate[Cos[c + d*x]^4*(a + a*Sec[c + d*x])^2,x]
Output:
(a^2*(84*d*x + 144*Sin[c + d*x] + 48*Sin[2*(c + d*x)] + 16*Sin[3*(c + d*x) ] + 3*Sin[4*(c + d*x)]))/(96*d)
Time = 0.46 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.99, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 4275, 3042, 3113, 2009, 4533, 3042, 3115, 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 ^4(c+d x) (a \sec (c+d x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right )^4}dx\) |
\(\Big \downarrow \) 4275 |
\(\displaystyle 2 a^2 \int \cos ^3(c+d x)dx+\int \cos ^4(c+d x) \left (\sec ^2(c+d x) a^2+a^2\right )dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 2 a^2 \int \sin \left (c+d x+\frac {\pi }{2}\right )^3dx+\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 )^4}dx\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle \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 )^4}dx-\frac {2 a^2 \int \left (1-\sin ^2(c+d x)\right )d(-\sin (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \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 )^4}dx-\frac {2 a^2 \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 4533 |
\(\displaystyle \frac {7}{4} a^2 \int \cos ^2(c+d x)dx-\frac {2 a^2 \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}+\frac {a^2 \sin (c+d x) \cos ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {7}{4} a^2 \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {2 a^2 \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}+\frac {a^2 \sin (c+d x) \cos ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {7}{4} a^2 \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )-\frac {2 a^2 \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}+\frac {a^2 \sin (c+d x) \cos ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle -\frac {2 a^2 \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}+\frac {a^2 \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {7}{4} a^2 \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )\) |
Input:
Int[Cos[c + d*x]^4*(a + a*Sec[c + d*x])^2,x]
Output:
(a^2*Cos[c + d*x]^3*Sin[c + d*x])/(4*d) + (7*a^2*(x/2 + (Cos[c + d*x]*Sin[ c + d*x])/(2*d)))/4 - (2*a^2*(-Sin[c + d*x] + Sin[c + d*x]^3/3))/d
Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
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_)]*(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.94 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.63
method | result | size |
parallelrisch | \(\frac {a^{2} \left (84 d x +3 \sin \left (4 d x +4 c \right )+16 \sin \left (3 d x +3 c \right )+48 \sin \left (2 d x +2 c \right )+144 \sin \left (d x +c \right )\right )}{96 d}\) | \(55\) |
risch | \(\frac {7 a^{2} x}{8}+\frac {3 a^{2} \sin \left (d x +c \right )}{2 d}+\frac {a^{2} \sin \left (4 d x +4 c \right )}{32 d}+\frac {a^{2} \sin \left (3 d x +3 c \right )}{6 d}+\frac {a^{2} \sin \left (2 d x +2 c \right )}{2 d}\) | \(73\) |
derivativedivides | \(\frac {a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\frac {2 a^{2} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+a^{2} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(90\) |
default | \(\frac {a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\frac {2 a^{2} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+a^{2} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(90\) |
norman | \(\frac {-\frac {7 a^{2} x}{8}-\frac {25 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}+\frac {a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{2 d}+\frac {14 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 d}+\frac {7 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{4 d}-\frac {21 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{8}-\frac {7 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{4}+\frac {7 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{4}+\frac {21 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{8}+\frac {7 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{8}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4} \left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}\) | \(217\) |
Input:
int(cos(d*x+c)^4*(a+a*sec(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/96*a^2*(84*d*x+3*sin(4*d*x+4*c)+16*sin(3*d*x+3*c)+48*sin(2*d*x+2*c)+144* sin(d*x+c))/d
Time = 0.08 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.72 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {21 \, a^{2} d x + {\left (6 \, a^{2} \cos \left (d x + c\right )^{3} + 16 \, a^{2} \cos \left (d x + c\right )^{2} + 21 \, a^{2} \cos \left (d x + c\right ) + 32 \, a^{2}\right )} \sin \left (d x + c\right )}{24 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+a*sec(d*x+c))^2,x, algorithm="fricas")
Output:
1/24*(21*a^2*d*x + (6*a^2*cos(d*x + c)^3 + 16*a^2*cos(d*x + c)^2 + 21*a^2* cos(d*x + c) + 32*a^2)*sin(d*x + c))/d
\[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^2 \, dx=a^{2} \left (\int 2 \cos ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \cos ^{4}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \cos ^{4}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(cos(d*x+c)**4*(a+a*sec(d*x+c))**2,x)
Output:
a**2*(Integral(2*cos(c + d*x)**4*sec(c + d*x), x) + Integral(cos(c + d*x)* *4*sec(c + d*x)**2, x) + Integral(cos(c + d*x)**4, x))
Time = 0.04 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.95 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {64 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{2} - 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} - 24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2}}{96 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+a*sec(d*x+c))^2,x, algorithm="maxima")
Output:
-1/96*(64*(sin(d*x + c)^3 - 3*sin(d*x + c))*a^2 - 3*(12*d*x + 12*c + sin(4 *d*x + 4*c) + 8*sin(2*d*x + 2*c))*a^2 - 24*(2*d*x + 2*c + sin(2*d*x + 2*c) )*a^2)/d
Time = 0.13 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.10 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {21 \, {\left (d x + c\right )} a^{2} + \frac {2 \, {\left (21 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 77 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 83 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 75 \, 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 )}^{4}}}{24 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+a*sec(d*x+c))^2,x, algorithm="giac")
Output:
1/24*(21*(d*x + c)*a^2 + 2*(21*a^2*tan(1/2*d*x + 1/2*c)^7 + 77*a^2*tan(1/2 *d*x + 1/2*c)^5 + 83*a^2*tan(1/2*d*x + 1/2*c)^3 + 75*a^2*tan(1/2*d*x + 1/2 *c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^4)/d
Time = 12.70 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.02 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {7\,a^2\,x}{8}+\frac {\frac {7\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {77\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{12}+\frac {83\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12}+\frac {25\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^4} \] Input:
int(cos(c + d*x)^4*(a + a/cos(c + d*x))^2,x)
Output:
(7*a^2*x)/8 + ((83*a^2*tan(c/2 + (d*x)/2)^3)/12 + (77*a^2*tan(c/2 + (d*x)/ 2)^5)/12 + (7*a^2*tan(c/2 + (d*x)/2)^7)/4 + (25*a^2*tan(c/2 + (d*x)/2))/4) /(d*(tan(c/2 + (d*x)/2)^2 + 1)^4)
Time = 0.17 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.70 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^{2} \left (-6 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+27 \cos \left (d x +c \right ) \sin \left (d x +c \right )-16 \sin \left (d x +c \right )^{3}+48 \sin \left (d x +c \right )+21 d x \right )}{24 d} \] Input:
int(cos(d*x+c)^4*(a+a*sec(d*x+c))^2,x)
Output:
(a**2*( - 6*cos(c + d*x)*sin(c + d*x)**3 + 27*cos(c + d*x)*sin(c + d*x) - 16*sin(c + d*x)**3 + 48*sin(c + d*x) + 21*d*x))/(24*d)