\(\int \frac {\tan ^2(x)}{(a+b \cot ^2(x))^{5/2}} \, dx\) [58]

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

Optimal result

Integrand size = 17, antiderivative size = 141 \[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx=\frac {\arctan \left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )}{(a-b)^{5/2}}+\frac {b \tan (x)}{3 a (a-b) \left (a+b \cot ^2(x)\right )^{3/2}}+\frac {(7 a-4 b) b \tan (x)}{3 a^2 (a-b)^2 \sqrt {a+b \cot ^2(x)}}+\frac {(a-4 b) (3 a-2 b) \sqrt {a+b \cot ^2(x)} \tan (x)}{3 a^3 (a-b)^2} \] Output:

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

Mathematica [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 10.94 (sec) , antiderivative size = 1450, normalized size of antiderivative = 10.28 \[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx =\text {Too large to display} \] Input:

Integrate[Tan[x]^2/(a + b*Cot[x]^2)^(5/2),x]
 

Output:

(Sin[x]^2*((-16*b^3*(Cot[x] + Cot[x]^3)^2)/(a*(a - b)^2) + (40*b*Csc[x]^2) 
/(a - b) + (160*b^2*Cot[x]^2*Csc[x]^2)/(3*a*(a - b)) + (64*b^3*Cot[x]^4*Cs 
c[x]^2)/(3*a^2*(a - b)) - (40*b^2*Csc[x]^4)/(a - b)^2 + (92*(a - b)*Cos[x] 
^2*Hypergeometric2F1[2, 2, 9/2, ((a - b)*Cos[x]^2)/a])/(105*a) + (124*(a - 
 b)*b*Cos[x]^2*Cot[x]^2*Hypergeometric2F1[2, 2, 9/2, ((a - b)*Cos[x]^2)/a] 
)/(35*a^2) + (152*(a - b)*b^2*Cos[x]^2*Cot[x]^4*Hypergeometric2F1[2, 2, 9/ 
2, ((a - b)*Cos[x]^2)/a])/(35*a^3) + (176*(a - b)*b^3*Cos[x]^2*Cot[x]^6*Hy 
pergeometric2F1[2, 2, 9/2, ((a - b)*Cos[x]^2)/a])/(105*a^4) + (24*(a - b)* 
Cos[x]^2*HypergeometricPFQ[{2, 2, 2}, {1, 9/2}, ((a - b)*Cos[x]^2)/a])/(35 
*a) + (16*(a - b)*b*Cos[x]^2*Cot[x]^2*HypergeometricPFQ[{2, 2, 2}, {1, 9/2 
}, ((a - b)*Cos[x]^2)/a])/(7*a^2) + (88*(a - b)*b^2*Cos[x]^2*Cot[x]^4*Hype 
rgeometricPFQ[{2, 2, 2}, {1, 9/2}, ((a - b)*Cos[x]^2)/a])/(35*a^3) + (32*( 
a - b)*b^3*Cos[x]^2*Cot[x]^6*HypergeometricPFQ[{2, 2, 2}, {1, 9/2}, ((a - 
b)*Cos[x]^2)/a])/(35*a^4) + (16*(a - b)*Cos[x]^2*HypergeometricPFQ[{2, 2, 
2, 2}, {1, 1, 9/2}, ((a - b)*Cos[x]^2)/a])/(105*a) + (16*(a - b)*b*Cos[x]^ 
2*Cot[x]^2*HypergeometricPFQ[{2, 2, 2, 2}, {1, 1, 9/2}, ((a - b)*Cos[x]^2) 
/a])/(35*a^2) + (16*(a - b)*b^2*Cos[x]^2*Cot[x]^4*HypergeometricPFQ[{2, 2, 
 2, 2}, {1, 1, 9/2}, ((a - b)*Cos[x]^2)/a])/(35*a^3) + (16*(a - b)*b^3*Cos 
[x]^2*Cot[x]^6*HypergeometricPFQ[{2, 2, 2, 2}, {1, 1, 9/2}, ((a - b)*Cos[x 
]^2)/a])/(105*a^4) + (20*a*Sec[x]^2)/(3*(a - b)) - (30*a*b*Csc[x]^2*Sec...
 

Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.14, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.471, Rules used = {3042, 4153, 374, 441, 445, 27, 291, 216}

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 {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\tan \left (x+\frac {\pi }{2}\right )^2 \left (a+b \tan \left (x+\frac {\pi }{2}\right )^2\right )^{5/2}}dx\)

\(\Big \downarrow \) 4153

\(\displaystyle -\int \frac {\tan ^2(x)}{\left (\cot ^2(x)+1\right ) \left (b \cot ^2(x)+a\right )^{5/2}}d\cot (x)\)

\(\Big \downarrow \) 374

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

\(\Big \downarrow \) 441

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

\(\Big \downarrow \) 445

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 291

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

\(\Big \downarrow \) 216

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

Input:

Int[Tan[x]^2/(a + b*Cot[x]^2)^(5/2),x]
 

Output:

(b*Tan[x])/(3*a*(a - b)*(a + b*Cot[x]^2)^(3/2)) - (-(((7*a - 4*b)*b*Tan[x] 
)/(a*(a - b)*Sqrt[a + b*Cot[x]^2])) + ((-3*a^2*ArcTan[(Sqrt[a - b]*Cot[x]) 
/Sqrt[a + b*Cot[x]^2]])/Sqrt[a - b] - ((a - 4*b)*(3*a - 2*b)*Sqrt[a + b*Co 
t[x]^2]*Tan[x])/a)/(a*(a - b)))/(3*a*(a - b))
 

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 291
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst 
[Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, 
d}, x] && NeQ[b*c - a*d, 0]
 

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

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

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

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

rule 4153
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], 
 x]}, Simp[c*(ff/f)   Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f 
f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, 
n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio 
nalQ[n]))
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(529\) vs. \(2(123)=246\).

