\(\int \frac {1}{(a+b \cos ^2(x))^3} \, dx\) [65]

Optimal result
Mathematica [A] (verified)
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 = 10, antiderivative size = 107 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx=-\frac {\left (8 a^2+8 a b+3 b^2\right ) \arctan \left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{8 a^{5/2} (a+b)^{5/2}}-\frac {b \cos (x) \sin (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}-\frac {3 b (2 a+b) \cos (x) \sin (x)}{8 a^2 (a+b)^2 \left (a+b \cos ^2(x)\right )} \] Output:

-1/8*(8*a^2+8*a*b+3*b^2)*arctan((a+b)^(1/2)*cot(x)/a^(1/2))/a^(5/2)/(a+b)^ 
(5/2)-1/4*b*cos(x)*sin(x)/a/(a+b)/(a+b*cos(x)^2)^2-3/8*b*(2*a+b)*cos(x)*si 
n(x)/a^2/(a+b)^2/(a+b*cos(x)^2)
 

Mathematica [A] (verified)

Time = 5.64 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.99 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx=\frac {\frac {\left (8 a^2+8 a b+3 b^2\right ) \arctan \left (\frac {\sqrt {a} \tan (x)}{\sqrt {a+b}}\right )}{(a+b)^{5/2}}-\frac {\sqrt {a} b \left (16 a^2+16 a b+3 b^2+3 b (2 a+b) \cos (2 x)\right ) \sin (2 x)}{(a+b)^2 (2 a+b+b \cos (2 x))^2}}{8 a^{5/2}} \] Input:

Integrate[(a + b*Cos[x]^2)^(-3),x]
 

Output:

(((8*a^2 + 8*a*b + 3*b^2)*ArcTan[(Sqrt[a]*Tan[x])/Sqrt[a + b]])/(a + b)^(5 
/2) - (Sqrt[a]*b*(16*a^2 + 16*a*b + 3*b^2 + 3*b*(2*a + b)*Cos[2*x])*Sin[2* 
x])/((a + b)^2*(2*a + b + b*Cos[2*x])^2))/(8*a^(5/2))
 

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.12, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.900, Rules used = {3042, 3663, 25, 3042, 3652, 27, 3042, 3660, 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 {1}{\left (a+b \cos ^2(x)\right )^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\left (a+b \sin \left (x+\frac {\pi }{2}\right )^2\right )^3}dx\)

\(\Big \downarrow \) 3663

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {-2 b \sin \left (x+\frac {\pi }{2}\right )^2+4 a+3 b}{\left (b \sin \left (x+\frac {\pi }{2}\right )^2+a\right )^2}dx}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\)

\(\Big \downarrow \) 3652

\(\displaystyle \frac {\frac {\int \frac {8 a^2+8 b a+3 b^2}{b \cos ^2(x)+a}dx}{2 a (a+b)}-\frac {3 b (2 a+b) \sin (x) \cos (x)}{2 a (a+b) \left (a+b \cos ^2(x)\right )}}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {\left (8 a^2+8 a b+3 b^2\right ) \int \frac {1}{b \cos ^2(x)+a}dx}{2 a (a+b)}-\frac {3 b (2 a+b) \sin (x) \cos (x)}{2 a (a+b) \left (a+b \cos ^2(x)\right )}}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\left (8 a^2+8 a b+3 b^2\right ) \int \frac {1}{b \sin \left (x+\frac {\pi }{2}\right )^2+a}dx}{2 a (a+b)}-\frac {3 b (2 a+b) \sin (x) \cos (x)}{2 a (a+b) \left (a+b \cos ^2(x)\right )}}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\)

\(\Big \downarrow \) 3660

