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

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [C] (verification not implemented)
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 = 125 \[ \int \frac {\tan ^5(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {b x}{a^2+b^2}-\frac {a \log (\cos (c+d x))}{\left (a^2+b^2\right ) d}-\frac {a^5 \log (a+b \tan (c+d x))}{b^4 \left (a^2+b^2\right ) d}+\frac {\left (a^2-b^2\right ) \tan (c+d x)}{b^3 d}-\frac {a \tan ^2(c+d x)}{2 b^2 d}+\frac {\tan ^3(c+d x)}{3 b d} \] Output:

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

Mathematica [C] (verified)

Result contains complex when optimal does not.

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

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

Output:

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

Rubi [A] (verified)

Time = 1.05 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.18, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.714, Rules used = {3042, 4049, 27, 3042, 4130, 27, 3042, 4131, 25, 3042, 4109, 3042, 3956, 4100, 16}

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 \tan (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\tan (c+d x)^5}{a+b \tan (c+d x)}dx\)

\(\Big \downarrow \) 4049

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4130

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4131

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4109

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3956

\(\displaystyle \frac {\tan ^3(c+d x)}{3 b d}-\frac {\frac {a \tan ^2(c+d x)}{2 b d}-\frac {\frac {\left (a^2-b^2\right ) \tan (c+d x)}{b d}-\frac {\frac {a^5 \int \frac {\tan (c+d x)^2+1}{a+b \tan (c+d x)}dx}{a^2+b^2}-\frac {b^4 x}{a^2+b^2}+\frac {a b^3 \log (\cos (c+d x))}{d \left (a^2+b^2\right )}}{b}}{b}}{b}\)

\(\Big \downarrow \) 4100

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

\(\Big \downarrow \) 16

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 16
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + 
b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
 

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 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3956
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d 
*x], x]]/d, x] /; FreeQ[{c, d}, x]
 

rule 4049
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b^2*(a + b*Tan[e + f*x])^(m - 2)*((c 
+ d*Tan[e + f*x])^(n + 1)/(d*f*(m + n - 1))), x] + Simp[1/(d*(m + n - 1)) 
 Int[(a + b*Tan[e + f*x])^(m - 3)*(c + d*Tan[e + f*x])^n*Simp[a^3*d*(m + n 
- 1) - b^2*(b*c*(m - 2) + a*d*(1 + n)) + b*d*(m + n - 1)*(3*a^2 - b^2)*Tan[ 
e + f*x] - b^2*(b*c*(m - 2) - a*d*(3*m + 2*n - 4))*Tan[e + f*x]^2, x], x], 
x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2 
, 0] && NeQ[c^2 + d^2, 0] && IntegerQ[2*m] && GtQ[m, 2] && (GeQ[n, -1] || I 
ntegerQ[m]) &&  !(IGtQ[n, 2] && ( !IntegerQ[m] || (EqQ[c, 0] && NeQ[a, 0])) 
)
 

