Integrand size = 19, antiderivative size = 65 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x)) \, dx=\frac {3 a x}{8}-\frac {b \cos ^5(c+d x)}{5 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} \] Output:
3/8*a*x-1/5*b*cos(d*x+c)^5/d+3/8*a*cos(d*x+c)*sin(d*x+c)/d+1/4*a*cos(d*x+c )^3*sin(d*x+c)/d
Time = 0.11 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.95 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x)) \, dx=\frac {3 a (c+d x)}{8 d}-\frac {b \cos ^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*Sin[c + d*x]),x]
Output:
(3*a*(c + d*x))/(8*d) - (b*Cos[c + d*x]^5)/(5*d) + (a*Sin[2*(c + d*x)])/(4 *d) + (a*Sin[4*(c + d*x)])/(32*d)
Time = 0.34 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.08, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {3042, 3148, 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) (a+b \sin (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (c+d x)^4 (a+b \sin (c+d x))dx\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle a \int \cos ^4(c+d x)dx-\frac {b \cos ^5(c+d x)}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx-\frac {b \cos ^5(c+d x)}{5 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 \cos ^5(c+d x)}{5 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 \cos ^5(c+d x)}{5 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 \cos ^5(c+d x)}{5 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 \cos ^5(c+d x)}{5 d}\) |
Input:
Int[Cos[c + d*x]^4*(a + b*Sin[c + d*x]),x]
Output:
-1/5*(b*Cos[c + d*x]^5)/d + a*((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)
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[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Simp[a Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
Time = 2.54 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.80
method | result | size |
derivativedivides | \(\frac {-\frac {b \cos \left (d x +c \right )^{5}}{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}\) | \(52\) |
default | \(\frac {-\frac {b \cos \left (d x +c \right )^{5}}{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}\) | \(52\) |
parallelrisch | \(\frac {60 a x d -2 b \cos \left (5 d x +5 c \right )+5 a \sin \left (4 d x +4 c \right )+40 a \sin \left (2 d x +2 c \right )-20 b \cos \left (d x +c \right )-10 b \cos \left (3 d x +3 c \right )-32 b}{160 d}\) | \(72\) |
risch | \(\frac {3 a x}{8}-\frac {b \cos \left (d x +c \right )}{8 d}-\frac {b \cos \left (5 d x +5 c \right )}{80 d}+\frac {a \sin \left (4 d x +4 c \right )}{32 d}-\frac {b \cos \left (3 d x +3 c \right )}{16 d}+\frac {a \sin \left (2 d x +2 c \right )}{4 d}\) | \(78\) |
norman | \(\frac {\frac {3 a x}{8}-\frac {2 b}{5 d}+\frac {5 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 d}-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{2 d}-\frac {5 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{4 d}+\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 {4 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d}-\frac {2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{5}}\) | \(203\) |
orering | \(\text {Expression too large to display}\) | \(1153\) |
Input:
int(cos(d*x+c)^4*(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(-1/5*b*cos(d*x+c)^5+a*(1/4*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3 /8*d*x+3/8*c))
Time = 0.09 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.78 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {8 \, b \cos \left (d x + c\right )^{5} - 15 \, a d x - 5 \, {\left (2 \, a \cos \left (d x + c\right )^{3} + 3 \, a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{40 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+b*sin(d*x+c)),x, algorithm="fricas")
Output:
-1/40*(8*b*cos(d*x + c)^5 - 15*a*d*x - 5*(2*a*cos(d*x + c)^3 + 3*a*cos(d*x + c))*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 124 vs. \(2 (60) = 120\).
Time = 0.25 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.91 \[ \int \cos ^4(c+d x) (a+b \sin (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 {b \cos ^{5}{\left (c + d x \right )}}{5 d} & \text {for}\: d \neq 0 \\x \left (a + b \sin {\left (c \right )}\right ) \cos ^{4}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)**4*(a+b*sin(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) - b*cos(c + d*x)**5/(5*d), Ne(d, 0)), (x*(a + b*sin(c))*cos(c)**4, True))
Time = 0.03 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.74 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {32 \, b \cos \left (d x + c\right )^{5} - 5 \, {\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}{160 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+b*sin(d*x+c)),x, algorithm="maxima")
Output:
-1/160*(32*b*cos(d*x + c)^5 - 5*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin( 2*d*x + 2*c))*a)/d
Time = 0.14 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.18 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x)) \, dx=\frac {3}{8} \, a x - \frac {b \cos \left (5 \, d x + 5 \, c\right )}{80 \, d} - \frac {b \cos \left (3 \, d x + 3 \, c\right )}{16 \, d} - \frac {b \cos \left (d x + c\right )}{8 \, d} + \frac {a \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {a \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+b*sin(d*x+c)),x, algorithm="giac")
Output:
3/8*a*x - 1/80*b*cos(5*d*x + 5*c)/d - 1/16*b*cos(3*d*x + 3*c)/d - 1/8*b*co s(d*x + c)/d + 1/32*a*sin(4*d*x + 4*c)/d + 1/4*a*sin(2*d*x + 2*c)/d
Time = 18.31 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.71 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x)) \, dx=\frac {3\,a\,x}{8}-\frac {\frac {5\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{4}+2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{2}+4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}-\frac {5\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}+\frac {2\,b}{5}}{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*sin(c + d*x)),x)
Output:
(3*a*x)/8 - ((2*b)/5 - (5*a*tan(c/2 + (d*x)/2))/4 - (a*tan(c/2 + (d*x)/2)^ 3)/2 + (a*tan(c/2 + (d*x)/2)^7)/2 + (5*a*tan(c/2 + (d*x)/2)^9)/4 + 4*b*tan (c/2 + (d*x)/2)^4 + 2*b*tan(c/2 + (d*x)/2)^8)/(d*(tan(c/2 + (d*x)/2)^2 + 1 )^5)
Time = 0.18 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.37 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x)) \, dx=\frac {-8 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} b -10 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a +16 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} b +25 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a -8 \cos \left (d x +c \right ) b +15 a d x +8 b}{40 d} \] Input:
int(cos(d*x+c)^4*(a+b*sin(d*x+c)),x)
Output:
( - 8*cos(c + d*x)*sin(c + d*x)**4*b - 10*cos(c + d*x)*sin(c + d*x)**3*a + 16*cos(c + d*x)*sin(c + d*x)**2*b + 25*cos(c + d*x)*sin(c + d*x)*a - 8*co s(c + d*x)*b + 15*a*d*x + 8*b)/(40*d)