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

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

Optimal result

Integrand size = 23, antiderivative size = 108 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {\log \left (a \cos ^2(e+f x)+b \sin ^2(e+f x)\right )}{2 (a-b)^3 f}+\frac {a^2}{4 (a-b) b^2 f \left (a+b \tan ^2(e+f x)\right )^2}-\frac {a (a-2 b)}{2 (a-b)^2 b^2 f \left (a+b \tan ^2(e+f x)\right )} \] Output:

-1/2*ln(a*cos(f*x+e)^2+b*sin(f*x+e)^2)/(a-b)^3/f+1/4*a^2/(a-b)/b^2/f/(a+b* 
tan(f*x+e)^2)^2-1/2*a*(a-2*b)/(a-b)^2/b^2/f/(a+b*tan(f*x+e)^2)
 

Mathematica [A] (verified)

Time = 0.69 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.90 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {-4 \log (\cos (e+f x))-2 \log \left (a+b \tan ^2(e+f x)\right )+\frac {a^2 (a-b)^2}{b^2 \left (a+b \tan ^2(e+f x)\right )^2}-\frac {2 a (a-2 b) (a-b)}{b^2 \left (a+b \tan ^2(e+f x)\right )}}{4 (a-b)^3 f} \] Input:

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

Output:

(-4*Log[Cos[e + f*x]] - 2*Log[a + b*Tan[e + f*x]^2] + (a^2*(a - b)^2)/(b^2 
*(a + b*Tan[e + f*x]^2)^2) - (2*a*(a - 2*b)*(a - b))/(b^2*(a + b*Tan[e + f 
*x]^2)))/(4*(a - b)^3*f)
 

Rubi [A] (verified)

Time = 0.55 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.04, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, 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 \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\tan (e+f x)^5}{\left (a+b \tan (e+f x)^2\right )^3}dx\)

\(\Big \downarrow \) 4153

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

\(\Big \downarrow \) 354

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

\(\Big \downarrow \) 99

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

(Log[1 + Tan[e + f*x]^2]/(a - b)^3 - Log[a + b*Tan[e + f*x]^2]/(a - b)^3 + 
 a^2/(2*(a - b)*b^2*(a + b*Tan[e + f*x]^2)^2) - (a*(a - 2*b))/((a - b)^2*b 
^2*(a + b*Tan[e + f*x]^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.89 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.08

method result size
derivativedivides \(\frac {\frac {-\ln \left (a +b \tan \left (f x +e \right )^{2}\right )-\frac {a \left (a^{2}-3 a b +2 b^{2}\right )}{b^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )}+\frac {a^{2} \left (a^{2}-2 a b +b^{2}\right )}{2 b^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}}{2 \left (a -b \right )^{3}}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 \left (a -b \right )^{3}}}{f}\) \(117\)
default \(\frac {\frac {-\ln \left (a +b \tan \left (f x +e \right )^{2}\right )-\frac {a \left (a^{2}-3 a b +2 b^{2}\right )}{b^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )}+\frac {a^{2} \left (a^{2}-2 a b +b^{2}\right )}{2 b^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}}{2 \left (a -b \right )^{3}}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 \left (a -b \right )^{3}}}{f}\) \(117\)
norman \(\frac {\frac {\left (-a +3 b \right ) a^{2}}{4 b^{2} \left (a^{2}-2 a b +b^{2}\right ) f}+\frac {a \left (-a +2 b \right ) \tan \left (f x +e \right )^{2}}{2 b \left (a^{2}-2 a b +b^{2}\right ) f}}{\left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {\ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{2 f \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}\) \(166\)
parallelrisch \(\frac {2 \ln \left (1+\tan \left (f x +e \right )^{2}\right ) \tan \left (f x +e \right )^{4} b^{4}-2 \ln \left (a +b \tan \left (f x +e \right )^{2}\right ) \tan \left (f x +e \right )^{4} b^{4}+4 \ln \left (1+\tan \left (f x +e \right )^{2}\right ) \tan \left (f x +e \right )^{2} a \,b^{3}-4 \ln \left (a +b \tan \left (f x +e \right )^{2}\right ) \tan \left (f x +e \right )^{2} a \,b^{3}-2 \tan \left (f x +e \right )^{2} a^{3} b +6 \tan \left (f x +e \right )^{2} a^{2} b^{2}-4 \tan \left (f x +e \right )^{2} a \,b^{3}+2 \ln \left (1+\tan \left (f x +e \right )^{2}\right ) a^{2} b^{2}-2 \ln \left (a +b \tan \left (f x +e \right )^{2}\right ) a^{2} b^{2}-a^{4}+4 a^{3} b -3 a^{2} b^{2}}{4 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) \left (a +b \tan \left (f x +e \right )^{2}\right )^{2} b^{2} f}\) \(252\)
risch \(\frac {i x}{a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}}+\frac {2 i e}{f \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {4 a \left (a \,{\mathrm e}^{6 i \left (f x +e \right )}-b \,{\mathrm e}^{6 i \left (f x +e \right )}+a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 b \,{\mathrm e}^{4 i \left (f x +e \right )}+a \,{\mathrm e}^{2 i \left (f x +e \right )}-b \,{\mathrm e}^{2 i \left (f x +e \right )}\right )}{\left (a \,{\mathrm e}^{4 i \left (f x +e \right )}-b \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a -b \right )^{2} f \left (a -b \right )^{3}}-\frac {\ln \left ({\mathrm e}^{4 i \left (f x +e \right )}+\frac {2 \left (a +b \right ) {\mathrm e}^{2 i \left (f x +e \right )}}{a -b}+1\right )}{2 f \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}\) \(257\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 206 vs. \(2 (102) = 204\).

Time = 0.15 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.91 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {{\left (a^{2} - 4 \, a b\right )} \tan \left (f x + e\right )^{4} - 2 \, {\left (a^{2} + 2 \, a b\right )} \tan \left (f x + e\right )^{2} - 3 \, a^{2} - 2 \, {\left (b^{2} \tan \left (f x + e\right )^{4} + 2 \, a b \tan \left (f x + e\right )^{2} + a^{2}\right )} \log \left (\frac {b \tan \left (f x + e\right )^{2} + a}{\tan \left (f x + e\right )^{2} + 1}\right )}{4 \, {\left ({\left (a^{3} b^{2} - 3 \, a^{2} b^{3} + 3 \, a b^{4} - b^{5}\right )} f \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{4} b - 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3} - a b^{4}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3}\right )} f\right )}} \] Input:

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

