\(\int \tan ^5(e+f x) \sqrt {a+b \tan ^2(e+f x)} \, dx\) [293]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [F(-2)]
Mupad [B] (verification not implemented)
Reduce [F]

Optimal result

Integrand size = 25, antiderivative size = 117 \[ \int \tan ^5(e+f x) \sqrt {a+b \tan ^2(e+f x)} \, dx=-\frac {\sqrt {a-b} \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )}{f}+\frac {\sqrt {a+b \tan ^2(e+f x)}}{f}-\frac {(a+b) \left (a+b \tan ^2(e+f x)\right )^{3/2}}{3 b^2 f}+\frac {\left (a+b \tan ^2(e+f x)\right )^{5/2}}{5 b^2 f} \] Output:

-(a-b)^(1/2)*arctanh((a+b*tan(f*x+e)^2)^(1/2)/(a-b)^(1/2))/f+(a+b*tan(f*x+ 
e)^2)^(1/2)/f-1/3*(a+b)*(a+b*tan(f*x+e)^2)^(3/2)/b^2/f+1/5*(a+b*tan(f*x+e) 
^2)^(5/2)/b^2/f
 

Mathematica [A] (verified)

Time = 0.92 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.93 \[ \int \tan ^5(e+f x) \sqrt {a+b \tan ^2(e+f x)} \, dx=\frac {-15 \sqrt {a-b} \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )+\frac {\sqrt {a+b \tan ^2(e+f x)} \left (-2 a^2-5 a b+15 b^2+(a-5 b) b \tan ^2(e+f x)+3 b^2 \tan ^4(e+f x)\right )}{b^2}}{15 f} \] Input:

Integrate[Tan[e + f*x]^5*Sqrt[a + b*Tan[e + f*x]^2],x]
 

Output:

(-15*Sqrt[a - b]*ArcTanh[Sqrt[a + b*Tan[e + f*x]^2]/Sqrt[a - b]] + (Sqrt[a 
 + b*Tan[e + f*x]^2]*(-2*a^2 - 5*a*b + 15*b^2 + (a - 5*b)*b*Tan[e + f*x]^2 
 + 3*b^2*Tan[e + f*x]^4))/b^2)/(15*f)
 

Rubi [A] (verified)

Time = 0.55 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.97, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3042, 4153, 354, 99, 2009}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4153

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

\(\Big \downarrow \) 354

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

\(\Big \downarrow \) 99

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-2 \sqrt {a-b} \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )+\frac {2 \left (a+b \tan ^2(e+f x)\right )^{5/2}}{5 b^2}-\frac {2 (a+b) \left (a+b \tan ^2(e+f x)\right )^{3/2}}{3 b^2}+2 \sqrt {a+b \tan ^2(e+f x)}}{2 f}\)

Input:

Int[Tan[e + f*x]^5*Sqrt[a + b*Tan[e + f*x]^2],x]
 

Output:

(-2*Sqrt[a - b]*ArcTanh[Sqrt[a + b*Tan[e + f*x]^2]/Sqrt[a - b]] + 2*Sqrt[a 
 + b*Tan[e + f*x]^2] - (2*(a + b)*(a + b*Tan[e + f*x]^2)^(3/2))/(3*b^2) + 
(2*(a + b*Tan[e + f*x]^2)^(5/2))/(5*b^2))/(2*f)
 

Defintions of rubi rules used

rule 99
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], 
 x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | 
| (GtQ[m, 0] && GeQ[n, -1]))
 

