Integrand size = 21, antiderivative size = 109 \[ \int \cos ^6(e+f x) \left (a+b \sin ^2(e+f x)\right ) \, dx=\frac {5}{128} (8 a+b) x+\frac {5 (8 a+b) \cos (e+f x) \sin (e+f x)}{128 f}+\frac {5 (8 a+b) \cos ^3(e+f x) \sin (e+f x)}{192 f}+\frac {(8 a+b) \cos ^5(e+f x) \sin (e+f x)}{48 f}-\frac {b \cos ^7(e+f x) \sin (e+f x)}{8 f} \] Output:
5/128*(8*a+b)*x+5/128*(8*a+b)*cos(f*x+e)*sin(f*x+e)/f+5/192*(8*a+b)*cos(f* x+e)^3*sin(f*x+e)/f+1/48*(8*a+b)*cos(f*x+e)^5*sin(f*x+e)/f-1/8*b*cos(f*x+e )^7*sin(f*x+e)/f
Time = 0.40 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.80 \[ \int \cos ^6(e+f x) \left (a+b \sin ^2(e+f x)\right ) \, dx=\frac {960 a e+960 a f x+120 b f x+48 (15 a+b) \sin (2 (e+f x))+24 (6 a-b) \sin (4 (e+f x))+16 a \sin (6 (e+f x))-16 b \sin (6 (e+f x))-3 b \sin (8 (e+f x))}{3072 f} \] Input:
Integrate[Cos[e + f*x]^6*(a + b*Sin[e + f*x]^2),x]
Output:
(960*a*e + 960*a*f*x + 120*b*f*x + 48*(15*a + b)*Sin[2*(e + f*x)] + 24*(6* a - b)*Sin[4*(e + f*x)] + 16*a*Sin[6*(e + f*x)] - 16*b*Sin[6*(e + f*x)] - 3*b*Sin[8*(e + f*x)])/(3072*f)
Time = 0.25 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.15, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3670, 298, 215, 215, 215, 216}
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 ^6(e+f x) \left (a+b \sin ^2(e+f x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (e+f x)^6 \left (a+b \sin (e+f x)^2\right )dx\) |
\(\Big \downarrow \) 3670 |
\(\displaystyle \frac {\int \frac {(a+b) \tan ^2(e+f x)+a}{\left (\tan ^2(e+f x)+1\right )^5}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 298 |
\(\displaystyle \frac {\frac {1}{8} (8 a+b) \int \frac {1}{\left (\tan ^2(e+f x)+1\right )^4}d\tan (e+f x)-\frac {b \tan (e+f x)}{8 \left (\tan ^2(e+f x)+1\right )^4}}{f}\) |
\(\Big \downarrow \) 215 |
\(\displaystyle \frac {\frac {1}{8} (8 a+b) \left (\frac {5}{6} \int \frac {1}{\left (\tan ^2(e+f x)+1\right )^3}d\tan (e+f x)+\frac {\tan (e+f x)}{6 \left (\tan ^2(e+f x)+1\right )^3}\right )-\frac {b \tan (e+f x)}{8 \left (\tan ^2(e+f x)+1\right )^4}}{f}\) |
\(\Big \downarrow \) 215 |
\(\displaystyle \frac {\frac {1}{8} (8 a+b) \left (\frac {5}{6} \left (\frac {3}{4} \int \frac {1}{\left (\tan ^2(e+f x)+1\right )^2}d\tan (e+f x)+\frac {\tan (e+f x)}{4 \left (\tan ^2(e+f x)+1\right )^2}\right )+\frac {\tan (e+f x)}{6 \left (\tan ^2(e+f x)+1\right )^3}\right )-\frac {b \tan (e+f x)}{8 \left (\tan ^2(e+f x)+1\right )^4}}{f}\) |
\(\Big \downarrow \) 215 |
\(\displaystyle \frac {\frac {1}{8} (8 a+b) \left (\frac {5}{6} \left (\frac {3}{4} \left (\frac {1}{2} \int \frac {1}{\tan ^2(e+f x)+1}d\tan (e+f x)+\frac {\tan (e+f x)}{2 \left (\tan ^2(e+f x)+1\right )}\right )+\frac {\tan (e+f x)}{4 \left (\tan ^2(e+f x)+1\right )^2}\right )+\frac {\tan (e+f x)}{6 \left (\tan ^2(e+f x)+1\right )^3}\right )-\frac {b \tan (e+f x)}{8 \left (\tan ^2(e+f x)+1\right )^4}}{f}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\frac {1}{8} (8 a+b) \left (\frac {5}{6} \left (\frac {3}{4} \left (\frac {1}{2} \arctan (\tan (e+f x))+\frac {\tan (e+f x)}{2 \left (\tan ^2(e+f x)+1\right )}\right )+\frac {\tan (e+f x)}{4 \left (\tan ^2(e+f x)+1\right )^2}\right )+\frac {\tan (e+f x)}{6 \left (\tan ^2(e+f x)+1\right )^3}\right )-\frac {b \tan (e+f x)}{8 \left (\tan ^2(e+f x)+1\right )^4}}{f}\) |
Input:
Int[Cos[e + f*x]^6*(a + b*Sin[e + f*x]^2),x]
Output:
(-1/8*(b*Tan[e + f*x])/(1 + Tan[e + f*x]^2)^4 + ((8*a + b)*(Tan[e + f*x]/( 6*(1 + Tan[e + f*x]^2)^3) + (5*(Tan[e + f*x]/(4*(1 + Tan[e + f*x]^2)^2) + (3*(ArcTan[Tan[e + f*x]]/2 + Tan[e + f*x]/(2*(1 + Tan[e + f*x]^2))))/4))/6 ))/8)/f
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^2)^(p + 1) /(2*a*(p + 1))), x] + Simp[(2*p + 3)/(2*a*(p + 1)) Int[(a + b*x^2)^(p + 1 ), x], x] /; FreeQ[{a, b}, x] && LtQ[p, -1] && (IntegerQ[4*p] || IntegerQ[6 *p])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[(-( b*c - a*d))*x*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] - Simp[(a*d - b*c*( 2*p + 3))/(2*a*b*(p + 1)) Int[(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/2 + p, 0])
Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^( p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f Su bst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]
Time = 6.93 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.72
method | result | size |
parallelrisch | \(\frac {48 \left (15 a +b \right ) \sin \left (2 f x +2 e \right )+24 \left (6 a -b \right ) \sin \left (4 f x +4 e \right )+16 \left (a -b \right ) \sin \left (6 f x +6 e \right )-3 b \sin \left (8 f x +8 e \right )+960 f x \left (a +\frac {b}{8}\right )}{3072 f}\) | \(78\) |
derivativedivides | \(\frac {b \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )^{7}}{8}+\frac {\left (\cos \left (f x +e \right )^{5}+\frac {5 \cos \left (f x +e \right )^{3}}{4}+\frac {15 \cos \left (f x +e \right )}{8}\right ) \sin \left (f x +e \right )}{48}+\frac {5 f x}{128}+\frac {5 e}{128}\right )+a \left (\frac {\left (\cos \left (f x +e \right )^{5}+\frac {5 \cos \left (f x +e \right )^{3}}{4}+\frac {15 \cos \left (f x +e \right )}{8}\right ) \sin \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )}{f}\) | \(112\) |
default | \(\frac {b \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )^{7}}{8}+\frac {\left (\cos \left (f x +e \right )^{5}+\frac {5 \cos \left (f x +e \right )^{3}}{4}+\frac {15 \cos \left (f x +e \right )}{8}\right ) \sin \left (f x +e \right )}{48}+\frac {5 f x}{128}+\frac {5 e}{128}\right )+a \left (\frac {\left (\cos \left (f x +e \right )^{5}+\frac {5 \cos \left (f x +e \right )^{3}}{4}+\frac {15 \cos \left (f x +e \right )}{8}\right ) \sin \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )}{f}\) | \(112\) |
risch | \(\frac {5 a x}{16}+\frac {5 b x}{128}-\frac {b \sin \left (8 f x +8 e \right )}{1024 f}+\frac {\sin \left (6 f x +6 e \right ) a}{192 f}-\frac {\sin \left (6 f x +6 e \right ) b}{192 f}+\frac {3 \sin \left (4 f x +4 e \right ) a}{64 f}-\frac {\sin \left (4 f x +4 e \right ) b}{128 f}+\frac {15 \sin \left (2 f x +2 e \right ) a}{64 f}+\frac {\sin \left (2 f x +2 e \right ) b}{64 f}\) | \(115\) |
norman | \(\frac {\left (\frac {5 a}{16}+\frac {5 b}{128}\right ) x +\left (\frac {5 a}{2}+\frac {5 b}{16}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+\left (\frac {5 a}{2}+\frac {5 b}{16}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{14}+\left (\frac {5 a}{16}+\frac {5 b}{128}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{16}+\left (\frac {35 a}{2}+\frac {35 b}{16}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}+\left (\frac {35 a}{2}+\frac {35 b}{16}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{10}+\left (\frac {35 a}{4}+\frac {35 b}{32}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}+\left (\frac {35 a}{4}+\frac {35 b}{32}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{12}+\left (\frac {175 a}{8}+\frac {175 b}{64}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}+\frac {\left (88 a -5 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{64 f}-\frac {\left (88 a -5 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{15}}{64 f}+\frac {5 \left (136 a +353 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{192 f}-\frac {5 \left (136 a +353 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{9}}{192 f}+\frac {\left (488 a +397 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{192 f}-\frac {\left (488 a +397 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{13}}{192 f}+\frac {\left (904 a -895 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{192 f}-\frac {\left (904 a -895 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{11}}{192 f}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{8}}\) | \(369\) |
orering | \(\text {Expression too large to display}\) | \(1216\) |
Input:
int(cos(f*x+e)^6*(a+b*sin(f*x+e)^2),x,method=_RETURNVERBOSE)
Output:
1/3072*(48*(15*a+b)*sin(2*f*x+2*e)+24*(6*a-b)*sin(4*f*x+4*e)+16*(a-b)*sin( 6*f*x+6*e)-3*b*sin(8*f*x+8*e)+960*f*x*(a+1/8*b))/f
Time = 0.10 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.72 \[ \int \cos ^6(e+f x) \left (a+b \sin ^2(e+f x)\right ) \, dx=\frac {15 \, {\left (8 \, a + b\right )} f x - {\left (48 \, b \cos \left (f x + e\right )^{7} - 8 \, {\left (8 \, a + b\right )} \cos \left (f x + e\right )^{5} - 10 \, {\left (8 \, a + b\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left (8 \, a + b\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{384 \, f} \] Input:
integrate(cos(f*x+e)^6*(a+b*sin(f*x+e)^2),x, algorithm="fricas")
Output:
1/384*(15*(8*a + b)*f*x - (48*b*cos(f*x + e)^7 - 8*(8*a + b)*cos(f*x + e)^ 5 - 10*(8*a + b)*cos(f*x + e)^3 - 15*(8*a + b)*cos(f*x + e))*sin(f*x + e)) /f
Leaf count of result is larger than twice the leaf count of optimal. 354 vs. \(2 (107) = 214\).
Time = 0.70 (sec) , antiderivative size = 354, normalized size of antiderivative = 3.25 \[ \int \cos ^6(e+f x) \left (a+b \sin ^2(e+f x)\right ) \, dx=\begin {cases} \frac {5 a x \sin ^{6}{\left (e + f x \right )}}{16} + \frac {15 a x \sin ^{4}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{16} + \frac {15 a x \sin ^{2}{\left (e + f x \right )} \cos ^{4}{\left (e + f x \right )}}{16} + \frac {5 a x \cos ^{6}{\left (e + f x \right )}}{16} + \frac {5 a \sin ^{5}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{16 f} + \frac {5 a \sin ^{3}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{6 f} + \frac {11 a \sin {\left (e + f x \right )} \cos ^{5}{\left (e + f x \right )}}{16 f} + \frac {5 b x \sin ^{8}{\left (e + f x \right )}}{128} + \frac {5 b x \sin ^{6}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{32} + \frac {15 b x \sin ^{4}{\left (e + f x \right )} \cos ^{4}{\left (e + f x \right )}}{64} + \frac {5 b x \sin ^{2}{\left (e + f x \right )} \cos ^{6}{\left (e + f x \right )}}{32} + \frac {5 b x \cos ^{8}{\left (e + f x \right )}}{128} + \frac {5 b \sin ^{7}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{128 f} + \frac {55 b \sin ^{5}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{384 f} + \frac {73 b \sin ^{3}{\left (e + f x \right )} \cos ^{5}{\left (e + f x \right )}}{384 f} - \frac {5 b \sin {\left (e + f x \right )} \cos ^{7}{\left (e + f x \right )}}{128 f} & \text {for}\: f \neq 0 \\x \left (a + b \sin ^{2}{\left (e \right )}\right ) \cos ^{6}{\left (e \right )} & \text {otherwise} \end {cases} \] Input:
integrate(cos(f*x+e)**6*(a+b*sin(f*x+e)**2),x)
Output:
Piecewise((5*a*x*sin(e + f*x)**6/16 + 15*a*x*sin(e + f*x)**4*cos(e + f*x)* *2/16 + 15*a*x*sin(e + f*x)**2*cos(e + f*x)**4/16 + 5*a*x*cos(e + f*x)**6/ 16 + 5*a*sin(e + f*x)**5*cos(e + f*x)/(16*f) + 5*a*sin(e + f*x)**3*cos(e + f*x)**3/(6*f) + 11*a*sin(e + f*x)*cos(e + f*x)**5/(16*f) + 5*b*x*sin(e + f*x)**8/128 + 5*b*x*sin(e + f*x)**6*cos(e + f*x)**2/32 + 15*b*x*sin(e + f* x)**4*cos(e + f*x)**4/64 + 5*b*x*sin(e + f*x)**2*cos(e + f*x)**6/32 + 5*b* x*cos(e + f*x)**8/128 + 5*b*sin(e + f*x)**7*cos(e + f*x)/(128*f) + 55*b*si n(e + f*x)**5*cos(e + f*x)**3/(384*f) + 73*b*sin(e + f*x)**3*cos(e + f*x)* *5/(384*f) - 5*b*sin(e + f*x)*cos(e + f*x)**7/(128*f), Ne(f, 0)), (x*(a + b*sin(e)**2)*cos(e)**6, True))
Time = 0.12 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.12 \[ \int \cos ^6(e+f x) \left (a+b \sin ^2(e+f x)\right ) \, dx=\frac {15 \, {\left (f x + e\right )} {\left (8 \, a + b\right )} + \frac {15 \, {\left (8 \, a + b\right )} \tan \left (f x + e\right )^{7} + 55 \, {\left (8 \, a + b\right )} \tan \left (f x + e\right )^{5} + 73 \, {\left (8 \, a + b\right )} \tan \left (f x + e\right )^{3} + 3 \, {\left (88 \, a - 5 \, b\right )} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{8} + 4 \, \tan \left (f x + e\right )^{6} + 6 \, \tan \left (f x + e\right )^{4} + 4 \, \tan \left (f x + e\right )^{2} + 1}}{384 \, f} \] Input:
integrate(cos(f*x+e)^6*(a+b*sin(f*x+e)^2),x, algorithm="maxima")
Output:
1/384*(15*(f*x + e)*(8*a + b) + (15*(8*a + b)*tan(f*x + e)^7 + 55*(8*a + b )*tan(f*x + e)^5 + 73*(8*a + b)*tan(f*x + e)^3 + 3*(88*a - 5*b)*tan(f*x + e))/(tan(f*x + e)^8 + 4*tan(f*x + e)^6 + 6*tan(f*x + e)^4 + 4*tan(f*x + e) ^2 + 1))/f
Time = 0.44 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.76 \[ \int \cos ^6(e+f x) \left (a+b \sin ^2(e+f x)\right ) \, dx=\frac {5}{128} \, {\left (8 \, a + b\right )} x - \frac {b \sin \left (8 \, f x + 8 \, e\right )}{1024 \, f} + \frac {{\left (a - b\right )} \sin \left (6 \, f x + 6 \, e\right )}{192 \, f} + \frac {{\left (6 \, a - b\right )} \sin \left (4 \, f x + 4 \, e\right )}{128 \, f} + \frac {{\left (15 \, a + b\right )} \sin \left (2 \, f x + 2 \, e\right )}{64 \, f} \] Input:
integrate(cos(f*x+e)^6*(a+b*sin(f*x+e)^2),x, algorithm="giac")
Output:
5/128*(8*a + b)*x - 1/1024*b*sin(8*f*x + 8*e)/f + 1/192*(a - b)*sin(6*f*x + 6*e)/f + 1/128*(6*a - b)*sin(4*f*x + 4*e)/f + 1/64*(15*a + b)*sin(2*f*x + 2*e)/f
Time = 37.62 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.09 \[ \int \cos ^6(e+f x) \left (a+b \sin ^2(e+f x)\right ) \, dx=x\,\left (\frac {5\,a}{16}+\frac {5\,b}{128}\right )+\frac {\left (\frac {5\,a}{16}+\frac {5\,b}{128}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^7+\left (\frac {55\,a}{48}+\frac {55\,b}{384}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^5+\left (\frac {73\,a}{48}+\frac {73\,b}{384}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^3+\left (\frac {11\,a}{16}-\frac {5\,b}{128}\right )\,\mathrm {tan}\left (e+f\,x\right )}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^8+4\,{\mathrm {tan}\left (e+f\,x\right )}^6+6\,{\mathrm {tan}\left (e+f\,x\right )}^4+4\,{\mathrm {tan}\left (e+f\,x\right )}^2+1\right )} \] Input:
int(cos(e + f*x)^6*(a + b*sin(e + f*x)^2),x)
Output:
x*((5*a)/16 + (5*b)/128) + (tan(e + f*x)^7*((5*a)/16 + (5*b)/128) + tan(e + f*x)^5*((55*a)/48 + (55*b)/384) + tan(e + f*x)^3*((73*a)/48 + (73*b)/384 ) + tan(e + f*x)*((11*a)/16 - (5*b)/128))/(f*(4*tan(e + f*x)^2 + 6*tan(e + f*x)^4 + 4*tan(e + f*x)^6 + tan(e + f*x)^8 + 1))
Time = 0.17 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.20 \[ \int \cos ^6(e+f x) \left (a+b \sin ^2(e+f x)\right ) \, dx=\frac {48 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{7} b +64 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{5} a -136 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{5} b -208 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} a +118 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} b +264 \cos \left (f x +e \right ) \sin \left (f x +e \right ) a -15 \cos \left (f x +e \right ) \sin \left (f x +e \right ) b +120 a f x +15 b f x}{384 f} \] Input:
int(cos(f*x+e)^6*(a+b*sin(f*x+e)^2),x)
Output:
(48*cos(e + f*x)*sin(e + f*x)**7*b + 64*cos(e + f*x)*sin(e + f*x)**5*a - 1 36*cos(e + f*x)*sin(e + f*x)**5*b - 208*cos(e + f*x)*sin(e + f*x)**3*a + 1 18*cos(e + f*x)*sin(e + f*x)**3*b + 264*cos(e + f*x)*sin(e + f*x)*a - 15*c os(e + f*x)*sin(e + f*x)*b + 120*a*f*x + 15*b*f*x)/(384*f)