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

Optimal result
Mathematica [C] (warning: unable to verify)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (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 = 269 \[ \int \frac {\cos ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {3 \left (a^2-4 a b+16 b^2\right ) x}{8 a^5}-\frac {3 b^{5/2} \left (21 a^2+36 a b+16 b^2\right ) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{8 a^5 (a+b)^{5/2} f}+\frac {(3 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 \left (3 a^2-7 a b-12 b^2\right ) \tan (e+f x)}{8 a^3 (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac {3 b (a+2 b) \left (a^2-4 a b-4 b^2\right ) \tan (e+f x)}{8 a^4 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )} \] Output:

3/8*(a^2-4*a*b+16*b^2)*x/a^5-3/8*b^(5/2)*(21*a^2+36*a*b+16*b^2)*arctan(b^( 
1/2)*tan(f*x+e)/(a+b)^(1/2))/a^5/(a+b)^(5/2)/f+1/8*(3*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*(3*a^2-7*a*b-12*b^2)*tan(f*x+e)/a^3/(a+b)/f/(a+b+ 
b*tan(f*x+e)^2)^2+3/8*b*(a+2*b)*(a^2-4*a*b-4*b^2)*tan(f*x+e)/a^4/(a+b)^2/f 
/(a+b+b*tan(f*x+e)^2)
 

Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

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

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

Output:

((a + 2*b + a*Cos[2*(e + f*x)])*Sec[e + f*x]^6*((96*b^3*(21*a^2 + 36*a*b + 
 16*b^2)*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])]*(a + 2* 
b + a*Cos[2*(e + f*x)])^2*(Cos[2*e] - I*Sin[2*e]))/(Sqrt[a + b]*Sqrt[b*(Co 
s[e] - I*Sin[e])^4]) + Sec[2*e]*(48*(a + b)^2*(3*a^4 - 4*a^3*b + 24*a^2*b^ 
2 + 96*a*b^3 + 128*b^4)*f*x*Cos[2*e] + 96*a*(a + b)^2*(a^3 - 2*a^2*b + 8*a 
*b^2 + 32*b^3)*f*x*Cos[2*f*x] + 24*a^6*f*x*Cos[2*(e + 2*f*x)] - 48*a^5*b*f 
*x*Cos[2*(e + 2*f*x)] + 216*a^4*b^2*f*x*Cos[2*(e + 2*f*x)] + 672*a^3*b^3*f 
*x*Cos[2*(e + 2*f*x)] + 384*a^2*b^4*f*x*Cos[2*(e + 2*f*x)] + 96*a^6*f*x*Co 
s[4*e + 2*f*x] + 480*a^4*b^2*f*x*Cos[4*e + 2*f*x] + 4416*a^3*b^3*f*x*Cos[4 
*e + 2*f*x] + 6912*a^2*b^4*f*x*Cos[4*e + 2*f*x] + 3072*a*b^5*f*x*Cos[4*e + 
 2*f*x] + 24*a^6*f*x*Cos[6*e + 4*f*x] - 48*a^5*b*f*x*Cos[6*e + 4*f*x] + 21 
6*a^4*b^2*f*x*Cos[6*e + 4*f*x] + 672*a^3*b^3*f*x*Cos[6*e + 4*f*x] + 384*a^ 
2*b^4*f*x*Cos[6*e + 4*f*x] + 816*a^3*b^3*Sin[2*e] + 2848*a^2*b^4*Sin[2*e] 
+ 3968*a*b^5*Sin[2*e] + 1792*b^6*Sin[2*e] + 44*a^6*Sin[2*f*x] + 104*a^5*b* 
Sin[2*f*x] - 180*a^4*b^2*Sin[2*f*x] - 1696*a^3*b^3*Sin[2*f*x] - 3264*a^2*b 
^4*Sin[2*f*x] - 1664*a*b^5*Sin[2*f*x] + 38*a^6*Sin[2*(e + 2*f*x)] + 60*a^5 
*b*Sin[2*(e + 2*f*x)] - 170*a^4*b^2*Sin[2*(e + 2*f*x)] - 640*a^3*b^3*Sin[2 
*(e + 2*f*x)] - 400*a^2*b^4*Sin[2*(e + 2*f*x)] + 44*a^6*Sin[4*e + 2*f*x] + 
 104*a^5*b*Sin[4*e + 2*f*x] - 180*a^4*b^2*Sin[4*e + 2*f*x] - 608*a^3*b^...
 

Rubi [A] (verified)

Time = 0.54 (sec) , antiderivative size = 305, normalized size of antiderivative = 1.13, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.565, Rules used = {3042, 4634, 316, 25, 402, 25, 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 {\cos ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4634

\(\displaystyle \frac {\int \frac {1}{\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 \) 316

\(\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 {7 b \tan ^2(e+f x)+3 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 \) 25

\(\displaystyle \frac {\frac {\int \frac {7 b \tan ^2(e+f x)+3 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}+\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}}{f}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\frac {\frac {(3 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 {3 a^2+3 b a+8 b^2+5 (3 a-8 b) 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}+\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}}{f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {\frac {\int \frac {3 a^2+3 b a+8 b^2+5 (3 a-8 b) 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}+\frac {(3 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}}{4 a}+\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}}{f}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\frac {\frac {\frac {\int \frac {12 \left (a^3+5 b^2 a+4 b^3+b \left (3 a^2-7 b a-12 b^2\right ) \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 \left (3 a^2-7 a b-12 b^2\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}+\frac {(3 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}}{4 a}+\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}}{f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {\frac {\frac {3 \int \frac {a^3+5 b^2 a+4 b^3+b \left (3 a^2-7 b a-12 b^2\right ) \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 (a+b)}+\frac {b \left (3 a^2-7 a b-12 b^2\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}+\frac {(3 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}}{4 a}+\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}}{f}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\frac {\frac {\frac {3 \left (\frac {\int \frac {2 \left (a^4-b a^3+7 b^2 a^2+16 b^3 a+8 b^4+b (a+2 b) \left (a^2-4 b a-4 b^2\right ) \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 {b (a+2 b) \left (a^2-4 a b-4 b^2\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a (a+b)}+\frac {b \left (3 a^2-7 a b-12 b^2\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}+\frac {(3 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}}{4 a}+\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}}{f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {\frac {\frac {3 \left (\frac {\int \frac {a^4-b a^3+7 b^2 a^2+16 b^3 a+8 b^4+b (a+2 b) \left (a^2-4 b a-4 b^2\right ) \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 (a+b)}+\frac {b (a+2 b) \left (a^2-4 a b-4 b^2\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a (a+b)}+\frac {b \left (3 a^2-7 a b-12 b^2\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}+\frac {(3 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}}{4 a}+\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}}{f}\)

\(\Big \downarrow \) 397

\(\displaystyle \frac {\frac {\frac {\frac {3 \left (\frac {\frac {(a+b)^2 \left (a^2-4 a b+16 b^2\right ) \int \frac {1}{\tan ^2(e+f x)+1}d\tan (e+f x)}{a}-\frac {b^3 \left (21 a^2+36 a b+16 b^2\right ) \int \frac {1}{b \tan ^2(e+f x)+a+b}d\tan (e+f x)}{a}}{a (a+b)}+\frac {b (a+2 b) \left (a^2-4 a b-4 b^2\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a (a+b)}+\frac {b \left (3 a^2-7 a b-12 b^2\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}+\frac {(3 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}}{4 a}+\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}}{f}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {\frac {\frac {\frac {3 \left (\frac {\frac {(a+b)^2 \left (a^2-4 a b+16 b^2\right ) \arctan (\tan (e+f x))}{a}-\frac {b^3 \left (21 a^2+36 a b+16 b^2\right ) \int \frac {1}{b \tan ^2(e+f x)+a+b}d\tan (e+f x)}{a}}{a (a+b)}+\frac {b (a+2 b) \left (a^2-4 a b-4 b^2\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a (a+b)}+\frac {b \left (3 a^2-7 a b-12 b^2\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}+\frac {(3 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}}{4 a}+\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}}{f}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {\frac {\frac {\frac {3 \left (\frac {\frac {(a+b)^2 \left (a^2-4 a b+16 b^2\right ) \arctan (\tan (e+f x))}{a}-\frac {b^{5/2} \left (21 a^2+36 a b+16 b^2\right ) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}}}{a (a+b)}+\frac {b (a+2 b) \left (a^2-4 a b-4 b^2\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a (a+b)}+\frac {b \left (3 a^2-7 a b-12 b^2\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}+\frac {(3 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}}{4 a}+\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}}{f}\)

Input:

Int[Cos[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) + 
(((3*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*(3*a^2 - 7*a*b - 12*b^2)*Tan[e + f*x])/(a*(a + b)*(a + b + 
 b*Tan[e + f*x]^2)^2) + (3*((((a + b)^2*(a^2 - 4*a*b + 16*b^2)*ArcTan[Tan[ 
e + f*x]])/a - (b^(5/2)*(21*a^2 + 36*a*b + 16*b^2)*ArcTan[(Sqrt[b]*Tan[e + 
 f*x])/Sqrt[a + b]])/(a*Sqrt[a + b]))/(a*(a + b)) + (b*(a + 2*b)*(a^2 - 4* 
a*b - 4*b^2)*Tan[e + f*x])/(a*(a + b)*(a + b + b*Tan[e + f*x]^2))))/(a*(a 
+ b)))/(2*a))/(4*a))/f
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 316
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[(-b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*a*(p + 1)*(b*c - a*d)) 
), x] + Simp[1/(2*a*(p + 1)*(b*c - a*d))   Int[(a + b*x^2)^(p + 1)*(c + d*x 
^2)^q*Simp[b*c + 2*(p + 1)*(b*c - a*d) + d*b*(2*(p + q + 2) + 1)*x^2, x], x 
], x] /; FreeQ[{a, b, c, d, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  ! 
( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomialQ[a, b, c, d, 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 4634
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_) 
)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f 
Subst[Int[(1 + ff^2*x^2)^(m/2 - 1)*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), 
x]^p, 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.67 (sec) , antiderivative size = 215, normalized size of antiderivative = 0.80

method result size
derivativedivides \(\frac {\frac {\frac {\left (\frac {3}{8} a^{2}-\frac {3}{2} a b \right ) \tan \left (f x +e \right )^{3}+\left (-\frac {3}{2} a b +\frac {5}{8} a^{2}\right ) \tan \left (f x +e \right )}{\left (1+\tan \left (f x +e \right )^{2}\right )^{2}}+\frac {3 \left (a^{2}-4 a b +16 b^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{8}}{a^{5}}-\frac {b^{3} \left (\frac {\frac {3 a b \left (5 a +4 b \right ) \tan \left (f x +e \right )^{3}}{8 \left (a^{2}+2 a b +b^{2}\right )}+\frac {\left (17 a +12 b \right ) a \tan \left (f x +e \right )}{8 a +8 b}}{\left (a +b +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {3 \left (21 a^{2}+36 a b +16 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{8 \left (a^{2}+2 a b +b^{2}\right ) \sqrt {\left (a +b \right ) b}}\right )}{a^{5}}}{f}\) \(215\)
default \(\frac {\frac {\frac {\left (\frac {3}{8} a^{2}-\frac {3}{2} a b \right ) \tan \left (f x +e \right )^{3}+\left (-\frac {3}{2} a b +\frac {5}{8} a^{2}\right ) \tan \left (f x +e \right )}{\left (1+\tan \left (f x +e \right )^{2}\right )^{2}}+\frac {3 \left (a^{2}-4 a b +16 b^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{8}}{a^{5}}-\frac {b^{3} \left (\frac {\frac {3 a b \left (5 a +4 b \right ) \tan \left (f x +e \right )^{3}}{8 \left (a^{2}+2 a b +b^{2}\right )}+\frac {\left (17 a +12 b \right ) a \tan \left (f x +e \right )}{8 a +8 b}}{\left (a +b +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {3 \left (21 a^{2}+36 a b +16 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{8 \left (a^{2}+2 a b +b^{2}\right ) \sqrt {\left (a +b \right ) b}}\right )}{a^{5}}}{f}\) \(215\)
risch \(\frac {3 x}{8 a^{3}}-\frac {3 x b}{2 a^{4}}+\frac {6 x \,b^{2}}{a^{5}}-\frac {i b^{3} \left (17 a^{3} {\mathrm e}^{6 i \left (f x +e \right )}+52 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 )}+51 a^{3} {\mathrm e}^{4 i \left (f x +e \right )}+178 a^{2} b \,{\mathrm e}^{4 i \left (f x +e \right )}+248 a \,b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+112 b^{3} {\mathrm e}^{4 i \left (f x +e \right )}+51 a^{3} {\mathrm e}^{2 i \left (f x +e \right )}+140 \,{\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}+17 a^{3}+14 a^{2} b \right )}{4 a^{5} \left (a +b \right )^{2} 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 {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 {\mathrm e}^{4 i \left (f x +e \right )}}{64 a^{3} f}+\frac {63 \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}}{16 \left (a +b \right )^{3} f \,a^{3}}+\frac {27 \sqrt {-\left (a +b \right ) b}\, b^{3} \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 )}{4 \left (a +b \right )^{3} f \,a^{4}}+\frac {3 \sqrt {-\left (a +b \right ) b}\, b^{4} \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 )}{\left (a +b \right )^{3} f \,a^{5}}-\frac {63 \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}}{16 \left (a +b \right )^{3} f \,a^{3}}-\frac {27 \sqrt {-\left (a +b \right ) b}\, b^{3} \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 )}{4 \left (a +b \right )^{3} f \,a^{4}}-\frac {3 \sqrt {-\left (a +b \right ) b}\, b^{4} \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 )}{\left (a +b \right )^{3} f \,a^{5}}\) \(687\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 521 vs. \(2 (249) = 498\).

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

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

Output:

[1/32*(12*(a^6 - 2*a^5*b + 9*a^4*b^2 + 28*a^3*b^3 + 16*a^2*b^4)*f*x*cos(f* 
x + e)^4 + 24*(a^5*b - 2*a^4*b^2 + 9*a^3*b^3 + 28*a^2*b^4 + 16*a*b^5)*f*x* 
cos(f*x + e)^2 + 12*(a^4*b^2 - 2*a^3*b^3 + 9*a^2*b^4 + 28*a*b^5 + 16*b^6)* 
f*x + 3*(21*a^2*b^4 + 36*a*b^5 + 16*b^6 + (21*a^4*b^2 + 36*a^3*b^3 + 16*a^ 
2*b^4)*cos(f*x + e)^4 + 2*(21*a^3*b^3 + 36*a^2*b^4 + 16*a*b^5)*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)*cos(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^6 + 2*a^5*b + a^4*b^2)*cos(f* 
x + e)^7 + (3*a^6 - 2*a^5*b - 13*a^4*b^2 - 8*a^3*b^3)*cos(f*x + e)^5 + (6* 
a^5*b - 10*a^4*b^2 - 55*a^3*b^3 - 36*a^2*b^4)*cos(f*x + e)^3 + 3*(a^4*b^2 
- 2*a^3*b^3 - 12*a^2*b^4 - 8*a*b^5)*cos(f*x + e))*sin(f*x + e))/((a^9 + 2* 
a^8*b + a^7*b^2)*f*cos(f*x + e)^4 + 2*(a^8*b + 2*a^7*b^2 + a^6*b^3)*f*cos( 
f*x + e)^2 + (a^7*b^2 + 2*a^6*b^3 + a^5*b^4)*f), 1/16*(6*(a^6 - 2*a^5*b + 
9*a^4*b^2 + 28*a^3*b^3 + 16*a^2*b^4)*f*x*cos(f*x + e)^4 + 12*(a^5*b - 2*a^ 
4*b^2 + 9*a^3*b^3 + 28*a^2*b^4 + 16*a*b^5)*f*x*cos(f*x + e)^2 + 6*(a^4*b^2 
 - 2*a^3*b^3 + 9*a^2*b^4 + 28*a*b^5 + 16*b^6)*f*x + 3*(21*a^2*b^4 + 36*a*b 
^5 + 16*b^6 + (21*a^4*b^2 + 36*a^3*b^3 + 16*a^2*b^4)*cos(f*x + e)^4 + 2*(2 
1*a^3*b^3 + 36*a^2*b^4 + 16*a*b^5)*cos(f*x + e)^2)*sqrt(b/(a + b))*arctan( 
1/2*((a + 2*b)*cos(f*x + e)^2 - b)*sqrt(b/(a + b))/(b*cos(f*x + e)*sin(...
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 464, normalized size of antiderivative = 1.72 \[ \int \frac {\cos ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {\frac {3 \, {\left (21 \, a^{2} b^{3} + 36 \, a b^{4} + 16 \, b^{5}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{{\left (a^{7} + 2 \, a^{6} b + a^{5} b^{2}\right )} \sqrt {{\left (a + b\right )} b}} - \frac {3 \, {\left (a^{3} b^{2} - 2 \, a^{2} b^{3} - 12 \, a b^{4} - 8 \, b^{5}\right )} \tan \left (f x + e\right )^{7} + {\left (6 \, a^{4} b - a^{3} b^{2} - 73 \, a^{2} b^{3} - 144 \, a b^{4} - 72 \, b^{5}\right )} \tan \left (f x + e\right )^{5} + {\left (3 \, a^{5} + 10 \, a^{4} b - 24 \, a^{3} b^{2} - 136 \, a^{2} b^{3} - 180 \, a b^{4} - 72 \, b^{5}\right )} \tan \left (f x + e\right )^{3} + {\left (5 \, a^{5} + 8 \, a^{4} b - 18 \, a^{3} b^{2} - 69 \, a^{2} b^{3} - 72 \, a b^{4} - 24 \, b^{5}\right )} \tan \left (f x + e\right )}{{\left (a^{6} b^{2} + 2 \, a^{5} b^{3} + a^{4} b^{4}\right )} \tan \left (f x + e\right )^{8} + a^{8} + 4 \, a^{7} b + 6 \, a^{6} b^{2} + 4 \, a^{5} b^{3} + a^{4} b^{4} + 2 \, {\left (a^{7} b + 4 \, a^{6} b^{2} + 5 \, a^{5} b^{3} + 2 \, a^{4} b^{4}\right )} \tan \left (f x + e\right )^{6} + {\left (a^{8} + 8 \, a^{7} b + 19 \, a^{6} b^{2} + 18 \, a^{5} b^{3} + 6 \, a^{4} b^{4}\right )} \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{8} + 5 \, a^{7} b + 9 \, a^{6} b^{2} + 7 \, a^{5} b^{3} + 2 \, a^{4} b^{4}\right )} \tan \left (f x + e\right )^{2}} - \frac {3 \, {\left (a^{2} - 4 \, a b + 16 \, b^{2}\right )} {\left (f x + e\right )}}{a^{5}}}{8 \, f} \] Input:

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

Output:

-1/8*(3*(21*a^2*b^3 + 36*a*b^4 + 16*b^5)*arctan(b*tan(f*x + e)/sqrt((a + b 
)*b))/((a^7 + 2*a^6*b + a^5*b^2)*sqrt((a + b)*b)) - (3*(a^3*b^2 - 2*a^2*b^ 
3 - 12*a*b^4 - 8*b^5)*tan(f*x + e)^7 + (6*a^4*b - a^3*b^2 - 73*a^2*b^3 - 1 
44*a*b^4 - 72*b^5)*tan(f*x + e)^5 + (3*a^5 + 10*a^4*b - 24*a^3*b^2 - 136*a 
^2*b^3 - 180*a*b^4 - 72*b^5)*tan(f*x + e)^3 + (5*a^5 + 8*a^4*b - 18*a^3*b^ 
2 - 69*a^2*b^3 - 72*a*b^4 - 24*b^5)*tan(f*x + e))/((a^6*b^2 + 2*a^5*b^3 + 
a^4*b^4)*tan(f*x + e)^8 + a^8 + 4*a^7*b + 6*a^6*b^2 + 4*a^5*b^3 + a^4*b^4 
+ 2*(a^7*b + 4*a^6*b^2 + 5*a^5*b^3 + 2*a^4*b^4)*tan(f*x + e)^6 + (a^8 + 8* 
a^7*b + 19*a^6*b^2 + 18*a^5*b^3 + 6*a^4*b^4)*tan(f*x + e)^4 + 2*(a^8 + 5*a 
^7*b + 9*a^6*b^2 + 7*a^5*b^3 + 2*a^4*b^4)*tan(f*x + e)^2) - 3*(a^2 - 4*a*b 
 + 16*b^2)*(f*x + e)/a^5)/f
 

Giac [A] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 464, normalized size of antiderivative = 1.72 \[ \int \frac {\cos ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {\frac {3 \, {\left (21 \, a^{2} b^{3} + 36 \, a b^{4} + 16 \, b^{5}\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 )}}{{\left (a^{7} + 2 \, a^{6} b + a^{5} b^{2}\right )} \sqrt {a b + b^{2}}} - \frac {3 \, a^{3} b^{2} \tan \left (f x + e\right )^{7} - 6 \, a^{2} b^{3} \tan \left (f x + e\right )^{7} - 36 \, a b^{4} \tan \left (f x + e\right )^{7} - 24 \, b^{5} \tan \left (f x + e\right )^{7} + 6 \, a^{4} b \tan \left (f x + e\right )^{5} - a^{3} b^{2} \tan \left (f x + e\right )^{5} - 73 \, a^{2} b^{3} \tan \left (f x + e\right )^{5} - 144 \, a b^{4} \tan \left (f x + e\right )^{5} - 72 \, b^{5} \tan \left (f x + e\right )^{5} + 3 \, a^{5} \tan \left (f x + e\right )^{3} + 10 \, a^{4} b \tan \left (f x + e\right )^{3} - 24 \, a^{3} b^{2} \tan \left (f x + e\right )^{3} - 136 \, a^{2} b^{3} \tan \left (f x + e\right )^{3} - 180 \, a b^{4} \tan \left (f x + e\right )^{3} - 72 \, b^{5} \tan \left (f x + e\right )^{3} + 5 \, a^{5} \tan \left (f x + e\right ) + 8 \, a^{4} b \tan \left (f x + e\right ) - 18 \, a^{3} b^{2} \tan \left (f x + e\right ) - 69 \, a^{2} b^{3} \tan \left (f x + e\right ) - 72 \, a b^{4} \tan \left (f x + e\right ) - 24 \, b^{5} \tan \left (f x + e\right )}{{\left (a^{6} + 2 \, a^{5} b + a^{4} b^{2}\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}} - \frac {3 \, {\left (a^{2} - 4 \, a b + 16 \, b^{2}\right )} {\left (f x + e\right )}}{a^{5}}}{8 \, f} \] Input:

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

Output:

-1/8*(3*(21*a^2*b^3 + 36*a*b^4 + 16*b^5)*(pi*floor((f*x + e)/pi + 1/2)*sgn 
(b) + arctan(b*tan(f*x + e)/sqrt(a*b + b^2)))/((a^7 + 2*a^6*b + a^5*b^2)*s 
qrt(a*b + b^2)) - (3*a^3*b^2*tan(f*x + e)^7 - 6*a^2*b^3*tan(f*x + e)^7 - 3 
6*a*b^4*tan(f*x + e)^7 - 24*b^5*tan(f*x + e)^7 + 6*a^4*b*tan(f*x + e)^5 - 
a^3*b^2*tan(f*x + e)^5 - 73*a^2*b^3*tan(f*x + e)^5 - 144*a*b^4*tan(f*x + e 
)^5 - 72*b^5*tan(f*x + e)^5 + 3*a^5*tan(f*x + e)^3 + 10*a^4*b*tan(f*x + e) 
^3 - 24*a^3*b^2*tan(f*x + e)^3 - 136*a^2*b^3*tan(f*x + e)^3 - 180*a*b^4*ta 
n(f*x + e)^3 - 72*b^5*tan(f*x + e)^3 + 5*a^5*tan(f*x + e) + 8*a^4*b*tan(f* 
x + e) - 18*a^3*b^2*tan(f*x + e) - 69*a^2*b^3*tan(f*x + e) - 72*a*b^4*tan( 
f*x + e) - 24*b^5*tan(f*x + e))/((a^6 + 2*a^5*b + a^4*b^2)*(b*tan(f*x + e) 
^4 + a*tan(f*x + e)^2 + 2*b*tan(f*x + e)^2 + a + b)^2) - 3*(a^2 - 4*a*b + 
16*b^2)*(f*x + e)/a^5)/f
 

Mupad [B] (verification not implemented)

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

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

Output:

(atan(((((tan(e + f*x)*(18432*a*b^10 + 4608*b^11 + 27360*a^2*b^9 + 17568*a 
^3*b^8 + 3978*a^4*b^7 + 180*a^5*b^6 + 198*a^6*b^5 - 36*a^7*b^4 + 9*a^8*b^3 
))/(32*(4*a^11*b + a^12 + a^8*b^4 + 4*a^9*b^3 + 6*a^10*b^2)) - (3*((12*a^1 
0*b^8 + 48*a^11*b^7 + (141*a^12*b^6)/2 + (87*a^13*b^5)/2 + 9*a^14*b^4 + (3 
*a^15*b^3)/2 + (3*a^16*b^2)/2)/(4*a^15*b + a^16 + a^12*b^4 + 4*a^13*b^3 + 
6*a^14*b^2) - (3*tan(e + f*x)*(-b^5*(a + b)^5)^(1/2)*(36*a*b + 21*a^2 + 16 
*b^2)*(512*a^10*b^7 + 2304*a^11*b^6 + 4096*a^12*b^5 + 3584*a^13*b^4 + 1536 
*a^14*b^3 + 256*a^15*b^2))/(512*(4*a^11*b + a^12 + a^8*b^4 + 4*a^9*b^3 + 6 
*a^10*b^2)*(5*a^9*b + a^10 + a^5*b^5 + 5*a^6*b^4 + 10*a^7*b^3 + 10*a^8*b^2 
)))*(-b^5*(a + b)^5)^(1/2)*(36*a*b + 21*a^2 + 16*b^2))/(16*(5*a^9*b + a^10 
 + a^5*b^5 + 5*a^6*b^4 + 10*a^7*b^3 + 10*a^8*b^2)))*(-b^5*(a + b)^5)^(1/2) 
*(36*a*b + 21*a^2 + 16*b^2)*3i)/(16*(5*a^9*b + a^10 + a^5*b^5 + 5*a^6*b^4 
+ 10*a^7*b^3 + 10*a^8*b^2)) + (((tan(e + f*x)*(18432*a*b^10 + 4608*b^11 + 
27360*a^2*b^9 + 17568*a^3*b^8 + 3978*a^4*b^7 + 180*a^5*b^6 + 198*a^6*b^5 - 
 36*a^7*b^4 + 9*a^8*b^3))/(32*(4*a^11*b + a^12 + a^8*b^4 + 4*a^9*b^3 + 6*a 
^10*b^2)) + (3*((12*a^10*b^8 + 48*a^11*b^7 + (141*a^12*b^6)/2 + (87*a^13*b 
^5)/2 + 9*a^14*b^4 + (3*a^15*b^3)/2 + (3*a^16*b^2)/2)/(4*a^15*b + a^16 + a 
^12*b^4 + 4*a^13*b^3 + 6*a^14*b^2) + (3*tan(e + f*x)*(-b^5*(a + b)^5)^(1/2 
)*(36*a*b + 21*a^2 + 16*b^2)*(512*a^10*b^7 + 2304*a^11*b^6 + 4096*a^12*b^5 
 + 3584*a^13*b^4 + 1536*a^14*b^3 + 256*a^15*b^2))/(512*(4*a^11*b + a^12...
 

Reduce [B] (verification not implemented)

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

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

Output:

( - 63*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*b**2 - 108*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**3 - 48*sq 
rt(b)*sqrt(a + b)*atan((sqrt(a + b)*tan((e + f*x)/2) - sqrt(a))/sqrt(b))*s 
in(e + f*x)**4*a**2*b**4 + 126*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*b**2 + 342*sqrt(b)*sq 
rt(a + b)*atan((sqrt(a + b)*tan((e + f*x)/2) - sqrt(a))/sqrt(b))*sin(e + f 
*x)**2*a**3*b**3 + 312*sqrt(b)*sqrt(a + b)*atan((sqrt(a + b)*tan((e + f*x) 
/2) - sqrt(a))/sqrt(b))*sin(e + f*x)**2*a**2*b**4 + 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**5 - 63*sqrt(b)*sqrt(a + b)*atan((sqrt(a + b)*tan((e + f*x)/2) - sqrt(a) 
)/sqrt(b))*a**4*b**2 - 234*sqrt(b)*sqrt(a + b)*atan((sqrt(a + b)*tan((e + 
f*x)/2) - sqrt(a))/sqrt(b))*a**3*b**3 - 327*sqrt(b)*sqrt(a + b)*atan((sqrt 
(a + b)*tan((e + f*x)/2) - sqrt(a))/sqrt(b))*a**2*b**4 - 204*sqrt(b)*sqrt( 
a + b)*atan((sqrt(a + b)*tan((e + f*x)/2) - sqrt(a))/sqrt(b))*a*b**5 - 48* 
sqrt(b)*sqrt(a + b)*atan((sqrt(a + b)*tan((e + f*x)/2) - sqrt(a))/sqrt(b)) 
*b**6 - 63*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*b**2 - 108*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**3 - 4 
8*sqrt(b)*sqrt(a + b)*atan((sqrt(a + b)*tan((e + f*x)/2) + sqrt(a))/sqr...