rule 354
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S 
ymbol] :> Simp[1/2   Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x 
, x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ 
[(m - 1)/2]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

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

Time = 0.91 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.34

method result size
derivativedivides \(\frac {\frac {\tan \left (f x +e \right )^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}{5 b}-\frac {2 a \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}{15 b^{2}}+b \left (\frac {\sqrt {a +b \tan \left (f x +e \right )^{2}}}{b}-\frac {\arctan \left (\frac {\sqrt {a +b \tan \left (f x +e \right )^{2}}}{\sqrt {-a +b}}\right )}{\sqrt {-a +b}}\right )+\frac {a \arctan \left (\frac {\sqrt {a +b \tan \left (f x +e \right )^{2}}}{\sqrt {-a +b}}\right )}{\sqrt {-a +b}}-\frac {\left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}{3 b}}{f}\) \(157\)
default \(\frac {\frac {\tan \left (f x +e \right )^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}{5 b}-\frac {2 a \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}{15 b^{2}}+b \left (\frac {\sqrt {a +b \tan \left (f x +e \right )^{2}}}{b}-\frac {\arctan \left (\frac {\sqrt {a +b \tan \left (f x +e \right )^{2}}}{\sqrt {-a +b}}\right )}{\sqrt {-a +b}}\right )+\frac {a \arctan \left (\frac {\sqrt {a +b \tan \left (f x +e \right )^{2}}}{\sqrt {-a +b}}\right )}{\sqrt {-a +b}}-\frac {\left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}{3 b}}{f}\) \(157\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 346, normalized size of antiderivative = 2.96 \[ \int \tan ^5(e+f x) \sqrt {a+b \tan ^2(e+f x)} \, dx=\left [\frac {15 \, \sqrt {a - b} b^{2} \log \left (-\frac {b^{2} \tan \left (f x + e\right )^{4} + 2 \, {\left (4 \, a b - 3 \, b^{2}\right )} \tan \left (f x + e\right )^{2} - 4 \, {\left (b \tan \left (f x + e\right )^{2} + 2 \, a - b\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a - b} + 8 \, a^{2} - 8 \, a b + b^{2}}{\tan \left (f x + e\right )^{4} + 2 \, \tan \left (f x + e\right )^{2} + 1}\right ) + 4 \, {\left (3 \, b^{2} \tan \left (f x + e\right )^{4} + {\left (a b - 5 \, b^{2}\right )} \tan \left (f x + e\right )^{2} - 2 \, a^{2} - 5 \, a b + 15 \, b^{2}\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a}}{60 \, b^{2} f}, -\frac {15 \, \sqrt {-a + b} b^{2} \arctan \left (-\frac {{\left (b \tan \left (f x + e\right )^{2} + 2 \, a - b\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b}}{2 \, {\left ({\left (a b - b^{2}\right )} \tan \left (f x + e\right )^{2} + a^{2} - a b\right )}}\right ) - 2 \, {\left (3 \, b^{2} \tan \left (f x + e\right )^{4} + {\left (a b - 5 \, b^{2}\right )} \tan \left (f x + e\right )^{2} - 2 \, a^{2} - 5 \, a b + 15 \, b^{2}\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a}}{30 \, b^{2} f}\right ] \] Input:

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

Output:

[1/60*(15*sqrt(a - b)*b^2*log(-(b^2*tan(f*x + e)^4 + 2*(4*a*b - 3*b^2)*tan 
(f*x + e)^2 - 4*(b*tan(f*x + e)^2 + 2*a - b)*sqrt(b*tan(f*x + e)^2 + a)*sq 
rt(a - b) + 8*a^2 - 8*a*b + b^2)/(tan(f*x + e)^4 + 2*tan(f*x + e)^2 + 1)) 
+ 4*(3*b^2*tan(f*x + e)^4 + (a*b - 5*b^2)*tan(f*x + e)^2 - 2*a^2 - 5*a*b + 
 15*b^2)*sqrt(b*tan(f*x + e)^2 + a))/(b^2*f), -1/30*(15*sqrt(-a + b)*b^2*a 
rctan(-1/2*(b*tan(f*x + e)^2 + 2*a - b)*sqrt(b*tan(f*x + e)^2 + a)*sqrt(-a 
 + b)/((a*b - b^2)*tan(f*x + e)^2 + a^2 - a*b)) - 2*(3*b^2*tan(f*x + e)^4 
+ (a*b - 5*b^2)*tan(f*x + e)^2 - 2*a^2 - 5*a*b + 15*b^2)*sqrt(b*tan(f*x + 
e)^2 + a))/(b^2*f)]
 

Sympy [F]

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

integrate(tan(f*x+e)**5*(a+b*tan(f*x+e)**2)**(1/2),x)
 

Output:

Integral(sqrt(a + b*tan(e + f*x)**2)*tan(e + f*x)**5, x)
 

Maxima [F]

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

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

Output:

integrate(sqrt(b*tan(f*x + e)^2 + a)*tan(f*x + e)^5, x)
 

Giac [F(-2)]

Exception generated. \[ \int \tan ^5(e+f x) \sqrt {a+b \tan ^2(e+f x)} \, dx=\text {Exception raised: TypeError} \] Input:

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:sym2poly/r2sym(const gen & e,const 
index_m & i,const vecteur & l) Error: Bad Argument Value
 

Mupad [B] (verification not implemented)

Time = 16.35 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.34 \[ \int \tan ^5(e+f x) \sqrt {a+b \tan ^2(e+f x)} \, dx=\frac {{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{5/2}}{5\,b^2\,f}-\left (\frac {2\,a}{3\,b^2\,f}-\frac {a-b}{3\,b^2\,f}\right )\,{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{3/2}-\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (\left (\frac {2\,a}{b^2\,f}-\frac {a-b}{b^2\,f}\right )\,\left (a-b\right )-\frac {a^2}{b^2\,f}\right )+\frac {\mathrm {atan}\left (\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,1{}\mathrm {i}}{\sqrt {a-b}}\right )\,\sqrt {a-b}\,1{}\mathrm {i}}{f} \] Input:

int(tan(e + f*x)^5*(a + b*tan(e + f*x)^2)^(1/2),x)
 

Output:

(atan(((a + b*tan(e + f*x)^2)^(1/2)*1i)/(a - b)^(1/2))*(a - b)^(1/2)*1i)/f 
 - ((2*a)/(3*b^2*f) - (a - b)/(3*b^2*f))*(a + b*tan(e + f*x)^2)^(3/2) - (a 
 + b*tan(e + f*x)^2)^(1/2)*(((2*a)/(b^2*f) - (a - b)/(b^2*f))*(a - b) - a^ 
2/(b^2*f)) + (a + b*tan(e + f*x)^2)^(5/2)/(5*b^2*f)
 

Reduce [F]

\[ \int \tan ^5(e+f x) \sqrt {a+b \tan ^2(e+f x)} \, dx=\frac {3 \sqrt {\tan \left (f x +e \right )^{2} b +a}\, \tan \left (f x +e \right )^{4} b^{2}+\sqrt {\tan \left (f x +e \right )^{2} b +a}\, \tan \left (f x +e \right )^{2} a b -5 \sqrt {\tan \left (f x +e \right )^{2} b +a}\, \tan \left (f x +e \right )^{2} b^{2}-2 \sqrt {\tan \left (f x +e \right )^{2} b +a}\, a^{2}+10 \sqrt {\tan \left (f x +e \right )^{2} b +a}\, a b -15 \left (\int \frac {\sqrt {\tan \left (f x +e \right )^{2} b +a}\, \tan \left (f x +e \right )^{3}}{\tan \left (f x +e \right )^{2} b +a}d x \right ) a \,b^{2} f +15 \left (\int \frac {\sqrt {\tan \left (f x +e \right )^{2} b +a}\, \tan \left (f x +e \right )^{3}}{\tan \left (f x +e \right )^{2} b +a}d x \right ) b^{3} f}{15 b^{2} f} \] Input:

int(tan(f*x+e)^5*(a+b*tan(f*x+e)^2)^(1/2),x)
 

Output:

(3*sqrt(tan(e + f*x)**2*b + a)*tan(e + f*x)**4*b**2 + sqrt(tan(e + f*x)**2 
*b + a)*tan(e + f*x)**2*a*b - 5*sqrt(tan(e + f*x)**2*b + a)*tan(e + f*x)** 
2*b**2 - 2*sqrt(tan(e + f*x)**2*b + a)*a**2 + 10*sqrt(tan(e + f*x)**2*b + 
a)*a*b - 15*int((sqrt(tan(e + f*x)**2*b + a)*tan(e + f*x)**3)/(tan(e + f*x 
)**2*b + a),x)*a*b**2*f + 15*int((sqrt(tan(e + f*x)**2*b + a)*tan(e + f*x) 
**3)/(tan(e + f*x)**2*b + a),x)*b**3*f)/(15*b**2*f)