Output:

1/4*((a^2 - 4*a*b)*tan(f*x + e)^4 - 2*(a^2 + 2*a*b)*tan(f*x + e)^2 - 3*a^2 
 - 2*(b^2*tan(f*x + e)^4 + 2*a*b*tan(f*x + e)^2 + a^2)*log((b*tan(f*x + e) 
^2 + a)/(tan(f*x + e)^2 + 1)))/((a^3*b^2 - 3*a^2*b^3 + 3*a*b^4 - b^5)*f*ta 
n(f*x + e)^4 + 2*(a^4*b - 3*a^3*b^2 + 3*a^2*b^3 - a*b^4)*f*tan(f*x + e)^2 
+ (a^5 - 3*a^4*b + 3*a^3*b^2 - a^2*b^3)*f)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 3315 vs. \(2 (87) = 174\).

Time = 47.18 (sec) , antiderivative size = 3315, normalized size of antiderivative = 30.69 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\text {Too large to display} \] Input:

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

Output:

Piecewise((zoo*x/tan(e), Eq(a, 0) & Eq(b, 0) & Eq(f, 0)), ((log(tan(e + f* 
x)**2 + 1)/(2*f) + tan(e + f*x)**4/(4*f) - tan(e + f*x)**2/(2*f))/a**3, Eq 
(b, 0)), (-3*tan(e + f*x)**4/(6*b**3*f*tan(e + f*x)**6 + 18*b**3*f*tan(e + 
 f*x)**4 + 18*b**3*f*tan(e + f*x)**2 + 6*b**3*f) - 3*tan(e + f*x)**2/(6*b* 
*3*f*tan(e + f*x)**6 + 18*b**3*f*tan(e + f*x)**4 + 18*b**3*f*tan(e + f*x)* 
*2 + 6*b**3*f) - 1/(6*b**3*f*tan(e + f*x)**6 + 18*b**3*f*tan(e + f*x)**4 + 
 18*b**3*f*tan(e + f*x)**2 + 6*b**3*f), Eq(a, b)), (x*tan(e)**5/(a + b*tan 
(e)**2)**3, Eq(f, 0)), (-a**4/(4*a**5*b**2*f + 8*a**4*b**3*f*tan(e + f*x)* 
*2 - 12*a**4*b**3*f + 4*a**3*b**4*f*tan(e + f*x)**4 - 24*a**3*b**4*f*tan(e 
 + f*x)**2 + 12*a**3*b**4*f - 12*a**2*b**5*f*tan(e + f*x)**4 + 24*a**2*b** 
5*f*tan(e + f*x)**2 - 4*a**2*b**5*f + 12*a*b**6*f*tan(e + f*x)**4 - 8*a*b* 
*6*f*tan(e + f*x)**2 - 4*b**7*f*tan(e + f*x)**4) - 2*a**3*b*tan(e + f*x)** 
2/(4*a**5*b**2*f + 8*a**4*b**3*f*tan(e + f*x)**2 - 12*a**4*b**3*f + 4*a**3 
*b**4*f*tan(e + f*x)**4 - 24*a**3*b**4*f*tan(e + f*x)**2 + 12*a**3*b**4*f 
- 12*a**2*b**5*f*tan(e + f*x)**4 + 24*a**2*b**5*f*tan(e + f*x)**2 - 4*a**2 
*b**5*f + 12*a*b**6*f*tan(e + f*x)**4 - 8*a*b**6*f*tan(e + f*x)**2 - 4*b** 
7*f*tan(e + f*x)**4) + 4*a**3*b/(4*a**5*b**2*f + 8*a**4*b**3*f*tan(e + f*x 
)**2 - 12*a**4*b**3*f + 4*a**3*b**4*f*tan(e + f*x)**4 - 24*a**3*b**4*f*tan 
(e + f*x)**2 + 12*a**3*b**4*f - 12*a**2*b**5*f*tan(e + f*x)**4 + 24*a**2*b 
**5*f*tan(e + f*x)**2 - 4*a**2*b**5*f + 12*a*b**6*f*tan(e + f*x)**4 - 8...
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.75 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {\frac {4 \, {\left (a^{2} - a b\right )} \sin \left (f x + e\right )^{2} - 3 \, a^{2}}{a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3} + {\left (a^{5} - 5 \, a^{4} b + 10 \, a^{3} b^{2} - 10 \, a^{2} b^{3} + 5 \, a b^{4} - b^{5}\right )} \sin \left (f x + e\right )^{4} - 2 \, {\left (a^{5} - 4 \, a^{4} b + 6 \, a^{3} b^{2} - 4 \, a^{2} b^{3} + a b^{4}\right )} \sin \left (f x + e\right )^{2}} - \frac {2 \, \log \left (-{\left (a - b\right )} \sin \left (f x + e\right )^{2} + a\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}}}{4 \, f} \] Input:

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

Output:

1/4*((4*(a^2 - a*b)*sin(f*x + e)^2 - 3*a^2)/(a^5 - 3*a^4*b + 3*a^3*b^2 - a 
^2*b^3 + (a^5 - 5*a^4*b + 10*a^3*b^2 - 10*a^2*b^3 + 5*a*b^4 - b^5)*sin(f*x 
 + e)^4 - 2*(a^5 - 4*a^4*b + 6*a^3*b^2 - 4*a^2*b^3 + a*b^4)*sin(f*x + e)^2 
) - 2*log(-(a - b)*sin(f*x + e)^2 + a)/(a^3 - 3*a^2*b + 3*a*b^2 - b^3))/f
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 208 vs. \(2 (102) = 204\).

Time = 0.68 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.93 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {b \log \left ({\left | b \tan \left (f x + e\right )^{2} + a \right |}\right )}{2 \, {\left (a^{3} b f - 3 \, a^{2} b^{2} f + 3 \, a b^{3} f - b^{4} f\right )}} + \frac {\log \left (\tan \left (f x + e\right )^{2} + 1\right )}{2 \, {\left (a^{3} f - 3 \, a^{2} b f + 3 \, a b^{2} f - b^{3} f\right )}} + \frac {3 \, b^{4} \tan \left (f x + e\right )^{4} - 2 \, a^{3} b \tan \left (f x + e\right )^{2} + 6 \, a^{2} b^{2} \tan \left (f x + e\right )^{2} + 2 \, a b^{3} \tan \left (f x + e\right )^{2} - a^{4} + 4 \, a^{3} b}{4 \, {\left (a^{3} b^{2} f - 3 \, a^{2} b^{3} f + 3 \, a b^{4} f - b^{5} f\right )} {\left (b \tan \left (f x + e\right )^{2} + a\right )}^{2}} \] Input:

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

