Integrand size = 19, antiderivative size = 92 \[ \int \cos ^4(c+d x) (a+b \cos (c+d x)) \, dx=\frac {3 a x}{8}+\frac {b \sin (c+d x)}{d}+\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {2 b \sin ^3(c+d x)}{3 d}+\frac {b \sin ^5(c+d x)}{5 d} \] Output:
3/8*a*x+b*sin(d*x+c)/d+3/8*a*cos(d*x+c)*sin(d*x+c)/d+1/4*a*cos(d*x+c)^3*si n(d*x+c)/d-2/3*b*sin(d*x+c)^3/d+1/5*b*sin(d*x+c)^5/d
Time = 0.13 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.97 \[ \int \cos ^4(c+d x) (a+b \cos (c+d x)) \, dx=\frac {3 a (c+d x)}{8 d}+\frac {b \sin (c+d x)}{d}-\frac {2 b \sin ^3(c+d x)}{3 d}+\frac {b \sin ^5(c+d x)}{5 d}+\frac {a \sin (2 (c+d x))}{4 d}+\frac {a \sin (4 (c+d x))}{32 d} \] Input:
Integrate[Cos[c + d*x]^4*(a + b*Cos[c + d*x]),x]
Output:
(3*a*(c + d*x))/(8*d) + (b*Sin[c + d*x])/d - (2*b*Sin[c + d*x]^3)/(3*d) + (b*Sin[c + d*x]^5)/(5*d) + (a*Sin[2*(c + d*x)])/(4*d) + (a*Sin[4*(c + d*x) ])/(32*d)
Time = 0.39 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.01, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.474, Rules used = {3042, 3227, 3042, 3113, 2009, 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) (a+b \cos (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin \left (c+d x+\frac {\pi }{2}\right )^4 \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle a \int \cos ^4(c+d x)dx+b \int \cos ^5(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx+b \int \sin \left (c+d x+\frac {\pi }{2}\right )^5dx\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle a \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx-\frac {b \int \left (\sin ^4(c+d x)-2 \sin ^2(c+d x)+1\right )d(-\sin (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx-\frac {b \left (-\frac {1}{5} \sin ^5(c+d x)+\frac {2}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle a \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 {b \left (-\frac {1}{5} \sin ^5(c+d x)+\frac {2}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \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 {b \left (-\frac {1}{5} \sin ^5(c+d x)+\frac {2}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle a \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 {b \left (-\frac {1}{5} \sin ^5(c+d x)+\frac {2}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle a \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 {b \left (-\frac {1}{5} \sin ^5(c+d x)+\frac {2}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\) |
Input:
Int[Cos[c + d*x]^4*(a + b*Cos[c + d*x]),x]
Output:
-((b*(-Sin[c + d*x] + (2*Sin[c + d*x]^3)/3 - Sin[c + d*x]^5/5))/d) + a*((C os[c + d*x]^3*Sin[c + d*x])/(4*d) + (3*(x/2 + (Cos[c + d*x]*Sin[c + d*x])/ (2*d)))/4)
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[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Time = 7.59 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.75
method | result | size |
parallelrisch | \(\frac {180 a x d +300 b \sin \left (d x +c \right )+6 b \sin \left (5 d x +5 c \right )+15 a \sin \left (4 d x +4 c \right )+50 b \sin \left (3 d x +3 c \right )+120 a \sin \left (2 d x +2 c \right )}{480 d}\) | \(69\) |
derivativedivides | \(\frac {\frac {b \left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5}+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}\) | \(70\) |
default | \(\frac {\frac {b \left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5}+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}\) | \(70\) |
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 {b \left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5 d}\) | \(72\) |
risch | \(\frac {3 a x}{8}+\frac {5 b \sin \left (d x +c \right )}{8 d}+\frac {b \sin \left (5 d x +5 c \right )}{80 d}+\frac {a \sin \left (4 d x +4 c \right )}{32 d}+\frac {5 b \sin \left (3 d x +3 c \right )}{48 d}+\frac {a \sin \left (2 d x +2 c \right )}{4 d}\) | \(78\) |
norman | \(\frac {\frac {3 a x}{8}+\frac {15 a x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{8}+\frac {15 a x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{4}+\frac {15 a x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{4}+\frac {15 a x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{8}+\frac {3 a x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{8}+\frac {116 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{15 d}-\frac {\left (3 a -16 b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{6 d}+\frac {\left (3 a +16 b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{6 d}-\frac {\left (5 a -8 b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{4 d}+\frac {\left (5 a +8 b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{5}}\) | \(204\) |
orering | \(\text {Expression too large to display}\) | \(1196\) |
Input:
int(cos(d*x+c)^4*(a+cos(d*x+c)*b),x,method=_RETURNVERBOSE)
Output:
1/480*(180*a*x*d+300*b*sin(d*x+c)+6*b*sin(5*d*x+5*c)+15*a*sin(4*d*x+4*c)+5 0*b*sin(3*d*x+3*c)+120*a*sin(2*d*x+2*c))/d
Time = 0.08 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.70 \[ \int \cos ^4(c+d x) (a+b \cos (c+d x)) \, dx=\frac {45 \, a d x + {\left (24 \, b \cos \left (d x + c\right )^{4} + 30 \, a \cos \left (d x + c\right )^{3} + 32 \, b \cos \left (d x + c\right )^{2} + 45 \, a \cos \left (d x + c\right ) + 64 \, b\right )} \sin \left (d x + c\right )}{120 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+b*cos(d*x+c)),x, algorithm="fricas")
Output:
1/120*(45*a*d*x + (24*b*cos(d*x + c)^4 + 30*a*cos(d*x + c)^3 + 32*b*cos(d* x + c)^2 + 45*a*cos(d*x + c) + 64*b)*sin(d*x + c))/d
Time = 0.22 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.83 \[ \int \cos ^4(c+d x) (a+b \cos (c+d x)) \, 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 {8 b \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {4 b \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {b \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a + b \cos {\left (c \right )}\right ) \cos ^{4}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)**4*(a+b*cos(d*x+c)),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) + 8*b*sin(c + d*x)**5/(15*d) + 4*b*si n(c + d*x)**3*cos(c + d*x)**2/(3*d) + b*sin(c + d*x)*cos(c + d*x)**4/d, Ne (d, 0)), (x*(a + b*cos(c))*cos(c)**4, True))
Time = 0.05 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.75 \[ \int \cos ^4(c+d x) (a+b \cos (c+d x)) \, dx=\frac {15 \, {\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 + 32 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} b}{480 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+b*cos(d*x+c)),x, algorithm="maxima")
Output:
1/480*(15*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*a + 32*( 3*sin(d*x + c)^5 - 10*sin(d*x + c)^3 + 15*sin(d*x + c))*b)/d
Time = 0.54 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.84 \[ \int \cos ^4(c+d x) (a+b \cos (c+d x)) \, dx=\frac {3}{8} \, a x + \frac {b \sin \left (5 \, d x + 5 \, c\right )}{80 \, d} + \frac {a \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {5 \, b \sin \left (3 \, d x + 3 \, c\right )}{48 \, d} + \frac {a \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {5 \, b \sin \left (d x + c\right )}{8 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+b*cos(d*x+c)),x, algorithm="giac")
Output:
3/8*a*x + 1/80*b*sin(5*d*x + 5*c)/d + 1/32*a*sin(4*d*x + 4*c)/d + 5/48*b*s in(3*d*x + 3*c)/d + 1/4*a*sin(2*d*x + 2*c)/d + 5/8*b*sin(d*x + c)/d
Time = 43.20 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.25 \[ \int \cos ^4(c+d x) (a+b \cos (c+d x)) \, dx=\frac {3\,a\,x}{8}+\frac {\left (2\,b-\frac {5\,a}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (\frac {8\,b}{3}-\frac {a}{2}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\frac {116\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{15}+\left (\frac {a}{2}+\frac {8\,b}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (\frac {5\,a}{4}+2\,b\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^5} \] Input:
int(cos(c + d*x)^4*(a + b*cos(c + d*x)),x)
Output:
(3*a*x)/8 + (tan(c/2 + (d*x)/2)*((5*a)/4 + 2*b) + tan(c/2 + (d*x)/2)^3*(a/ 2 + (8*b)/3) - tan(c/2 + (d*x)/2)^9*((5*a)/4 - 2*b) - tan(c/2 + (d*x)/2)^7 *(a/2 - (8*b)/3) + (116*b*tan(c/2 + (d*x)/2)^5)/15)/(d*(tan(c/2 + (d*x)/2) ^2 + 1)^5)
Time = 0.16 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.80 \[ \int \cos ^4(c+d x) (a+b \cos (c+d x)) \, dx=\frac {-30 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a +75 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a +24 \sin \left (d x +c \right )^{5} b -80 \sin \left (d x +c \right )^{3} b +120 \sin \left (d x +c \right ) b +45 a d x}{120 d} \] Input:
int(cos(d*x+c)^4*(a+b*cos(d*x+c)),x)
Output:
( - 30*cos(c + d*x)*sin(c + d*x)**3*a + 75*cos(c + d*x)*sin(c + d*x)*a + 2 4*sin(c + d*x)**5*b - 80*sin(c + d*x)**3*b + 120*sin(c + d*x)*b + 45*a*d*x )/(120*d)