Time = 4.29 (sec) , antiderivative size = 530, normalized size of antiderivative = 3.76

method result size
default \(\frac {\sqrt {4}\, \left (\cos \left (x \right ) \left (3 \cos \left (x \right )+3\right ) \sin \left (x \right )^{4} \sqrt {\frac {\cos \left (x \right )^{2} b +a \sin \left (x \right )^{2}}{\left (\cos \left (x \right )+1\right )^{2}}}\, \ln \left (4 \sqrt {\frac {\cos \left (x \right )^{2} b +a \sin \left (x \right )^{2}}{\left (\cos \left (x \right )+1\right )^{2}}}\, \sqrt {-a +b}\, \cos \left (x \right )+4 \sqrt {-a +b}\, \sqrt {\frac {\cos \left (x \right )^{2} b +a \sin \left (x \right )^{2}}{\left (\cos \left (x \right )+1\right )^{2}}}-4 \cos \left (x \right ) a +4 b \cos \left (x \right )\right ) a^{5}+\cos \left (x \right )^{3} \left (6 \cos \left (x \right )+6\right ) \sin \left (x \right )^{2} \sqrt {\frac {\cos \left (x \right )^{2} b +a \sin \left (x \right )^{2}}{\left (\cos \left (x \right )+1\right )^{2}}}\, \ln \left (4 \sqrt {\frac {\cos \left (x \right )^{2} b +a \sin \left (x \right )^{2}}{\left (\cos \left (x \right )+1\right )^{2}}}\, \sqrt {-a +b}\, \cos \left (x \right )+4 \sqrt {-a +b}\, \sqrt {\frac {\cos \left (x \right )^{2} b +a \sin \left (x \right )^{2}}{\left (\cos \left (x \right )+1\right )^{2}}}-4 \cos \left (x \right ) a +4 b \cos \left (x \right )\right ) a^{4} b +\cos \left (x \right )^{5} \left (3 \cos \left (x \right )+3\right ) \sqrt {\frac {\cos \left (x \right )^{2} b +a \sin \left (x \right )^{2}}{\left (\cos \left (x \right )+1\right )^{2}}}\, \ln \left (4 \sqrt {\frac {\cos \left (x \right )^{2} b +a \sin \left (x \right )^{2}}{\left (\cos \left (x \right )+1\right )^{2}}}\, \sqrt {-a +b}\, \cos \left (x \right )+4 \sqrt {-a +b}\, \sqrt {\frac {\cos \left (x \right )^{2} b +a \sin \left (x \right )^{2}}{\left (\cos \left (x \right )+1\right )^{2}}}-4 \cos \left (x \right ) a +4 b \cos \left (x \right )\right ) a^{3} b^{2}+3 \sin \left (x \right )^{6} \sqrt {-a +b}\, a^{5}+\left (15 \cos \left (x \right )^{2}-6\right ) \sin \left (x \right )^{4} \sqrt {-a +b}\, a^{4} b +\left (39 \cos \left (x \right )^{4}-33 \cos \left (x \right )^{2}+3\right ) \sin \left (x \right )^{2} \sqrt {-a +b}\, a^{3} b^{2}+\cos \left (x \right )^{2} \left (53 \cos \left (x \right )^{4}-65 \cos \left (x \right )^{2}+15\right ) \sqrt {-a +b}\, a^{2} b^{3}+\cos \left (x \right )^{4} \left (-34 \cos \left (x \right )^{2}+20\right ) \sqrt {-a +b}\, a \,b^{4}+8 \sqrt {-a +b}\, b^{5} \cos \left (x \right )^{6}\right ) \sec \left (x \right ) \csc \left (x \right )^{5}}{6 \sqrt {-a +b}\, \left (a -b \right )^{2} a^{3} \left (a +b \cot \left (x \right )^{2}\right )^{\frac {5}{2}}}\) \(530\)

