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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [F(-1)]
Maxima [B] (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 = 154 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^4} \, dx=-\frac {(2 a+b) \left (8 a^2+8 a b+5 b^2\right ) \arctan \left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{16 a^{7/2} (a+b)^{7/2}}-\frac {b \cos (x) \sin (x)}{6 a (a+b) \left (a+b \cos ^2(x)\right )^3}-\frac {5 b (2 a+b) \cos (x) \sin (x)}{24 a^2 (a+b)^2 \left (a+b \cos ^2(x)\right )^2}-\frac {b \left (44 a^2+44 a b+15 b^2\right ) \cos (x) \sin (x)}{48 a^3 (a+b)^3 \left (a+b \cos ^2(x)\right )} \] Output:

-1/16*(2*a+b)*(8*a^2+8*a*b+5*b^2)*arctan((a+b)^(1/2)*cot(x)/a^(1/2))/a^(7/ 
2)/(a+b)^(7/2)-1/6*b*cos(x)*sin(x)/a/(a+b)/(a+b*cos(x)^2)^3-5/24*b*(2*a+b) 
*cos(x)*sin(x)/a^2/(a+b)^2/(a+b*cos(x)^2)^2-1/48*b*(44*a^2+44*a*b+15*b^2)* 
cos(x)*sin(x)/a^3/(a+b)^3/(a+b*cos(x)^2)
 

Mathematica [A] (verified)

Time = 6.11 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.09 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^4} \, dx=\frac {\frac {3 \left (16 a^3+24 a^2 b+18 a b^2+5 b^3\right ) \arctan \left (\frac {\sqrt {a} \tan (x)}{\sqrt {a+b}}\right )}{(a+b)^{7/2}}-\frac {32 a^{5/2} b \sin (2 x)}{(a+b) (2 a+b+b \cos (2 x))^3}-\frac {20 a^{3/2} b (2 a+b) \sin (2 x)}{(a+b)^2 (2 a+b+b \cos (2 x))^2}-\frac {\sqrt {a} b \left (44 a^2+44 a b+15 b^2\right ) \sin (2 x)}{(a+b)^3 (2 a+b+b \cos (2 x))}}{48 a^{7/2}} \] Input:

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

Output:

((3*(16*a^3 + 24*a^2*b + 18*a*b^2 + 5*b^3)*ArcTan[(Sqrt[a]*Tan[x])/Sqrt[a 
+ b]])/(a + b)^(7/2) - (32*a^(5/2)*b*Sin[2*x])/((a + b)*(2*a + b + b*Cos[2 
*x])^3) - (20*a^(3/2)*b*(2*a + b)*Sin[2*x])/((a + b)^2*(2*a + b + b*Cos[2* 
x])^2) - (Sqrt[a]*b*(44*a^2 + 44*a*b + 15*b^2)*Sin[2*x])/((a + b)^3*(2*a + 
 b + b*Cos[2*x])))/(48*a^(7/2))
 

Rubi [A] (verified)

Time = 0.70 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.17, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.100, Rules used = {3042, 3663, 25, 3042, 3652, 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 )^4} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3663

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3652

\(\displaystyle \frac {\frac {\int \frac {24 a^2+34 b a+15 b^2-10 b (2 a+b) \cos ^2(x)}{\left (b \cos ^2(x)+a\right )^2}dx}{4 a (a+b)}-\frac {5 b (2 a+b) \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}}{6 a (a+b)}-\frac {b \sin (x) \cos (x)}{6 a (a+b) \left (a+b \cos ^2(x)\right )^3}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\int \frac {24 a^2+34 b a+15 b^2-10 b (2 a+b) \sin \left (x+\frac {\pi }{2}\right )^2}{\left (b \sin \left (x+\frac {\pi }{2}\right )^2+a\right )^2}dx}{4 a (a+b)}-\frac {5 b (2 a+b) \sin (x) \cos (x)}{4 a (a+b) \left (a+b \cos ^2(x)\right )^2}}{6 a (a+b)}-\frac {b \sin (x) \cos (x)}{6 a (a+b) \left (a+b \cos ^2(x)\right )^3}\)

