\(\int \tan ^2(x) \sqrt {a+b \tan ^4(x)} \, dx\) [392]

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

Optimal result

Integrand size = 17, antiderivative size = 458 \[ \int \tan ^2(x) \sqrt {a+b \tan ^4(x)} \, dx=-\frac {1}{2} \sqrt {a+b} \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )+\frac {1}{3} \tan (x) \sqrt {a+b \tan ^4(x)}-\frac {\sqrt {b} \tan (x) \sqrt {a+b \tan ^4(x)}}{\sqrt {a}+\sqrt {b} \tan ^2(x)}+\frac {\sqrt [4]{a} \sqrt [4]{b} E\left (2 \arctan \left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{\sqrt {a+b \tan ^4(x)}}+\frac {\sqrt [4]{a} \left (a-\sqrt {a} \sqrt {b}+3 b\right ) \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{3 \left (\sqrt {a}-\sqrt {b}\right ) \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \operatorname {EllipticPi}\left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}},2 \arctan \left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{4 \sqrt [4]{a} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}} \] Output:

-1/2*(a+b)^(1/2)*arctan((a+b)^(1/2)*tan(x)/(a+b*tan(x)^4)^(1/2))+1/3*tan(x 
)*(a+b*tan(x)^4)^(1/2)-b^(1/2)*tan(x)*(a+b*tan(x)^4)^(1/2)/(a^(1/2)+b^(1/2 
)*tan(x)^2)+a^(1/4)*b^(1/4)*EllipticE(sin(2*arctan(b^(1/4)*tan(x)/a^(1/4)) 
),1/2*2^(1/2))*(a^(1/2)+b^(1/2)*tan(x)^2)*((a+b*tan(x)^4)/(a^(1/2)+b^(1/2) 
*tan(x)^2)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)+1/3*a^(1/4)*(a-a^(1/2)*b^(1/2)+3* 
b)*InverseJacobiAM(2*arctan(b^(1/4)*tan(x)/a^(1/4)),1/2*2^(1/2))*(a^(1/2)+ 
b^(1/2)*tan(x)^2)*((a+b*tan(x)^4)/(a^(1/2)+b^(1/2)*tan(x)^2)^2)^(1/2)/(a^( 
1/2)-b^(1/2))/b^(1/4)/(a+b*tan(x)^4)^(1/2)-1/4*(a^(1/2)+b^(1/2))*(a+b)*Ell 
ipticPi(sin(2*arctan(b^(1/4)*tan(x)/a^(1/4))),-1/4*(a^(1/2)-b^(1/2))^2/a^( 
1/2)/b^(1/2),1/2*2^(1/2))*(a^(1/2)+b^(1/2)*tan(x)^2)*((a+b*tan(x)^4)/(a^(1 
/2)+b^(1/2)*tan(x)^2)^2)^(1/2)/a^(1/4)/(a^(1/2)-b^(1/2))/b^(1/4)/(a+b*tan( 
x)^4)^(1/2)
 

Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

Time = 11.16 (sec) , antiderivative size = 404, normalized size of antiderivative = 0.88 \[ \int \tan ^2(x) \sqrt {a+b \tan ^4(x)} \, dx=\sqrt {\frac {3 a+3 b+4 a \cos (2 x)-4 b \cos (2 x)+a \cos (4 x)+b \cos (4 x)}{3+4 \cos (2 x)+\cos (4 x)}} \left (-\frac {1}{2} \sin (2 x)+\frac {\tan (x)}{3}\right )+\frac {3 a \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \cos (x) \sin (x)+3 \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} b \sin ^2(x) \tan ^3(x)-3 \sqrt {a} \sqrt {b} E\left (\left .i \text {arcsinh}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right )\right |-1\right ) \sqrt {1+\frac {b \tan ^4(x)}{a}}+\left (-2 i a+3 \sqrt {a} \sqrt {b}-3 i b\right ) \operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right ),-1\right ) \sqrt {1+\frac {b \tan ^4(x)}{a}}+3 i a \operatorname {EllipticPi}\left (-\frac {i \sqrt {a}}{\sqrt {b}},i \text {arcsinh}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right ),-1\right ) \sqrt {1+\frac {b \tan ^4(x)}{a}}+3 i b \operatorname {EllipticPi}\left (-\frac {i \sqrt {a}}{\sqrt {b}},i \text {arcsinh}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right ),-1\right ) \sqrt {1+\frac {b \tan ^4(x)}{a}}}{3 \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \sqrt {a+b \tan ^4(x)}} \] Input:

Integrate[Tan[x]^2*Sqrt[a + b*Tan[x]^4],x]
 

Output:

Sqrt[(3*a + 3*b + 4*a*Cos[2*x] - 4*b*Cos[2*x] + a*Cos[4*x] + b*Cos[4*x])/( 
3 + 4*Cos[2*x] + Cos[4*x])]*(-1/2*Sin[2*x] + Tan[x]/3) + (3*a*Sqrt[(I*Sqrt 
[b])/Sqrt[a]]*Cos[x]*Sin[x] + 3*Sqrt[(I*Sqrt[b])/Sqrt[a]]*b*Sin[x]^2*Tan[x 
]^3 - 3*Sqrt[a]*Sqrt[b]*EllipticE[I*ArcSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[ 
x]], -1]*Sqrt[1 + (b*Tan[x]^4)/a] + ((-2*I)*a + 3*Sqrt[a]*Sqrt[b] - (3*I)* 
b)*EllipticF[I*ArcSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[x]], -1]*Sqrt[1 + (b* 
Tan[x]^4)/a] + (3*I)*a*EllipticPi[((-I)*Sqrt[a])/Sqrt[b], I*ArcSinh[Sqrt[( 
I*Sqrt[b])/Sqrt[a]]*Tan[x]], -1]*Sqrt[1 + (b*Tan[x]^4)/a] + (3*I)*b*Ellipt 
icPi[((-I)*Sqrt[a])/Sqrt[b], I*ArcSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[x]], 
-1]*Sqrt[1 + (b*Tan[x]^4)/a])/(3*Sqrt[(I*Sqrt[b])/Sqrt[a]]*Sqrt[a + b*Tan[ 
x]^4])
 

Rubi [A] (verified)

Time = 0.91 (sec) , antiderivative size = 490, normalized size of antiderivative = 1.07, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.706, Rules used = {3042, 4153, 1631, 25, 27, 2221, 2427, 27, 1512, 27, 761, 1510}

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 \tan ^2(x) \sqrt {a+b \tan ^4(x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \tan (x)^2 \sqrt {a+b \tan (x)^4}dx\)

\(\Big \downarrow \) 4153

\(\displaystyle \int \frac {\tan ^2(x) \sqrt {a+b \tan ^4(x)}}{\tan ^2(x)+1}d\tan (x)\)

\(\Big \downarrow \) 1631

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 2221

\(\displaystyle \frac {\int \frac {(a-b) b \tan ^4(x)-(a-b) b \tan ^2(x)+\sqrt {a} \left (\sqrt {a}+\sqrt {b}\right ) (a+b)}{\sqrt {b \tan ^4(x)+a}}d\tan (x)}{a-b}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \left (\frac {\left (\sqrt {a}-\sqrt {b}\right ) \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )}{2 \sqrt {a+b}}+\frac {\left (\sqrt {a}+\sqrt {b}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} \operatorname {EllipticPi}\left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}},2 \arctan \left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac {1}{2}\right )}{4 \sqrt [4]{a} \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}\right )}{a-b}\)

\(\Big \downarrow \) 2427

\(\displaystyle \frac {\frac {\int \frac {b \left (\sqrt {a} \left (\sqrt {a}+\sqrt {b}\right ) \left (2 a+\sqrt {b} \sqrt {a}+3 b\right )-3 (a-b) b \tan ^2(x)\right )}{\sqrt {b \tan ^4(x)+a}}d\tan (x)}{3 b}+\frac {1}{3} (a-b) \tan (x) \sqrt {a+b \tan ^4(x)}}{a-b}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \left (\frac {\left (\sqrt {a}-\sqrt {b}\right ) \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )}{2 \sqrt {a+b}}+\frac {\left (\sqrt {a}+\sqrt {b}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} \operatorname {EllipticPi}\left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}},2 \arctan \left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac {1}{2}\right )}{4 \sqrt [4]{a} \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}\right )}{a-b}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {1}{3} \int \frac {\sqrt {a} \left (2 a^{3/2}+3 \sqrt {b} a+4 b \sqrt {a}+3 b^{3/2}\right )-3 (a-b) b \tan ^2(x)}{\sqrt {b \tan ^4(x)+a}}d\tan (x)+\frac {1}{3} (a-b) \tan (x) \sqrt {a+b \tan ^4(x)}}{a-b}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \left (\frac {\left (\sqrt {a}-\sqrt {b}\right ) \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )}{2 \sqrt {a+b}}+\frac {\left (\sqrt {a}+\sqrt {b}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} \operatorname {EllipticPi}\left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}},2 \arctan \left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac {1}{2}\right )}{4 \sqrt [4]{a} \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}\right )}{a-b}\)

