\(\int \frac {\tan ^5(c+d x)}{(a+b \sec (c+d x))^2} \, dx\) [298]

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

Optimal result

Integrand size = 21, antiderivative size = 121 \[ \int \frac {\tan ^5(c+d x)}{(a+b \sec (c+d x))^2} \, dx=-\frac {\log (\cos (c+d x))}{a^2 d}+\frac {\left (a^2-b^2\right ) \left (3 a^2+b^2\right ) \log (a+b \sec (c+d x))}{a^2 b^4 d}-\frac {2 a \sec (c+d x)}{b^3 d}+\frac {\sec ^2(c+d x)}{2 b^2 d}+\frac {\left (a^2-b^2\right )^2}{a b^4 d (a+b \sec (c+d x))} \] Output:

-ln(cos(d*x+c))/a^2/d+(a^2-b^2)*(3*a^2+b^2)*ln(a+b*sec(d*x+c))/a^2/b^4/d-2 
*a*sec(d*x+c)/b^3/d+1/2*sec(d*x+c)^2/b^2/d+(a^2-b^2)^2/a/b^4/d/(a+b*sec(d* 
x+c))
 

Mathematica [A] (verified)

Time = 0.31 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.88 \[ \int \frac {\tan ^5(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {-\frac {b^4 \log (\cos (c+d x))}{a^2}+\frac {(a-b) (a+b) \left (3 a^2+b^2\right ) \log (a+b \sec (c+d x))}{a^2}-2 a b \sec (c+d x)+\frac {1}{2} b^2 \sec ^2(c+d x)+\frac {\left (a^2-b^2\right )^2}{a (a+b \sec (c+d x))}}{b^4 d} \] Input:

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

Output:

(-((b^4*Log[Cos[c + d*x]])/a^2) + ((a - b)*(a + b)*(3*a^2 + b^2)*Log[a + b 
*Sec[c + d*x]])/a^2 - 2*a*b*Sec[c + d*x] + (b^2*Sec[c + d*x]^2)/2 + (a^2 - 
 b^2)^2/(a*(a + b*Sec[c + d*x])))/(b^4*d)
 

Rubi [A] (verified)

Time = 0.32 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.90, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 25, 4373, 522, 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(c+d x)}{(a+b \sec (c+d x))^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -\frac {\cot \left (c+d x+\frac {\pi }{2}\right )^5}{\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {\cot \left (\frac {1}{2} (2 c+\pi )+d x\right )^5}{\left (a+b \csc \left (\frac {1}{2} (2 c+\pi )+d x\right )\right )^2}dx\)

\(\Big \downarrow \) 4373

\(\displaystyle \frac {\int \frac {\cos (c+d x) \left (b^2-b^2 \sec ^2(c+d x)\right )^2}{b (a+b \sec (c+d x))^2}d(b \sec (c+d x))}{b^4 d}\)

\(\Big \downarrow \) 522

\(\displaystyle \frac {\int \left (\frac {\cos (c+d x) b^3}{a^2}+\sec (c+d x) b-2 a+\frac {\left (a^2-b^2\right ) \left (3 a^2+b^2\right )}{a^2 (a+b \sec (c+d x))}-\frac {\left (a^2-b^2\right )^2}{a (a+b \sec (c+d x))^2}\right )d(b \sec (c+d x))}{b^4 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {b^4 \log (b \sec (c+d x))}{a^2}+\frac {\left (a^2-b^2\right )^2}{a (a+b \sec (c+d x))}+\frac {\left (a^2-b^2\right ) \left (3 a^2+b^2\right ) \log (a+b \sec (c+d x))}{a^2}-2 a b \sec (c+d x)+\frac {1}{2} b^2 \sec ^2(c+d x)}{b^4 d}\)

Input:

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

Output:

((b^4*Log[b*Sec[c + d*x]])/a^2 + ((a^2 - b^2)*(3*a^2 + b^2)*Log[a + b*Sec[ 
c + d*x]])/a^2 - 2*a*b*Sec[c + d*x] + (b^2*Sec[c + d*x]^2)/2 + (a^2 - b^2) 
^2/(a*(a + b*Sec[c + d*x])))/(b^4*d)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

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 4373
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_), x_Symbol] :> Simp[-(-1)^((m - 1)/2)/(d*b^(m - 1))   Subst[Int[(b^2 - x^ 
2)^((m - 1)/2)*((a + x)^n/x), x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b, c, 
 d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]
 
Maple [A] (verified)

Time = 0.82 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.05

method result size
derivativedivides \(\frac {\frac {\left (-3 a^{2}+2 b^{2}\right ) \ln \left (\cos \left (d x +c \right )\right )}{b^{4}}+\frac {1}{2 b^{2} \cos \left (d x +c \right )^{2}}-\frac {2 a}{b^{3} \cos \left (d x +c \right )}-\frac {a^{4}-2 a^{2} b^{2}+b^{4}}{a^{2} b^{3} \left (b +a \cos \left (d x +c \right )\right )}+\frac {\left (3 a^{4}-2 a^{2} b^{2}-b^{4}\right ) \ln \left (b +a \cos \left (d x +c \right )\right )}{b^{4} a^{2}}}{d}\) \(127\)
default \(\frac {\frac {\left (-3 a^{2}+2 b^{2}\right ) \ln \left (\cos \left (d x +c \right )\right )}{b^{4}}+\frac {1}{2 b^{2} \cos \left (d x +c \right )^{2}}-\frac {2 a}{b^{3} \cos \left (d x +c \right )}-\frac {a^{4}-2 a^{2} b^{2}+b^{4}}{a^{2} b^{3} \left (b +a \cos \left (d x +c \right )\right )}+\frac {\left (3 a^{4}-2 a^{2} b^{2}-b^{4}\right ) \ln \left (b +a \cos \left (d x +c \right )\right )}{b^{4} a^{2}}}{d}\) \(127\)
risch \(\frac {i x}{a^{2}}+\frac {2 i c}{d \,a^{2}}-\frac {2 \left (3 a^{4} {\mathrm e}^{5 i \left (d x +c \right )}-2 a^{2} b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+b^{4} {\mathrm e}^{5 i \left (d x +c \right )}+3 a^{3} b \,{\mathrm e}^{4 i \left (d x +c \right )}+6 a^{4} {\mathrm e}^{3 i \left (d x +c \right )}-6 a^{2} b^{2} {\mathrm e}^{3 i \left (d x +c \right )}+2 b^{4} {\mathrm e}^{3 i \left (d x +c \right )}+3 a^{3} b \,{\mathrm e}^{2 i \left (d x +c \right )}+3 a^{4} {\mathrm e}^{i \left (d x +c \right )}-2 a^{2} b^{2} {\mathrm e}^{i \left (d x +c \right )}+b^{4} {\mathrm e}^{i \left (d x +c \right )}\right )}{d \,b^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2} a^{2} \left (a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{i \left (d x +c \right )}+a \right )}+\frac {3 a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{b^{4} d}-\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{b^{2} d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{a^{2} d}-\frac {3 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{b^{4} d}+\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{2} d}\) \(385\)

Input:

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

Output:

1/d*((-3*a^2+2*b^2)/b^4*ln(cos(d*x+c))+1/2/b^2/cos(d*x+c)^2-2/b^3*a/cos(d* 
x+c)-(a^4-2*a^2*b^2+b^4)/a^2/b^3/(b+a*cos(d*x+c))+(3*a^4-2*a^2*b^2-b^4)/b^ 
4/a^2*ln(b+a*cos(d*x+c)))
 

Fricas [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 219, normalized size of antiderivative = 1.81 \[ \int \frac {\tan ^5(c+d x)}{(a+b \sec (c+d x))^2} \, dx=-\frac {3 \, a^{3} b^{2} \cos \left (d x + c\right ) - a^{2} b^{3} + 2 \, {\left (3 \, a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left ({\left (3 \, a^{5} - 2 \, a^{3} b^{2} - a b^{4}\right )} \cos \left (d x + c\right )^{3} + {\left (3 \, a^{4} b - 2 \, a^{2} b^{3} - b^{5}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (a \cos \left (d x + c\right ) + b\right ) + 2 \, {\left ({\left (3 \, a^{5} - 2 \, a^{3} b^{2}\right )} \cos \left (d x + c\right )^{3} + {\left (3 \, a^{4} b - 2 \, a^{2} b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\cos \left (d x + c\right )\right )}{2 \, {\left (a^{3} b^{4} d \cos \left (d x + c\right )^{3} + a^{2} b^{5} d \cos \left (d x + c\right )^{2}\right )}} \] Input:

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

Output:

-1/2*(3*a^3*b^2*cos(d*x + c) - a^2*b^3 + 2*(3*a^4*b - 2*a^2*b^3 + b^5)*cos 
(d*x + c)^2 - 2*((3*a^5 - 2*a^3*b^2 - a*b^4)*cos(d*x + c)^3 + (3*a^4*b - 2 
*a^2*b^3 - b^5)*cos(d*x + c)^2)*log(a*cos(d*x + c) + b) + 2*((3*a^5 - 2*a^ 
3*b^2)*cos(d*x + c)^3 + (3*a^4*b - 2*a^2*b^3)*cos(d*x + c)^2)*log(-cos(d*x 
 + c)))/(a^3*b^4*d*cos(d*x + c)^3 + a^2*b^5*d*cos(d*x + c)^2)
                                                                                    
                                                                                    
 

Sympy [F]

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

integrate(tan(d*x+c)**5/(a+b*sec(d*x+c))**2,x)
 

Output:

Integral(tan(c + d*x)**5/(a + b*sec(c + d*x))**2, x)
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.23 \[ \int \frac {\tan ^5(c+d x)}{(a+b \sec (c+d x))^2} \, dx=-\frac {\frac {3 \, a^{3} b \cos \left (d x + c\right ) - a^{2} b^{2} + 2 \, {\left (3 \, a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2}}{a^{3} b^{3} \cos \left (d x + c\right )^{3} + a^{2} b^{4} \cos \left (d x + c\right )^{2}} + \frac {2 \, {\left (3 \, a^{2} - 2 \, b^{2}\right )} \log \left (\cos \left (d x + c\right )\right )}{b^{4}} - \frac {2 \, {\left (3 \, a^{4} - 2 \, a^{2} b^{2} - b^{4}\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{2} b^{4}}}{2 \, d} \] Input:

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

Output:

-1/2*((3*a^3*b*cos(d*x + c) - a^2*b^2 + 2*(3*a^4 - 2*a^2*b^2 + b^4)*cos(d* 
x + c)^2)/(a^3*b^3*cos(d*x + c)^3 + a^2*b^4*cos(d*x + c)^2) + 2*(3*a^2 - 2 
*b^2)*log(cos(d*x + c))/b^4 - 2*(3*a^4 - 2*a^2*b^2 - b^4)*log(a*cos(d*x + 
c) + b)/(a^2*b^4))/d
 

Giac [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.26 \[ \int \frac {\tan ^5(c+d x)}{(a+b \sec (c+d x))^2} \, dx=-\frac {{\left (3 \, a^{2} - 2 \, b^{2}\right )} \log \left ({\left | \cos \left (d x + c\right ) \right |}\right )}{b^{4} d} + \frac {{\left (3 \, a^{4} - 2 \, a^{2} b^{2} - b^{4}\right )} \log \left ({\left | a \cos \left (d x + c\right ) + b \right |}\right )}{a^{2} b^{4} d} - \frac {3 \, a^{2} b^{2} \cos \left (d x + c\right ) - a b^{3} + \frac {2 \, {\left (3 \, a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{2}}{a}}{2 \, {\left (a \cos \left (d x + c\right ) + b\right )} a b^{4} d \cos \left (d x + c\right )^{2}} \] Input:

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

Output:

-(3*a^2 - 2*b^2)*log(abs(cos(d*x + c)))/(b^4*d) + (3*a^4 - 2*a^2*b^2 - b^4 
)*log(abs(a*cos(d*x + c) + b))/(a^2*b^4*d) - 1/2*(3*a^2*b^2*cos(d*x + c) - 
 a*b^3 + 2*(3*a^4*b - 2*a^2*b^3 + b^5)*cos(d*x + c)^2/a)/((a*cos(d*x + c) 
+ b)*a*b^4*d*cos(d*x + c)^2)
 

Mupad [B] (verification not implemented)

Time = 11.32 (sec) , antiderivative size = 286, normalized size of antiderivative = 2.36 \[ \int \frac {\tan ^5(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{a^2\,d}-\frac {\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (-6\,a^3-3\,a^2\,b+a\,b^2+2\,b^3\right )}{a\,b^3}-\frac {2\,\left (-3\,a^3-3\,a^2\,b+a\,b^2+b^3\right )}{a\,b^3}+\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (a-b\right )\,\left (3\,a^2+3\,a\,b+b^2\right )}{a\,b^3}}{d\,\left (\left (b-a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (3\,a-b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (-3\,a-b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a+b\right )}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )\,\left (3\,a^2-2\,b^2\right )}{b^4\,d}-\frac {\ln \left (a+b-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )\,\left (-3\,a^4+2\,a^2\,b^2+b^4\right )}{a^2\,b^4\,d} \] Input:

int(tan(c + d*x)^5/(a + b/cos(c + d*x))^2,x)
 

Output:

log(tan(c/2 + (d*x)/2)^2 + 1)/(a^2*d) - ((2*tan(c/2 + (d*x)/2)^2*(a*b^2 - 
3*a^2*b - 6*a^3 + 2*b^3))/(a*b^3) - (2*(a*b^2 - 3*a^2*b - 3*a^3 + b^3))/(a 
*b^3) + (2*tan(c/2 + (d*x)/2)^4*(a - b)*(3*a*b + 3*a^2 + b^2))/(a*b^3))/(d 
*(a + b - tan(c/2 + (d*x)/2)^2*(3*a + b) - tan(c/2 + (d*x)/2)^6*(a - b) + 
tan(c/2 + (d*x)/2)^4*(3*a - b))) - (log(tan(c/2 + (d*x)/2)^2 - 1)*(3*a^2 - 
 2*b^2))/(b^4*d) - (log(a + b - a*tan(c/2 + (d*x)/2)^2 + b*tan(c/2 + (d*x) 
/2)^2)*(b^4 - 3*a^4 + 2*a^2*b^2))/(a^2*b^4*d)
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 1374, normalized size of antiderivative = 11.36 \[ \int \frac {\tan ^5(c+d x)}{(a+b \sec (c+d x))^2} \, dx =\text {Too large to display} \] Input:

int(tan(d*x+c)^5/(a+b*sec(d*x+c))^2,x)
 

Output:

(2*cos(c + d*x)*log(tan((c + d*x)/2)**2 + 1)*sin(c + d*x)**2*a*b**4 - 2*co 
s(c + d*x)*log(tan((c + d*x)/2)**2 + 1)*a*b**4 - 6*cos(c + d*x)*log(tan((c 
 + d*x)/2) - 1)*sin(c + d*x)**2*a**5 + 4*cos(c + d*x)*log(tan((c + d*x)/2) 
 - 1)*sin(c + d*x)**2*a**3*b**2 + 6*cos(c + d*x)*log(tan((c + d*x)/2) - 1) 
*a**5 - 4*cos(c + d*x)*log(tan((c + d*x)/2) - 1)*a**3*b**2 - 6*cos(c + d*x 
)*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a**5 + 4*cos(c + d*x)*log(tan( 
(c + d*x)/2) + 1)*sin(c + d*x)**2*a**3*b**2 + 6*cos(c + d*x)*log(tan((c + 
d*x)/2) + 1)*a**5 - 4*cos(c + d*x)*log(tan((c + d*x)/2) + 1)*a**3*b**2 + 6 
*cos(c + d*x)*log(tan((c + d*x)/2)**2*a - tan((c + d*x)/2)**2*b - a - b)*s 
in(c + d*x)**2*a**5 - 4*cos(c + d*x)*log(tan((c + d*x)/2)**2*a - tan((c + 
d*x)/2)**2*b - a - b)*sin(c + d*x)**2*a**3*b**2 - 2*cos(c + d*x)*log(tan(( 
c + d*x)/2)**2*a - tan((c + d*x)/2)**2*b - a - b)*sin(c + d*x)**2*a*b**4 - 
 6*cos(c + d*x)*log(tan((c + d*x)/2)**2*a - tan((c + d*x)/2)**2*b - a - b) 
*a**5 + 4*cos(c + d*x)*log(tan((c + d*x)/2)**2*a - tan((c + d*x)/2)**2*b - 
 a - b)*a**3*b**2 + 2*cos(c + d*x)*log(tan((c + d*x)/2)**2*a - tan((c + d* 
x)/2)**2*b - a - b)*a*b**4 + 6*cos(c + d*x)*sin(c + d*x)**2*a**4*b - 3*cos 
(c + d*x)*sin(c + d*x)**2*a**3*b**2 - 2*cos(c + d*x)*sin(c + d*x)**2*a**2* 
b**3 + 2*cos(c + d*x)*sin(c + d*x)**2*a*b**4 - 6*cos(c + d*x)*a**4*b + 6*c 
os(c + d*x)*a**3*b**2 + 2*cos(c + d*x)*a**2*b**3 - 2*cos(c + d*x)*a*b**4 + 
 2*log(tan((c + d*x)/2)**2 + 1)*sin(c + d*x)**2*b**5 - 2*log(tan((c + d...