\(\displaystyle \frac {-\frac {\left (8 a^2+8 a b+3 b^2\right ) \int \frac {1}{(a+b) \cot ^2(x)+a}d\cot (x)}{2 a (a+b)}-\frac {3 b (2 a+b) \sin (x) \cos (x)}{2 a (a+b) \left (a+b \cos ^2(x)\right )}}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {-\frac {\left (8 a^2+8 a b+3 b^2\right ) \arctan \left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{2 a^{3/2} (a+b)^{3/2}}-\frac {3 b (2 a+b) \sin (x) \cos (x)}{2 a (a+b) \left (a+b \cos ^2(x)\right )}}{4 a (a+b)}-\frac {b \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}\)

Input:

Int[(a + b*Cos[x]^2)^(-3),x]
 

Output:

-1/4*(b*Cos[x]*Sin[x])/(a*(a + b)*(a + b*Cos[x]^2)^2) + (-1/2*((8*a^2 + 8* 
a*b + 3*b^2)*ArcTan[(Sqrt[a + b]*Cot[x])/Sqrt[a]])/(a^(3/2)*(a + b)^(3/2)) 
 - (3*b*(2*a + b)*Cos[x]*Sin[x])/(2*a*(a + b)*(a + b*Cos[x]^2)))/(4*a*(a + 
 b))
 

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 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 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3652
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_)*((A_.) + (B_.)*sin[(e_.) 
+ (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b - a*B))*Cos[e + f*x]*Sin[e + f*x 
]*((a + b*Sin[e + f*x]^2)^(p + 1)/(2*a*f*(a + b)*(p + 1))), x] - Simp[1/(2* 
a*(a + b)*(p + 1))   Int[(a + b*Sin[e + f*x]^2)^(p + 1)*Simp[a*B - A*(2*a*( 
p + 1) + b*(2*p + 3)) + 2*(A*b - a*B)*(p + 2)*Sin[e + f*x]^2, x], x], x] /; 
 FreeQ[{a, b, e, f, A, B}, x] && LtQ[p, -1] && NeQ[a + b, 0]
 

rule 3660
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> With[{ff = 
FreeFactors[Tan[e + f*x], x]}, Simp[ff/f   Subst[Int[1/(a + (a + b)*ff^2*x^ 
2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x]
 

rule 3663
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Simp[(-b)*C 
os[e + f*x]*Sin[e + f*x]*((a + b*Sin[e + f*x]^2)^(p + 1)/(2*a*f*(p + 1)*(a 
+ b))), x] + Simp[1/(2*a*(p + 1)*(a + b))   Int[(a + b*Sin[e + f*x]^2)^(p + 
 1)*Simp[2*a*(p + 1) + b*(2*p + 3) - 2*b*(p + 2)*Sin[e + f*x]^2, x], x], x] 
 /; FreeQ[{a, b, e, f}, x] && NeQ[a + b, 0] && LtQ[p, -1]
 
Maple [A] (verified)

Time = 0.77 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.09

method result size
default \(\frac {-\frac {b \left (8 a +5 b \right ) \tan \left (x \right )^{3}}{8 a \left (a^{2}+2 b a +b^{2}\right )}-\frac {\left (8 a +3 b \right ) b \tan \left (x \right )}{8 a^{2} \left (a +b \right )}}{\left (a \tan \left (x \right )^{2}+a +b \right )^{2}}+\frac {\left (8 a^{2}+8 b a +3 b^{2}\right ) \arctan \left (\frac {a \tan \left (x \right )}{\sqrt {\left (a +b \right ) a}}\right )}{8 \left (a^{2}+2 b a +b^{2}\right ) a^{2} \sqrt {\left (a +b \right ) a}}\) \(117\)
risch \(-\frac {i \left (8 a^{2} b \,{\mathrm e}^{6 i x}+8 a \,b^{2} {\mathrm e}^{6 i x}+3 b^{3} {\mathrm e}^{6 i x}+48 a^{3} {\mathrm e}^{4 i x}+72 a^{2} b \,{\mathrm e}^{4 i x}+42 a \,b^{2} {\mathrm e}^{4 i x}+9 b^{3} {\mathrm e}^{4 i x}+40 a^{2} b \,{\mathrm e}^{2 i x}+40 a \,b^{2} {\mathrm e}^{2 i x}+9 b^{3} {\mathrm e}^{2 i x}+6 a \,b^{2}+3 b^{3}\right )}{4 \left (a +b \right )^{2} a^{2} \left ({\mathrm e}^{4 i x} b +4 a \,{\mathrm e}^{2 i x}+2 \,{\mathrm e}^{2 i x} b +b \right )^{2}}-\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {2 i a^{2}+2 i a b +2 a \sqrt {-a^{2}-b a}+b \sqrt {-a^{2}-b a}}{b \sqrt {-a^{2}-b a}}\right )}{2 \sqrt {-a^{2}-b a}\, \left (a +b \right )^{2}}-\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {2 i a^{2}+2 i a b +2 a \sqrt {-a^{2}-b a}+b \sqrt {-a^{2}-b a}}{b \sqrt {-a^{2}-b a}}\right ) b}{2 \sqrt {-a^{2}-b a}\, \left (a +b \right )^{2} a}-\frac {3 \ln \left ({\mathrm e}^{2 i x}+\frac {2 i a^{2}+2 i a b +2 a \sqrt {-a^{2}-b a}+b \sqrt {-a^{2}-b a}}{b \sqrt {-a^{2}-b a}}\right ) b^{2}}{16 \sqrt {-a^{2}-b a}\, \left (a +b \right )^{2} a^{2}}+\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {-2 i a^{2}-2 i a b +2 a \sqrt {-a^{2}-b a}+b \sqrt {-a^{2}-b a}}{\sqrt {-a^{2}-b a}\, b}\right )}{2 \sqrt {-a^{2}-b a}\, \left (a +b \right )^{2}}+\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {-2 i a^{2}-2 i a b +2 a \sqrt {-a^{2}-b a}+b \sqrt {-a^{2}-b a}}{\sqrt {-a^{2}-b a}\, b}\right ) b}{2 \sqrt {-a^{2}-b a}\, \left (a +b \right )^{2} a}+\frac {3 \ln \left ({\mathrm e}^{2 i x}+\frac {-2 i a^{2}-2 i a b +2 a \sqrt {-a^{2}-b a}+b \sqrt {-a^{2}-b a}}{\sqrt {-a^{2}-b a}\, b}\right ) b^{2}}{16 \sqrt {-a^{2}-b a}\, \left (a +b \right )^{2} a^{2}}\) \(676\)