\(\Big \downarrow \) 1512

\(\displaystyle \frac {\frac {1}{3} \left (2 \sqrt {a} \left (a^{3/2}+2 \sqrt {a} b+3 b^{3/2}\right ) \int \frac {1}{\sqrt {b \tan ^4(x)+a}}d\tan (x)+3 \sqrt {a} \sqrt {b} (a-b) \int \frac {\sqrt {a}-\sqrt {b} \tan ^2(x)}{\sqrt {a} \sqrt {b \tan ^4(x)+a}}d\tan (x)\right )+\frac {1}{3} (a-b) \tan (x) \sqrt {a+b \tan ^4(x)}}{a-b}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \left (\frac {\left (\sqrt {a}-\sqrt {b}\right ) \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )}{2 \sqrt {a+b}}+\frac {\left (\sqrt {a}+\sqrt {b}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} \operatorname {EllipticPi}\left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}},2 \arctan \left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac {1}{2}\right )}{4 \sqrt [4]{a} \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}\right )}{a-b}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {1}{3} \left (2 \sqrt {a} \left (a^{3/2}+2 \sqrt {a} b+3 b^{3/2}\right ) \int \frac {1}{\sqrt {b \tan ^4(x)+a}}d\tan (x)+3 \sqrt {b} (a-b) \int \frac {\sqrt {a}-\sqrt {b} \tan ^2(x)}{\sqrt {b \tan ^4(x)+a}}d\tan (x)\right )+\frac {1}{3} (a-b) \tan (x) \sqrt {a+b \tan ^4(x)}}{a-b}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \left (\frac {\left (\sqrt {a}-\sqrt {b}\right ) \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )}{2 \sqrt {a+b}}+\frac {\left (\sqrt {a}+\sqrt {b}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} \operatorname {EllipticPi}\left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}},2 \arctan \left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac {1}{2}\right )}{4 \sqrt [4]{a} \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}\right )}{a-b}\)

\(\Big \downarrow \) 761

\(\displaystyle \frac {\frac {1}{3} \left (3 \sqrt {b} (a-b) \int \frac {\sqrt {a}-\sqrt {b} \tan ^2(x)}{\sqrt {b \tan ^4(x)+a}}d\tan (x)+\frac {\sqrt [4]{a} \left (a^{3/2}+2 \sqrt {a} b+3 b^{3/2}\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac {1}{2}\right )}{\sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}\right )+\frac {1}{3} (a-b) \tan (x) \sqrt {a+b \tan ^4(x)}}{a-b}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \left (\frac {\left (\sqrt {a}-\sqrt {b}\right ) \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )}{2 \sqrt {a+b}}+\frac {\left (\sqrt {a}+\sqrt {b}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} \operatorname {EllipticPi}\left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}},2 \arctan \left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac {1}{2}\right )}{4 \sqrt [4]{a} \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}\right )}{a-b}\)

\(\Big \downarrow \) 1510

\(\displaystyle \frac {\frac {1}{3} \left (\frac {\sqrt [4]{a} \left (a^{3/2}+2 \sqrt {a} b+3 b^{3/2}\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac {1}{2}\right )}{\sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}+3 \sqrt {b} (a-b) \left (\frac {\sqrt [4]{a} \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} E\left (2 \arctan \left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{\sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}-\frac {\tan (x) \sqrt {a+b \tan ^4(x)}}{\sqrt {a}+\sqrt {b} \tan ^2(x)}\right )\right )+\frac {1}{3} (a-b) \tan (x) \sqrt {a+b \tan ^4(x)}}{a-b}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \left (\frac {\left (\sqrt {a}-\sqrt {b}\right ) \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )}{2 \sqrt {a+b}}+\frac {\left (\sqrt {a}+\sqrt {b}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} \operatorname {EllipticPi}\left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}},2 \arctan \left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac {1}{2}\right )}{4 \sqrt [4]{a} \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}\right )}{a-b}\)

