Integrand size = 34, antiderivative size = 157 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=4 a^3 (i A+B) x+\frac {4 a^3 (i A+B) \cot (c+d x)}{d}+\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{12 d}+\frac {4 a^3 (A-i B) \log (\sin (c+d x))}{d}-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}-\frac {(3 i A+2 B) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{6 d} \] Output:
4*a^3*(I*A+B)*x+4*a^3*(I*A+B)*cot(d*x+c)/d+1/12*a^3*(15*A-14*I*B)*cot(d*x+ c)^2/d+4*a^3*(A-I*B)*ln(sin(d*x+c))/d-1/4*a*A*cot(d*x+c)^4*(a+I*a*tan(d*x+ c))^2/d-1/6*(3*I*A+2*B)*cot(d*x+c)^3*(a^3+I*a^3*tan(d*x+c))/d
Time = 0.92 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.71 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {i a^3 \left (-\left ((3 A-4 i B) (i+\cot (c+d x))^3\right )+3 i A \cot (c+d x) (i+\cot (c+d x))^3-6 i (A-i B) \left (6 i \cot (c+d x)+\cot ^2(c+d x)+8 \log (\tan (c+d x))-8 \log (i+\tan (c+d x))\right )\right )}{12 d} \] Input:
Integrate[Cot[c + d*x]^5*(a + I*a*Tan[c + d*x])^3*(A + B*Tan[c + d*x]),x]
Output:
((I/12)*a^3*(-((3*A - (4*I)*B)*(I + Cot[c + d*x])^3) + (3*I)*A*Cot[c + d*x ]*(I + Cot[c + d*x])^3 - (6*I)*(A - I*B)*((6*I)*Cot[c + d*x] + Cot[c + d*x ]^2 + 8*Log[Tan[c + d*x]] - 8*Log[I + Tan[c + d*x]])))/d
Time = 1.11 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.10, number of steps used = 17, number of rules used = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 4076, 27, 3042, 4076, 25, 3042, 4074, 27, 3042, 4012, 25, 3042, 4014, 3042, 25, 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 \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+i a \tan (c+d x))^3 (A+B \tan (c+d x))}{\tan (c+d x)^5}dx\) |
\(\Big \downarrow \) 4076 |
\(\displaystyle \frac {1}{4} \int 2 \cot ^4(c+d x) (i \tan (c+d x) a+a)^2 (a (3 i A+2 B)-a (A-2 i B) \tan (c+d x))dx-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{2} \int \cot ^4(c+d x) (i \tan (c+d x) a+a)^2 (a (3 i A+2 B)-a (A-2 i B) \tan (c+d x))dx-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {(i \tan (c+d x) a+a)^2 (a (3 i A+2 B)-a (A-2 i B) \tan (c+d x))}{\tan (c+d x)^4}dx-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4076 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \int -\cot ^3(c+d x) (i \tan (c+d x) a+a) \left ((15 A-14 i B) a^2+(9 i A+10 B) \tan (c+d x) a^2\right )dx-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (-\frac {1}{3} \int \cot ^3(c+d x) (i \tan (c+d x) a+a) \left ((15 A-14 i B) a^2+(9 i A+10 B) \tan (c+d x) a^2\right )dx-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (-\frac {1}{3} \int \frac {(i \tan (c+d x) a+a) \left ((15 A-14 i B) a^2+(9 i A+10 B) \tan (c+d x) a^2\right )}{\tan (c+d x)^3}dx-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4074 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-\int 24 \cot ^2(c+d x) \left (a^3 (i A+B)-a^3 (A-i B) \tan (c+d x)\right )dx\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \int \cot ^2(c+d x) \left (a^3 (i A+B)-a^3 (A-i B) \tan (c+d x)\right )dx\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \int \frac {a^3 (i A+B)-a^3 (A-i B) \tan (c+d x)}{\tan (c+d x)^2}dx\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (\int -\cot (c+d x) \left ((A-i B) a^3+(i A+B) \tan (c+d x) a^3\right )dx-\frac {a^3 (B+i A) \cot (c+d x)}{d}\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (-\int \cot (c+d x) \left ((A-i B) a^3+(i A+B) \tan (c+d x) a^3\right )dx-\frac {a^3 (B+i A) \cot (c+d x)}{d}\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (-\int \frac {(A-i B) a^3+(i A+B) \tan (c+d x) a^3}{\tan (c+d x)}dx-\frac {a^3 (B+i A) \cot (c+d x)}{d}\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4014 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (-a^3 (A-i B) \int \cot (c+d x)dx-\frac {a^3 (B+i A) \cot (c+d x)}{d}-\left (a^3 x (B+i A)\right )\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (-a^3 (A-i B) \int -\tan \left (c+d x+\frac {\pi }{2}\right )dx-\frac {a^3 (B+i A) \cot (c+d x)}{d}-\left (a^3 x (B+i A)\right )\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (a^3 (A-i B) \int \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )dx-\frac {a^3 (B+i A) \cot (c+d x)}{d}-\left (a^3 x (B+i A)\right )\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (-\frac {a^3 (B+i A) \cot (c+d x)}{d}-\frac {a^3 (A-i B) \log (-\sin (c+d x))}{d}-\left (a^3 x (B+i A)\right )\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
Input:
Int[Cot[c + d*x]^5*(a + I*a*Tan[c + d*x])^3*(A + B*Tan[c + d*x]),x]
Output:
-1/4*(a*A*Cot[c + d*x]^4*(a + I*a*Tan[c + d*x])^2)/d + (((a^3*(15*A - (14* I)*B)*Cot[c + d*x]^2)/(2*d) - 24*(-(a^3*(I*A + B)*x) - (a^3*(I*A + B)*Cot[ c + d*x])/d - (a^3*(A - I*B)*Log[-Sin[c + d*x]])/d))/3 - (((3*I)*A + 2*B)* Cot[c + d*x]^3*(a^3 + I*a^3*Tan[c + d*x]))/(3*d))/2
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
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_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*((a + b*Tan[e + f*x])^(m + 1)/ (f*(m + 1)*(a^2 + b^2))), x] + Simp[1/(a^2 + b^2) Int[(a + b*Tan[e + f*x] )^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a , b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1 ]
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[(a*c + b*d)*(x/(a^2 + b^2)), x] + Simp[(b*c - a *d)/(a^2 + b^2) Int[(b - a*Tan[e + f*x])/(a + b*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] && N eQ[a*c + b*d, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b *c - a*d)*(A*b - a*B)*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1)*(a^2 + b^2 ))), x] + Simp[1/(a^2 + b^2) Int[(a + b*Tan[e + f*x])^(m + 1)*Simp[a*A*c + b*B*c + A*b*d - a*B*d - (A*b*c - a*B*c - a*A*d - b*B*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && LtQ[m , -1] && NeQ[a^2 + b^2, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(-a^2)*(B*c - A*d)*(a + b*Tan[e + f*x])^(m - 1)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(b*c + a*d)*(n + 1))), x] - Simp[a/(d*(b*c + a*d)*(n + 1)) Int[ (a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^(n + 1)*Simp[A*b*d*(m - n - 2) - B*(b*c*(m - 1) + a*d*(n + 1)) + (a*A*d*(m + n) - B*(a*c*(m - 1) + b *d*(n + 1)))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && GtQ[m, 1] && LtQ[n, -1]
Time = 0.67 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.70
method | result | size |
parallelrisch | \(\frac {4 \left (\frac {\left (i B -A \right ) \ln \left (\sec \left (d x +c \right )^{2}\right )}{2}+\left (-i B +A \right ) \ln \left (\tan \left (d x +c \right )\right )-\frac {A \cot \left (d x +c \right )^{4}}{16}-\frac {\cot \left (d x +c \right )^{3} \left (i A +\frac {B}{3}\right )}{4}+\frac {\left (-\frac {3 i B}{4}+A \right ) \cot \left (d x +c \right )^{2}}{2}+\cot \left (d x +c \right ) \left (i A +B \right )+\left (i A +B \right ) x d \right ) a^{3}}{d}\) | \(110\) |
derivativedivides | \(\frac {a^{3} \left (-i A \cot \left (d x +c \right )^{3}-\frac {A \cot \left (d x +c \right )^{4}}{4}-\frac {3 i B \cot \left (d x +c \right )^{2}}{2}-\frac {B \cot \left (d x +c \right )^{3}}{3}+4 i A \cot \left (d x +c \right )+2 A \cot \left (d x +c \right )^{2}+4 \cot \left (d x +c \right ) B +\frac {\left (4 i B -4 A \right ) \ln \left (\cot \left (d x +c \right )^{2}+1\right )}{2}+\left (-4 i A -4 B \right ) \left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (d x +c \right )\right )\right )\right )}{d}\) | \(128\) |
default | \(\frac {a^{3} \left (-i A \cot \left (d x +c \right )^{3}-\frac {A \cot \left (d x +c \right )^{4}}{4}-\frac {3 i B \cot \left (d x +c \right )^{2}}{2}-\frac {B \cot \left (d x +c \right )^{3}}{3}+4 i A \cot \left (d x +c \right )+2 A \cot \left (d x +c \right )^{2}+4 \cot \left (d x +c \right ) B +\frac {\left (4 i B -4 A \right ) \ln \left (\cot \left (d x +c \right )^{2}+1\right )}{2}+\left (-4 i A -4 B \right ) \left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (d x +c \right )\right )\right )\right )}{d}\) | \(128\) |
risch | \(-\frac {8 a^{3} B c}{d}-\frac {8 i a^{3} A c}{d}+\frac {2 i a^{3} \left (36 i A \,{\mathrm e}^{6 i \left (d x +c \right )}+24 B \,{\mathrm e}^{6 i \left (d x +c \right )}-69 i A \,{\mathrm e}^{4 i \left (d x +c \right )}-57 B \,{\mathrm e}^{4 i \left (d x +c \right )}+54 i A \,{\mathrm e}^{2 i \left (d x +c \right )}+46 B \,{\mathrm e}^{2 i \left (d x +c \right )}-15 i A -13 B \right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}-\frac {4 i a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) B}{d}+\frac {4 A \,a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) | \(171\) |
norman | \(\frac {\left (4 i A \,a^{3}+4 B \,a^{3}\right ) x \tan \left (d x +c \right )^{4}-\frac {A \,a^{3}}{4 d}+\frac {\left (-3 i B \,a^{3}+4 A \,a^{3}\right ) \tan \left (d x +c \right )^{2}}{2 d}-\frac {\left (3 i A \,a^{3}+B \,a^{3}\right ) \tan \left (d x +c \right )}{3 d}+\frac {4 \left (i A \,a^{3}+B \,a^{3}\right ) \tan \left (d x +c \right )^{3}}{d}}{\tan \left (d x +c \right )^{4}}+\frac {4 \left (-i B \,a^{3}+A \,a^{3}\right ) \ln \left (\tan \left (d x +c \right )\right )}{d}-\frac {2 \left (-i B \,a^{3}+A \,a^{3}\right ) \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{d}\) | \(176\) |
Input:
int(cot(d*x+c)^5*(a+I*a*tan(d*x+c))^3*(A+B*tan(d*x+c)),x,method=_RETURNVER BOSE)
Output:
4*(1/2*(-A+I*B)*ln(sec(d*x+c)^2)+(A-I*B)*ln(tan(d*x+c))-1/16*A*cot(d*x+c)^ 4-1/4*cot(d*x+c)^3*(I*A+1/3*B)+1/2*(-3/4*I*B+A)*cot(d*x+c)^2+cot(d*x+c)*(I *A+B)+(I*A+B)*x*d)*a^3/d
Time = 0.08 (sec) , antiderivative size = 228, normalized size of antiderivative = 1.45 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=-\frac {2 \, {\left (12 \, {\left (3 \, A - 2 i \, B\right )} a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} - 3 \, {\left (23 \, A - 19 i \, B\right )} a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, {\left (27 \, A - 23 i \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - {\left (15 \, A - 13 i \, B\right )} a^{3} - 6 \, {\left ({\left (A - i \, B\right )} a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} - 4 \, {\left (A - i \, B\right )} a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, {\left (A - i \, B\right )} a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 4 \, {\left (A - i \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (A - i \, B\right )} a^{3}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )\right )}}{3 \, {\left (d e^{\left (8 i \, d x + 8 i \, c\right )} - 4 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, d e^{\left (4 i \, d x + 4 i \, c\right )} - 4 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \] Input:
integrate(cot(d*x+c)^5*(a+I*a*tan(d*x+c))^3*(A+B*tan(d*x+c)),x, algorithm= "fricas")
Output:
-2/3*(12*(3*A - 2*I*B)*a^3*e^(6*I*d*x + 6*I*c) - 3*(23*A - 19*I*B)*a^3*e^( 4*I*d*x + 4*I*c) + 2*(27*A - 23*I*B)*a^3*e^(2*I*d*x + 2*I*c) - (15*A - 13* I*B)*a^3 - 6*((A - I*B)*a^3*e^(8*I*d*x + 8*I*c) - 4*(A - I*B)*a^3*e^(6*I*d *x + 6*I*c) + 6*(A - I*B)*a^3*e^(4*I*d*x + 4*I*c) - 4*(A - I*B)*a^3*e^(2*I *d*x + 2*I*c) + (A - I*B)*a^3)*log(e^(2*I*d*x + 2*I*c) - 1))/(d*e^(8*I*d*x + 8*I*c) - 4*d*e^(6*I*d*x + 6*I*c) + 6*d*e^(4*I*d*x + 4*I*c) - 4*d*e^(2*I *d*x + 2*I*c) + d)
Time = 1.39 (sec) , antiderivative size = 235, normalized size of antiderivative = 1.50 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {4 a^{3} \left (A - i B\right ) \log {\left (e^{2 i d x} - e^{- 2 i c} \right )}}{d} + \frac {30 A a^{3} - 26 i B a^{3} + \left (- 108 A a^{3} e^{2 i c} + 92 i B a^{3} e^{2 i c}\right ) e^{2 i d x} + \left (138 A a^{3} e^{4 i c} - 114 i B a^{3} e^{4 i c}\right ) e^{4 i d x} + \left (- 72 A a^{3} e^{6 i c} + 48 i B a^{3} e^{6 i c}\right ) e^{6 i d x}}{3 d e^{8 i c} e^{8 i d x} - 12 d e^{6 i c} e^{6 i d x} + 18 d e^{4 i c} e^{4 i d x} - 12 d e^{2 i c} e^{2 i d x} + 3 d} \] Input:
integrate(cot(d*x+c)**5*(a+I*a*tan(d*x+c))**3*(A+B*tan(d*x+c)),x)
Output:
4*a**3*(A - I*B)*log(exp(2*I*d*x) - exp(-2*I*c))/d + (30*A*a**3 - 26*I*B*a **3 + (-108*A*a**3*exp(2*I*c) + 92*I*B*a**3*exp(2*I*c))*exp(2*I*d*x) + (13 8*A*a**3*exp(4*I*c) - 114*I*B*a**3*exp(4*I*c))*exp(4*I*d*x) + (-72*A*a**3* exp(6*I*c) + 48*I*B*a**3*exp(6*I*c))*exp(6*I*d*x))/(3*d*exp(8*I*c)*exp(8*I *d*x) - 12*d*exp(6*I*c)*exp(6*I*d*x) + 18*d*exp(4*I*c)*exp(4*I*d*x) - 12*d *exp(2*I*c)*exp(2*I*d*x) + 3*d)
Time = 0.12 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.85 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=-\frac {48 \, {\left (d x + c\right )} {\left (-i \, A - B\right )} a^{3} + 24 \, {\left (A - i \, B\right )} a^{3} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 48 \, {\left (A - i \, B\right )} a^{3} \log \left (\tan \left (d x + c\right )\right ) - \frac {48 \, {\left (i \, A + B\right )} a^{3} \tan \left (d x + c\right )^{3} + 6 \, {\left (4 \, A - 3 i \, B\right )} a^{3} \tan \left (d x + c\right )^{2} + 4 \, {\left (-3 i \, A - B\right )} a^{3} \tan \left (d x + c\right ) - 3 \, A a^{3}}{\tan \left (d x + c\right )^{4}}}{12 \, d} \] Input:
integrate(cot(d*x+c)^5*(a+I*a*tan(d*x+c))^3*(A+B*tan(d*x+c)),x, algorithm= "maxima")
Output:
-1/12*(48*(d*x + c)*(-I*A - B)*a^3 + 24*(A - I*B)*a^3*log(tan(d*x + c)^2 + 1) - 48*(A - I*B)*a^3*log(tan(d*x + c)) - (48*(I*A + B)*a^3*tan(d*x + c)^ 3 + 6*(4*A - 3*I*B)*a^3*tan(d*x + c)^2 + 4*(-3*I*A - B)*a^3*tan(d*x + c) - 3*A*a^3)/tan(d*x + c)^4)/d
Time = 0.63 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.88 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=-\frac {4 \, {\left (A a^{3} - i \, B a^{3}\right )} \log \left (\tan \left (d x + c\right ) + i\right )}{d} + \frac {4 \, {\left (A a^{3} - i \, B a^{3}\right )} \log \left ({\left | \tan \left (d x + c\right ) \right |}\right )}{d} - \frac {3 \, A a^{3} + 48 \, {\left (-i \, A a^{3} - B a^{3}\right )} \tan \left (d x + c\right )^{3} - 6 \, {\left (4 \, A a^{3} - 3 i \, B a^{3}\right )} \tan \left (d x + c\right )^{2} + 4 \, {\left (3 i \, A a^{3} + B a^{3}\right )} \tan \left (d x + c\right )}{12 \, d \tan \left (d x + c\right )^{4}} \] Input:
integrate(cot(d*x+c)^5*(a+I*a*tan(d*x+c))^3*(A+B*tan(d*x+c)),x, algorithm= "giac")
Output:
-4*(A*a^3 - I*B*a^3)*log(tan(d*x + c) + I)/d + 4*(A*a^3 - I*B*a^3)*log(abs (tan(d*x + c)))/d - 1/12*(3*A*a^3 + 48*(-I*A*a^3 - B*a^3)*tan(d*x + c)^3 - 6*(4*A*a^3 - 3*I*B*a^3)*tan(d*x + c)^2 + 4*(3*I*A*a^3 + B*a^3)*tan(d*x + c))/(d*tan(d*x + c)^4)
Time = 3.58 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.73 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (2\,A\,a^3-\frac {B\,a^3\,3{}\mathrm {i}}{2}\right )+{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (4\,B\,a^3+A\,a^3\,4{}\mathrm {i}\right )-\frac {A\,a^3}{4}-\mathrm {tan}\left (c+d\,x\right )\,\left (\frac {B\,a^3}{3}+A\,a^3\,1{}\mathrm {i}\right )}{d\,{\mathrm {tan}\left (c+d\,x\right )}^4}+\frac {8\,a^3\,\mathrm {atan}\left (2\,\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (B+A\,1{}\mathrm {i}\right )}{d} \] Input:
int(cot(c + d*x)^5*(A + B*tan(c + d*x))*(a + a*tan(c + d*x)*1i)^3,x)
Output:
(tan(c + d*x)^2*(2*A*a^3 - (B*a^3*3i)/2) + tan(c + d*x)^3*(A*a^3*4i + 4*B* a^3) - (A*a^3)/4 - tan(c + d*x)*(A*a^3*1i + (B*a^3)/3))/(d*tan(c + d*x)^4) + (8*a^3*atan(2*tan(c + d*x) + 1i)*(A*1i + B))/d
Time = 0.18 (sec) , antiderivative size = 253, normalized size of antiderivative = 1.61 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {a^{3} \left (480 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a i +416 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} b -96 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a i -32 \cos \left (d x +c \right ) \sin \left (d x +c \right ) b -384 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (d x +c \right )^{4} a +384 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (d x +c \right )^{4} b i +384 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{4} a -384 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{4} b i +384 \sin \left (d x +c \right )^{4} a d i x -111 \sin \left (d x +c \right )^{4} a +384 \sin \left (d x +c \right )^{4} b d x +72 \sin \left (d x +c \right )^{4} b i +240 \sin \left (d x +c \right )^{2} a -144 \sin \left (d x +c \right )^{2} b i -24 a \right )}{96 \sin \left (d x +c \right )^{4} d} \] Input:
int(cot(d*x+c)^5*(a+I*a*tan(d*x+c))^3*(A+B*tan(d*x+c)),x)
Output:
(a**3*(480*cos(c + d*x)*sin(c + d*x)**3*a*i + 416*cos(c + d*x)*sin(c + d*x )**3*b - 96*cos(c + d*x)*sin(c + d*x)*a*i - 32*cos(c + d*x)*sin(c + d*x)*b - 384*log(tan((c + d*x)/2)**2 + 1)*sin(c + d*x)**4*a + 384*log(tan((c + d *x)/2)**2 + 1)*sin(c + d*x)**4*b*i + 384*log(tan((c + d*x)/2))*sin(c + d*x )**4*a - 384*log(tan((c + d*x)/2))*sin(c + d*x)**4*b*i + 384*sin(c + d*x)* *4*a*d*i*x - 111*sin(c + d*x)**4*a + 384*sin(c + d*x)**4*b*d*x + 72*sin(c + d*x)**4*b*i + 240*sin(c + d*x)**2*a - 144*sin(c + d*x)**2*b*i - 24*a))/( 96*sin(c + d*x)**4*d)