\(\Big \downarrow \) 3652

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3660

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

\(\Big \downarrow \) 218

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

Input:

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

Output:

-1/6*(b*Cos[x]*Sin[x])/(a*(a + b)*(a + b*Cos[x]^2)^3) + ((-5*b*(2*a + b)*C 
os[x]*Sin[x])/(4*a*(a + b)*(a + b*Cos[x]^2)^2) + ((-3*(2*a + b)*(8*a^2 + 8 
*a*b + 5*b^2)*ArcTan[(Sqrt[a + b]*Cot[x])/Sqrt[a]])/(2*a^(3/2)*(a + b)^(3/ 
2)) - (b*(44*a^2 + 44*a*b + 15*b^2)*Cos[x]*Sin[x])/(2*a*(a + b)*(a + b*Cos 
[x]^2)))/(4*a*(a + b)))/(6*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 = 1.82 (sec) , antiderivative size = 195, normalized size of antiderivative = 1.27

method result size
default \(\frac {-\frac {b \left (24 a^{2}+30 b a +11 b^{2}\right ) \tan \left (x \right )^{5}}{16 a \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {\left (18 a^{2}+18 b a +5 b^{2}\right ) b \tan \left (x \right )^{3}}{6 a^{2} \left (a^{2}+2 b a +b^{2}\right )}-\frac {\left (24 a^{2}+18 b a +5 b^{2}\right ) b \tan \left (x \right )}{16 a^{3} \left (a +b \right )}}{\left (a \tan \left (x \right )^{2}+a +b \right )^{3}}+\frac {\left (16 a^{3}+24 a^{2} b +18 a \,b^{2}+5 b^{3}\right ) \arctan \left (\frac {a \tan \left (x \right )}{\sqrt {\left (a +b \right ) a}}\right )}{16 a^{3} \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) \sqrt {\left (a +b \right ) a}}\) \(195\)
risch \(-\frac {i \left (2592 a^{2} b^{3} {\mathrm e}^{4 i x}+960 a \,b^{4} {\mathrm e}^{4 i x}+480 a^{3} b^{2} {\mathrm e}^{2 i x}+720 a^{2} b^{3} {\mathrm e}^{2 i x}+390 a \,b^{4} {\mathrm e}^{2 i x}+48 a^{3} b^{2} {\mathrm e}^{10 i x}+420 a \,b^{4} {\mathrm e}^{8 i x}+3520 a^{4} b \,{\mathrm e}^{6 i x}+15 b^{5}+150 b^{5} {\mathrm e}^{6 i x}+150 b^{5} {\mathrm e}^{4 i x}+75 b^{5} {\mathrm e}^{2 i x}+15 b^{5} {\mathrm e}^{10 i x}+75 b^{5} {\mathrm e}^{8 i x}+1408 a^{5} {\mathrm e}^{6 i x}+4176 a^{3} b^{2} {\mathrm e}^{6 i x}+2744 a^{2} b^{3} {\mathrm e}^{6 i x}+980 a \,b^{4} {\mathrm e}^{6 i x}+1632 a^{4} b \,{\mathrm e}^{4 i x}+3264 a^{3} b^{2} {\mathrm e}^{4 i x}+72 a^{2} b^{3} {\mathrm e}^{10 i x}+54 a \,b^{4} {\mathrm e}^{10 i x}+480 a^{4} b \,{\mathrm e}^{8 i x}+960 a^{3} b^{2} {\mathrm e}^{8 i x}+900 a^{2} b^{3} {\mathrm e}^{8 i x}+44 a^{2} b^{3}+44 a \,b^{4}\right )}{24 \left (a +b \right )^{3} a^{3} \left ({\mathrm e}^{4 i x} b +4 a \,{\mathrm e}^{2 i x}+2 \,{\mathrm e}^{2 i x} b +b \right )^{3}}-\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 )^{3}}-\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}{4 \sqrt {-a^{2}-b a}\, \left (a +b \right )^{3} a}-\frac {9 \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 )^{3} a^{2}}-\frac {5 \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^{3}}{32 \sqrt {-a^{2}-b a}\, \left (a +b \right )^{3} a^{3}}+\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 )^{3}}+\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}{4 \sqrt {-a^{2}-b a}\, \left (a +b \right )^{3} a}+\frac {9 \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 )^{3} a^{2}}+\frac {5 \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^{3}}{32 \sqrt {-a^{2}-b a}\, \left (a +b \right )^{3} a^{3}}\) \(1042\)