Input:

Int[Tan[x]^2*Sqrt[a + b*Tan[x]^4],x]
 

Output:

-(((Sqrt[a] + Sqrt[b])*(a + b)*(((Sqrt[a] - Sqrt[b])*ArcTan[(Sqrt[a + b]*T 
an[x])/Sqrt[a + b*Tan[x]^4]])/(2*Sqrt[a + b]) + ((Sqrt[a] + Sqrt[b])*Ellip 
ticPi[-1/4*(Sqrt[a] - Sqrt[b])^2/(Sqrt[a]*Sqrt[b]), 2*ArcTan[(b^(1/4)*Tan[ 
x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Tan[x]^4)/(Sqr 
t[a] + Sqrt[b]*Tan[x]^2)^2])/(4*a^(1/4)*b^(1/4)*Sqrt[a + b*Tan[x]^4])))/(a 
 - b)) + (((a - b)*Tan[x]*Sqrt[a + b*Tan[x]^4])/3 + ((a^(1/4)*(a^(3/2) + 2 
*Sqrt[a]*b + 3*b^(3/2))*EllipticF[2*ArcTan[(b^(1/4)*Tan[x])/a^(1/4)], 1/2] 
*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Tan[x]^4)/(Sqrt[a] + Sqrt[b]*Tan 
[x]^2)^2])/(b^(1/4)*Sqrt[a + b*Tan[x]^4]) + 3*(a - b)*Sqrt[b]*(-((Tan[x]*S 
qrt[a + b*Tan[x]^4])/(Sqrt[a] + Sqrt[b]*Tan[x]^2)) + (a^(1/4)*EllipticE[2* 
ArcTan[(b^(1/4)*Tan[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[( 
a + b*Tan[x]^4)/(Sqrt[a] + Sqrt[b]*Tan[x]^2)^2])/(b^(1/4)*Sqrt[a + b*Tan[x 
]^4])))/3)/(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 761
Int[1/Sqrt[(a_) + (b_.)*(x_)^4], x_Symbol] :> With[{q = Rt[b/a, 4]}, Simp[( 
1 + q^2*x^2)*(Sqrt[(a + b*x^4)/(a*(1 + q^2*x^2)^2)]/(2*q*Sqrt[a + b*x^4]))* 
EllipticF[2*ArcTan[q*x], 1/2], x]] /; FreeQ[{a, b}, x] && PosQ[b/a]
 

rule 1510
Int[((d_) + (e_.)*(x_)^2)/Sqrt[(a_) + (c_.)*(x_)^4], x_Symbol] :> With[{q = 
 Rt[c/a, 4]}, Simp[(-d)*x*(Sqrt[a + c*x^4]/(a*(1 + q^2*x^2))), x] + Simp[d* 
(1 + q^2*x^2)*(Sqrt[(a + c*x^4)/(a*(1 + q^2*x^2)^2)]/(q*Sqrt[a + c*x^4]))*E 
llipticE[2*ArcTan[q*x], 1/2], x] /; EqQ[e + d*q^2, 0]] /; FreeQ[{a, c, d, e 
}, x] && PosQ[c/a]
 

rule 1512
Int[((d_) + (e_.)*(x_)^2)/Sqrt[(a_) + (c_.)*(x_)^4], x_Symbol] :> With[{q = 
 Rt[c/a, 2]}, Simp[(e + d*q)/q   Int[1/Sqrt[a + c*x^4], x], x] - Simp[e/q 
 Int[(1 - q*x^2)/Sqrt[a + c*x^4], x], x] /; NeQ[e + d*q, 0]] /; FreeQ[{a, c 
, d, e}, x] && PosQ[c/a]
 

rule 1631
Int[((x_)^(m_)*((a_) + (c_.)*(x_)^4)^(p_))/((d_) + (e_.)*(x_)^2), x_Symbol] 
 :> Simp[(-(-d/e)^(m/2))*((c*d^2 + a*e^2)^(p + 1/2)/(e^(2*p)*(c*d^2 - a*e^2 
)))   Int[(a*d*Rt[c/a, 2] + a*e + (c*d + a*e*Rt[c/a, 2])*x^2)/((d + e*x^2)* 
Sqrt[a + c*x^4]), x], x] + Simp[1/(e^(2*p)*(c*d^2 - a*e^2))   Int[(1/Sqrt[a 
 + c*x^4])*ExpandToSum[(e^(2*p)*(c*d^2 - a*e^2)*x^m*(a + c*x^4)^(p + 1/2) + 
 (-d/e)^(m/2)*(c*d^2 + a*e^2)^(p + 1/2)*(a*d*Rt[c/a, 2] + a*e + (c*d + a*e* 
Rt[c/a, 2])*x^2))/(d + e*x^2), x], x], x] /; FreeQ[{a, c, d, e}, x] && IGtQ 
[p + 1/2, 0] && IGtQ[m/2, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[c/a]
 

rule 2221
Int[((A_) + (B_.)*(x_)^2)/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (c_.)*(x_)^4]) 
, x_Symbol] :> With[{q = Rt[B/A, 2]}, Simp[(-(B*d - A*e))*(ArcTan[Rt[c*(d/e 
) + a*(e/d), 2]*(x/Sqrt[a + c*x^4])]/(2*d*e*Rt[c*(d/e) + a*(e/d), 2])), x] 
+ Simp[(B*d + A*e)*(1 + q^2*x^2)*(Sqrt[(a + c*x^4)/(a*(1 + q^2*x^2)^2)]/(4* 
d*e*q*Sqrt[a + c*x^4]))*EllipticPi[-(e - d*q^2)^2/(4*d*e*q^2), 2*ArcTan[q*x 
], 1/2], x]] /; FreeQ[{a, c, d, e, A, B}, x] && NeQ[c*d^2 - a*e^2, 0] && Po 
sQ[c/a] && EqQ[c*A^2 - a*B^2, 0] && PosQ[B/A] && PosQ[c*(d/e) + a*(e/d)]
 

rule 2427
Int[(Pq_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{q = Expon[Pq, x 
]}, With[{Pqq = Coeff[Pq, x, q]}, Simp[Pqq*x^(q - n + 1)*((a + b*x^n)^(p + 
1)/(b*(q + n*p + 1))), x] + Simp[1/(b*(q + n*p + 1))   Int[ExpandToSum[b*(q 
 + n*p + 1)*(Pq - Pqq*x^q) - a*Pqq*(q - n + 1)*x^(q - n), x]*(a + b*x^n)^p, 
 x], x]] /; NeQ[q + n*p + 1, 0] && q - n >= 0 && (IntegerQ[2*p] || IntegerQ 
[p + (q + 1)/(2*n)])] /; FreeQ[{a, b, p}, x] && PolyQ[Pq, x] && IGtQ[n, 0]
 

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 [C] (verified)

Result contains complex when optimal does not.

Time = 0.73 (sec) , antiderivative size = 537, normalized size of antiderivative = 1.17

method result size
derivativedivides \(\frac {\tan \left (x \right ) \sqrt {a +b \tan \left (x \right )^{4}}}{3}+\frac {2 a \sqrt {1-\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \operatorname {EllipticF}\left (\tan \left (x \right ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{3 \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \tan \left (x \right )^{4}}}+\frac {b \sqrt {1-\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \operatorname {EllipticF}\left (\tan \left (x \right ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \tan \left (x \right )^{4}}}-\frac {i \sqrt {b}\, \sqrt {a}\, \sqrt {1-\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \operatorname {EllipticF}\left (\tan \left (x \right ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \tan \left (x \right )^{4}}}+\frac {i \sqrt {b}\, \sqrt {a}\, \sqrt {1-\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \operatorname {EllipticE}\left (\tan \left (x \right ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \tan \left (x \right )^{4}}}-\frac {a \sqrt {1-\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \operatorname {EllipticPi}\left (\tan \left (x \right ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, \frac {i \sqrt {a}}{\sqrt {b}}, \frac {\sqrt {-\frac {i \sqrt {b}}{\sqrt {a}}}}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}}\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \tan \left (x \right )^{4}}}-\frac {b \sqrt {1-\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \operatorname {EllipticPi}\left (\tan \left (x \right ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, \frac {i \sqrt {a}}{\sqrt {b}}, \frac {\sqrt {-\frac {i \sqrt {b}}{\sqrt {a}}}}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}}\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \tan \left (x \right )^{4}}}\) \(537\)
default \(\frac {\tan \left (x \right ) \sqrt {a +b \tan \left (x \right )^{4}}}{3}+\frac {2 a \sqrt {1-\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \operatorname {EllipticF}\left (\tan \left (x \right ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{3 \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \tan \left (x \right )^{4}}}+\frac {b \sqrt {1-\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \operatorname {EllipticF}\left (\tan \left (x \right ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \tan \left (x \right )^{4}}}-\frac {i \sqrt {b}\, \sqrt {a}\, \sqrt {1-\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \operatorname {EllipticF}\left (\tan \left (x \right ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \tan \left (x \right )^{4}}}+\frac {i \sqrt {b}\, \sqrt {a}\, \sqrt {1-\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \operatorname {EllipticE}\left (\tan \left (x \right ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \tan \left (x \right )^{4}}}-\frac {a \sqrt {1-\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \operatorname {EllipticPi}\left (\tan \left (x \right ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, \frac {i \sqrt {a}}{\sqrt {b}}, \frac {\sqrt {-\frac {i \sqrt {b}}{\sqrt {a}}}}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}}\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \tan \left (x \right )^{4}}}-\frac {b \sqrt {1-\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \tan \left (x \right )^{2}}{\sqrt {a}}}\, \operatorname {EllipticPi}\left (\tan \left (x \right ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, \frac {i \sqrt {a}}{\sqrt {b}}, \frac {\sqrt {-\frac {i \sqrt {b}}{\sqrt {a}}}}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}}\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \tan \left (x \right )^{4}}}\) \(537\)

Input:

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

Output:

1/3*tan(x)*(a+b*tan(x)^4)^(1/2)+2/3*a/(I/a^(1/2)*b^(1/2))^(1/2)*(1-I/a^(1/ 
2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x 
)^4)^(1/2)*EllipticF(tan(x)*(I/a^(1/2)*b^(1/2))^(1/2),I)+b/(I/a^(1/2)*b^(1 
/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)*tan(x 
)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*EllipticF(tan(x)*(I/a^(1/2)*b^(1/2))^(1/2) 
,I)-I*b^(1/2)*a^(1/2)/(I/a^(1/2)*b^(1/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*tan(x 
)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*Ellip 
ticF(tan(x)*(I/a^(1/2)*b^(1/2))^(1/2),I)+I*b^(1/2)*a^(1/2)/(I/a^(1/2)*b^(1 
/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)*tan(x 
)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*EllipticE(tan(x)*(I/a^(1/2)*b^(1/2))^(1/2) 
,I)-a/(I/a^(1/2)*b^(1/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/ 
a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*EllipticPi(tan(x)*(I/ 
a^(1/2)*b^(1/2))^(1/2),I*a^(1/2)/b^(1/2),(-I/a^(1/2)*b^(1/2))^(1/2)/(I/a^( 
1/2)*b^(1/2))^(1/2))-b/(I/a^(1/2)*b^(1/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*tan( 
x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*Elli 
pticPi(tan(x)*(I/a^(1/2)*b^(1/2))^(1/2),I*a^(1/2)/b^(1/2),(-I/a^(1/2)*b^(1 
/2))^(1/2)/(I/a^(1/2)*b^(1/2))^(1/2))
 

Fricas [F(-1)]

Timed out. \[ \int \tan ^2(x) \sqrt {a+b \tan ^4(x)} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Sympy [F]

\[ \int \tan ^2(x) \sqrt {a+b \tan ^4(x)} \, dx=\int \sqrt {a + b \tan ^{4}{\left (x \right )}} \tan ^{2}{\left (x \right )}\, dx \] Input:

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

Output:

Integral(sqrt(a + b*tan(x)**4)*tan(x)**2, x)
 

Maxima [F]

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

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

Output:

integrate(sqrt(b*tan(x)^4 + a)*tan(x)^2, x)
 

Giac [F]

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

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

Output:

integrate(sqrt(b*tan(x)^4 + a)*tan(x)^2, x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

int(sqrt(tan(x)**4*b + a)*tan(x)**2,x)