Output:

-1/2*b*log(abs(b*tan(f*x + e)^2 + a))/(a^3*b*f - 3*a^2*b^2*f + 3*a*b^3*f - 
 b^4*f) + 1/2*log(tan(f*x + e)^2 + 1)/(a^3*f - 3*a^2*b*f + 3*a*b^2*f - b^3 
*f) + 1/4*(3*b^4*tan(f*x + e)^4 - 2*a^3*b*tan(f*x + e)^2 + 6*a^2*b^2*tan(f 
*x + e)^2 + 2*a*b^3*tan(f*x + e)^2 - a^4 + 4*a^3*b)/((a^3*b^2*f - 3*a^2*b^ 
3*f + 3*a*b^4*f - b^5*f)*(b*tan(f*x + e)^2 + a)^2)
 

Mupad [B] (verification not implemented)

Time = 8.38 (sec) , antiderivative size = 577, normalized size of antiderivative = 5.34 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {a^3\,b\,{\cos \left (e+f\,x\right )}^4-\frac {a^4\,{\cos \left (e+f\,x\right )}^4}{4}-\frac {3\,a^2\,b^2\,{\cos \left (e+f\,x\right )}^4}{4}+b^4\,{\sin \left (e+f\,x\right )}^4\,\mathrm {atan}\left (\frac {a\,{\sin \left (e+f\,x\right )}^2-b\,{\sin \left (e+f\,x\right )}^2}{a\,{\cos \left (e+f\,x\right )}^2\,2{}\mathrm {i}+a\,{\sin \left (e+f\,x\right )}^2\,1{}\mathrm {i}+b\,{\sin \left (e+f\,x\right )}^2\,1{}\mathrm {i}}\right )\,1{}\mathrm {i}-a\,b^3\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2-\frac {a^3\,b\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2}{2}+a^2\,b^2\,{\cos \left (e+f\,x\right )}^4\,\mathrm {atan}\left (\frac {a\,{\sin \left (e+f\,x\right )}^2-b\,{\sin \left (e+f\,x\right )}^2}{a\,{\cos \left (e+f\,x\right )}^2\,2{}\mathrm {i}+a\,{\sin \left (e+f\,x\right )}^2\,1{}\mathrm {i}+b\,{\sin \left (e+f\,x\right )}^2\,1{}\mathrm {i}}\right )\,1{}\mathrm {i}+\frac {3\,a^2\,b^2\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2}{2}+a\,b^3\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2\,\mathrm {atan}\left (\frac {a\,{\sin \left (e+f\,x\right )}^2-b\,{\sin \left (e+f\,x\right )}^2}{a\,{\cos \left (e+f\,x\right )}^2\,2{}\mathrm {i}+a\,{\sin \left (e+f\,x\right )}^2\,1{}\mathrm {i}+b\,{\sin \left (e+f\,x\right )}^2\,1{}\mathrm {i}}\right )\,2{}\mathrm {i}}{f\,\left (-a^5\,b^2\,{\cos \left (e+f\,x\right )}^4+3\,a^4\,b^3\,{\cos \left (e+f\,x\right )}^4-2\,a^4\,b^3\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2-3\,a^3\,b^4\,{\cos \left (e+f\,x\right )}^4+6\,a^3\,b^4\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2-a^3\,b^4\,{\sin \left (e+f\,x\right )}^4+a^2\,b^5\,{\cos \left (e+f\,x\right )}^4-6\,a^2\,b^5\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2+3\,a^2\,b^5\,{\sin \left (e+f\,x\right )}^4+2\,a\,b^6\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2-3\,a\,b^6\,{\sin \left (e+f\,x\right )}^4+b^7\,{\sin \left (e+f\,x\right )}^4\right )} \] Input:

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