Input:

int(tan(x)^2/(a+b*cot(x)^2)^(5/2),x,method=_RETURNVERBOSE)
 

Output:

1/6*4^(1/2)/(-a+b)^(1/2)/(a-b)^2/a^3*(cos(x)*(3*cos(x)+3)*sin(x)^4*((cos(x 
)^2*b+a*sin(x)^2)/(cos(x)+1)^2)^(1/2)*ln(4*((cos(x)^2*b+a*sin(x)^2)/(cos(x 
)+1)^2)^(1/2)*(-a+b)^(1/2)*cos(x)+4*(-a+b)^(1/2)*((cos(x)^2*b+a*sin(x)^2)/ 
(cos(x)+1)^2)^(1/2)-4*cos(x)*a+4*b*cos(x))*a^5+cos(x)^3*(6*cos(x)+6)*sin(x 
)^2*((cos(x)^2*b+a*sin(x)^2)/(cos(x)+1)^2)^(1/2)*ln(4*((cos(x)^2*b+a*sin(x 
)^2)/(cos(x)+1)^2)^(1/2)*(-a+b)^(1/2)*cos(x)+4*(-a+b)^(1/2)*((cos(x)^2*b+a 
*sin(x)^2)/(cos(x)+1)^2)^(1/2)-4*cos(x)*a+4*b*cos(x))*a^4*b+cos(x)^5*(3*co 
s(x)+3)*((cos(x)^2*b+a*sin(x)^2)/(cos(x)+1)^2)^(1/2)*ln(4*((cos(x)^2*b+a*s 
in(x)^2)/(cos(x)+1)^2)^(1/2)*(-a+b)^(1/2)*cos(x)+4*(-a+b)^(1/2)*((cos(x)^2 
*b+a*sin(x)^2)/(cos(x)+1)^2)^(1/2)-4*cos(x)*a+4*b*cos(x))*a^3*b^2+3*sin(x) 
^6*(-a+b)^(1/2)*a^5+(15*cos(x)^2-6)*sin(x)^4*(-a+b)^(1/2)*a^4*b+(39*cos(x) 
^4-33*cos(x)^2+3)*sin(x)^2*(-a+b)^(1/2)*a^3*b^2+cos(x)^2*(53*cos(x)^4-65*c 
os(x)^2+15)*(-a+b)^(1/2)*a^2*b^3+cos(x)^4*(-34*cos(x)^2+20)*(-a+b)^(1/2)*a 
*b^4+8*(-a+b)^(1/2)*b^5*cos(x)^6)/(a+b*cot(x)^2)^(5/2)*sec(x)*csc(x)^5
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 320 vs. \(2 (123) = 246\).

Time = 0.15 (sec) , antiderivative size = 670, normalized size of antiderivative = 4.75 \[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx =\text {Too large to display} \] Input:

integrate(tan(x)^2/(a+b*cot(x)^2)^(5/2),x, algorithm="fricas")
 

Output:

[-1/12*(3*(a^5*tan(x)^4 + 2*a^4*b*tan(x)^2 + a^3*b^2)*sqrt(-a + b)*log(-(a 
^2*tan(x)^4 - 2*(3*a^2 - 4*a*b)*tan(x)^2 + a^2 - 8*a*b + 8*b^2 + 4*(a*tan( 
x)^3 - (a - 2*b)*tan(x))*sqrt(-a + b)*sqrt((a*tan(x)^2 + b)/tan(x)^2))/(ta 
n(x)^4 + 2*tan(x)^2 + 1)) - 4*(3*(a^5 - 3*a^4*b + 3*a^3*b^2 - a^2*b^3)*tan 
(x)^5 + 3*(2*a^4*b - 9*a^3*b^2 + 11*a^2*b^3 - 4*a*b^4)*tan(x)^3 + (3*a^3*b 
^2 - 17*a^2*b^3 + 22*a*b^4 - 8*b^5)*tan(x))*sqrt((a*tan(x)^2 + b)/tan(x)^2 
))/(a^6*b^2 - 3*a^5*b^3 + 3*a^4*b^4 - a^3*b^5 + (a^8 - 3*a^7*b + 3*a^6*b^2 
 - a^5*b^3)*tan(x)^4 + 2*(a^7*b - 3*a^6*b^2 + 3*a^5*b^3 - a^4*b^4)*tan(x)^ 
2), 1/6*(3*(a^5*tan(x)^4 + 2*a^4*b*tan(x)^2 + a^3*b^2)*sqrt(a - b)*arctan( 
-1/2*(a*tan(x)^3 - (a - 2*b)*tan(x))*sqrt(a - b)*sqrt((a*tan(x)^2 + b)/tan 
(x)^2)/((a^2 - a*b)*tan(x)^2 + a*b - b^2)) + 2*(3*(a^5 - 3*a^4*b + 3*a^3*b 
^2 - a^2*b^3)*tan(x)^5 + 3*(2*a^4*b - 9*a^3*b^2 + 11*a^2*b^3 - 4*a*b^4)*ta 
n(x)^3 + (3*a^3*b^2 - 17*a^2*b^3 + 22*a*b^4 - 8*b^5)*tan(x))*sqrt((a*tan(x 
)^2 + b)/tan(x)^2))/(a^6*b^2 - 3*a^5*b^3 + 3*a^4*b^4 - a^3*b^5 + (a^8 - 3* 
a^7*b + 3*a^6*b^2 - a^5*b^3)*tan(x)^4 + 2*(a^7*b - 3*a^6*b^2 + 3*a^5*b^3 - 
 a^4*b^4)*tan(x)^2)]
 

Sympy [F]

\[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx=\int \frac {\tan ^{2}{\left (x \right )}}{\left (a + b \cot ^{2}{\left (x \right )}\right )^{\frac {5}{2}}}\, dx \] Input:

integrate(tan(x)**2/(a+b*cot(x)**2)**(5/2),x)
 

Output:

Integral(tan(x)**2/(a + b*cot(x)**2)**(5/2), x)
 

Maxima [F(-1)]

Timed out. \[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx=\text {Timed out} \] Input:

integrate(tan(x)^2/(a+b*cot(x)^2)^(5/2),x, algorithm="maxima")
 

Output:

Timed out
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 537 vs. \(2 (123) = 246\).

Time = 0.19 (sec) , antiderivative size = 537, normalized size of antiderivative = 3.81 \[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx=\frac {{\left (3 \, a^{4} \sqrt {b} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) + 3 \, a^{3} \sqrt {-a + b} b \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) - 3 \, a^{3} b^{\frac {3}{2}} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) + 6 \, a^{4} \sqrt {b} - 18 \, a^{3} b^{\frac {3}{2}} + 16 \, a^{2} \sqrt {-a + b} b^{2} + 2 \, a^{2} b^{\frac {5}{2}} - 26 \, a \sqrt {-a + b} b^{3} + 20 \, a b^{\frac {7}{2}} + 10 \, \sqrt {-a + b} b^{4} - 10 \, b^{\frac {9}{2}}\right )} \mathrm {sgn}\left (\sin \left (x\right )\right )}{6 \, {\left (a^{6} \sqrt {-a + b} \sqrt {b} - a^{6} b - 3 \, a^{5} \sqrt {-a + b} b^{\frac {3}{2}} + 3 \, a^{5} b^{2} + 3 \, a^{4} \sqrt {-a + b} b^{\frac {5}{2}} - 3 \, a^{4} b^{3} - a^{3} \sqrt {-a + b} b^{\frac {7}{2}} + a^{3} b^{4}\right )}} - \frac {\frac {2 \, {\left (\frac {{\left (9 \, a^{5} b^{2} - 23 \, a^{4} b^{3} + 19 \, a^{3} b^{4} - 5 \, a^{2} b^{5}\right )} \cos \left (x\right )^{2}}{a^{8} - 3 \, a^{7} b + 3 \, a^{6} b^{2} - a^{5} b^{3}} - \frac {3 \, {\left (3 \, a^{5} b^{2} - 5 \, a^{4} b^{3} + 2 \, a^{3} b^{4}\right )}}{a^{8} - 3 \, a^{7} b + 3 \, a^{6} b^{2} - a^{5} b^{3}}\right )} \cos \left (x\right )}{{\left (a \cos \left (x\right )^{2} - b \cos \left (x\right )^{2} - a\right )} \sqrt {-a \cos \left (x\right )^{2} + b \cos \left (x\right )^{2} + a}} + \frac {3 \, \log \left ({\left (\sqrt {-a + b} \cos \left (x\right ) - \sqrt {-a \cos \left (x\right )^{2} + b \cos \left (x\right )^{2} + a}\right )}^{2}\right )}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \sqrt {-a + b}} + \frac {12 \, \sqrt {-a + b}}{{\left ({\left (\sqrt {-a + b} \cos \left (x\right ) - \sqrt {-a \cos \left (x\right )^{2} + b \cos \left (x\right )^{2} + a}\right )}^{2} - a\right )} a^{2}}}{6 \, \mathrm {sgn}\left (\sin \left (x\right )\right )} \] Input:

