Integrand size = 21, antiderivative size = 89 \[ \int \cos ^4(c+d x) \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {1}{16} (6 A+5 C) x+\frac {(6 A+5 C) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {(6 A+5 C) \cos ^3(c+d x) \sin (c+d x)}{24 d}+\frac {C \cos ^5(c+d x) \sin (c+d x)}{6 d} \] Output:
1/16*(6*A+5*C)*x+1/16*(6*A+5*C)*cos(d*x+c)*sin(d*x+c)/d+1/24*(6*A+5*C)*cos (d*x+c)^3*sin(d*x+c)/d+1/6*C*cos(d*x+c)^5*sin(d*x+c)/d
Time = 0.20 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.76 \[ \int \cos ^4(c+d x) \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {72 A c+60 c C+72 A d x+60 C d x+(48 A+45 C) \sin (2 (c+d x))+(6 A+9 C) \sin (4 (c+d x))+C \sin (6 (c+d x))}{192 d} \] Input:
Integrate[Cos[c + d*x]^4*(A + C*Cos[c + d*x]^2),x]
Output:
(72*A*c + 60*c*C + 72*A*d*x + 60*C*d*x + (48*A + 45*C)*Sin[2*(c + d*x)] + (6*A + 9*C)*Sin[4*(c + d*x)] + C*Sin[6*(c + d*x)])/(192*d)
Time = 0.35 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.96, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3493, 3042, 3115, 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) \left (A+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin \left (c+d x+\frac {\pi }{2}\right )^4 \left (A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 3493 |
\(\displaystyle \frac {1}{6} (6 A+5 C) \int \cos ^4(c+d x)dx+\frac {C \sin (c+d x) \cos ^5(c+d x)}{6 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{6} (6 A+5 C) \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx+\frac {C \sin (c+d x) \cos ^5(c+d x)}{6 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {1}{6} (6 A+5 C) \left (\frac {3}{4} \int \cos ^2(c+d x)dx+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )+\frac {C \sin (c+d x) \cos ^5(c+d x)}{6 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{6} (6 A+5 C) \left (\frac {3}{4} \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )+\frac {C \sin (c+d x) \cos ^5(c+d x)}{6 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {1}{6} (6 A+5 C) \left (\frac {3}{4} \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )+\frac {C \sin (c+d x) \cos ^5(c+d x)}{6 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{6} (6 A+5 C) \left (\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3}{4} \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )\right )+\frac {C \sin (c+d x) \cos ^5(c+d x)}{6 d}\) |
Input:
Int[Cos[c + d*x]^4*(A + C*Cos[c + d*x]^2),x]
Output:
(C*Cos[c + d*x]^5*Sin[c + d*x])/(6*d) + ((6*A + 5*C)*((Cos[c + d*x]^3*Sin[ c + d*x])/(4*d) + (3*(x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d)))/4))/6
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[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*sin[(e_.) + (f_.)*( x_)]^2), x_Symbol] :> Simp[(-C)*Cos[e + f*x]*((b*Sin[e + f*x])^(m + 1)/(b*f *(m + 2))), x] + Simp[(A*(m + 2) + C*(m + 1))/(m + 2) Int[(b*Sin[e + f*x] )^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] && !LtQ[m, -1]
Time = 2.20 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.69
method | result | size |
parallelrisch | \(\frac {\left (48 A +45 C \right ) \sin \left (2 d x +2 c \right )+\left (6 A +9 C \right ) \sin \left (4 d x +4 c \right )+\sin \left (6 d x +6 c \right ) C +72 x \left (A +\frac {5 C}{6}\right ) d}{192 d}\) | \(61\) |
risch | \(\frac {3 x A}{8}+\frac {5 C x}{16}+\frac {\sin \left (6 d x +6 c \right ) C}{192 d}+\frac {\sin \left (4 d x +4 c \right ) A}{32 d}+\frac {3 \sin \left (4 d x +4 c \right ) C}{64 d}+\frac {\sin \left (2 d x +2 c \right ) A}{4 d}+\frac {15 \sin \left (2 d x +2 c \right ) C}{64 d}\) | \(85\) |
derivativedivides | \(\frac {C \left (\frac {\left (\cos \left (d x +c \right )^{5}+\frac {5 \cos \left (d x +c \right )^{3}}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )+A \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}\) | \(86\) |
default | \(\frac {C \left (\frac {\left (\cos \left (d x +c \right )^{5}+\frac {5 \cos \left (d x +c \right )^{3}}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )+A \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}\) | \(86\) |
parts | \(\frac {A \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}+\frac {C \left (\frac {\left (\cos \left (d x +c \right )^{5}+\frac {5 \cos \left (d x +c \right )^{3}}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )}{d}\) | \(88\) |
norman | \(\frac {\left (\frac {3 A}{8}+\frac {5 C}{16}\right ) x +\left (\frac {3 A}{8}+\frac {5 C}{16}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (\frac {9 A}{4}+\frac {15 C}{8}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (\frac {9 A}{4}+\frac {15 C}{8}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\left (\frac {15 A}{2}+\frac {25 C}{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\left (\frac {45 A}{8}+\frac {75 C}{16}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (\frac {45 A}{8}+\frac {75 C}{16}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\frac {\left (2 A +15 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{4 d}-\frac {\left (2 A +15 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{4 d}+\frac {\left (10 A +11 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}-\frac {\left (10 A +11 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{8 d}+\frac {\left (42 A -5 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{24 d}-\frac {\left (42 A -5 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{24 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{6}}\) | \(283\) |
orering | \(x \cos \left (d x +c \right )^{4} \left (A +C \cos \left (d x +c \right )^{2}\right )-\frac {49 \left (-4 \cos \left (d x +c \right )^{3} \left (A +C \cos \left (d x +c \right )^{2}\right ) d \sin \left (d x +c \right )-2 \cos \left (d x +c \right )^{5} C d \sin \left (d x +c \right )\right )}{144 d^{2}}+\frac {49 x \left (12 \cos \left (d x +c \right )^{2} \left (A +C \cos \left (d x +c \right )^{2}\right ) d^{2} \sin \left (d x +c \right )^{2}+18 \cos \left (d x +c \right )^{4} C \,d^{2} \sin \left (d x +c \right )^{2}-4 \cos \left (d x +c \right )^{4} \left (A +C \cos \left (d x +c \right )^{2}\right ) d^{2}-2 \cos \left (d x +c \right )^{6} C \,d^{2}\right )}{144 d^{2}}-\frac {7 \left (-24 \cos \left (d x +c \right ) \left (A +C \cos \left (d x +c \right )^{2}\right ) d^{3} \sin \left (d x +c \right )^{3}-96 \cos \left (d x +c \right )^{3} C \,d^{3} \sin \left (d x +c \right )^{3}+40 \cos \left (d x +c \right )^{3} \left (A +C \cos \left (d x +c \right )^{2}\right ) d^{3} \sin \left (d x +c \right )+56 \cos \left (d x +c \right )^{5} C \,d^{3} \sin \left (d x +c \right )\right )}{288 d^{4}}+\frac {7 x \left (24 d^{4} \sin \left (d x +c \right )^{4} \left (A +C \cos \left (d x +c \right )^{2}\right )+336 C \sin \left (d x +c \right )^{4} \cos \left (d x +c \right )^{2} d^{4}-192 \cos \left (d x +c \right )^{2} \left (A +C \cos \left (d x +c \right )^{2}\right ) d^{4} \sin \left (d x +c \right )^{2}-648 C \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{4} d^{4}+40 \cos \left (d x +c \right )^{4} \left (A +C \cos \left (d x +c \right )^{2}\right ) d^{4}+56 C \cos \left (d x +c \right )^{6} d^{4}\right )}{288 d^{4}}-\frac {480 d^{5} \sin \left (d x +c \right )^{3} \left (A +C \cos \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )-720 d^{5} \sin \left (d x +c \right )^{5} C \cos \left (d x +c \right )+4320 C \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{3} d^{5}-544 \cos \left (d x +c \right )^{3} \left (A +C \cos \left (d x +c \right )^{2}\right ) d^{5} \sin \left (d x +c \right )-1712 C \sin \left (d x +c \right ) \cos \left (d x +c \right )^{5} d^{5}}{2304 d^{6}}+\frac {x \left (3072 d^{6} \sin \left (d x +c \right )^{2} \left (A +C \cos \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )^{2}-17520 d^{6} \sin \left (d x +c \right )^{4} C \cos \left (d x +c \right )^{2}-480 d^{6} \sin \left (d x +c \right )^{4} \left (A +C \cos \left (d x +c \right )^{2}\right )+720 d^{6} \sin \left (d x +c \right )^{6} C +22608 C \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{4} d^{6}-544 \cos \left (d x +c \right )^{4} \left (A +C \cos \left (d x +c \right )^{2}\right ) d^{6}-1712 C \,d^{6} \cos \left (d x +c \right )^{6}\right )}{2304 d^{6}}\) | \(728\) |
Input:
int(cos(d*x+c)^4*(A+C*cos(d*x+c)^2),x,method=_RETURNVERBOSE)
Output:
1/192*((48*A+45*C)*sin(2*d*x+2*c)+(6*A+9*C)*sin(4*d*x+4*c)+sin(6*d*x+6*c)* C+72*x*(A+5/6*C)*d)/d
Time = 0.09 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.76 \[ \int \cos ^4(c+d x) \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (6 \, A + 5 \, C\right )} d x + {\left (8 \, C \cos \left (d x + c\right )^{5} + 2 \, {\left (6 \, A + 5 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (6 \, A + 5 \, C\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{48 \, d} \] Input:
integrate(cos(d*x+c)^4*(A+C*cos(d*x+c)^2),x, algorithm="fricas")
Output:
1/48*(3*(6*A + 5*C)*d*x + (8*C*cos(d*x + c)^5 + 2*(6*A + 5*C)*cos(d*x + c) ^3 + 3*(6*A + 5*C)*cos(d*x + c))*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 258 vs. \(2 (82) = 164\).
Time = 0.53 (sec) , antiderivative size = 258, normalized size of antiderivative = 2.90 \[ \int \cos ^4(c+d x) \left (A+C \cos ^2(c+d x)\right ) \, dx=\begin {cases} \frac {3 A x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 A x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {3 A x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {3 A \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {5 A \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} + \frac {5 C x \sin ^{6}{\left (c + d x \right )}}{16} + \frac {15 C x \sin ^{4}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{16} + \frac {15 C x \sin ^{2}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{16} + \frac {5 C x \cos ^{6}{\left (c + d x \right )}}{16} + \frac {5 C \sin ^{5}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{16 d} + \frac {5 C \sin ^{3}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{6 d} + \frac {11 C \sin {\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{16 d} & \text {for}\: d \neq 0 \\x \left (A + C \cos ^{2}{\left (c \right )}\right ) \cos ^{4}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)**4*(A+C*cos(d*x+c)**2),x)
Output:
Piecewise((3*A*x*sin(c + d*x)**4/8 + 3*A*x*sin(c + d*x)**2*cos(c + d*x)**2 /4 + 3*A*x*cos(c + d*x)**4/8 + 3*A*sin(c + d*x)**3*cos(c + d*x)/(8*d) + 5* A*sin(c + d*x)*cos(c + d*x)**3/(8*d) + 5*C*x*sin(c + d*x)**6/16 + 15*C*x*s in(c + d*x)**4*cos(c + d*x)**2/16 + 15*C*x*sin(c + d*x)**2*cos(c + d*x)**4 /16 + 5*C*x*cos(c + d*x)**6/16 + 5*C*sin(c + d*x)**5*cos(c + d*x)/(16*d) + 5*C*sin(c + d*x)**3*cos(c + d*x)**3/(6*d) + 11*C*sin(c + d*x)*cos(c + d*x )**5/(16*d), Ne(d, 0)), (x*(A + C*cos(c)**2)*cos(c)**4, True))
Time = 0.11 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.16 \[ \int \cos ^4(c+d x) \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (d x + c\right )} {\left (6 \, A + 5 \, C\right )} + \frac {3 \, {\left (6 \, A + 5 \, C\right )} \tan \left (d x + c\right )^{5} + 8 \, {\left (6 \, A + 5 \, C\right )} \tan \left (d x + c\right )^{3} + 3 \, {\left (10 \, A + 11 \, C\right )} \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{6} + 3 \, \tan \left (d x + c\right )^{4} + 3 \, \tan \left (d x + c\right )^{2} + 1}}{48 \, d} \] Input:
integrate(cos(d*x+c)^4*(A+C*cos(d*x+c)^2),x, algorithm="maxima")
Output:
1/48*(3*(d*x + c)*(6*A + 5*C) + (3*(6*A + 5*C)*tan(d*x + c)^5 + 8*(6*A + 5 *C)*tan(d*x + c)^3 + 3*(10*A + 11*C)*tan(d*x + c))/(tan(d*x + c)^6 + 3*tan (d*x + c)^4 + 3*tan(d*x + c)^2 + 1))/d
Time = 0.23 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.76 \[ \int \cos ^4(c+d x) \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {1}{16} \, {\left (6 \, A + 5 \, C\right )} x + \frac {C \sin \left (6 \, d x + 6 \, c\right )}{192 \, d} + \frac {{\left (2 \, A + 3 \, C\right )} \sin \left (4 \, d x + 4 \, c\right )}{64 \, d} + \frac {{\left (16 \, A + 15 \, C\right )} \sin \left (2 \, d x + 2 \, c\right )}{64 \, d} \] Input:
integrate(cos(d*x+c)^4*(A+C*cos(d*x+c)^2),x, algorithm="giac")
Output:
1/16*(6*A + 5*C)*x + 1/192*C*sin(6*d*x + 6*c)/d + 1/64*(2*A + 3*C)*sin(4*d *x + 4*c)/d + 1/64*(16*A + 15*C)*sin(2*d*x + 2*c)/d
Time = 41.68 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.02 \[ \int \cos ^4(c+d x) \left (A+C \cos ^2(c+d x)\right ) \, dx=x\,\left (\frac {3\,A}{8}+\frac {5\,C}{16}\right )+\frac {\left (\frac {3\,A}{8}+\frac {5\,C}{16}\right )\,{\mathrm {tan}\left (c+d\,x\right )}^5+\left (A+\frac {5\,C}{6}\right )\,{\mathrm {tan}\left (c+d\,x\right )}^3+\left (\frac {5\,A}{8}+\frac {11\,C}{16}\right )\,\mathrm {tan}\left (c+d\,x\right )}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^6+3\,{\mathrm {tan}\left (c+d\,x\right )}^4+3\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )} \] Input:
int(cos(c + d*x)^4*(A + C*cos(c + d*x)^2),x)
Output:
x*((3*A)/8 + (5*C)/16) + (tan(c + d*x)*((5*A)/8 + (11*C)/16) + tan(c + d*x )^3*(A + (5*C)/6) + tan(c + d*x)^5*((3*A)/8 + (5*C)/16))/(d*(3*tan(c + d*x )^2 + 3*tan(c + d*x)^4 + tan(c + d*x)^6 + 1))
Time = 0.17 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.09 \[ \int \cos ^4(c+d x) \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {8 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5} c -12 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a -26 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} c +30 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a +33 \cos \left (d x +c \right ) \sin \left (d x +c \right ) c +18 a d x +15 c d x}{48 d} \] Input:
int(cos(d*x+c)^4*(A+C*cos(d*x+c)^2),x)
Output:
(8*cos(c + d*x)*sin(c + d*x)**5*c - 12*cos(c + d*x)*sin(c + d*x)**3*a - 26 *cos(c + d*x)*sin(c + d*x)**3*c + 30*cos(c + d*x)*sin(c + d*x)*a + 33*cos( c + d*x)*sin(c + d*x)*c + 18*a*d*x + 15*c*d*x)/(48*d)