Output:

-(a^3*b*cos(e + f*x)^4 - (a^4*cos(e + f*x)^4)/4 - (3*a^2*b^2*cos(e + f*x)^ 
4)/4 + b^4*sin(e + f*x)^4*atan((a*sin(e + f*x)^2 - b*sin(e + f*x)^2)/(a*co 
s(e + f*x)^2*2i + a*sin(e + f*x)^2*1i + b*sin(e + f*x)^2*1i))*1i - a*b^3*c 
os(e + f*x)^2*sin(e + f*x)^2 - (a^3*b*cos(e + f*x)^2*sin(e + f*x)^2)/2 + a 
^2*b^2*cos(e + f*x)^4*atan((a*sin(e + f*x)^2 - b*sin(e + f*x)^2)/(a*cos(e 
+ f*x)^2*2i + a*sin(e + f*x)^2*1i + b*sin(e + f*x)^2*1i))*1i + (3*a^2*b^2* 
cos(e + f*x)^2*sin(e + f*x)^2)/2 + a*b^3*cos(e + f*x)^2*sin(e + f*x)^2*ata 
n((a*sin(e + f*x)^2 - b*sin(e + f*x)^2)/(a*cos(e + f*x)^2*2i + a*sin(e + f 
*x)^2*1i + b*sin(e + f*x)^2*1i))*2i)/(f*(b^7*sin(e + f*x)^4 - 3*a*b^6*sin( 
e + f*x)^4 + a^2*b^5*cos(e + f*x)^4 - 3*a^3*b^4*cos(e + f*x)^4 + 3*a^4*b^3 
*cos(e + f*x)^4 - a^5*b^2*cos(e + f*x)^4 + 3*a^2*b^5*sin(e + f*x)^4 - a^3* 
b^4*sin(e + f*x)^4 + 2*a*b^6*cos(e + f*x)^2*sin(e + f*x)^2 - 6*a^2*b^5*cos 
(e + f*x)^2*sin(e + f*x)^2 + 6*a^3*b^4*cos(e + f*x)^2*sin(e + f*x)^2 - 2*a 
^4*b^3*cos(e + f*x)^2*sin(e + f*x)^2))
                                                                                    
                                                                                    
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 346, normalized size of antiderivative = 3.20 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {2 \,\mathrm {log}\left (\tan \left (f x +e \right )^{2}+1\right ) \tan \left (f x +e \right )^{4} b^{2}+4 \,\mathrm {log}\left (\tan \left (f x +e \right )^{2}+1\right ) \tan \left (f x +e \right )^{2} a b +2 \,\mathrm {log}\left (\tan \left (f x +e \right )^{2}+1\right ) a^{2}-2 \,\mathrm {log}\left (\tan \left (f x +e \right )^{2} b +a \right ) \tan \left (f x +e \right )^{4} b^{2}-4 \,\mathrm {log}\left (\tan \left (f x +e \right )^{2} b +a \right ) \tan \left (f x +e \right )^{2} a b -2 \,\mathrm {log}\left (\tan \left (f x +e \right )^{2} b +a \right ) a^{2}+\tan \left (f x +e \right )^{4} a^{2}-4 \tan \left (f x +e \right )^{4} a b +3 \tan \left (f x +e \right )^{4} b^{2}-2 \tan \left (f x +e \right )^{2} a^{2}+2 \tan \left (f x +e \right )^{2} a b}{4 f \left (\tan \left (f x +e \right )^{4} a^{3} b^{2}-3 \tan \left (f x +e \right )^{4} a^{2} b^{3}+3 \tan \left (f x +e \right )^{4} a \,b^{4}-\tan \left (f x +e \right )^{4} b^{5}+2 \tan \left (f x +e \right )^{2} a^{4} b -6 \tan \left (f x +e \right )^{2} a^{3} b^{2}+6 \tan \left (f x +e \right )^{2} a^{2} b^{3}-2 \tan \left (f x +e \right )^{2} a \,b^{4}+a^{5}-3 a^{4} b +3 a^{3} b^{2}-a^{2} b^{3}\right )} \] Input:

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

Output:

(2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**4*b**2 + 4*log(tan(e + f*x)**2 + 
 1)*tan(e + f*x)**2*a*b + 2*log(tan(e + f*x)**2 + 1)*a**2 - 2*log(tan(e + 
f*x)**2*b + a)*tan(e + f*x)**4*b**2 - 4*log(tan(e + f*x)**2*b + a)*tan(e + 
 f*x)**2*a*b - 2*log(tan(e + f*x)**2*b + a)*a**2 + tan(e + f*x)**4*a**2 - 
4*tan(e + f*x)**4*a*b + 3*tan(e + f*x)**4*b**2 - 2*tan(e + f*x)**2*a**2 + 
2*tan(e + f*x)**2*a*b)/(4*f*(tan(e + f*x)**4*a**3*b**2 - 3*tan(e + f*x)**4 
*a**2*b**3 + 3*tan(e + f*x)**4*a*b**4 - tan(e + f*x)**4*b**5 + 2*tan(e + f 
*x)**2*a**4*b - 6*tan(e + f*x)**2*a**3*b**2 + 6*tan(e + f*x)**2*a**2*b**3 
- 2*tan(e + f*x)**2*a*b**4 + a**5 - 3*a**4*b + 3*a**3*b**2 - a**2*b**3))