Input:

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

Output:

(-1/16*b*(24*a^2+30*a*b+11*b^2)/a/(a^3+3*a^2*b+3*a*b^2+b^3)*tan(x)^5-1/6*( 
18*a^2+18*a*b+5*b^2)*b/a^2/(a^2+2*a*b+b^2)*tan(x)^3-1/16*(24*a^2+18*a*b+5* 
b^2)*b/a^3/(a+b)*tan(x))/(a*tan(x)^2+a+b)^3+1/16*(16*a^3+24*a^2*b+18*a*b^2 
+5*b^3)/a^3/(a^3+3*a^2*b+3*a*b^2+b^3)/((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. 465 vs. \(2 (138) = 276\).

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

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

Output:

[-1/192*(3*((16*a^3*b^3 + 24*a^2*b^4 + 18*a*b^5 + 5*b^6)*cos(x)^6 + 16*a^6 
 + 24*a^5*b + 18*a^4*b^2 + 5*a^3*b^3 + 3*(16*a^4*b^2 + 24*a^3*b^3 + 18*a^2 
*b^4 + 5*a*b^5)*cos(x)^4 + 3*(16*a^5*b + 24*a^4*b^2 + 18*a^3*b^3 + 5*a^2*b 
^4)*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)*cos(x)^3 - a*cos(x))*sqrt(-a^2 - a*b) 
*sin(x) + a^2)/(b^2*cos(x)^4 + 2*a*b*cos(x)^2 + a^2)) + 4*((44*a^4*b^3 + 8 
8*a^3*b^4 + 59*a^2*b^5 + 15*a*b^6)*cos(x)^5 + 2*(54*a^5*b^2 + 113*a^4*b^3 
+ 79*a^3*b^4 + 20*a^2*b^5)*cos(x)^3 + 3*(24*a^6*b + 54*a^5*b^2 + 41*a^4*b^ 
3 + 11*a^3*b^4)*cos(x))*sin(x))/(a^11 + 4*a^10*b + 6*a^9*b^2 + 4*a^8*b^3 + 
 a^7*b^4 + (a^8*b^3 + 4*a^7*b^4 + 6*a^6*b^5 + 4*a^5*b^6 + a^4*b^7)*cos(x)^ 
6 + 3*(a^9*b^2 + 4*a^8*b^3 + 6*a^7*b^4 + 4*a^6*b^5 + a^5*b^6)*cos(x)^4 + 3 
*(a^10*b + 4*a^9*b^2 + 6*a^8*b^3 + 4*a^7*b^4 + a^6*b^5)*cos(x)^2), -1/96*( 
3*((16*a^3*b^3 + 24*a^2*b^4 + 18*a*b^5 + 5*b^6)*cos(x)^6 + 16*a^6 + 24*a^5 
*b + 18*a^4*b^2 + 5*a^3*b^3 + 3*(16*a^4*b^2 + 24*a^3*b^3 + 18*a^2*b^4 + 5* 
a*b^5)*cos(x)^4 + 3*(16*a^5*b + 24*a^4*b^2 + 18*a^3*b^3 + 5*a^2*b^4)*cos(x 
)^2)*sqrt(a^2 + a*b)*arctan(1/2*((2*a + b)*cos(x)^2 - a)/(sqrt(a^2 + a*b)* 
cos(x)*sin(x))) + 2*((44*a^4*b^3 + 88*a^3*b^4 + 59*a^2*b^5 + 15*a*b^6)*cos 
(x)^5 + 2*(54*a^5*b^2 + 113*a^4*b^3 + 79*a^3*b^4 + 20*a^2*b^5)*cos(x)^3 + 
3*(24*a^6*b + 54*a^5*b^2 + 41*a^4*b^3 + 11*a^3*b^4)*cos(x))*sin(x))/(a^11 
+ 4*a^10*b + 6*a^9*b^2 + 4*a^8*b^3 + a^7*b^4 + (a^8*b^3 + 4*a^7*b^4 + 6...
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [B] (verification not implemented)

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

Time = 0.13 (sec) , antiderivative size = 344, normalized size of antiderivative = 2.23 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^4} \, dx=\frac {{\left (16 \, a^{3} + 24 \, a^{2} b + 18 \, a b^{2} + 5 \, b^{3}\right )} \arctan \left (\frac {a \tan \left (x\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{16 \, {\left (a^{6} + 3 \, a^{5} b + 3 \, a^{4} b^{2} + a^{3} b^{3}\right )} \sqrt {{\left (a + b\right )} a}} - \frac {3 \, {\left (24 \, a^{4} b + 30 \, a^{3} b^{2} + 11 \, a^{2} b^{3}\right )} \tan \left (x\right )^{5} + 8 \, {\left (18 \, a^{4} b + 36 \, a^{3} b^{2} + 23 \, a^{2} b^{3} + 5 \, a b^{4}\right )} \tan \left (x\right )^{3} + 3 \, {\left (24 \, a^{4} b + 66 \, a^{3} b^{2} + 65 \, a^{2} b^{3} + 28 \, a b^{4} + 5 \, b^{5}\right )} \tan \left (x\right )}{48 \, {\left (a^{9} + 6 \, a^{8} b + 15 \, a^{7} b^{2} + 20 \, a^{6} b^{3} + 15 \, a^{5} b^{4} + 6 \, a^{4} b^{5} + a^{3} b^{6} + {\left (a^{9} + 3 \, a^{8} b + 3 \, a^{7} b^{2} + a^{6} b^{3}\right )} \tan \left (x\right )^{6} + 3 \, {\left (a^{9} + 4 \, a^{8} b + 6 \, a^{7} b^{2} + 4 \, a^{6} b^{3} + a^{5} b^{4}\right )} \tan \left (x\right )^{4} + 3 \, {\left (a^{9} + 5 \, a^{8} b + 10 \, a^{7} b^{2} + 10 \, a^{6} b^{3} + 5 \, a^{5} b^{4} + a^{4} b^{5}\right )} \tan \left (x\right )^{2}\right )}} \] Input:

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

Output:

1/16*(16*a^3 + 24*a^2*b + 18*a*b^2 + 5*b^3)*arctan(a*tan(x)/sqrt((a + b)*a 
))/((a^6 + 3*a^5*b + 3*a^4*b^2 + a^3*b^3)*sqrt((a + b)*a)) - 1/48*(3*(24*a 
^4*b + 30*a^3*b^2 + 11*a^2*b^3)*tan(x)^5 + 8*(18*a^4*b + 36*a^3*b^2 + 23*a 
^2*b^3 + 5*a*b^4)*tan(x)^3 + 3*(24*a^4*b + 66*a^3*b^2 + 65*a^2*b^3 + 28*a* 
b^4 + 5*b^5)*tan(x))/(a^9 + 6*a^8*b + 15*a^7*b^2 + 20*a^6*b^3 + 15*a^5*b^4 
 + 6*a^4*b^5 + a^3*b^6 + (a^9 + 3*a^8*b + 3*a^7*b^2 + a^6*b^3)*tan(x)^6 + 
3*(a^9 + 4*a^8*b + 6*a^7*b^2 + 4*a^6*b^3 + a^5*b^4)*tan(x)^4 + 3*(a^9 + 5* 
a^8*b + 10*a^7*b^2 + 10*a^6*b^3 + 5*a^5*b^4 + a^4*b^5)*tan(x)^2)
 

Giac [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 251, normalized size of antiderivative = 1.63 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^4} \, dx=\frac {{\left (16 \, a^{3} + 24 \, a^{2} b + 18 \, a b^{2} + 5 \, b^{3}\right )} {\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 )}}{16 \, {\left (a^{6} + 3 \, a^{5} b + 3 \, a^{4} b^{2} + a^{3} b^{3}\right )} \sqrt {a^{2} + a b}} - \frac {72 \, a^{4} b \tan \left (x\right )^{5} + 90 \, a^{3} b^{2} \tan \left (x\right )^{5} + 33 \, a^{2} b^{3} \tan \left (x\right )^{5} + 144 \, a^{4} b \tan \left (x\right )^{3} + 288 \, a^{3} b^{2} \tan \left (x\right )^{3} + 184 \, a^{2} b^{3} \tan \left (x\right )^{3} + 40 \, a b^{4} \tan \left (x\right )^{3} + 72 \, a^{4} b \tan \left (x\right ) + 198 \, a^{3} b^{2} \tan \left (x\right ) + 195 \, a^{2} b^{3} \tan \left (x\right ) + 84 \, a b^{4} \tan \left (x\right ) + 15 \, b^{5} \tan \left (x\right )}{48 \, {\left (a^{6} + 3 \, a^{5} b + 3 \, a^{4} b^{2} + a^{3} b^{3}\right )} {\left (a \tan \left (x\right )^{2} + a + b\right )}^{3}} \] Input:

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

Output:

1/16*(16*a^3 + 24*a^2*b + 18*a*b^2 + 5*b^3)*(pi*floor(x/pi + 1/2)*sgn(a) + 
 arctan(a*tan(x)/sqrt(a^2 + a*b)))/((a^6 + 3*a^5*b + 3*a^4*b^2 + a^3*b^3)* 
sqrt(a^2 + a*b)) - 1/48*(72*a^4*b*tan(x)^5 + 90*a^3*b^2*tan(x)^5 + 33*a^2* 
b^3*tan(x)^5 + 144*a^4*b*tan(x)^3 + 288*a^3*b^2*tan(x)^3 + 184*a^2*b^3*tan 
(x)^3 + 40*a*b^4*tan(x)^3 + 72*a^4*b*tan(x) + 198*a^3*b^2*tan(x) + 195*a^2 
*b^3*tan(x) + 84*a*b^4*tan(x) + 15*b^5*tan(x))/((a^6 + 3*a^5*b + 3*a^4*b^2 
 + a^3*b^3)*(a*tan(x)^2 + a + b)^3)
 

Mupad [B] (verification not implemented)

Time = 1.12 (sec) , antiderivative size = 254, normalized size of antiderivative = 1.65 \[ \int \frac {1}{\left (a+b \cos ^2(x)\right )^4} \, dx=\frac {\mathrm {atan}\left (\frac {\sqrt {a}\,\mathrm {tan}\left (x\right )\,\left (2\,a+b\right )\,\left (8\,a^2+8\,a\,b+5\,b^2\right )}{\sqrt {a+b}\,\left (16\,a^3+24\,a^2\,b+18\,a\,b^2+5\,b^3\right )}\right )\,\left (2\,a+b\right )\,\left (8\,a^2+8\,a\,b+5\,b^2\right )}{16\,a^{7/2}\,{\left (a+b\right )}^{7/2}}-\frac {\frac {\mathrm {tan}\left (x\right )\,\left (24\,a^2\,b+18\,a\,b^2+5\,b^3\right )}{16\,a^3\,\left (a+b\right )}+\frac {{\mathrm {tan}\left (x\right )}^3\,\left (18\,a^2\,b+18\,a\,b^2+5\,b^3\right )}{6\,a^2\,{\left (a+b\right )}^2}+\frac {{\mathrm {tan}\left (x\right )}^5\,\left (24\,a^2\,b+30\,a\,b^2+11\,b^3\right )}{16\,a\,{\left (a+b\right )}^3}}{{\mathrm {tan}\left (x\right )}^2\,\left (3\,a^3+6\,a^2\,b+3\,a\,b^2\right )+a^3\,{\mathrm {tan}\left (x\right )}^6+3\,a\,b^2+3\,a^2\,b+{\mathrm {tan}\left (x\right )}^4\,\left (3\,a^3+3\,b\,a^2\right )+a^3+b^3} \] Input:

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

Output:

(atan((a^(1/2)*tan(x)*(2*a + b)*(8*a*b + 8*a^2 + 5*b^2))/((a + b)^(1/2)*(1 
8*a*b^2 + 24*a^2*b + 16*a^3 + 5*b^3)))*(2*a + b)*(8*a*b + 8*a^2 + 5*b^2))/ 
(16*a^(7/2)*(a + b)^(7/2)) - ((tan(x)*(18*a*b^2 + 24*a^2*b + 5*b^3))/(16*a 
^3*(a + b)) + (tan(x)^3*(18*a*b^2 + 18*a^2*b + 5*b^3))/(6*a^2*(a + b)^2) + 
 (tan(x)^5*(30*a*b^2 + 24*a^2*b + 11*b^3))/(16*a*(a + b)^3))/(tan(x)^2*(3* 
a*b^2 + 6*a^2*b + 3*a^3) + a^3*tan(x)^6 + 3*a*b^2 + 3*a^2*b + tan(x)^4*(3* 
a^2*b + 3*a^3) + a^3 + b^3)
 

Reduce [B] (verification not implemented)

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

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

Output:

(48*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))*sin 
(x)**6*a**3*b**3 + 72*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) - sqr 
t(b))/sqrt(a))*sin(x)**6*a**2*b**4 + 54*sqrt(a)*sqrt(a + b)*atan((sqrt(a + 
 b)*tan(x/2) - sqrt(b))/sqrt(a))*sin(x)**6*a*b**5 + 15*sqrt(a)*sqrt(a + b) 
