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

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 = 97 \[ \int \frac {\tan ^4(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {a x}{a^2+b^2}+\frac {b \log (\cos (c+d x))}{\left (a^2+b^2\right ) d}+\frac {a^4 \log (a+b \tan (c+d x))}{b^3 \left (a^2+b^2\right ) d}-\frac {a \tan (c+d x)}{b^2 d}+\frac {\tan ^2(c+d x)}{2 b d} \] Output:

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

Mathematica [C] (verified)

Result contains complex when optimal does not.

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

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

Output:

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

Rubi [A] (verified)

Time = 0.75 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.16, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {3042, 4049, 27, 3042, 4130, 25, 3042, 4110, 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 ^4(c+d x)}{a+b \tan (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4049

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

\(\Big \downarrow \) 27

\(\displaystyle \frac {\tan ^2(c+d x)}{2 b d}-\frac {\int \frac {\tan (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 ^2(c+d x)}{2 b d}-\frac {\int \frac {\tan (c+d x) \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 ^2(c+d x)}{2 b d}-\frac {\frac {\int -\frac {a^2+\left (a^2-b^2\right ) \tan ^2(c+d x)}{a+b \tan (c+d x)}dx}{b}+\frac {a \tan (c+d x)}{b d}}{b}\)

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4110

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3956

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

\(\Big \downarrow \) 4100

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

\(\Big \downarrow \) 16

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

Input:

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

Output:

Tan[c + d*x]^2/(2*b*d) - (-(((a*b^2*x)/(a^2 + b^2) + (b^3*Log[Cos[c + d*x] 
])/((a^2 + b^2)*d) + (a^4*Log[a + b*Tan[c + d*x]])/(b*(a^2 + b^2)*d))/b) + 
 (a*Tan[c + d*x])/(b*d))/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 4110
Int[((A_) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2)/((a_) + (b_.)*tan[(e_.) + (f_. 
)*(x_)]), x_Symbol] :> Simp[a*(A - C)*(x/(a^2 + b^2)), x] + (Simp[(a^2*C + 
A*b^2)/(a^2 + b^2)   Int[(1 + Tan[e + f*x]^2)/(a + b*Tan[e + f*x]), x], x] 
- Simp[b*((A - C)/(a^2 + b^2))   Int[Tan[e + f*x], x], x]) /; FreeQ[{a, b, 
e, f, A, C}, x] && NeQ[a^2*C + A*b^2, 0] && NeQ[a^2 + b^2, 0] && NeQ[A, C]
 

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

Time = 0.49 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.95

method result size
derivativedivides \(\frac {-\frac {-\frac {b \tan \left (d x +c \right )^{2}}{2}+a \tan \left (d x +c \right )}{b^{2}}+\frac {a^{4} \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3} \left (a^{2}+b^{2}\right )}+\frac {-\frac {b \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}+a \arctan \left (\tan \left (d x +c \right )\right )}{a^{2}+b^{2}}}{d}\) \(92\)
default \(\frac {-\frac {-\frac {b \tan \left (d x +c \right )^{2}}{2}+a \tan \left (d x +c \right )}{b^{2}}+\frac {a^{4} \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3} \left (a^{2}+b^{2}\right )}+\frac {-\frac {b \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}+a \arctan \left (\tan \left (d x +c \right )\right )}{a^{2}+b^{2}}}{d}\) \(92\)
norman \(\frac {a x}{a^{2}+b^{2}}+\frac {\tan \left (d x +c \right )^{2}}{2 b d}-\frac {a \tan \left (d x +c \right )}{b^{2} d}+\frac {a^{4} \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3} \left (a^{2}+b^{2}\right ) d}-\frac {b \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2 d \left (a^{2}+b^{2}\right )}\) \(101\)
parallelrisch \(-\frac {-2 a \,b^{3} d x -b^{2} a^{2} \tan \left (d x +c \right )^{2}-b^{4} \tan \left (d x +c \right )^{2}+\ln \left (1+\tan \left (d x +c \right )^{2}\right ) b^{4}-2 a^{4} \ln \left (a +b \tan \left (d x +c \right )\right )+2 a^{3} b \tan \left (d x +c \right )+2 a \,b^{3} \tan \left (d x +c \right )}{2 \left (a^{2}+b^{2}\right ) b^{3} d}\) \(111\)
risch \(-\frac {x}{i b -a}+\frac {2 i x \,a^{2}}{b^{3}}+\frac {2 i a^{2} c}{b^{3} d}-\frac {2 i x}{b}-\frac {2 i c}{b d}-\frac {2 i a^{4} x}{\left (a^{2}+b^{2}\right ) b^{3}}-\frac {2 i a^{4} c}{\left (a^{2}+b^{2}\right ) b^{3} d}+\frac {-2 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{2 i \left (d x +c \right )}-2 i a}{b^{2} d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{b^{3} d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b d}+\frac {a^{4} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{\left (a^{2}+b^{2}\right ) b^{3} d}\) \(236\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.38 \[ \int \frac {\tan ^4(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {2 \, a b^{3} d x + a^{4} \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 ) + {\left (a^{2} b^{2} + b^{4}\right )} \tan \left (d x + c\right )^{2} - {\left (a^{4} - b^{4}\right )} \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right ) - 2 \, {\left (a^{3} b + a b^{3}\right )} \tan \left (d x + c\right )}{2 \, {\left (a^{2} b^{3} + b^{5}\right )} d} \] Input:

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

Output:

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

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

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

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

Output:

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

Maxima [A] (verification not implemented)

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

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

Output:

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

Giac [A] (verification not implemented)

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

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

Output:

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

Mupad [B] (verification not implemented)

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

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

Output:

tan(c + d*x)^2/(2*b*d) - log(tan(c + d*x) + 1i)/(2*d*(a*1i + b)) - (log(ta 
n(c + d*x) - 1i)*1i)/(2*d*(a + b*1i)) - (a*tan(c + d*x))/(b^2*d) + (a^4*lo 
g(a + b*tan(c + d*x)))/(b^3*d*(a^2 + b^2))
 

Reduce [B] (verification not implemented)

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

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

Output:

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