Input:

int(1/(a+b*cos(x)^2)^3,x,method=_RETURNVERBOSE)
 

Output:

(-1/8*b*(8*a+5*b)/a/(a^2+2*a*b+b^2)*tan(x)^3-1/8*(8*a+3*b)*b/a^2/(a+b)*tan 
(x))/(a*tan(x)^2+a+b)^2+1/8*(8*a^2+8*a*b+3*b^2)/(a^2+2*a*b+b^2)/a^2/((a+b) 
*a)^(1/2)*arctan(a*tan(x)/((a+b)*a)^(1/2))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 276 vs. \(2 (93) = 186\).

Time = 0.13 (sec) , antiderivative size = 616, normalized size of antiderivative = 5.76 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx =\text {Too large to display} \] Input:

integrate(1/(a+b*cos(x)^2)^3,x, algorithm="fricas")
 

Output:

[-1/32*(((8*a^2*b^2 + 8*a*b^3 + 3*b^4)*cos(x)^4 + 8*a^4 + 8*a^3*b + 3*a^2* 
b^2 + 2*(8*a^3*b + 8*a^2*b^2 + 3*a*b^3)*cos(x)^2)*sqrt(-a^2 - a*b)*log(((8 
*a^2 + 8*a*b + b^2)*cos(x)^4 - 2*(4*a^2 + 3*a*b)*cos(x)^2 + 4*((2*a + b)*c 
os(x)^3 - a*cos(x))*sqrt(-a^2 - a*b)*sin(x) + a^2)/(b^2*cos(x)^4 + 2*a*b*c 
os(x)^2 + a^2)) + 4*(3*(2*a^3*b^2 + 3*a^2*b^3 + a*b^4)*cos(x)^3 + (8*a^4*b 
 + 13*a^3*b^2 + 5*a^2*b^3)*cos(x))*sin(x))/(a^8 + 3*a^7*b + 3*a^6*b^2 + a^ 
5*b^3 + (a^6*b^2 + 3*a^5*b^3 + 3*a^4*b^4 + a^3*b^5)*cos(x)^4 + 2*(a^7*b + 
3*a^6*b^2 + 3*a^5*b^3 + a^4*b^4)*cos(x)^2), -1/16*(((8*a^2*b^2 + 8*a*b^3 + 
 3*b^4)*cos(x)^4 + 8*a^4 + 8*a^3*b + 3*a^2*b^2 + 2*(8*a^3*b + 8*a^2*b^2 + 
3*a*b^3)*cos(x)^2)*sqrt(a^2 + a*b)*arctan(1/2*((2*a + b)*cos(x)^2 - a)/(sq 
rt(a^2 + a*b)*cos(x)*sin(x))) + 2*(3*(2*a^3*b^2 + 3*a^2*b^3 + a*b^4)*cos(x 
)^3 + (8*a^4*b + 13*a^3*b^2 + 5*a^2*b^3)*cos(x))*sin(x))/(a^8 + 3*a^7*b + 
3*a^6*b^2 + a^5*b^3 + (a^6*b^2 + 3*a^5*b^3 + 3*a^4*b^4 + a^3*b^5)*cos(x)^4 
 + 2*(a^7*b + 3*a^6*b^2 + 3*a^5*b^3 + a^4*b^4)*cos(x)^2)]
 