integrate(tan(x)^2/(a+b*cot(x)^2)^(5/2),x, algorithm="giac")
 

Output:

1/6*(3*a^4*sqrt(b)*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) + 3*a^3*sqrt(-a 
+ b)*b*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) - 3*a^3*b^(3/2)*log(-a - 2*s 
qrt(-a + b)*sqrt(b) + 2*b) + 6*a^4*sqrt(b) - 18*a^3*b^(3/2) + 16*a^2*sqrt( 
-a + b)*b^2 + 2*a^2*b^(5/2) - 26*a*sqrt(-a + b)*b^3 + 20*a*b^(7/2) + 10*sq 
rt(-a + b)*b^4 - 10*b^(9/2))*sgn(sin(x))/(a^6*sqrt(-a + b)*sqrt(b) - a^6*b 
 - 3*a^5*sqrt(-a + b)*b^(3/2) + 3*a^5*b^2 + 3*a^4*sqrt(-a + b)*b^(5/2) - 3 
*a^4*b^3 - a^3*sqrt(-a + b)*b^(7/2) + a^3*b^4) - 1/6*(2*((9*a^5*b^2 - 23*a 
^4*b^3 + 19*a^3*b^4 - 5*a^2*b^5)*cos(x)^2/(a^8 - 3*a^7*b + 3*a^6*b^2 - a^5 
*b^3) - 3*(3*a^5*b^2 - 5*a^4*b^3 + 2*a^3*b^4)/(a^8 - 3*a^7*b + 3*a^6*b^2 - 
 a^5*b^3))*cos(x)/((a*cos(x)^2 - b*cos(x)^2 - a)*sqrt(-a*cos(x)^2 + b*cos( 
x)^2 + a)) + 3*log((sqrt(-a + b)*cos(x) - sqrt(-a*cos(x)^2 + b*cos(x)^2 + 
a))^2)/((a^2 - 2*a*b + b^2)*sqrt(-a + b)) + 12*sqrt(-a + b)/(((sqrt(-a + b 
)*cos(x) - sqrt(-a*cos(x)^2 + b*cos(x)^2 + a))^2 - a)*a^2))/sgn(sin(x))
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx=\int \frac {{\mathrm {tan}\left (x\right )}^2}{{\left (b\,{\mathrm {cot}\left (x\right )}^2+a\right )}^{5/2}} \,d x \] Input:

int(tan(x)^2/(a + b*cot(x)^2)^(5/2),x)
 

Output:

int(tan(x)^2/(a + b*cot(x)^2)^(5/2), x)
 

Reduce [F]

\[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx=\int \frac {\sqrt {\cot \left (x \right )^{2} b +a}\, \tan \left (x \right )^{2}}{\cot \left (x \right )^{6} b^{3}+3 \cot \left (x \right )^{4} a \,b^{2}+3 \cot \left (x \right )^{2} a^{2} b +a^{3}}d x \] Input:

int(tan(x)^2/(a+b*cot(x)^2)^(5/2),x)
 

Output:

int((sqrt(cot(x)**2*b + a)*tan(x)**2)/(cot(x)**6*b**3 + 3*cot(x)**4*a*b**2 
 + 3*cot(x)**2*a**2*b + a**3),x)