Integrand size = 22, antiderivative size = 102 \[ \int \tan ^5(c+d x) (a+i a \tan (c+d x)) \, dx=-i a x-\frac {a \log (\cos (c+d x))}{d}+\frac {i a \tan (c+d x)}{d}-\frac {a \tan ^2(c+d x)}{2 d}-\frac {i a \tan ^3(c+d x)}{3 d}+\frac {a \tan ^4(c+d x)}{4 d}+\frac {i a \tan ^5(c+d x)}{5 d} \] Output:
-I*a*x-a*ln(cos(d*x+c))/d+I*a*tan(d*x+c)/d-1/2*a*tan(d*x+c)^2/d-1/3*I*a*ta n(d*x+c)^3/d+1/4*a*tan(d*x+c)^4/d+1/5*I*a*tan(d*x+c)^5/d
Time = 0.02 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.07 \[ \int \tan ^5(c+d x) (a+i a \tan (c+d x)) \, dx=-\frac {i a \arctan (\tan (c+d x))}{d}-\frac {a \log (\cos (c+d x))}{d}-\frac {a \sec ^2(c+d x)}{d}+\frac {a \sec ^4(c+d x)}{4 d}+\frac {i a \tan (c+d x)}{d}-\frac {i a \tan ^3(c+d x)}{3 d}+\frac {i a \tan ^5(c+d x)}{5 d} \] Input:
Integrate[Tan[c + d*x]^5*(a + I*a*Tan[c + d*x]),x]
Output:
((-I)*a*ArcTan[Tan[c + d*x]])/d - (a*Log[Cos[c + d*x]])/d - (a*Sec[c + d*x ]^2)/d + (a*Sec[c + d*x]^4)/(4*d) + (I*a*Tan[c + d*x])/d - ((I/3)*a*Tan[c + d*x]^3)/d + ((I/5)*a*Tan[c + d*x]^5)/d
Time = 0.62 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.545, Rules used = {3042, 4011, 3042, 4011, 3042, 4011, 3042, 4011, 3042, 4008, 3042, 3956}
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(c+d x) (a+i a \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^5 (a+i a \tan (c+d x))dx\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int \tan ^4(c+d x) (a \tan (c+d x)-i a)dx+\frac {i a \tan ^5(c+d x)}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^4 (a \tan (c+d x)-i a)dx+\frac {i a \tan ^5(c+d x)}{5 d}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int \tan ^3(c+d x) (-i \tan (c+d x) a-a)dx+\frac {i a \tan ^5(c+d x)}{5 d}+\frac {a \tan ^4(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^3 (-i \tan (c+d x) a-a)dx+\frac {i a \tan ^5(c+d x)}{5 d}+\frac {a \tan ^4(c+d x)}{4 d}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int \tan ^2(c+d x) (i a-a \tan (c+d x))dx+\frac {i a \tan ^5(c+d x)}{5 d}+\frac {a \tan ^4(c+d x)}{4 d}-\frac {i a \tan ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^2 (i a-a \tan (c+d x))dx+\frac {i a \tan ^5(c+d x)}{5 d}+\frac {a \tan ^4(c+d x)}{4 d}-\frac {i a \tan ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int \tan (c+d x) (i \tan (c+d x) a+a)dx+\frac {i a \tan ^5(c+d x)}{5 d}+\frac {a \tan ^4(c+d x)}{4 d}-\frac {i a \tan ^3(c+d x)}{3 d}-\frac {a \tan ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x) (i \tan (c+d x) a+a)dx+\frac {i a \tan ^5(c+d x)}{5 d}+\frac {a \tan ^4(c+d x)}{4 d}-\frac {i a \tan ^3(c+d x)}{3 d}-\frac {a \tan ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 4008 |
\(\displaystyle a \int \tan (c+d x)dx+\frac {i a \tan ^5(c+d x)}{5 d}+\frac {a \tan ^4(c+d x)}{4 d}-\frac {i a \tan ^3(c+d x)}{3 d}-\frac {a \tan ^2(c+d x)}{2 d}+\frac {i a \tan (c+d x)}{d}-i a x\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \tan (c+d x)dx+\frac {i a \tan ^5(c+d x)}{5 d}+\frac {a \tan ^4(c+d x)}{4 d}-\frac {i a \tan ^3(c+d x)}{3 d}-\frac {a \tan ^2(c+d x)}{2 d}+\frac {i a \tan (c+d x)}{d}-i a x\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {i a \tan ^5(c+d x)}{5 d}+\frac {a \tan ^4(c+d x)}{4 d}-\frac {i a \tan ^3(c+d x)}{3 d}-\frac {a \tan ^2(c+d x)}{2 d}+\frac {i a \tan (c+d x)}{d}-\frac {a \log (\cos (c+d x))}{d}-i a x\) |
Input:
Int[Tan[c + d*x]^5*(a + I*a*Tan[c + d*x]),x]
Output:
(-I)*a*x - (a*Log[Cos[c + d*x]])/d + (I*a*Tan[c + d*x])/d - (a*Tan[c + d*x ]^2)/(2*d) - ((I/3)*a*Tan[c + d*x]^3)/d + (a*Tan[c + d*x]^4)/(4*d) + ((I/5 )*a*Tan[c + d*x]^5)/d
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(a*c - b*d)*x, x] + (Simp[b*d*(Tan[e + f*x]/f), x] + Simp[(b*c + a*d) Int[Tan[e + f*x], x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int [(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] , x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]
Time = 0.41 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.79
method | result | size |
derivativedivides | \(\frac {a \left (i \tan \left (d x +c \right )+\frac {i \tan \left (d x +c \right )^{5}}{5}+\frac {\tan \left (d x +c \right )^{4}}{4}-\frac {i \tan \left (d x +c \right )^{3}}{3}-\frac {\tan \left (d x +c \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}-i \arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(81\) |
default | \(\frac {a \left (i \tan \left (d x +c \right )+\frac {i \tan \left (d x +c \right )^{5}}{5}+\frac {\tan \left (d x +c \right )^{4}}{4}-\frac {i \tan \left (d x +c \right )^{3}}{3}-\frac {\tan \left (d x +c \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}-i \arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(81\) |
parallelrisch | \(-\frac {-12 i a \tan \left (d x +c \right )^{5}+20 i a \tan \left (d x +c \right )^{3}-15 a \tan \left (d x +c \right )^{4}+60 i a x d -60 i a \tan \left (d x +c \right )+30 \tan \left (d x +c \right )^{2} a -30 a \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{60 d}\) | \(83\) |
parts | \(\frac {a \left (\frac {\tan \left (d x +c \right )^{4}}{4}-\frac {\tan \left (d x +c \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}\right )}{d}+\frac {i a \left (\frac {\tan \left (d x +c \right )^{5}}{5}-\frac {\tan \left (d x +c \right )^{3}}{3}+\tan \left (d x +c \right )-\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(84\) |
risch | \(\frac {2 i a c}{d}-\frac {2 a \left (75 \,{\mathrm e}^{8 i \left (d x +c \right )}+150 \,{\mathrm e}^{6 i \left (d x +c \right )}+200 \,{\mathrm e}^{4 i \left (d x +c \right )}+100 \,{\mathrm e}^{2 i \left (d x +c \right )}+23\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(93\) |
norman | \(\frac {i a \tan \left (d x +c \right )}{d}-\frac {a \tan \left (d x +c \right )^{2}}{2 d}+\frac {a \tan \left (d x +c \right )^{4}}{4 d}-i a x -\frac {i a \tan \left (d x +c \right )^{3}}{3 d}+\frac {i a \tan \left (d x +c \right )^{5}}{5 d}+\frac {a \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2 d}\) | \(95\) |
Input:
int(tan(d*x+c)^5*(a+I*a*tan(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*a*(I*tan(d*x+c)+1/5*I*tan(d*x+c)^5+1/4*tan(d*x+c)^4-1/3*I*tan(d*x+c)^3 -1/2*tan(d*x+c)^2+1/2*ln(1+tan(d*x+c)^2)-I*arctan(tan(d*x+c)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 192 vs. \(2 (86) = 172\).
Time = 0.08 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.88 \[ \int \tan ^5(c+d x) (a+i a \tan (c+d x)) \, dx=-\frac {150 \, a e^{\left (8 i \, d x + 8 i \, c\right )} + 300 \, a e^{\left (6 i \, d x + 6 i \, c\right )} + 400 \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 200 \, a e^{\left (2 i \, d x + 2 i \, c\right )} + 15 \, {\left (a e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, a e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, a e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, a e^{\left (2 i \, d x + 2 i \, c\right )} + a\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 46 \, a}{15 \, {\left (d e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \] Input:
integrate(tan(d*x+c)^5*(a+I*a*tan(d*x+c)),x, algorithm="fricas")
Output:
-1/15*(150*a*e^(8*I*d*x + 8*I*c) + 300*a*e^(6*I*d*x + 6*I*c) + 400*a*e^(4* I*d*x + 4*I*c) + 200*a*e^(2*I*d*x + 2*I*c) + 15*(a*e^(10*I*d*x + 10*I*c) + 5*a*e^(8*I*d*x + 8*I*c) + 10*a*e^(6*I*d*x + 6*I*c) + 10*a*e^(4*I*d*x + 4* I*c) + 5*a*e^(2*I*d*x + 2*I*c) + a)*log(e^(2*I*d*x + 2*I*c) + 1) + 46*a)/( d*e^(10*I*d*x + 10*I*c) + 5*d*e^(8*I*d*x + 8*I*c) + 10*d*e^(6*I*d*x + 6*I* c) + 10*d*e^(4*I*d*x + 4*I*c) + 5*d*e^(2*I*d*x + 2*I*c) + d)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 197 vs. \(2 (85) = 170\).
Time = 0.30 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.93 \[ \int \tan ^5(c+d x) (a+i a \tan (c+d x)) \, dx=- \frac {a \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} + \frac {- 150 a e^{8 i c} e^{8 i d x} - 300 a e^{6 i c} e^{6 i d x} - 400 a e^{4 i c} e^{4 i d x} - 200 a e^{2 i c} e^{2 i d x} - 46 a}{15 d e^{10 i c} e^{10 i d x} + 75 d e^{8 i c} e^{8 i d x} + 150 d e^{6 i c} e^{6 i d x} + 150 d e^{4 i c} e^{4 i d x} + 75 d e^{2 i c} e^{2 i d x} + 15 d} \] Input:
integrate(tan(d*x+c)**5*(a+I*a*tan(d*x+c)),x)
Output:
-a*log(exp(2*I*d*x) + exp(-2*I*c))/d + (-150*a*exp(8*I*c)*exp(8*I*d*x) - 3 00*a*exp(6*I*c)*exp(6*I*d*x) - 400*a*exp(4*I*c)*exp(4*I*d*x) - 200*a*exp(2 *I*c)*exp(2*I*d*x) - 46*a)/(15*d*exp(10*I*c)*exp(10*I*d*x) + 75*d*exp(8*I* c)*exp(8*I*d*x) + 150*d*exp(6*I*c)*exp(6*I*d*x) + 150*d*exp(4*I*c)*exp(4*I *d*x) + 75*d*exp(2*I*c)*exp(2*I*d*x) + 15*d)
Time = 0.12 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.79 \[ \int \tan ^5(c+d x) (a+i a \tan (c+d x)) \, dx=-\frac {-12 i \, a \tan \left (d x + c\right )^{5} - 15 \, a \tan \left (d x + c\right )^{4} + 20 i \, a \tan \left (d x + c\right )^{3} + 30 \, a \tan \left (d x + c\right )^{2} + 60 i \, {\left (d x + c\right )} a - 30 \, a \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 60 i \, a \tan \left (d x + c\right )}{60 \, d} \] Input:
integrate(tan(d*x+c)^5*(a+I*a*tan(d*x+c)),x, algorithm="maxima")
Output:
-1/60*(-12*I*a*tan(d*x + c)^5 - 15*a*tan(d*x + c)^4 + 20*I*a*tan(d*x + c)^ 3 + 30*a*tan(d*x + c)^2 + 60*I*(d*x + c)*a - 30*a*log(tan(d*x + c)^2 + 1) - 60*I*a*tan(d*x + c))/d
Time = 0.17 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.85 \[ \int \tan ^5(c+d x) (a+i a \tan (c+d x)) \, dx=-\frac {1}{60} i \, a {\left (\frac {60 i \, \log \left (\tan \left (d x + c\right ) + i\right )}{d} - \frac {12 \, d^{4} \tan \left (d x + c\right )^{5} - 15 i \, d^{4} \tan \left (d x + c\right )^{4} - 20 \, d^{4} \tan \left (d x + c\right )^{3} + 30 i \, d^{4} \tan \left (d x + c\right )^{2} + 60 \, d^{4} \tan \left (d x + c\right )}{d^{5}}\right )} \] Input:
integrate(tan(d*x+c)^5*(a+I*a*tan(d*x+c)),x, algorithm="giac")
Output:
-1/60*I*a*(60*I*log(tan(d*x + c) + I)/d - (12*d^4*tan(d*x + c)^5 - 15*I*d^ 4*tan(d*x + c)^4 - 20*d^4*tan(d*x + c)^3 + 30*I*d^4*tan(d*x + c)^2 + 60*d^ 4*tan(d*x + c))/d^5)
Time = 0.84 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.72 \[ \int \tan ^5(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}-\frac {a\,{\mathrm {tan}\left (c+d\,x\right )}^2}{2}-\frac {a\,{\mathrm {tan}\left (c+d\,x\right )}^3\,1{}\mathrm {i}}{3}+\frac {a\,{\mathrm {tan}\left (c+d\,x\right )}^4}{4}+\frac {a\,{\mathrm {tan}\left (c+d\,x\right )}^5\,1{}\mathrm {i}}{5}+a\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )}{d} \] Input:
int(tan(c + d*x)^5*(a + a*tan(c + d*x)*1i),x)
Output:
(a*tan(c + d*x)*1i - (a*tan(c + d*x)^2)/2 - (a*tan(c + d*x)^3*1i)/3 + (a*t an(c + d*x)^4)/4 + (a*tan(c + d*x)^5*1i)/5 + a*log(tan(c + d*x) + 1i))/d
Time = 0.15 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.75 \[ \int \tan ^5(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {a \left (30 \,\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right )+12 \tan \left (d x +c \right )^{5} i +15 \tan \left (d x +c \right )^{4}-20 \tan \left (d x +c \right )^{3} i -30 \tan \left (d x +c \right )^{2}+60 \tan \left (d x +c \right ) i -60 d i x \right )}{60 d} \] Input:
int(tan(d*x+c)^5*(a+I*a*tan(d*x+c)),x)
Output:
(a*(30*log(tan(c + d*x)**2 + 1) + 12*tan(c + d*x)**5*i + 15*tan(c + d*x)** 4 - 20*tan(c + d*x)**3*i - 30*tan(c + d*x)**2 + 60*tan(c + d*x)*i - 60*d*i *x))/(60*d)