rule 4100
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*tan[(e_.) + 
 (f_.)*(x_)]^2), x_Symbol] :> Simp[A/(b*f)   Subst[Int[(a + x)^m, x], x, b* 
Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && EqQ[A, C]
 

rule 4109
Int[((A_) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2 
)/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*A + b*B - a 
*C)*(x/(a^2 + b^2)), x] + (Simp[(A*b^2 - a*b*B + a^2*C)/(a^2 + b^2)   Int[( 
1 + Tan[e + f*x]^2)/(a + b*Tan[e + f*x]), x], x] - Simp[(A*b - a*B - b*C)/( 
a^2 + b^2)   Int[Tan[e + f*x], x], x]) /; FreeQ[{a, b, e, f, A, B, C}, x] & 
& NeQ[A*b^2 - a*b*B + a^2*C, 0] && NeQ[a^2 + b^2, 0] && NeQ[A*b - a*B - b*C 
, 0]
 

rule 4130
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) 
+ (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_. 
) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*(a + b*Tan[e + f*x])^m*((c + d*Tan[ 
e + f*x])^(n + 1)/(d*f*(m + n + 1))), x] + Simp[1/(d*(m + n + 1))   Int[(a 
+ b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^n*Simp[a*A*d*(m + n + 1) - C 
*(b*c*m + a*d*(n + 1)) + d*(A*b + a*B - b*C)*(m + n + 1)*Tan[e + f*x] - (C* 
m*(b*c - a*d) - b*B*d*(m + n + 1))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, 
b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && 
 NeQ[c^2 + d^2, 0] && GtQ[m, 0] &&  !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[ 
c, 0] && NeQ[a, 0])))
 

rule 4131
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) 
+ (f_.)*(x_)])^(n_)*((A_.) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> 
 Simp[C*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(m + n + 
1))), x] + Simp[1/(d*(m + n + 1))   Int[(a + b*Tan[e + f*x])^(m - 1)*(c + d 
*Tan[e + f*x])^n*Simp[a*A*d*(m + n + 1) - C*(b*c*m + a*d*(n + 1)) + d*(A*b 
- b*C)*(m + n + 1)*Tan[e + f*x] - C*m*(b*c - a*d)*Tan[e + f*x]^2, x], x], x 
] /; FreeQ[{a, b, c, d, e, f, A, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 
+ b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 0] &&  !(IGtQ[n, 0] && ( !IntegerQ 
[m] || (EqQ[c, 0] && NeQ[a, 0])))
 
Maple [A] (verified)

Time = 0.68 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.95

method result size
derivativedivides \(\frac {\frac {\frac {b^{2} \tan \left (d x +c \right )^{3}}{3}-\frac {a b \tan \left (d x +c \right )^{2}}{2}+a^{2} \tan \left (d x +c \right )-b^{2} \tan \left (d x +c \right )}{b^{3}}+\frac {\frac {a \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}+b \arctan \left (\tan \left (d x +c \right )\right )}{a^{2}+b^{2}}-\frac {a^{5} \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{4} \left (a^{2}+b^{2}\right )}}{d}\) \(119\)
default \(\frac {\frac {\frac {b^{2} \tan \left (d x +c \right )^{3}}{3}-\frac {a b \tan \left (d x +c \right )^{2}}{2}+a^{2} \tan \left (d x +c \right )-b^{2} \tan \left (d x +c \right )}{b^{3}}+\frac {\frac {a \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}+b \arctan \left (\tan \left (d x +c \right )\right )}{a^{2}+b^{2}}-\frac {a^{5} \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{4} \left (a^{2}+b^{2}\right )}}{d}\) \(119\)
norman \(\frac {b x}{a^{2}+b^{2}}+\frac {\left (a^{2}-b^{2}\right ) \tan \left (d x +c \right )}{b^{3} d}+\frac {\tan \left (d x +c \right )^{3}}{3 b d}-\frac {a \tan \left (d x +c \right )^{2}}{2 b^{2} d}+\frac {a \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2 d \left (a^{2}+b^{2}\right )}-\frac {a^{5} \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{4} \left (a^{2}+b^{2}\right ) d}\) \(126\)
parallelrisch \(-\frac {-2 \tan \left (d x +c \right )^{3} a^{2} b^{3}-2 \tan \left (d x +c \right )^{3} b^{5}-6 b^{5} x d +3 \tan \left (d x +c \right )^{2} a^{3} b^{2}+3 \tan \left (d x +c \right )^{2} a \,b^{4}+6 a^{5} \ln \left (a +b \tan \left (d x +c \right )\right )-3 a \ln \left (1+\tan \left (d x +c \right )^{2}\right ) b^{4}-6 \tan \left (d x +c \right ) a^{4} b +6 \tan \left (d x +c \right ) b^{5}}{6 \left (a^{2}+b^{2}\right ) b^{4} d}\) \(141\)
risch \(\frac {i x}{i b -a}+\frac {2 i a^{5} x}{b^{4} \left (a^{2}+b^{2}\right )}+\frac {2 i a^{5} c}{b^{4} d \left (a^{2}+b^{2}\right )}-\frac {2 i a^{3} x}{b^{4}}-\frac {2 i a^{3} c}{b^{4} d}+\frac {2 i a x}{b^{2}}+\frac {2 i a c}{b^{2} d}+\frac {2 i \left (3 i a b \,{\mathrm e}^{4 i \left (d x +c \right )}+3 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-6 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+3 i a b \,{\mathrm e}^{2 i \left (d x +c \right )}+6 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-6 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+3 a^{2}-4 b^{2}\right )}{3 b^{3} d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}-\frac {a^{5} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b^{4} d \left (a^{2}+b^{2}\right )}+\frac {a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{4} d}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{2} d}\) \(308\)

