Integrand size = 34, antiderivative size = 139 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^2 (A+B \tan (c+d x)) \, dx=2 a^2 (i A+B) x+\frac {2 a^2 (i A+B) \cot (c+d x)}{d}+\frac {a^2 (A-i B) \cot ^2(c+d x)}{d}-\frac {a^2 (5 i A+4 B) \cot ^3(c+d x)}{12 d}+\frac {2 a^2 (A-i B) \log (\sin (c+d x))}{d}-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d} \] Output:
2*a^2*(I*A+B)*x+2*a^2*(I*A+B)*cot(d*x+c)/d+a^2*(A-I*B)*cot(d*x+c)^2/d-1/12 *a^2*(5*I*A+4*B)*cot(d*x+c)^3/d+2*a^2*(A-I*B)*ln(sin(d*x+c))/d-1/4*A*cot(d *x+c)^4*(a^2+I*a^2*tan(d*x+c))/d
Time = 0.75 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.25 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^2 (A+B \tan (c+d x)) \, dx=a^2 \left (\frac {2 i A \cot (c+d x)}{d}+\frac {2 B \cot (c+d x)}{d}+\frac {A \cot ^2(c+d x)}{d}-\frac {i B \cot ^2(c+d x)}{d}-\frac {2 i A \cot ^3(c+d x)}{3 d}-\frac {B \cot ^3(c+d x)}{3 d}-\frac {A \cot ^4(c+d x)}{4 d}+\frac {2 A \log (\tan (c+d x))}{d}-\frac {2 i B \log (\tan (c+d x))}{d}-\frac {2 A \log (i+\tan (c+d x))}{d}+\frac {2 i B \log (i+\tan (c+d x))}{d}\right ) \] Input:
Integrate[Cot[c + d*x]^5*(a + I*a*Tan[c + d*x])^2*(A + B*Tan[c + d*x]),x]
Output:
a^2*(((2*I)*A*Cot[c + d*x])/d + (2*B*Cot[c + d*x])/d + (A*Cot[c + d*x]^2)/ d - (I*B*Cot[c + d*x]^2)/d - (((2*I)/3)*A*Cot[c + d*x]^3)/d - (B*Cot[c + d *x]^3)/(3*d) - (A*Cot[c + d*x]^4)/(4*d) + (2*A*Log[Tan[c + d*x]])/d - ((2* I)*B*Log[Tan[c + d*x]])/d - (2*A*Log[I + Tan[c + d*x]])/d + ((2*I)*B*Log[I + Tan[c + d*x]])/d)
Time = 0.97 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.09, number of steps used = 15, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.441, Rules used = {3042, 4076, 3042, 4074, 27, 3042, 4012, 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))^2 (A+B \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+i a \tan (c+d x))^2 (A+B \tan (c+d x))}{\tan (c+d x)^5}dx\) |
\(\Big \downarrow \) 4076 |
\(\displaystyle \frac {1}{4} \int \cot ^4(c+d x) (i \tan (c+d x) a+a) (a (5 i A+4 B)-a (3 A-4 i B) \tan (c+d x))dx-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \int \frac {(i \tan (c+d x) a+a) (a (5 i A+4 B)-a (3 A-4 i B) \tan (c+d x))}{\tan (c+d x)^4}dx-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
\(\Big \downarrow \) 4074 |
\(\displaystyle \frac {1}{4} \left (\int -8 \cot ^3(c+d x) \left ((A-i B) a^2+(i A+B) \tan (c+d x) a^2\right )dx-\frac {a^2 (4 B+5 i A) \cot ^3(c+d x)}{3 d}\right )-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{4} \left (-8 \int \cot ^3(c+d x) \left ((A-i B) a^2+(i A+B) \tan (c+d x) a^2\right )dx-\frac {a^2 (4 B+5 i A) \cot ^3(c+d x)}{3 d}\right )-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (-8 \int \frac {(A-i B) a^2+(i A+B) \tan (c+d x) a^2}{\tan (c+d x)^3}dx-\frac {a^2 (4 B+5 i A) \cot ^3(c+d x)}{3 d}\right )-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle \frac {1}{4} \left (-8 \left (\int \cot ^2(c+d x) \left (a^2 (i A+B)-a^2 (A-i B) \tan (c+d x)\right )dx-\frac {a^2 (A-i B) \cot ^2(c+d x)}{2 d}\right )-\frac {a^2 (4 B+5 i A) \cot ^3(c+d x)}{3 d}\right )-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (-8 \left (\int \frac {a^2 (i A+B)-a^2 (A-i B) \tan (c+d x)}{\tan (c+d x)^2}dx-\frac {a^2 (A-i B) \cot ^2(c+d x)}{2 d}\right )-\frac {a^2 (4 B+5 i A) \cot ^3(c+d x)}{3 d}\right )-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle \frac {1}{4} \left (-8 \left (\int -\cot (c+d x) \left ((A-i B) a^2+(i A+B) \tan (c+d x) a^2\right )dx-\frac {a^2 (A-i B) \cot ^2(c+d x)}{2 d}-\frac {a^2 (B+i A) \cot (c+d x)}{d}\right )-\frac {a^2 (4 B+5 i A) \cot ^3(c+d x)}{3 d}\right )-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{4} \left (-8 \left (-\int \cot (c+d x) \left ((A-i B) a^2+(i A+B) \tan (c+d x) a^2\right )dx-\frac {a^2 (A-i B) \cot ^2(c+d x)}{2 d}-\frac {a^2 (B+i A) \cot (c+d x)}{d}\right )-\frac {a^2 (4 B+5 i A) \cot ^3(c+d x)}{3 d}\right )-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (-8 \left (-\int \frac {(A-i B) a^2+(i A+B) \tan (c+d x) a^2}{\tan (c+d x)}dx-\frac {a^2 (A-i B) \cot ^2(c+d x)}{2 d}-\frac {a^2 (B+i A) \cot (c+d x)}{d}\right )-\frac {a^2 (4 B+5 i A) \cot ^3(c+d x)}{3 d}\right )-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
\(\Big \downarrow \) 4014 |
\(\displaystyle \frac {1}{4} \left (-8 \left (-a^2 (A-i B) \int \cot (c+d x)dx-\frac {a^2 (A-i B) \cot ^2(c+d x)}{2 d}-\frac {a^2 (B+i A) \cot (c+d x)}{d}-a^2 x (B+i A)\right )-\frac {a^2 (4 B+5 i A) \cot ^3(c+d x)}{3 d}\right )-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (-8 \left (-a^2 (A-i B) \int -\tan \left (c+d x+\frac {\pi }{2}\right )dx-\frac {a^2 (A-i B) \cot ^2(c+d x)}{2 d}-\frac {a^2 (B+i A) \cot (c+d x)}{d}-a^2 x (B+i A)\right )-\frac {a^2 (4 B+5 i A) \cot ^3(c+d x)}{3 d}\right )-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{4} \left (-8 \left (a^2 (A-i B) \int \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )dx-\frac {a^2 (A-i B) \cot ^2(c+d x)}{2 d}-\frac {a^2 (B+i A) \cot (c+d x)}{d}-a^2 x (B+i A)\right )-\frac {a^2 (4 B+5 i A) \cot ^3(c+d x)}{3 d}\right )-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {1}{4} \left (-\frac {a^2 (4 B+5 i A) \cot ^3(c+d x)}{3 d}-8 \left (-\frac {a^2 (A-i B) \cot ^2(c+d x)}{2 d}-\frac {a^2 (B+i A) \cot (c+d x)}{d}-\frac {a^2 (A-i B) \log (-\sin (c+d x))}{d}-a^2 x (B+i A)\right )\right )-\frac {A \cot ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{4 d}\) |
Input:
Int[Cot[c + d*x]^5*(a + I*a*Tan[c + d*x])^2*(A + B*Tan[c + d*x]),x]
Output:
(-1/3*(a^2*((5*I)*A + 4*B)*Cot[c + d*x]^3)/d - 8*(-(a^2*(I*A + B)*x) - (a^ 2*(I*A + B)*Cot[c + d*x])/d - (a^2*(A - I*B)*Cot[c + d*x]^2)/(2*d) - (a^2* (A - I*B)*Log[-Sin[c + d*x]])/d))/4 - (A*Cot[c + d*x]^4*(a^2 + I*a^2*Tan[c + d*x]))/(4*d)
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.44 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.79
method | result | size |
parallelrisch | \(\frac {2 \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}}{8}-\frac {\cot \left (d x +c \right )^{3} \left (i A +\frac {B}{2}\right )}{3}+\frac {\left (-i B +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^{2}}{d}\) | \(110\) |
derivativedivides | \(\frac {-A \,a^{2} \left (-\frac {\cot \left (d x +c \right )^{2}}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )-B \,a^{2} \left (-\cot \left (d x +c \right )-d x -c \right )+2 i A \,a^{2} \left (-\frac {\cot \left (d x +c \right )^{3}}{3}+\cot \left (d x +c \right )+d x +c \right )+2 i B \,a^{2} \left (-\frac {\cot \left (d x +c \right )^{2}}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+A \,a^{2} \left (-\frac {\cot \left (d x +c \right )^{4}}{4}+\frac {\cot \left (d x +c \right )^{2}}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )+B \,a^{2} \left (-\frac {\cot \left (d x +c \right )^{3}}{3}+\cot \left (d x +c \right )+d x +c \right )}{d}\) | \(168\) |
default | \(\frac {-A \,a^{2} \left (-\frac {\cot \left (d x +c \right )^{2}}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )-B \,a^{2} \left (-\cot \left (d x +c \right )-d x -c \right )+2 i A \,a^{2} \left (-\frac {\cot \left (d x +c \right )^{3}}{3}+\cot \left (d x +c \right )+d x +c \right )+2 i B \,a^{2} \left (-\frac {\cot \left (d x +c \right )^{2}}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+A \,a^{2} \left (-\frac {\cot \left (d x +c \right )^{4}}{4}+\frac {\cot \left (d x +c \right )^{2}}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )+B \,a^{2} \left (-\frac {\cot \left (d x +c \right )^{3}}{3}+\cot \left (d x +c \right )+d x +c \right )}{d}\) | \(168\) |
risch | \(-\frac {4 a^{2} B c}{d}-\frac {4 i a^{2} A c}{d}+\frac {2 i a^{2} \left (21 i A \,{\mathrm e}^{6 i \left (d x +c \right )}+15 B \,{\mathrm e}^{6 i \left (d x +c \right )}-36 i A \,{\mathrm e}^{4 i \left (d x +c \right )}-33 B \,{\mathrm e}^{4 i \left (d x +c \right )}+29 i A \,{\mathrm e}^{2 i \left (d x +c \right )}+25 B \,{\mathrm e}^{2 i \left (d x +c \right )}-8 i A -7 B \right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}-\frac {2 i a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) B}{d}+\frac {2 A \,a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) | \(171\) |
norman | \(\frac {\frac {\left (-i B \,a^{2}+A \,a^{2}\right ) \tan \left (d x +c \right )^{2}}{d}+\left (2 i A \,a^{2}+2 B \,a^{2}\right ) x \tan \left (d x +c \right )^{4}-\frac {A \,a^{2}}{4 d}+\frac {2 \left (i A \,a^{2}+B \,a^{2}\right ) \tan \left (d x +c \right )^{3}}{d}-\frac {\left (2 i A \,a^{2}+B \,a^{2}\right ) \tan \left (d x +c \right )}{3 d}}{\tan \left (d x +c \right )^{4}}+\frac {2 \left (-i B \,a^{2}+A \,a^{2}\right ) \ln \left (\tan \left (d x +c \right )\right )}{d}-\frac {\left (-i B \,a^{2}+A \,a^{2}\right ) \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{d}\) | \(174\) |
Input:
int(cot(d*x+c)^5*(a+I*a*tan(d*x+c))^2*(A+B*tan(d*x+c)),x,method=_RETURNVER BOSE)
Output:
2*(1/2*(-A+I*B)*ln(sec(d*x+c)^2)+(A-I*B)*ln(tan(d*x+c))-1/8*A*cot(d*x+c)^4 -1/3*cot(d*x+c)^3*(I*A+1/2*B)+1/2*(A-I*B)*cot(d*x+c)^2+cot(d*x+c)*(I*A+B)+ (I*A+B)*x*d)*a^2/d
Time = 0.08 (sec) , antiderivative size = 227, normalized size of antiderivative = 1.63 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^2 (A+B \tan (c+d x)) \, dx=-\frac {2 \, {\left (3 \, {\left (7 \, A - 5 i \, B\right )} a^{2} e^{\left (6 i \, d x + 6 i \, c\right )} - 3 \, {\left (12 \, A - 11 i \, B\right )} a^{2} e^{\left (4 i \, d x + 4 i \, c\right )} + {\left (29 \, A - 25 i \, B\right )} a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} - {\left (8 \, A - 7 i \, B\right )} a^{2} - 3 \, {\left ({\left (A - i \, B\right )} a^{2} e^{\left (8 i \, d x + 8 i \, c\right )} - 4 \, {\left (A - i \, B\right )} a^{2} e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, {\left (A - i \, B\right )} a^{2} e^{\left (4 i \, d x + 4 i \, c\right )} - 4 \, {\left (A - i \, B\right )} a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (A - i \, B\right )} a^{2}\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))^2*(A+B*tan(d*x+c)),x, algorithm= "fricas")
Output:
-2/3*(3*(7*A - 5*I*B)*a^2*e^(6*I*d*x + 6*I*c) - 3*(12*A - 11*I*B)*a^2*e^(4 *I*d*x + 4*I*c) + (29*A - 25*I*B)*a^2*e^(2*I*d*x + 2*I*c) - (8*A - 7*I*B)* a^2 - 3*((A - I*B)*a^2*e^(8*I*d*x + 8*I*c) - 4*(A - I*B)*a^2*e^(6*I*d*x + 6*I*c) + 6*(A - I*B)*a^2*e^(4*I*d*x + 4*I*c) - 4*(A - I*B)*a^2*e^(2*I*d*x + 2*I*c) + (A - I*B)*a^2)*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 = 0.56 (sec) , antiderivative size = 235, normalized size of antiderivative = 1.69 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^2 (A+B \tan (c+d x)) \, dx=\frac {2 a^{2} \left (A - i B\right ) \log {\left (e^{2 i d x} - e^{- 2 i c} \right )}}{d} + \frac {16 A a^{2} - 14 i B a^{2} + \left (- 58 A a^{2} e^{2 i c} + 50 i B a^{2} e^{2 i c}\right ) e^{2 i d x} + \left (72 A a^{2} e^{4 i c} - 66 i B a^{2} e^{4 i c}\right ) e^{4 i d x} + \left (- 42 A a^{2} e^{6 i c} + 30 i B a^{2} 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))**2*(A+B*tan(d*x+c)),x)
Output:
2*a**2*(A - I*B)*log(exp(2*I*d*x) - exp(-2*I*c))/d + (16*A*a**2 - 14*I*B*a **2 + (-58*A*a**2*exp(2*I*c) + 50*I*B*a**2*exp(2*I*c))*exp(2*I*d*x) + (72* A*a**2*exp(4*I*c) - 66*I*B*a**2*exp(4*I*c))*exp(4*I*d*x) + (-42*A*a**2*exp (6*I*c) + 30*I*B*a**2*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*ex p(2*I*c)*exp(2*I*d*x) + 3*d)
Time = 0.12 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.95 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^2 (A+B \tan (c+d x)) \, dx=-\frac {24 \, {\left (d x + c\right )} {\left (-i \, A - B\right )} a^{2} + 12 \, {\left (A - i \, B\right )} a^{2} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 24 \, {\left (A - i \, B\right )} a^{2} \log \left (\tan \left (d x + c\right )\right ) - \frac {24 \, {\left (i \, A + B\right )} a^{2} \tan \left (d x + c\right )^{3} + 12 \, {\left (A - i \, B\right )} a^{2} \tan \left (d x + c\right )^{2} + 4 \, {\left (-2 i \, A - B\right )} a^{2} \tan \left (d x + c\right ) - 3 \, A a^{2}}{\tan \left (d x + c\right )^{4}}}{12 \, d} \] Input:
integrate(cot(d*x+c)^5*(a+I*a*tan(d*x+c))^2*(A+B*tan(d*x+c)),x, algorithm= "maxima")
Output:
-1/12*(24*(d*x + c)*(-I*A - B)*a^2 + 12*(A - I*B)*a^2*log(tan(d*x + c)^2 + 1) - 24*(A - I*B)*a^2*log(tan(d*x + c)) - (24*(I*A + B)*a^2*tan(d*x + c)^ 3 + 12*(A - I*B)*a^2*tan(d*x + c)^2 + 4*(-2*I*A - B)*a^2*tan(d*x + c) - 3* A*a^2)/tan(d*x + c)^4)/d
Time = 0.57 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.99 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^2 (A+B \tan (c+d x)) \, dx=-\frac {2 \, {\left (A a^{2} - i \, B a^{2}\right )} \log \left (\tan \left (d x + c\right ) + i\right )}{d} + \frac {2 \, {\left (A a^{2} - i \, B a^{2}\right )} \log \left ({\left | \tan \left (d x + c\right ) \right |}\right )}{d} - \frac {24 \, {\left (-i \, A a^{2} - B a^{2}\right )} \tan \left (d x + c\right )^{3} + 3 \, A a^{2} - 12 \, {\left (A a^{2} - i \, B a^{2}\right )} \tan \left (d x + c\right )^{2} + 4 \, {\left (2 i \, A a^{2} + B a^{2}\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))^2*(A+B*tan(d*x+c)),x, algorithm= "giac")
Output:
-2*(A*a^2 - I*B*a^2)*log(tan(d*x + c) + I)/d + 2*(A*a^2 - I*B*a^2)*log(abs (tan(d*x + c)))/d - 1/12*(24*(-I*A*a^2 - B*a^2)*tan(d*x + c)^3 + 3*A*a^2 - 12*(A*a^2 - I*B*a^2)*tan(d*x + c)^2 + 4*(2*I*A*a^2 + B*a^2)*tan(d*x + c)) /(d*tan(d*x + c)^4)
Time = 3.95 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.81 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^2 (A+B \tan (c+d x)) \, dx=\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (A\,a^2-B\,a^2\,1{}\mathrm {i}\right )+{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (2\,B\,a^2+A\,a^2\,2{}\mathrm {i}\right )-\frac {A\,a^2}{4}-\mathrm {tan}\left (c+d\,x\right )\,\left (\frac {B\,a^2}{3}+\frac {A\,a^2\,2{}\mathrm {i}}{3}\right )}{d\,{\mathrm {tan}\left (c+d\,x\right )}^4}+\frac {4\,a^2\,\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)^2,x)
Output:
(tan(c + d*x)^2*(A*a^2 - B*a^2*1i) + tan(c + d*x)^3*(A*a^2*2i + 2*B*a^2) - (A*a^2)/4 - tan(c + d*x)*((A*a^2*2i)/3 + (B*a^2)/3))/(d*tan(c + d*x)^4) + (4*a^2*atan(2*tan(c + d*x) + 1i)*(A*1i + B))/d
Time = 0.19 (sec) , antiderivative size = 253, normalized size of antiderivative = 1.82 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^2 (A+B \tan (c+d x)) \, dx=\frac {a^{2} \left (256 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a i +224 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} b -64 \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 -192 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (d x +c \right )^{4} a +192 \,\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 +192 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{4} a -192 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{4} b i +192 \sin \left (d x +c \right )^{4} a d i x -63 \sin \left (d x +c \right )^{4} a +192 \sin \left (d x +c \right )^{4} b d x +48 \sin \left (d x +c \right )^{4} b i +144 \sin \left (d x +c \right )^{2} a -96 \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))^2*(A+B*tan(d*x+c)),x)
Output:
(a**2*(256*cos(c + d*x)*sin(c + d*x)**3*a*i + 224*cos(c + d*x)*sin(c + d*x )**3*b - 64*cos(c + d*x)*sin(c + d*x)*a*i - 32*cos(c + d*x)*sin(c + d*x)*b - 192*log(tan((c + d*x)/2)**2 + 1)*sin(c + d*x)**4*a + 192*log(tan((c + d *x)/2)**2 + 1)*sin(c + d*x)**4*b*i + 192*log(tan((c + d*x)/2))*sin(c + d*x )**4*a - 192*log(tan((c + d*x)/2))*sin(c + d*x)**4*b*i + 192*sin(c + d*x)* *4*a*d*i*x - 63*sin(c + d*x)**4*a + 192*sin(c + d*x)**4*b*d*x + 48*sin(c + d*x)**4*b*i + 144*sin(c + d*x)**2*a - 96*sin(c + d*x)**2*b*i - 24*a))/(96 *sin(c + d*x)**4*d)