\(\int \frac {\sin ^4(e+f x)}{(a+b \sec ^2(e+f x))^3} \, dx\) [61]

Optimal result
Mathematica [C] (warning: unable to verify)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F(-1)]
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 238 \[ \int \frac {\sin ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {3 \left (a^2+12 a b+16 b^2\right ) x}{8 a^5}-\frac {3 \sqrt {b} \left (5 a^2+20 a b+16 b^2\right ) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{8 a^5 \sqrt {a+b} f}-\frac {(5 a+8 b) \cos (e+f x) \sin (e+f x)}{8 a^2 f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac {b (7 a+12 b) \tan (e+f x)}{8 a^3 f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac {3 b (a+2 b) \tan (e+f x)}{2 a^4 f \left (a+b+b \tan ^2(e+f x)\right )} \] Output:

3/8*(a^2+12*a*b+16*b^2)*x/a^5-3/8*b^(1/2)*(5*a^2+20*a*b+16*b^2)*arctan(b^( 
1/2)*tan(f*x+e)/(a+b)^(1/2))/a^5/(a+b)^(1/2)/f-1/8*(5*a+8*b)*cos(f*x+e)*si 
n(f*x+e)/a^2/f/(a+b+b*tan(f*x+e)^2)^2+1/4*cos(f*x+e)^3*sin(f*x+e)/a/f/(a+b 
+b*tan(f*x+e)^2)^2-1/8*b*(7*a+12*b)*tan(f*x+e)/a^3/f/(a+b+b*tan(f*x+e)^2)^ 
2-3/2*b*(a+2*b)*tan(f*x+e)/a^4/f/(a+b+b*tan(f*x+e)^2)
 

Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

Time = 20.02 (sec) , antiderivative size = 2469, normalized size of antiderivative = 10.37 \[ \int \frac {\sin ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\text {Result too large to show} \] Input:

Integrate[Sin[e + f*x]^4/(a + b*Sec[e + f*x]^2)^3,x]
 

Output:

(3*(a + 2*b + a*Cos[2*e + 2*f*x])^3*Sec[e + f*x]^6*(((3*a^2 + 8*a*b + 8*b^ 
2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(a + b)^(5/2) - (a*Sqrt[b]* 
(3*a^2 + 16*a*b + 16*b^2 + 3*a*(a + 2*b)*Cos[2*(e + f*x)])*Sin[2*(e + f*x) 
])/((a + b)^2*(a + 2*b + a*Cos[2*(e + f*x)])^2)))/(16384*b^(5/2)*f*(a + b* 
Sec[e + f*x]^2)^3) + ((a + 2*b + a*Cos[2*e + 2*f*x])^3*Sec[e + f*x]^6*((-3 
*a*(a + 2*b)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(a + b)^(5/2) + ( 
Sqrt[b]*(3*a^3 + 14*a^2*b + 24*a*b^2 + 16*b^3 + a*(3*a^2 + 4*a*b + 4*b^2)* 
Cos[2*(e + f*x)])*Sin[2*(e + f*x)])/((a + b)^2*(a + 2*b + a*Cos[2*(e + f*x 
)])^2)))/(16384*b^(5/2)*f*(a + b*Sec[e + f*x]^2)^3) - (3*(a + 2*b + a*Cos[ 
2*e + 2*f*x])^3*Sec[e + f*x]^6*((2*(3*a^5 - 10*a^4*b + 80*a^3*b^2 + 480*a^ 
2*b^3 + 640*a*b^4 + 256*b^5)*ArcTan[(Sec[f*x]*(Cos[2*e] - I*Sin[2*e])*(-(( 
a + 2*b)*Sin[f*x]) + a*Sin[2*e + f*x]))/(2*Sqrt[a + b]*Sqrt[b*(Cos[e] - I* 
Sin[e])^4])]*(Cos[2*e] - I*Sin[2*e]))/(Sqrt[a + b]*Sqrt[b*(Cos[e] - I*Sin[ 
e])^4]) + (Sec[2*e]*(256*b^2*(a + b)^2*(3*a^2 + 8*a*b + 8*b^2)*f*x*Cos[2*e 
] + 512*a*b^2*(a + b)^2*(a + 2*b)*f*x*Cos[2*f*x] + 128*a^4*b^2*f*x*Cos[2*( 
e + 2*f*x)] + 256*a^3*b^3*f*x*Cos[2*(e + 2*f*x)] + 128*a^2*b^4*f*x*Cos[2*( 
e + 2*f*x)] + 512*a^4*b^2*f*x*Cos[4*e + 2*f*x] + 2048*a^3*b^3*f*x*Cos[4*e 
+ 2*f*x] + 2560*a^2*b^4*f*x*Cos[4*e + 2*f*x] + 1024*a*b^5*f*x*Cos[4*e + 2* 
f*x] + 128*a^4*b^2*f*x*Cos[6*e + 4*f*x] + 256*a^3*b^3*f*x*Cos[6*e + 4*f*x] 
 + 128*a^2*b^4*f*x*Cos[6*e + 4*f*x] - 9*a^6*Sin[2*e] + 12*a^5*b*Sin[2*e...
 

Rubi [A] (verified)

Time = 0.48 (sec) , antiderivative size = 261, normalized size of antiderivative = 1.10, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.478, Rules used = {3042, 4620, 372, 402, 402, 27, 402, 27, 397, 216, 218}

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 \frac {\sin ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sin (e+f x)^4}{\left (a+b \sec (e+f x)^2\right )^3}dx\)

\(\Big \downarrow \) 4620

\(\displaystyle \frac {\int \frac {\tan ^4(e+f x)}{\left (\tan ^2(e+f x)+1\right )^3 \left (b \tan ^2(e+f x)+a+b\right )^3}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 372

\(\displaystyle \frac {\frac {\tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\int \frac {-\left ((4 a+7 b) \tan ^2(e+f x)\right )+a+b}{\left (\tan ^2(e+f x)+1\right )^2 \left (b \tan ^2(e+f x)+a+b\right )^3}d\tan (e+f x)}{4 a}}{f}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\frac {\tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {(5 a+8 b) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\int \frac {(a+b) (3 a+8 b)-5 b (5 a+8 b) \tan ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )^3}d\tan (e+f x)}{2 a}}{4 a}}{f}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\frac {\tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {(5 a+8 b) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {\int \frac {12 (a+b) \left ((a+b) (a+4 b)-b (7 a+12 b) \tan ^2(e+f x)\right )}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )^2}d\tan (e+f x)}{4 a (a+b)}-\frac {b (7 a+12 b) \tan (e+f x)}{a \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}}{4 a}}{f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {\tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {(5 a+8 b) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {3 \int \frac {(a+b) (a+4 b)-b (7 a+12 b) \tan ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )^2}d\tan (e+f x)}{a}-\frac {b (7 a+12 b) \tan (e+f x)}{a \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}}{4 a}}{f}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\frac {\tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {(5 a+8 b) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {3 \left (\frac {\int \frac {2 (a+b) \left (a^2+8 b a+8 b^2-4 b (a+2 b) \tan ^2(e+f x)\right )}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )}d\tan (e+f x)}{2 a (a+b)}-\frac {4 b (a+2 b) \tan (e+f x)}{a \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a}-\frac {b (7 a+12 b) \tan (e+f x)}{a \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}}{4 a}}{f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {\tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {(5 a+8 b) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {3 \left (\frac {\int \frac {a^2+8 b a+8 b^2-4 b (a+2 b) \tan ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )}d\tan (e+f x)}{a}-\frac {4 b (a+2 b) \tan (e+f x)}{a \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a}-\frac {b (7 a+12 b) \tan (e+f x)}{a \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}}{4 a}}{f}\)

\(\Big \downarrow \) 397

\(\displaystyle \frac {\frac {\tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {(5 a+8 b) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {3 \left (\frac {\frac {\left (a^2+12 a b+16 b^2\right ) \int \frac {1}{\tan ^2(e+f x)+1}d\tan (e+f x)}{a}-\frac {b \left (5 a^2+20 a b+16 b^2\right ) \int \frac {1}{b \tan ^2(e+f x)+a+b}d\tan (e+f x)}{a}}{a}-\frac {4 b (a+2 b) \tan (e+f x)}{a \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a}-\frac {b (7 a+12 b) \tan (e+f x)}{a \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}}{4 a}}{f}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {\frac {\tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {(5 a+8 b) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {3 \left (\frac {\frac {\left (a^2+12 a b+16 b^2\right ) \arctan (\tan (e+f x))}{a}-\frac {b \left (5 a^2+20 a b+16 b^2\right ) \int \frac {1}{b \tan ^2(e+f x)+a+b}d\tan (e+f x)}{a}}{a}-\frac {4 b (a+2 b) \tan (e+f x)}{a \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a}-\frac {b (7 a+12 b) \tan (e+f x)}{a \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}}{4 a}}{f}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {\frac {\tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {(5 a+8 b) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\frac {3 \left (\frac {\frac {\left (a^2+12 a b+16 b^2\right ) \arctan (\tan (e+f x))}{a}-\frac {\sqrt {b} \left (5 a^2+20 a b+16 b^2\right ) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}}}{a}-\frac {4 b (a+2 b) \tan (e+f x)}{a \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a}-\frac {b (7 a+12 b) \tan (e+f x)}{a \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}}{4 a}}{f}\)

Input:

Int[Sin[e + f*x]^4/(a + b*Sec[e + f*x]^2)^3,x]
 

Output:

(Tan[e + f*x]/(4*a*(1 + Tan[e + f*x]^2)^2*(a + b + b*Tan[e + f*x]^2)^2) - 
(((5*a + 8*b)*Tan[e + f*x])/(2*a*(1 + Tan[e + f*x]^2)*(a + b + b*Tan[e + f 
*x]^2)^2) - (-((b*(7*a + 12*b)*Tan[e + f*x])/(a*(a + b + b*Tan[e + f*x]^2) 
^2)) + (3*((((a^2 + 12*a*b + 16*b^2)*ArcTan[Tan[e + f*x]])/a - (Sqrt[b]*(5 
*a^2 + 20*a*b + 16*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(a*Sqr 
t[a + b]))/a - (4*b*(a + 2*b)*Tan[e + f*x])/(a*(a + b + b*Tan[e + f*x]^2)) 
))/a)/(2*a))/(4*a))/f
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 216
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])
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 372
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ 
), x_Symbol] :> Simp[(-a)*e^3*(e*x)^(m - 3)*(a + b*x^2)^(p + 1)*((c + d*x^2 
)^(q + 1)/(2*b*(b*c - a*d)*(p + 1))), x] + Simp[e^4/(2*b*(b*c - a*d)*(p + 1 
))   Int[(e*x)^(m - 4)*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[a*c*(m - 3) + 
 (a*d*(m + 2*q - 1) + 2*b*c*(p + 1))*x^2, x], x], x] /; FreeQ[{a, b, c, d, 
e, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && GtQ[m, 3] && IntBinomialQ[a 
, b, c, d, e, m, 2, p, q, x]
 

rule 397
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ 
Symbol] :> Simp[(b*e - a*f)/(b*c - a*d)   Int[1/(a + b*x^2), x], x] - Simp[ 
(d*e - c*f)/(b*c - a*d)   Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e 
, f}, x]
 

rule 402
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_.)*((e_) + (f_.)*(x 
_)^2), x_Symbol] :> Simp[(-(b*e - a*f))*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^ 
(q + 1)/(a*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) 
 Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(b*e - a*f) + e*2*(b*c - a*d) 
*(p + 1) + d*(b*e - a*f)*(2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b 
, c, d, e, f, q}, x] && LtQ[p, -1]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4620
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]
 
Maple [A] (verified)

Time = 4.61 (sec) , antiderivative size = 193, normalized size of antiderivative = 0.81

method result size
derivativedivides \(\frac {-\frac {b \left (\frac {\left (\frac {7}{8} a^{2} b +\frac {3}{2} a \,b^{2}\right ) \tan \left (f x +e \right )^{3}+\frac {3 a \left (3 a^{2}+7 a b +4 b^{2}\right ) \tan \left (f x +e \right )}{8}}{\left (a +b +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {3 \left (5 a^{2}+20 a b +16 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{8 \sqrt {\left (a +b \right ) b}}\right )}{a^{5}}+\frac {\frac {\left (-\frac {3}{2} a b -\frac {5}{8} a^{2}\right ) \tan \left (f x +e \right )^{3}+\left (-\frac {3}{8} a^{2}-\frac {3}{2} a b \right ) \tan \left (f x +e \right )}{\left (1+\tan \left (f x +e \right )^{2}\right )^{2}}+\frac {3 \left (a^{2}+12 a b +16 b^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{8}}{a^{5}}}{f}\) \(193\)
default \(\frac {-\frac {b \left (\frac {\left (\frac {7}{8} a^{2} b +\frac {3}{2} a \,b^{2}\right ) \tan \left (f x +e \right )^{3}+\frac {3 a \left (3 a^{2}+7 a b +4 b^{2}\right ) \tan \left (f x +e \right )}{8}}{\left (a +b +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {3 \left (5 a^{2}+20 a b +16 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{8 \sqrt {\left (a +b \right ) b}}\right )}{a^{5}}+\frac {\frac {\left (-\frac {3}{2} a b -\frac {5}{8} a^{2}\right ) \tan \left (f x +e \right )^{3}+\left (-\frac {3}{8} a^{2}-\frac {3}{2} a b \right ) \tan \left (f x +e \right )}{\left (1+\tan \left (f x +e \right )^{2}\right )^{2}}+\frac {3 \left (a^{2}+12 a b +16 b^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{8}}{a^{5}}}{f}\) \(193\)
risch \(\frac {3 x}{8 a^{3}}+\frac {9 x b}{2 a^{4}}+\frac {6 x \,b^{2}}{a^{5}}+\frac {i {\mathrm e}^{-4 i \left (f x +e \right )}}{64 a^{3} f}-\frac {i {\mathrm e}^{4 i \left (f x +e \right )}}{64 a^{3} f}-\frac {i {\mathrm e}^{-2 i \left (f x +e \right )}}{8 a^{3} f}+\frac {i {\mathrm e}^{2 i \left (f x +e \right )}}{8 a^{3} f}-\frac {i b \left (9 a^{3} {\mathrm e}^{6 i \left (f x +e \right )}+36 a^{2} b \,{\mathrm e}^{6 i \left (f x +e \right )}+32 a \,b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+27 a^{3} {\mathrm e}^{4 i \left (f x +e \right )}+114 a^{2} b \,{\mathrm e}^{4 i \left (f x +e \right )}+184 a \,b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+112 b^{3} {\mathrm e}^{4 i \left (f x +e \right )}+27 a^{3} {\mathrm e}^{2 i \left (f x +e \right )}+92 \,{\mathrm e}^{2 i \left (f x +e \right )} a^{2} b +80 \,{\mathrm e}^{2 i \left (f x +e \right )} a \,b^{2}+9 a^{3}+14 a^{2} b \right )}{4 a^{5} f \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )^{2}}+\frac {3 i {\mathrm e}^{2 i \left (f x +e \right )} b}{8 a^{4} f}-\frac {3 i {\mathrm e}^{-2 i \left (f x +e \right )} b}{8 a^{4} f}+\frac {15 \sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{16 \left (a +b \right ) f \,a^{3}}+\frac {15 \sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right ) b}{4 \left (a +b \right ) f \,a^{4}}+\frac {3 \sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right ) b^{2}}{\left (a +b \right ) f \,a^{5}}-\frac {15 \sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{16 \left (a +b \right ) f \,a^{3}}-\frac {15 \sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right ) b}{4 \left (a +b \right ) f \,a^{4}}-\frac {3 \sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right ) b^{2}}{\left (a +b \right ) f \,a^{5}}\) \(670\)

Input:

int(sin(f*x+e)^4/(a+b*sec(f*x+e)^2)^3,x,method=_RETURNVERBOSE)
 

Output:

1/f*(-b/a^5*(((7/8*a^2*b+3/2*a*b^2)*tan(f*x+e)^3+3/8*a*(3*a^2+7*a*b+4*b^2) 
*tan(f*x+e))/(a+b+b*tan(f*x+e)^2)^2+3/8*(5*a^2+20*a*b+16*b^2)/((a+b)*b)^(1 
/2)*arctan(b*tan(f*x+e)/((a+b)*b)^(1/2)))+1/a^5*(((-3/2*a*b-5/8*a^2)*tan(f 
*x+e)^3+(-3/8*a^2-3/2*a*b)*tan(f*x+e))/(1+tan(f*x+e)^2)^2+3/8*(a^2+12*a*b+ 
16*b^2)*arctan(tan(f*x+e))))
 

Fricas [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 803, normalized size of antiderivative = 3.37 \[ \int \frac {\sin ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx =\text {Too large to display} \] Input:

integrate(sin(f*x+e)^4/(a+b*sec(f*x+e)^2)^3,x, algorithm="fricas")
 

Output:

[1/32*(12*(a^4 + 12*a^3*b + 16*a^2*b^2)*f*x*cos(f*x + e)^4 + 24*(a^3*b + 1 
2*a^2*b^2 + 16*a*b^3)*f*x*cos(f*x + e)^2 + 12*(a^2*b^2 + 12*a*b^3 + 16*b^4 
)*f*x + 3*((5*a^4 + 20*a^3*b + 16*a^2*b^2)*cos(f*x + e)^4 + 5*a^2*b^2 + 20 
*a*b^3 + 16*b^4 + 2*(5*a^3*b + 20*a^2*b^2 + 16*a*b^3)*cos(f*x + e)^2)*sqrt 
(-b/(a + b))*log(((a^2 + 8*a*b + 8*b^2)*cos(f*x + e)^4 - 2*(3*a*b + 4*b^2) 
*cos(f*x + e)^2 + 4*((a^2 + 3*a*b + 2*b^2)*cos(f*x + e)^3 - (a*b + b^2)*co 
s(f*x + e))*sqrt(-b/(a + b))*sin(f*x + e) + b^2)/(a^2*cos(f*x + e)^4 + 2*a 
*b*cos(f*x + e)^2 + b^2)) + 4*(2*a^4*cos(f*x + e)^7 - (5*a^4 + 8*a^3*b)*co 
s(f*x + e)^5 - (19*a^3*b + 36*a^2*b^2)*cos(f*x + e)^3 - 12*(a^2*b^2 + 2*a* 
b^3)*cos(f*x + e))*sin(f*x + e))/(a^7*f*cos(f*x + e)^4 + 2*a^6*b*f*cos(f*x 
 + e)^2 + a^5*b^2*f), 1/16*(6*(a^4 + 12*a^3*b + 16*a^2*b^2)*f*x*cos(f*x + 
e)^4 + 12*(a^3*b + 12*a^2*b^2 + 16*a*b^3)*f*x*cos(f*x + e)^2 + 6*(a^2*b^2 
+ 12*a*b^3 + 16*b^4)*f*x + 3*((5*a^4 + 20*a^3*b + 16*a^2*b^2)*cos(f*x + e) 
^4 + 5*a^2*b^2 + 20*a*b^3 + 16*b^4 + 2*(5*a^3*b + 20*a^2*b^2 + 16*a*b^3)*c 
os(f*x + e)^2)*sqrt(b/(a + b))*arctan(1/2*((a + 2*b)*cos(f*x + e)^2 - b)*s 
qrt(b/(a + b))/(b*cos(f*x + e)*sin(f*x + e))) + 2*(2*a^4*cos(f*x + e)^7 - 
(5*a^4 + 8*a^3*b)*cos(f*x + e)^5 - (19*a^3*b + 36*a^2*b^2)*cos(f*x + e)^3 
- 12*(a^2*b^2 + 2*a*b^3)*cos(f*x + e))*sin(f*x + e))/(a^7*f*cos(f*x + e)^4 
 + 2*a^6*b*f*cos(f*x + e)^2 + a^5*b^2*f)]
 

Sympy [F(-1)]

Timed out. \[ \int \frac {\sin ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\text {Timed out} \] Input:

integrate(sin(f*x+e)**4/(a+b*sec(f*x+e)**2)**3,x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 299, normalized size of antiderivative = 1.26 \[ \int \frac {\sin ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {\frac {12 \, {\left (a b^{2} + 2 \, b^{3}\right )} \tan \left (f x + e\right )^{7} + {\left (19 \, a^{2} b + 72 \, a b^{2} + 72 \, b^{3}\right )} \tan \left (f x + e\right )^{5} + {\left (5 \, a^{3} + 46 \, a^{2} b + 108 \, a b^{2} + 72 \, b^{3}\right )} \tan \left (f x + e\right )^{3} + 3 \, {\left (a^{3} + 9 \, a^{2} b + 16 \, a b^{2} + 8 \, b^{3}\right )} \tan \left (f x + e\right )}{a^{4} b^{2} \tan \left (f x + e\right )^{8} + 2 \, {\left (a^{5} b + 2 \, a^{4} b^{2}\right )} \tan \left (f x + e\right )^{6} + a^{6} + 2 \, a^{5} b + a^{4} b^{2} + {\left (a^{6} + 6 \, a^{5} b + 6 \, a^{4} b^{2}\right )} \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{6} + 3 \, a^{5} b + 2 \, a^{4} b^{2}\right )} \tan \left (f x + e\right )^{2}} - \frac {3 \, {\left (a^{2} + 12 \, a b + 16 \, b^{2}\right )} {\left (f x + e\right )}}{a^{5}} + \frac {3 \, {\left (5 \, a^{2} b + 20 \, a b^{2} + 16 \, b^{3}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{\sqrt {{\left (a + b\right )} b} a^{5}}}{8 \, f} \] Input:

integrate(sin(f*x+e)^4/(a+b*sec(f*x+e)^2)^3,x, algorithm="maxima")
 

Output:

-1/8*((12*(a*b^2 + 2*b^3)*tan(f*x + e)^7 + (19*a^2*b + 72*a*b^2 + 72*b^3)* 
tan(f*x + e)^5 + (5*a^3 + 46*a^2*b + 108*a*b^2 + 72*b^3)*tan(f*x + e)^3 + 
3*(a^3 + 9*a^2*b + 16*a*b^2 + 8*b^3)*tan(f*x + e))/(a^4*b^2*tan(f*x + e)^8 
 + 2*(a^5*b + 2*a^4*b^2)*tan(f*x + e)^6 + a^6 + 2*a^5*b + a^4*b^2 + (a^6 + 
 6*a^5*b + 6*a^4*b^2)*tan(f*x + e)^4 + 2*(a^6 + 3*a^5*b + 2*a^4*b^2)*tan(f 
*x + e)^2) - 3*(a^2 + 12*a*b + 16*b^2)*(f*x + e)/a^5 + 3*(5*a^2*b + 20*a*b 
^2 + 16*b^3)*arctan(b*tan(f*x + e)/sqrt((a + b)*b))/(sqrt((a + b)*b)*a^5)) 
/f
 

Giac [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 306, normalized size of antiderivative = 1.29 \[ \int \frac {\sin ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {\frac {3 \, {\left (a^{2} + 12 \, a b + 16 \, b^{2}\right )} {\left (f x + e\right )}}{a^{5}} - \frac {3 \, {\left (5 \, a^{2} b + 20 \, a b^{2} + 16 \, b^{3}\right )} {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b + b^{2}}}\right )\right )}}{\sqrt {a b + b^{2}} a^{5}} - \frac {12 \, a b^{2} \tan \left (f x + e\right )^{7} + 24 \, b^{3} \tan \left (f x + e\right )^{7} + 19 \, a^{2} b \tan \left (f x + e\right )^{5} + 72 \, a b^{2} \tan \left (f x + e\right )^{5} + 72 \, b^{3} \tan \left (f x + e\right )^{5} + 5 \, a^{3} \tan \left (f x + e\right )^{3} + 46 \, a^{2} b \tan \left (f x + e\right )^{3} + 108 \, a b^{2} \tan \left (f x + e\right )^{3} + 72 \, b^{3} \tan \left (f x + e\right )^{3} + 3 \, a^{3} \tan \left (f x + e\right ) + 27 \, a^{2} b \tan \left (f x + e\right ) + 48 \, a b^{2} \tan \left (f x + e\right ) + 24 \, b^{3} \tan \left (f x + e\right )}{{\left (b \tan \left (f x + e\right )^{4} + a \tan \left (f x + e\right )^{2} + 2 \, b \tan \left (f x + e\right )^{2} + a + b\right )}^{2} a^{4}}}{8 \, f} \] Input:

integrate(sin(f*x+e)^4/(a+b*sec(f*x+e)^2)^3,x, algorithm="giac")
 

Output:

1/8*(3*(a^2 + 12*a*b + 16*b^2)*(f*x + e)/a^5 - 3*(5*a^2*b + 20*a*b^2 + 16* 
b^3)*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*b 
 + b^2)))/(sqrt(a*b + b^2)*a^5) - (12*a*b^2*tan(f*x + e)^7 + 24*b^3*tan(f* 
x + e)^7 + 19*a^2*b*tan(f*x + e)^5 + 72*a*b^2*tan(f*x + e)^5 + 72*b^3*tan( 
f*x + e)^5 + 5*a^3*tan(f*x + e)^3 + 46*a^2*b*tan(f*x + e)^3 + 108*a*b^2*ta 
n(f*x + e)^3 + 72*b^3*tan(f*x + e)^3 + 3*a^3*tan(f*x + e) + 27*a^2*b*tan(f 
*x + e) + 48*a*b^2*tan(f*x + e) + 24*b^3*tan(f*x + e))/((b*tan(f*x + e)^4 
+ a*tan(f*x + e)^2 + 2*b*tan(f*x + e)^2 + a + b)^2*a^4))/f
 

Mupad [B] (verification not implemented)

Time = 15.05 (sec) , antiderivative size = 1317, normalized size of antiderivative = 5.53 \[ \int \frac {\sin ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\text {Too large to display} \] Input:

int(sin(e + f*x)^4/(a + b/cos(e + f*x)^2)^3,x)
 

Output:

(atan(((((tan(e + f*x)*(4608*a*b^6 + 2304*b^7 + 3312*a^2*b^5 + 1008*a^3*b^ 
4 + 117*a^4*b^3))/(16*a^8) - (3*((12*a^10*b^4 + 12*a^11*b^3 + (3*a^12*b^2) 
/2)/a^12 - (3*tan(e + f*x)*(256*a^10*b^3 + 128*a^11*b^2)*(-b*(a + b))^(1/2 
)*(20*a*b + 5*a^2 + 16*b^2))/(256*a^8*(a^5*b + a^6)))*(-b*(a + b))^(1/2)*( 
20*a*b + 5*a^2 + 16*b^2))/(16*(a^5*b + a^6)))*(-b*(a + b))^(1/2)*(20*a*b + 
 5*a^2 + 16*b^2)*3i)/(16*(a^5*b + a^6)) + (((tan(e + f*x)*(4608*a*b^6 + 23 
04*b^7 + 3312*a^2*b^5 + 1008*a^3*b^4 + 117*a^4*b^3))/(16*a^8) + (3*((12*a^ 
10*b^4 + 12*a^11*b^3 + (3*a^12*b^2)/2)/a^12 + (3*tan(e + f*x)*(256*a^10*b^ 
3 + 128*a^11*b^2)*(-b*(a + b))^(1/2)*(20*a*b + 5*a^2 + 16*b^2))/(256*a^8*( 
a^5*b + a^6)))*(-b*(a + b))^(1/2)*(20*a*b + 5*a^2 + 16*b^2))/(16*(a^5*b + 
a^6)))*(-b*(a + b))^(1/2)*(20*a*b + 5*a^2 + 16*b^2)*3i)/(16*(a^5*b + a^6)) 
)/((540*a*b^7 + 216*b^8 + (999*a^2*b^6)/2 + (837*a^3*b^5)/4 + (1215*a^4*b^ 
4)/32 + (135*a^5*b^3)/64)/a^12 - (3*((tan(e + f*x)*(4608*a*b^6 + 2304*b^7 
+ 3312*a^2*b^5 + 1008*a^3*b^4 + 117*a^4*b^3))/(16*a^8) - (3*((12*a^10*b^4 
+ 12*a^11*b^3 + (3*a^12*b^2)/2)/a^12 - (3*tan(e + f*x)*(256*a^10*b^3 + 128 
*a^11*b^2)*(-b*(a + b))^(1/2)*(20*a*b + 5*a^2 + 16*b^2))/(256*a^8*(a^5*b + 
 a^6)))*(-b*(a + b))^(1/2)*(20*a*b + 5*a^2 + 16*b^2))/(16*(a^5*b + a^6)))* 
(-b*(a + b))^(1/2)*(20*a*b + 5*a^2 + 16*b^2))/(16*(a^5*b + a^6)) + (3*((ta 
n(e + f*x)*(4608*a*b^6 + 2304*b^7 + 3312*a^2*b^5 + 1008*a^3*b^4 + 117*a^4* 
b^3))/(16*a^8) + (3*((12*a^10*b^4 + 12*a^11*b^3 + (3*a^12*b^2)/2)/a^12 ...
 

Reduce [B] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 1736, normalized size of antiderivative = 7.29 \[ \int \frac {\sin ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx =\text {Too large to display} \] Input:

int(sin(f*x+e)^4/(a+b*sec(f*x+e)^2)^3,x)
 

Output:

( - 15*sqrt(b)*sqrt(a + b)*atan((sqrt(a + b)*tan((e + f*x)/2) - sqrt(a))/s 
qrt(b))*sin(e + f*x)**4*a**4 - 60*sqrt(b)*sqrt(a + b)*atan((sqrt(a + b)*ta 
n((e + f*x)/2) - sqrt(a))/sqrt(b))*sin(e + f*x)**4*a**3*b - 48*sqrt(b)*sqr 
t(a + b)*atan((sqrt(a + b)*tan((e + f*x)/2) - sqrt(a))/sqrt(b))*sin(e + f* 
x)**4*a**2*b**2 + 30*sqrt(b)*sqrt(a + b)*atan((sqrt(a + b)*tan((e + f*x)/2 
) - sqrt(a))/sqrt(b))*sin(e + f*x)**2*a**4 + 150*sqrt(b)*sqrt(a + b)*atan( 
(sqrt(a + b)*tan((e + f*x)/2) - sqrt(a))/sqrt(b))*sin(e + f*x)**2*a**3*b + 
 216*sqrt(b)*sqrt(a + b)*atan((sqrt(a + b)*tan((e + f*x)/2) - sqrt(a))/sqr 
t(b))*sin(e + f*x)**2*a**2*b**2 + 96*sqrt(b)*sqrt(a + b)*atan((sqrt(a + b) 
*tan((e + f*x)/2) - sqrt(a))/sqrt(b))*sin(e + f*x)**2*a*b**3 - 15*sqrt(b)* 
sqrt(a + b)*atan((sqrt(a + b)*tan((e + f*x)/2) - sqrt(a))/sqrt(b))*a**4 - 
90*sqrt(b)*sqrt(a + b)*atan((sqrt(a + b)*tan((e + f*x)/2) - sqrt(a))/sqrt( 
b))*a**3*b - 183*sqrt(b)*sqrt(a + b)*atan((sqrt(a + b)*tan((e + f*x)/2) - 
sqrt(a))/sqrt(b))*a**2*b**2 - 156*sqrt(b)*sqrt(a + b)*atan((sqrt(a + b)*ta 
n((e + f*x)/2) - sqrt(a))/sqrt(b))*a*b**3 - 48*sqrt(b)*sqrt(a + b)*atan((s 
qrt(a + b)*tan((e + f*x)/2) - sqrt(a))/sqrt(b))*b**4 - 15*sqrt(b)*sqrt(a + 
 b)*atan((sqrt(a + b)*tan((e + f*x)/2) + sqrt(a))/sqrt(b))*sin(e + f*x)**4 
*a**4 - 60*sqrt(b)*sqrt(a + b)*atan((sqrt(a + b)*tan((e + f*x)/2) + sqrt(a 
))/sqrt(b))*sin(e + f*x)**4*a**3*b - 48*sqrt(b)*sqrt(a + b)*atan((sqrt(a + 
 b)*tan((e + f*x)/2) + sqrt(a))/sqrt(b))*sin(e + f*x)**4*a**2*b**2 + 30...