*atan((sqrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))*sin(x)**6*b**6 - 144*sqrt( 
a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))*sin(x)**4*a* 
*4*b**2 - 360*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) - sqrt(b))/sq 
rt(a))*sin(x)**4*a**3*b**3 - 378*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan 
(x/2) - sqrt(b))/sqrt(a))*sin(x)**4*a**2*b**4 - 207*sqrt(a)*sqrt(a + b)*at 
an((sqrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))*sin(x)**4*a*b**5 - 45*sqrt(a) 
*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))*sin(x)**4*b**6 
 + 144*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))* 
sin(x)**2*a**5*b + 504*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) - sq 
rt(b))/sqrt(a))*sin(x)**2*a**4*b**2 + 738*sqrt(a)*sqrt(a + b)*atan((sqrt(a 
 + b)*tan(x/2) - sqrt(b))/sqrt(a))*sin(x)**2*a**3*b**3 + 585*sqrt(a)*sqrt( 
a + b)*atan((sqrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))*sin(x)**2*a**2*b**4 
+ 252*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) - sqrt(b))/sqrt(a))*s 
in(x)**2*a*b**5 + 45*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*tan(x/2) - sqrt 
(b))/sqrt(a))*sin(x)**2*b**6 - 48*sqrt(a)*sqrt(a + b)*atan((sqrt(a + b)*ta 
n(x/2) - sqrt(b))/sqrt(a))*a**6 - 216*sqrt(a)*sqrt(a + b)*atan((sqrt(a ...