Sympy [F(-1)]

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

integrate(1/(a+b*cos(x)**2)**3,x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.74 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx=\frac {{\left (8 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )} \arctan \left (\frac {a \tan \left (x\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{8 \, {\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} \sqrt {{\left (a + b\right )} a}} - \frac {{\left (8 \, a^{2} b + 5 \, a b^{2}\right )} \tan \left (x\right )^{3} + {\left (8 \, a^{2} b + 11 \, a b^{2} + 3 \, b^{3}\right )} \tan \left (x\right )}{8 \, {\left (a^{6} + 4 \, a^{5} b + 6 \, a^{4} b^{2} + 4 \, a^{3} b^{3} + a^{2} b^{4} + {\left (a^{6} + 2 \, a^{5} b + a^{4} b^{2}\right )} \tan \left (x\right )^{4} + 2 \, {\left (a^{6} + 3 \, a^{5} b + 3 \, a^{4} b^{2} + a^{3} b^{3}\right )} \tan \left (x\right )^{2}\right )}} \] Input:

integrate(1/(a+b*cos(x)^2)^3,x, algorithm="maxima")
 

Output:

1/8*(8*a^2 + 8*a*b + 3*b^2)*arctan(a*tan(x)/sqrt((a + b)*a))/((a^4 + 2*a^3 
*b + a^2*b^2)*sqrt((a + b)*a)) - 1/8*((8*a^2*b + 5*a*b^2)*tan(x)^3 + (8*a^ 
2*b + 11*a*b^2 + 3*b^3)*tan(x))/(a^6 + 4*a^5*b + 6*a^4*b^2 + 4*a^3*b^3 + a 
^2*b^4 + (a^6 + 2*a^5*b + a^4*b^2)*tan(x)^4 + 2*(a^6 + 3*a^5*b + 3*a^4*b^2 
 + a^3*b^3)*tan(x)^2)
 

Giac [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.39 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx=\frac {{\left (\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (x\right )}{\sqrt {a^{2} + a b}}\right )\right )} {\left (8 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )}}{8 \, {\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} \sqrt {a^{2} + a b}} - \frac {8 \, a^{2} b \tan \left (x\right )^{3} + 5 \, a b^{2} \tan \left (x\right )^{3} + 8 \, a^{2} b \tan \left (x\right ) + 11 \, a b^{2} \tan \left (x\right ) + 3 \, b^{3} \tan \left (x\right )}{8 \, {\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} {\left (a \tan \left (x\right )^{2} + a + b\right )}^{2}} \] Input:

integrate(1/(a+b*cos(x)^2)^3,x, algorithm="giac")
 

Output:

1/8*(pi*floor(x/pi + 1/2)*sgn(a) + arctan(a*tan(x)/sqrt(a^2 + a*b)))*(8*a^ 
2 + 8*a*b + 3*b^2)/((a^4 + 2*a^3*b + a^2*b^2)*sqrt(a^2 + a*b)) - 1/8*(8*a^ 
2*b*tan(x)^3 + 5*a*b^2*tan(x)^3 + 8*a^2*b*tan(x) + 11*a*b^2*tan(x) + 3*b^3 
*tan(x))/((a^4 + 2*a^3*b + a^2*b^2)*(a*tan(x)^2 + a + b)^2)
 

Mupad [B] (verification not implemented)

Time = 1.07 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.15 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx=\frac {\mathrm {atan}\left (\frac {\sqrt {a}\,\mathrm {tan}\left (x\right )}{\sqrt {a+b}}\right )\,\left (8\,a^2+8\,a\,b+3\,b^2\right )}{8\,a^{5/2}\,{\left (a+b\right )}^{5/2}}-\frac {\frac {\mathrm {tan}\left (x\right )\,\left (3\,b^2+8\,a\,b\right )}{8\,a^2\,\left (a+b\right )}+\frac {{\mathrm {tan}\left (x\right )}^3\,\left (5\,b^2+8\,a\,b\right )}{8\,a\,{\left (a+b\right )}^2}}{2\,a\,b+{\mathrm {tan}\left (x\right )}^2\,\left (2\,a^2+2\,b\,a\right )+a^2\,{\mathrm {tan}\left (x\right )}^4+a^2+b^2} \] Input:

int(1/(a + b*cos(x)^2)^3,x)
                                                                                    
                                                                                    
 

Output:

(atan((a^(1/2)*tan(x))/(a + b)^(1/2))*(8*a*b + 8*a^2 + 3*b^2))/(8*a^(5/2)* 
(a + b)^(5/2)) - ((tan(x)*(8*a*b + 3*b^2))/(8*a^2*(a + b)) + (tan(x)^3*(8* 
a*b + 5*b^2))/(8*a*(a + b)^2))/(2*a*b + tan(x)^2*(2*a*b + 2*a^2) + a^2*tan 
(x)^4 + a^2 + b^2)
 

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 1025, normalized size of antiderivative = 9.58 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^3} \, dx =\text {Too large to display} \] Input:

