Integrand size = 23, antiderivative size = 141 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \sin ^6(e+f x) \, dx=\frac {5}{16} \left (a^2-12 a b+8 b^2\right ) x-\frac {\left (11 a^2-36 a b+8 b^2\right ) \cos (e+f x) \sin (e+f x)}{16 f}+\frac {a (13 a-12 b) \cos ^3(e+f x) \sin (e+f x)}{24 f}-\frac {a^2 \cos ^5(e+f x) \sin (e+f x)}{6 f}+\frac {2 (a-b) b \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \] Output:
5/16*(a^2-12*a*b+8*b^2)*x-1/16*(11*a^2-36*a*b+8*b^2)*cos(f*x+e)*sin(f*x+e) /f+1/24*a*(13*a-12*b)*cos(f*x+e)^3*sin(f*x+e)/f-1/6*a^2*cos(f*x+e)^5*sin(f *x+e)/f+2*(a-b)*b*tan(f*x+e)/f+1/3*b^2*tan(f*x+e)^3/f
Leaf count is larger than twice the leaf count of optimal. \(499\) vs. \(2(141)=282\).
Time = 1.77 (sec) , antiderivative size = 499, normalized size of antiderivative = 3.54 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \sin ^6(e+f x) \, dx=\frac {\left (b+a \cos ^2(e+f x)\right )^2 \sec (e) \sec ^3(e+f x) \left (360 \left (a^2-12 a b+8 b^2\right ) f x \cos (f x)+360 \left (a^2-12 a b+8 b^2\right ) f x \cos (2 e+f x)+120 a^2 f x \cos (2 e+3 f x)-1440 a b f x \cos (2 e+3 f x)+960 b^2 f x \cos (2 e+3 f x)+120 a^2 f x \cos (4 e+3 f x)-1440 a b f x \cos (4 e+3 f x)+960 b^2 f x \cos (4 e+3 f x)-81 a^2 \sin (f x)+3444 a b \sin (f x)-3168 b^2 \sin (f x)-81 a^2 \sin (2 e+f x)-1164 a b \sin (2 e+f x)+2208 b^2 \sin (2 e+f x)-109 a^2 \sin (2 e+3 f x)+2076 a b \sin (2 e+3 f x)-1936 b^2 \sin (2 e+3 f x)-109 a^2 \sin (4 e+3 f x)+540 a b \sin (4 e+3 f x)-144 b^2 \sin (4 e+3 f x)-21 a^2 \sin (4 e+5 f x)+156 a b \sin (4 e+5 f x)-48 b^2 \sin (4 e+5 f x)-21 a^2 \sin (6 e+5 f x)+156 a b \sin (6 e+5 f x)-48 b^2 \sin (6 e+5 f x)+6 a^2 \sin (6 e+7 f x)-12 a b \sin (6 e+7 f x)+6 a^2 \sin (8 e+7 f x)-12 a b \sin (8 e+7 f x)-a^2 \sin (8 e+9 f x)-a^2 \sin (10 e+9 f x)\right )}{768 f (a+2 b+a \cos (2 (e+f x)))^2} \] Input:
Integrate[(a + b*Sec[e + f*x]^2)^2*Sin[e + f*x]^6,x]
Output:
((b + a*Cos[e + f*x]^2)^2*Sec[e]*Sec[e + f*x]^3*(360*(a^2 - 12*a*b + 8*b^2 )*f*x*Cos[f*x] + 360*(a^2 - 12*a*b + 8*b^2)*f*x*Cos[2*e + f*x] + 120*a^2*f *x*Cos[2*e + 3*f*x] - 1440*a*b*f*x*Cos[2*e + 3*f*x] + 960*b^2*f*x*Cos[2*e + 3*f*x] + 120*a^2*f*x*Cos[4*e + 3*f*x] - 1440*a*b*f*x*Cos[4*e + 3*f*x] + 960*b^2*f*x*Cos[4*e + 3*f*x] - 81*a^2*Sin[f*x] + 3444*a*b*Sin[f*x] - 3168* b^2*Sin[f*x] - 81*a^2*Sin[2*e + f*x] - 1164*a*b*Sin[2*e + f*x] + 2208*b^2* Sin[2*e + f*x] - 109*a^2*Sin[2*e + 3*f*x] + 2076*a*b*Sin[2*e + 3*f*x] - 19 36*b^2*Sin[2*e + 3*f*x] - 109*a^2*Sin[4*e + 3*f*x] + 540*a*b*Sin[4*e + 3*f *x] - 144*b^2*Sin[4*e + 3*f*x] - 21*a^2*Sin[4*e + 5*f*x] + 156*a*b*Sin[4*e + 5*f*x] - 48*b^2*Sin[4*e + 5*f*x] - 21*a^2*Sin[6*e + 5*f*x] + 156*a*b*Si n[6*e + 5*f*x] - 48*b^2*Sin[6*e + 5*f*x] + 6*a^2*Sin[6*e + 7*f*x] - 12*a*b *Sin[6*e + 7*f*x] + 6*a^2*Sin[8*e + 7*f*x] - 12*a*b*Sin[8*e + 7*f*x] - a^2 *Sin[8*e + 9*f*x] - a^2*Sin[10*e + 9*f*x]))/(768*f*(a + 2*b + a*Cos[2*(e + f*x)])^2)
Time = 0.48 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.19, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {3042, 4620, 366, 360, 25, 2345, 1467, 2009}
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 \sin ^6(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (e+f x)^6 \left (a+b \sec (e+f x)^2\right )^2dx\) |
\(\Big \downarrow \) 4620 |
\(\displaystyle \frac {\int \frac {\tan ^6(e+f x) \left (b \tan ^2(e+f x)+a+b\right )^2}{\left (\tan ^2(e+f x)+1\right )^4}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 366 |
\(\displaystyle \frac {\frac {a^2 \tan ^7(e+f x)}{6 \left (\tan ^2(e+f x)+1\right )^3}-\frac {1}{6} \int \frac {\tan ^6(e+f x) \left (7 a^2-6 (a+b)^2-6 b^2 \tan ^2(e+f x)\right )}{\left (\tan ^2(e+f x)+1\right )^3}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 360 |
\(\displaystyle \frac {\frac {1}{6} \left (\frac {1}{4} \int -\frac {-24 b^2 \tan ^6(e+f x)+4 a (a-12 b) \tan ^4(e+f x)-4 a (a-12 b) \tan ^2(e+f x)+a (a-12 b)}{\left (\tan ^2(e+f x)+1\right )^2}d\tan (e+f x)+\frac {a (a-12 b) \tan (e+f x)}{4 \left (\tan ^2(e+f x)+1\right )^2}\right )+\frac {a^2 \tan ^7(e+f x)}{6 \left (\tan ^2(e+f x)+1\right )^3}}{f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {1}{6} \left (\frac {a (a-12 b) \tan (e+f x)}{4 \left (\tan ^2(e+f x)+1\right )^2}-\frac {1}{4} \int \frac {-24 b^2 \tan ^6(e+f x)+4 a (a-12 b) \tan ^4(e+f x)-4 a (a-12 b) \tan ^2(e+f x)+a (a-12 b)}{\left (\tan ^2(e+f x)+1\right )^2}d\tan (e+f x)\right )+\frac {a^2 \tan ^7(e+f x)}{6 \left (\tan ^2(e+f x)+1\right )^3}}{f}\) |
\(\Big \downarrow \) 2345 |
\(\displaystyle \frac {\frac {1}{6} \left (\frac {1}{4} \left (\frac {1}{2} \int \frac {48 b^2 \tan ^4(e+f x)-8 \left (a^2-12 b a+6 b^2\right ) \tan ^2(e+f x)+7 a^2+24 b^2-84 a b}{\tan ^2(e+f x)+1}d\tan (e+f x)-\frac {3 \left (3 a^2-36 a b+8 b^2\right ) \tan (e+f x)}{2 \left (\tan ^2(e+f x)+1\right )}\right )+\frac {a (a-12 b) \tan (e+f x)}{4 \left (\tan ^2(e+f x)+1\right )^2}\right )+\frac {a^2 \tan ^7(e+f x)}{6 \left (\tan ^2(e+f x)+1\right )^3}}{f}\) |
\(\Big \downarrow \) 1467 |
\(\displaystyle \frac {\frac {1}{6} \left (\frac {1}{4} \left (\frac {1}{2} \int \left (48 b^2 \tan ^2(e+f x)-8 \left (a^2-12 b a+12 b^2\right )+\frac {15 \left (a^2-12 b a+8 b^2\right )}{\tan ^2(e+f x)+1}\right )d\tan (e+f x)-\frac {3 \left (3 a^2-36 a b+8 b^2\right ) \tan (e+f x)}{2 \left (\tan ^2(e+f x)+1\right )}\right )+\frac {a (a-12 b) \tan (e+f x)}{4 \left (\tan ^2(e+f x)+1\right )^2}\right )+\frac {a^2 \tan ^7(e+f x)}{6 \left (\tan ^2(e+f x)+1\right )^3}}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{6} \left (\frac {1}{4} \left (\frac {1}{2} \left (15 \left (a^2-12 a b+8 b^2\right ) \arctan (\tan (e+f x))-8 \left (a^2-12 a b+12 b^2\right ) \tan (e+f x)+16 b^2 \tan ^3(e+f x)\right )-\frac {3 \left (3 a^2-36 a b+8 b^2\right ) \tan (e+f x)}{2 \left (\tan ^2(e+f x)+1\right )}\right )+\frac {a (a-12 b) \tan (e+f x)}{4 \left (\tan ^2(e+f x)+1\right )^2}\right )+\frac {a^2 \tan ^7(e+f x)}{6 \left (\tan ^2(e+f x)+1\right )^3}}{f}\) |
Input:
Int[(a + b*Sec[e + f*x]^2)^2*Sin[e + f*x]^6,x]
Output:
((a^2*Tan[e + f*x]^7)/(6*(1 + Tan[e + f*x]^2)^3) + ((a*(a - 12*b)*Tan[e + f*x])/(4*(1 + Tan[e + f*x]^2)^2) + ((-3*(3*a^2 - 36*a*b + 8*b^2)*Tan[e + f *x])/(2*(1 + Tan[e + f*x]^2)) + (15*(a^2 - 12*a*b + 8*b^2)*ArcTan[Tan[e + f*x]] - 8*(a^2 - 12*a*b + 12*b^2)*Tan[e + f*x] + 16*b^2*Tan[e + f*x]^3)/2) /4)/6)/f
Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] : > Simp[(-a)^(m/2 - 1)*(b*c - a*d)*x*((a + b*x^2)^(p + 1)/(2*b^(m/2 + 1)*(p + 1))), x] + Simp[1/(2*b^(m/2 + 1)*(p + 1)) Int[(a + b*x^2)^(p + 1)*Expan dToSum[2*b*(p + 1)*x^2*Together[(b^(m/2)*x^(m - 2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d))/(a + b*x^2)] - (-a)^(m/2 - 1)*(b*c - a*d), x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && IGtQ[m/2, 0] & & (IntegerQ[p] || EqQ[m + 2*p + 1, 0])
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^2, x_Symbol] :> Simp[(-(b*c - a*d)^2)*(e*x)^(m + 1)*((a + b*x^2)^(p + 1)/(2*a* b^2*e*(p + 1))), x] + Simp[1/(2*a*b^2*(p + 1)) Int[(e*x)^m*(a + b*x^2)^(p + 1)*Simp[(b*c - a*d)^2*(m + 1) + 2*b^2*c^2*(p + 1) + 2*a*b*d^2*(p + 1)*x^ 2, x], x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && LtQ[p , -1]
Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]
Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuot ient[Pq, a + b*x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*g - b *f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Simp[1/(2*a*(p + 1)) In t[(a + b*x^2)^(p + 1)*ExpandToSum[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_ )]^(m_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff^(m + 1)/f Subst[Int[x^m*(ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p/(1 + f f^2*x^2)^(m/2 + 1)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && IntegerQ[n/2]
Time = 1.77 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.17
method | result | size |
parallelrisch | \(-\frac {109 \left (-\frac {120 f x \left (a^{2}-12 a b +8 b^{2}\right ) \cos \left (3 f x +3 e \right )}{109}+\left (a^{2}-12 a b +\frac {1040}{109} b^{2}\right ) \sin \left (3 f x +3 e \right )+\frac {3 \left (7 a^{2}-52 a b +16 b^{2}\right ) \sin \left (5 f x +5 e \right )}{109}-\frac {6 a \left (a -2 b \right ) \sin \left (7 f x +7 e \right )}{109}+\frac {a^{2} \sin \left (9 f x +9 e \right )}{109}-\frac {360 f x \left (a^{2}-12 a b +8 b^{2}\right ) \cos \left (f x +e \right )}{109}+\frac {81 \sin \left (f x +e \right ) \left (a^{2}-\frac {380}{27} a b +\frac {160}{27} b^{2}\right )}{109}\right ) \sec \left (f x +e \right )^{3}}{1536 f}\) | \(165\) |
derivativedivides | \(\frac {a^{2} \left (-\frac {\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )+2 a b \left (\frac {\sin \left (f x +e \right )^{7}}{\cos \left (f x +e \right )}+\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )-\frac {15 f x}{8}-\frac {15 e}{8}\right )+b^{2} \left (\frac {\sin \left (f x +e \right )^{7}}{3 \cos \left (f x +e \right )^{3}}-\frac {4 \sin \left (f x +e \right )^{7}}{3 \cos \left (f x +e \right )}-\frac {4 \left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{3}+\frac {5 f x}{2}+\frac {5 e}{2}\right )}{f}\) | \(199\) |
default | \(\frac {a^{2} \left (-\frac {\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )+2 a b \left (\frac {\sin \left (f x +e \right )^{7}}{\cos \left (f x +e \right )}+\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )-\frac {15 f x}{8}-\frac {15 e}{8}\right )+b^{2} \left (\frac {\sin \left (f x +e \right )^{7}}{3 \cos \left (f x +e \right )^{3}}-\frac {4 \sin \left (f x +e \right )^{7}}{3 \cos \left (f x +e \right )}-\frac {4 \left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{3}+\frac {5 f x}{2}+\frac {5 e}{2}\right )}{f}\) | \(199\) |
parts | \(\frac {a^{2} \left (-\frac {\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )}{f}+\frac {b^{2} \left (\frac {\sin \left (f x +e \right )^{7}}{3 \cos \left (f x +e \right )^{3}}-\frac {4 \sin \left (f x +e \right )^{7}}{3 \cos \left (f x +e \right )}-\frac {4 \left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{3}+\frac {5 f x}{2}+\frac {5 e}{2}\right )}{f}+\frac {2 a b \left (\frac {\sin \left (f x +e \right )^{7}}{\cos \left (f x +e \right )}+\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )-\frac {15 f x}{8}-\frac {15 e}{8}\right )}{f}\) | \(204\) |
risch | \(\frac {5 a^{2} x}{16}-\frac {15 x a b}{4}+\frac {5 x \,b^{2}}{2}-\frac {3 i {\mathrm e}^{4 i \left (f x +e \right )} a^{2}}{128 f}+\frac {i {\mathrm e}^{4 i \left (f x +e \right )} a b}{32 f}+\frac {15 i {\mathrm e}^{2 i \left (f x +e \right )} a^{2}}{128 f}-\frac {i {\mathrm e}^{2 i \left (f x +e \right )} a b}{2 f}+\frac {i {\mathrm e}^{2 i \left (f x +e \right )} b^{2}}{8 f}-\frac {15 i {\mathrm e}^{-2 i \left (f x +e \right )} a^{2}}{128 f}+\frac {i {\mathrm e}^{-2 i \left (f x +e \right )} a b}{2 f}-\frac {i {\mathrm e}^{-2 i \left (f x +e \right )} b^{2}}{8 f}+\frac {3 i {\mathrm e}^{-4 i \left (f x +e \right )} a^{2}}{128 f}-\frac {i {\mathrm e}^{-4 i \left (f x +e \right )} a b}{32 f}-\frac {2 i b \left (-6 a \,{\mathrm e}^{4 i \left (f x +e \right )}+9 b \,{\mathrm e}^{4 i \left (f x +e \right )}-12 a \,{\mathrm e}^{2 i \left (f x +e \right )}+12 b \,{\mathrm e}^{2 i \left (f x +e \right )}-6 a +7 b \right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{3}}-\frac {a^{2} \sin \left (6 f x +6 e \right )}{192 f}\) | \(287\) |
Input:
int((a+b*sec(f*x+e)^2)^2*sin(f*x+e)^6,x,method=_RETURNVERBOSE)
Output:
-109/1536*(-120/109*f*x*(a^2-12*a*b+8*b^2)*cos(3*f*x+3*e)+(a^2-12*a*b+1040 /109*b^2)*sin(3*f*x+3*e)+3/109*(7*a^2-52*a*b+16*b^2)*sin(5*f*x+5*e)-6/109* a*(a-2*b)*sin(7*f*x+7*e)+1/109*a^2*sin(9*f*x+9*e)-360/109*f*x*(a^2-12*a*b+ 8*b^2)*cos(f*x+e)+81/109*sin(f*x+e)*(a^2-380/27*a*b+160/27*b^2))*sec(f*x+e )^3/f
Time = 0.09 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.93 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \sin ^6(e+f x) \, dx=\frac {15 \, {\left (a^{2} - 12 \, a b + 8 \, b^{2}\right )} f x \cos \left (f x + e\right )^{3} - {\left (8 \, a^{2} \cos \left (f x + e\right )^{8} - 2 \, {\left (13 \, a^{2} - 12 \, a b\right )} \cos \left (f x + e\right )^{6} + 3 \, {\left (11 \, a^{2} - 36 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 16 \, {\left (6 \, a b - 7 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - 16 \, b^{2}\right )} \sin \left (f x + e\right )}{48 \, f \cos \left (f x + e\right )^{3}} \] Input:
integrate((a+b*sec(f*x+e)^2)^2*sin(f*x+e)^6,x, algorithm="fricas")
Output:
1/48*(15*(a^2 - 12*a*b + 8*b^2)*f*x*cos(f*x + e)^3 - (8*a^2*cos(f*x + e)^8 - 2*(13*a^2 - 12*a*b)*cos(f*x + e)^6 + 3*(11*a^2 - 36*a*b + 8*b^2)*cos(f* x + e)^4 - 16*(6*a*b - 7*b^2)*cos(f*x + e)^2 - 16*b^2)*sin(f*x + e))/(f*co s(f*x + e)^3)
Timed out. \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \sin ^6(e+f x) \, dx=\text {Timed out} \] Input:
integrate((a+b*sec(f*x+e)**2)**2*sin(f*x+e)**6,x)
Output:
Timed out
Time = 0.11 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.16 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \sin ^6(e+f x) \, dx=\frac {16 \, b^{2} \tan \left (f x + e\right )^{3} + 15 \, {\left (a^{2} - 12 \, a b + 8 \, b^{2}\right )} {\left (f x + e\right )} + 96 \, {\left (a b - b^{2}\right )} \tan \left (f x + e\right ) - \frac {3 \, {\left (11 \, a^{2} - 36 \, a b + 8 \, b^{2}\right )} \tan \left (f x + e\right )^{5} + 8 \, {\left (5 \, a^{2} - 24 \, a b + 6 \, b^{2}\right )} \tan \left (f x + e\right )^{3} + 3 \, {\left (5 \, a^{2} - 28 \, a b + 8 \, b^{2}\right )} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{6} + 3 \, \tan \left (f x + e\right )^{4} + 3 \, \tan \left (f x + e\right )^{2} + 1}}{48 \, f} \] Input:
integrate((a+b*sec(f*x+e)^2)^2*sin(f*x+e)^6,x, algorithm="maxima")
Output:
1/48*(16*b^2*tan(f*x + e)^3 + 15*(a^2 - 12*a*b + 8*b^2)*(f*x + e) + 96*(a* b - b^2)*tan(f*x + e) - (3*(11*a^2 - 36*a*b + 8*b^2)*tan(f*x + e)^5 + 8*(5 *a^2 - 24*a*b + 6*b^2)*tan(f*x + e)^3 + 3*(5*a^2 - 28*a*b + 8*b^2)*tan(f*x + e))/(tan(f*x + e)^6 + 3*tan(f*x + e)^4 + 3*tan(f*x + e)^2 + 1))/f
Time = 0.29 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.30 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \sin ^6(e+f x) \, dx=\frac {16 \, b^{2} \tan \left (f x + e\right )^{3} + 96 \, a b \tan \left (f x + e\right ) - 96 \, b^{2} \tan \left (f x + e\right ) + 15 \, {\left (a^{2} - 12 \, a b + 8 \, b^{2}\right )} {\left (f x + e\right )} - \frac {33 \, a^{2} \tan \left (f x + e\right )^{5} - 108 \, a b \tan \left (f x + e\right )^{5} + 24 \, b^{2} \tan \left (f x + e\right )^{5} + 40 \, a^{2} \tan \left (f x + e\right )^{3} - 192 \, a b \tan \left (f x + e\right )^{3} + 48 \, b^{2} \tan \left (f x + e\right )^{3} + 15 \, a^{2} \tan \left (f x + e\right ) - 84 \, a b \tan \left (f x + e\right ) + 24 \, b^{2} \tan \left (f x + e\right )}{{\left (\tan \left (f x + e\right )^{2} + 1\right )}^{3}}}{48 \, f} \] Input:
integrate((a+b*sec(f*x+e)^2)^2*sin(f*x+e)^6,x, algorithm="giac")
Output:
1/48*(16*b^2*tan(f*x + e)^3 + 96*a*b*tan(f*x + e) - 96*b^2*tan(f*x + e) + 15*(a^2 - 12*a*b + 8*b^2)*(f*x + e) - (33*a^2*tan(f*x + e)^5 - 108*a*b*tan (f*x + e)^5 + 24*b^2*tan(f*x + e)^5 + 40*a^2*tan(f*x + e)^3 - 192*a*b*tan( f*x + e)^3 + 48*b^2*tan(f*x + e)^3 + 15*a^2*tan(f*x + e) - 84*a*b*tan(f*x + e) + 24*b^2*tan(f*x + e))/(tan(f*x + e)^2 + 1)^3)/f
Time = 12.94 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.16 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \sin ^6(e+f x) \, dx=x\,\left (\frac {5\,a^2}{16}-\frac {15\,a\,b}{4}+\frac {5\,b^2}{2}\right )-\frac {\left (\frac {11\,a^2}{16}-\frac {9\,a\,b}{4}+\frac {b^2}{2}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^5+\left (\frac {5\,a^2}{6}-4\,a\,b+b^2\right )\,{\mathrm {tan}\left (e+f\,x\right )}^3+\left (\frac {5\,a^2}{16}-\frac {7\,a\,b}{4}+\frac {b^2}{2}\right )\,\mathrm {tan}\left (e+f\,x\right )}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^6+3\,{\mathrm {tan}\left (e+f\,x\right )}^4+3\,{\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}+\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^3}{3\,f}-\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (4\,b^2-2\,b\,\left (a+b\right )\right )}{f} \] Input:
int(sin(e + f*x)^6*(a + b/cos(e + f*x)^2)^2,x)
Output:
x*((5*a^2)/16 - (15*a*b)/4 + (5*b^2)/2) - (tan(e + f*x)*((5*a^2)/16 - (7*a *b)/4 + b^2/2) + tan(e + f*x)^3*((5*a^2)/6 - 4*a*b + b^2) + tan(e + f*x)^5 *((11*a^2)/16 - (9*a*b)/4 + b^2/2))/(f*(3*tan(e + f*x)^2 + 3*tan(e + f*x)^ 4 + tan(e + f*x)^6 + 1)) + (b^2*tan(e + f*x)^3)/(3*f) - (tan(e + f*x)*(4*b ^2 - 2*b*(a + b)))/f
Time = 0.18 (sec) , antiderivative size = 353, normalized size of antiderivative = 2.50 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \sin ^6(e+f x) \, dx=\frac {-8 \cos \left (f x +e \right )^{2} \sin \left (f x +e \right )^{7} a^{2}-2 \cos \left (f x +e \right )^{2} \sin \left (f x +e \right )^{5} a^{2}-5 \cos \left (f x +e \right )^{2} \sin \left (f x +e \right )^{3} a^{2}+15 \cos \left (f x +e \right )^{2} \sin \left (f x +e \right ) a^{2}+15 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} a^{2} f x -180 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} a b e -180 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} a b f x +120 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} b^{2} e +120 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} b^{2} f x -15 \cos \left (f x +e \right ) a^{2} f x +180 \cos \left (f x +e \right ) a b e +180 \cos \left (f x +e \right ) a b f x -120 \cos \left (f x +e \right ) b^{2} e -120 \cos \left (f x +e \right ) b^{2} f x -24 \sin \left (f x +e \right )^{7} a b -36 \sin \left (f x +e \right )^{5} a b +24 \sin \left (f x +e \right )^{5} b^{2}+240 \sin \left (f x +e \right )^{3} a b -160 \sin \left (f x +e \right )^{3} b^{2}-180 \sin \left (f x +e \right ) a b +120 \sin \left (f x +e \right ) b^{2}}{48 \cos \left (f x +e \right ) f \left (\sin \left (f x +e \right )^{2}-1\right )} \] Input:
int((a+b*sec(f*x+e)^2)^2*sin(f*x+e)^6,x)
Output:
( - 8*cos(e + f*x)**2*sin(e + f*x)**7*a**2 - 2*cos(e + f*x)**2*sin(e + f*x )**5*a**2 - 5*cos(e + f*x)**2*sin(e + f*x)**3*a**2 + 15*cos(e + f*x)**2*si n(e + f*x)*a**2 + 15*cos(e + f*x)*sin(e + f*x)**2*a**2*f*x - 180*cos(e + f *x)*sin(e + f*x)**2*a*b*e - 180*cos(e + f*x)*sin(e + f*x)**2*a*b*f*x + 120 *cos(e + f*x)*sin(e + f*x)**2*b**2*e + 120*cos(e + f*x)*sin(e + f*x)**2*b* *2*f*x - 15*cos(e + f*x)*a**2*f*x + 180*cos(e + f*x)*a*b*e + 180*cos(e + f *x)*a*b*f*x - 120*cos(e + f*x)*b**2*e - 120*cos(e + f*x)*b**2*f*x - 24*sin (e + f*x)**7*a*b - 36*sin(e + f*x)**5*a*b + 24*sin(e + f*x)**5*b**2 + 240* sin(e + f*x)**3*a*b - 160*sin(e + f*x)**3*b**2 - 180*sin(e + f*x)*a*b + 12 0*sin(e + f*x)*b**2)/(48*cos(e + f*x)*f*(sin(e + f*x)**2 - 1))