Input:

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

Output:

1/d*(1/b^3*(1/3*b^2*tan(d*x+c)^3-1/2*a*b*tan(d*x+c)^2+a^2*tan(d*x+c)-b^2*t 
an(d*x+c))+1/(a^2+b^2)*(1/2*a*ln(1+tan(d*x+c)^2)+b*arctan(tan(d*x+c)))-1/b 
^4*a^5/(a^2+b^2)*ln(a+b*tan(d*x+c)))
 

Fricas [A] (verification not implemented)

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

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

Output:

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

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

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

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

Output:

Piecewise((zoo*x*tan(c)**4, Eq(a, 0) & Eq(b, 0) & Eq(d, 0)), ((log(tan(c + 
 d*x)**2 + 1)/(2*d) + tan(c + d*x)**4/(4*d) - tan(c + d*x)**2/(2*d))/a, Eq 
(b, 0)), (15*d*x*tan(c + d*x)/(6*b*d*tan(c + d*x) - 6*I*b*d) - 15*I*d*x/(6 
*b*d*tan(c + d*x) - 6*I*b*d) - 6*I*log(tan(c + d*x)**2 + 1)*tan(c + d*x)/( 
6*b*d*tan(c + d*x) - 6*I*b*d) - 6*log(tan(c + d*x)**2 + 1)/(6*b*d*tan(c + 
d*x) - 6*I*b*d) + 2*tan(c + d*x)**4/(6*b*d*tan(c + d*x) - 6*I*b*d) + I*tan 
(c + d*x)**3/(6*b*d*tan(c + d*x) - 6*I*b*d) - 9*tan(c + d*x)**2/(6*b*d*tan 
(c + d*x) - 6*I*b*d) - 15/(6*b*d*tan(c + d*x) - 6*I*b*d), Eq(a, -I*b)), (1 
5*d*x*tan(c + d*x)/(6*b*d*tan(c + d*x) + 6*I*b*d) + 15*I*d*x/(6*b*d*tan(c 
+ d*x) + 6*I*b*d) + 6*I*log(tan(c + d*x)**2 + 1)*tan(c + d*x)/(6*b*d*tan(c 
 + d*x) + 6*I*b*d) - 6*log(tan(c + d*x)**2 + 1)/(6*b*d*tan(c + d*x) + 6*I* 
b*d) + 2*tan(c + d*x)**4/(6*b*d*tan(c + d*x) + 6*I*b*d) - I*tan(c + d*x)** 
3/(6*b*d*tan(c + d*x) + 6*I*b*d) - 9*tan(c + d*x)**2/(6*b*d*tan(c + d*x) + 
 6*I*b*d) - 15/(6*b*d*tan(c + d*x) + 6*I*b*d), Eq(a, I*b)), (x*tan(c)**5/( 
a + b*tan(c)), Eq(d, 0)), (-6*a**5*log(a/b + tan(c + d*x))/(6*a**2*b**4*d 
+ 6*b**6*d) + 6*a**4*b*tan(c + d*x)/(6*a**2*b**4*d + 6*b**6*d) - 3*a**3*b* 
*2*tan(c + d*x)**2/(6*a**2*b**4*d + 6*b**6*d) + 2*a**2*b**3*tan(c + d*x)** 
3/(6*a**2*b**4*d + 6*b**6*d) + 3*a*b**4*log(tan(c + d*x)**2 + 1)/(6*a**2*b 
**4*d + 6*b**6*d) - 3*a*b**4*tan(c + d*x)**2/(6*a**2*b**4*d + 6*b**6*d) + 
6*b**5*d*x/(6*a**2*b**4*d + 6*b**6*d) + 2*b**5*tan(c + d*x)**3/(6*a**2*...
 

Maxima [A] (verification not implemented)

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

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

Output:

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

Giac [A] (verification not implemented)

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

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

Output:

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

Mupad [B] (verification not implemented)

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

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

Output:

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

Reduce [B] (verification not implemented)

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

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

Output:

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