int(1/(a+b*cos(x)^2)^3,x)
 

Output:

(8*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))*sin( 
x)**4*a**2*b**2 + 8*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) - sqrt( 
b))/sqrt(a))*sin(x)**4*a*b**3 + 3*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*ta 
n(x/2) - sqrt(b))/sqrt(a))*sin(x)**4*b**4 - 16*sqrt(a)*sqrt(a + b)*atan((s 
qrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))*sin(x)**2*a**3*b - 32*sqrt(a)*sqrt 
(a + b)*atan((sqrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))*sin(x)**2*a**2*b**2 
 - 22*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))*s 
in(x)**2*a*b**3 - 6*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) - sqrt( 
b))/sqrt(a))*sin(x)**2*b**4 + 8*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan( 
x/2) - sqrt(b))/sqrt(a))*a**4 + 24*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*t 
an(x/2) - sqrt(b))/sqrt(a))*a**3*b + 27*sqrt(a)*sqrt(a + b)*atan((sqrt(a + 
 b)*tan(x/2) - sqrt(b))/sqrt(a))*a**2*b**2 + 14*sqrt(a)*sqrt(a + b)*atan(( 
sqrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))*a*b**3 + 3*sqrt(a)*sqrt(a + b)*at 
an((sqrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))*b**4 + 8*sqrt(a)*sqrt(a + b)* 
atan((sqrt(a + b)*tan(x/2) + sqrt(b))/sqrt(a))*sin(x)**4*a**2*b**2 + 8*sqr 
t(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) + sqrt(b))/sqrt(a))*sin(x)**4* 
a*b**3 + 3*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) + sqrt(b))/sqrt( 
a))*sin(x)**4*b**4 - 16*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) + s 
qrt(b))/sqrt(a))*sin(x)**2*a**3*b - 32*sqrt(a)*sqrt(a + b)*atan((sqrt(a + 
b)*tan(x/2) + sqrt(b))/sqrt(a))*sin(x)**2*a**2*b**2 - 22*sqrt(a)*sqrt(a...