Integrand size = 34, antiderivative size = 182 \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=-4 a^3 (A-i B) x+\frac {4 a^3 (i A+B) \log (\cos (c+d x))}{d}+\frac {4 a^3 (A-i B) \tan (c+d x)}{d}+\frac {2 a^3 (i A+B) \tan ^2(c+d x)}{d}-\frac {a^3 (45 A-47 i B) \tan ^3(c+d x)}{60 d}+\frac {i a B \tan ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}-\frac {(5 A-7 i B) \tan ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{20 d} \] Output:
-4*a^3*(A-I*B)*x+4*a^3*(I*A+B)*ln(cos(d*x+c))/d+4*a^3*(A-I*B)*tan(d*x+c)/d +2*a^3*(I*A+B)*tan(d*x+c)^2/d-1/60*a^3*(45*A-47*I*B)*tan(d*x+c)^3/d+1/5*I* a*B*tan(d*x+c)^3*(a+I*a*tan(d*x+c))^2/d-1/20*(5*A-7*I*B)*tan(d*x+c)^3*(a^3 +I*a^3*tan(d*x+c))/d
Time = 1.01 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.68 \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {a^3 \left (-15 i A-17 B-240 i (A-i B) \log (i+\tan (c+d x))+240 (A-i B) \tan (c+d x)+120 (i A+B) \tan ^2(c+d x)+(-60 A+80 i B) \tan ^3(c+d x)-15 i (A-3 i B) \tan ^4(c+d x)-12 i B \tan ^5(c+d x)\right )}{60 d} \] Input:
Integrate[Tan[c + d*x]^2*(a + I*a*Tan[c + d*x])^3*(A + B*Tan[c + d*x]),x]
Output:
(a^3*((-15*I)*A - 17*B - (240*I)*(A - I*B)*Log[I + Tan[c + d*x]] + 240*(A - I*B)*Tan[c + d*x] + 120*(I*A + B)*Tan[c + d*x]^2 + (-60*A + (80*I)*B)*Ta n[c + d*x]^3 - (15*I)*(A - (3*I)*B)*Tan[c + d*x]^4 - (12*I)*B*Tan[c + d*x] ^5))/(60*d)
Time = 1.08 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.05, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {3042, 4077, 3042, 4077, 3042, 4075, 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 ^2(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^2 (a+i a \tan (c+d x))^3 (A+B \tan (c+d x))dx\) |
\(\Big \downarrow \) 4077 |
\(\displaystyle \frac {1}{5} \int \tan ^2(c+d x) (i \tan (c+d x) a+a)^2 (a (5 A-3 i B)+a (5 i A+7 B) \tan (c+d x))dx+\frac {i a B \tan ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \int \tan (c+d x)^2 (i \tan (c+d x) a+a)^2 (a (5 A-3 i B)+a (5 i A+7 B) \tan (c+d x))dx+\frac {i a B \tan ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}\) |
\(\Big \downarrow \) 4077 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \int \tan ^2(c+d x) (i \tan (c+d x) a+a) \left ((35 A-33 i B) a^2+(45 i A+47 B) \tan (c+d x) a^2\right )dx-\frac {(5 A-7 i B) \tan ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}\right )+\frac {i a B \tan ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \int \tan (c+d x)^2 (i \tan (c+d x) a+a) \left ((35 A-33 i B) a^2+(45 i A+47 B) \tan (c+d x) a^2\right )dx-\frac {(5 A-7 i B) \tan ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}\right )+\frac {i a B \tan ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}\) |
\(\Big \downarrow \) 4075 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\int \tan ^2(c+d x) \left (80 (A-i B) a^3+80 (i A+B) \tan (c+d x) a^3\right )dx-\frac {a^3 (45 A-47 i B) \tan ^3(c+d x)}{3 d}\right )-\frac {(5 A-7 i B) \tan ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}\right )+\frac {i a B \tan ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\int \tan (c+d x)^2 \left (80 (A-i B) a^3+80 (i A+B) \tan (c+d x) a^3\right )dx-\frac {a^3 (45 A-47 i B) \tan ^3(c+d x)}{3 d}\right )-\frac {(5 A-7 i B) \tan ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}\right )+\frac {i a B \tan ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\int \tan (c+d x) \left (80 a^3 (A-i B) \tan (c+d x)-80 a^3 (i A+B)\right )dx-\frac {a^3 (45 A-47 i B) \tan ^3(c+d x)}{3 d}+\frac {40 a^3 (B+i A) \tan ^2(c+d x)}{d}\right )-\frac {(5 A-7 i B) \tan ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}\right )+\frac {i a B \tan ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\int \tan (c+d x) \left (80 a^3 (A-i B) \tan (c+d x)-80 a^3 (i A+B)\right )dx-\frac {a^3 (45 A-47 i B) \tan ^3(c+d x)}{3 d}+\frac {40 a^3 (B+i A) \tan ^2(c+d x)}{d}\right )-\frac {(5 A-7 i B) \tan ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}\right )+\frac {i a B \tan ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}\) |
\(\Big \downarrow \) 4008 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (-80 a^3 (B+i A) \int \tan (c+d x)dx-\frac {a^3 (45 A-47 i B) \tan ^3(c+d x)}{3 d}+\frac {40 a^3 (B+i A) \tan ^2(c+d x)}{d}+\frac {80 a^3 (A-i B) \tan (c+d x)}{d}-80 a^3 x (A-i B)\right )-\frac {(5 A-7 i B) \tan ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}\right )+\frac {i a B \tan ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (-80 a^3 (B+i A) \int \tan (c+d x)dx-\frac {a^3 (45 A-47 i B) \tan ^3(c+d x)}{3 d}+\frac {40 a^3 (B+i A) \tan ^2(c+d x)}{d}+\frac {80 a^3 (A-i B) \tan (c+d x)}{d}-80 a^3 x (A-i B)\right )-\frac {(5 A-7 i B) \tan ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}\right )+\frac {i a B \tan ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (-\frac {a^3 (45 A-47 i B) \tan ^3(c+d x)}{3 d}+\frac {40 a^3 (B+i A) \tan ^2(c+d x)}{d}+\frac {80 a^3 (A-i B) \tan (c+d x)}{d}+\frac {80 a^3 (B+i A) \log (\cos (c+d x))}{d}-80 a^3 x (A-i B)\right )-\frac {(5 A-7 i B) \tan ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}\right )+\frac {i a B \tan ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}\) |
Input:
Int[Tan[c + d*x]^2*(a + I*a*Tan[c + d*x])^3*(A + B*Tan[c + d*x]),x]
Output:
((I/5)*a*B*Tan[c + d*x]^3*(a + I*a*Tan[c + d*x])^2)/d + (-1/4*((5*A - (7*I )*B)*Tan[c + d*x]^3*(a^3 + I*a^3*Tan[c + d*x]))/d + (-80*a^3*(A - I*B)*x + (80*a^3*(I*A + B)*Log[Cos[c + d*x]])/d + (80*a^3*(A - I*B)*Tan[c + d*x])/ d + (40*a^3*(I*A + B)*Tan[c + d*x]^2)/d - (a^3*(45*A - (47*I)*B)*Tan[c + d *x]^3)/(3*d))/4)/5
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]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[B *d*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Int[(a + b*Tan[e + f* x])^m*Simp[A*c - B*d + (B*c + A*d)*Tan[e + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] && !LeQ[m, -1]
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[b*B*(a + b*Tan[e + f*x])^(m - 1)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(m + n))), x] + Simp[1/(d*(m + n)) Int[(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan [e + f*x])^n*Simp[a*A*d*(m + n) + B*(a*c*(m - 1) - b*d*(n + 1)) - (B*(b*c - a*d)*(m - 1) - d*(A*b + a*B)*(m + n))*Tan[e + f*x], x], x], x] /; FreeQ[{a , b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && GtQ[m, 1] && !LtQ[n, -1]
Time = 0.14 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.80
method | result | size |
derivativedivides | \(\frac {a^{3} \left (-\frac {i B \tan \left (d x +c \right )^{5}}{5}-\frac {i A \tan \left (d x +c \right )^{4}}{4}+\frac {4 i B \tan \left (d x +c \right )^{3}}{3}-\frac {3 B \tan \left (d x +c \right )^{4}}{4}+2 i A \tan \left (d x +c \right )^{2}-A \tan \left (d x +c \right )^{3}-4 i B \tan \left (d x +c \right )+2 B \tan \left (d x +c \right )^{2}+4 A \tan \left (d x +c \right )+\frac {\left (-4 i A -4 B \right ) \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}+\left (4 i B -4 A \right ) \arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(146\) |
default | \(\frac {a^{3} \left (-\frac {i B \tan \left (d x +c \right )^{5}}{5}-\frac {i A \tan \left (d x +c \right )^{4}}{4}+\frac {4 i B \tan \left (d x +c \right )^{3}}{3}-\frac {3 B \tan \left (d x +c \right )^{4}}{4}+2 i A \tan \left (d x +c \right )^{2}-A \tan \left (d x +c \right )^{3}-4 i B \tan \left (d x +c \right )+2 B \tan \left (d x +c \right )^{2}+4 A \tan \left (d x +c \right )+\frac {\left (-4 i A -4 B \right ) \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}+\left (4 i B -4 A \right ) \arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(146\) |
norman | \(\left (4 i B \,a^{3}-4 A \,a^{3}\right ) x -\frac {\left (i A \,a^{3}+3 B \,a^{3}\right ) \tan \left (d x +c \right )^{4}}{4 d}-\frac {\left (-4 i B \,a^{3}+3 A \,a^{3}\right ) \tan \left (d x +c \right )^{3}}{3 d}+\frac {4 \left (-i B \,a^{3}+A \,a^{3}\right ) \tan \left (d x +c \right )}{d}+\frac {2 \left (i A \,a^{3}+B \,a^{3}\right ) \tan \left (d x +c \right )^{2}}{d}-\frac {i B \,a^{3} \tan \left (d x +c \right )^{5}}{5 d}-\frac {2 \left (i A \,a^{3}+B \,a^{3}\right ) \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{d}\) | \(169\) |
parallelrisch | \(-\frac {12 i B \,a^{3} \tan \left (d x +c \right )^{5}+15 i A \tan \left (d x +c \right )^{4} a^{3}-80 i B \tan \left (d x +c \right )^{3} a^{3}+45 B \tan \left (d x +c \right )^{4} a^{3}-120 i A \tan \left (d x +c \right )^{2} a^{3}+60 A \tan \left (d x +c \right )^{3} a^{3}-240 i B x \,a^{3} d +120 i A \ln \left (1+\tan \left (d x +c \right )^{2}\right ) a^{3}+240 A x \,a^{3} d +240 i B \tan \left (d x +c \right ) a^{3}-120 B \tan \left (d x +c \right )^{2} a^{3}-240 A \tan \left (d x +c \right ) a^{3}+120 B \ln \left (1+\tan \left (d x +c \right )^{2}\right ) a^{3}}{60 d}\) | \(186\) |
risch | \(-\frac {8 i a^{3} B c}{d}+\frac {8 a^{3} A c}{d}+\frac {2 a^{3} \left (180 i A \,{\mathrm e}^{8 i \left (d x +c \right )}+240 B \,{\mathrm e}^{8 i \left (d x +c \right )}+525 i A \,{\mathrm e}^{6 i \left (d x +c \right )}+585 B \,{\mathrm e}^{6 i \left (d x +c \right )}+615 i A \,{\mathrm e}^{4 i \left (d x +c \right )}+695 B \,{\mathrm e}^{4 i \left (d x +c \right )}+345 i A \,{\mathrm e}^{2 i \left (d x +c \right )}+385 B \,{\mathrm e}^{2 i \left (d x +c \right )}+75 i A +83 B \right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}+\frac {4 a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) B}{d}+\frac {4 i a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) A}{d}\) | \(195\) |
parts | \(\frac {\left (-i A \,a^{3}-3 B \,a^{3}\right ) \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 {\left (3 i A \,a^{3}+B \,a^{3}\right ) \left (\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 {\left (3 i B \,a^{3}-3 A \,a^{3}\right ) \left (\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}+\frac {A \,a^{3} \left (\tan \left (d x +c \right )-\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}-\frac {i B \,a^{3} \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}\) | \(209\) |
Input:
int(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^3*(A+B*tan(d*x+c)),x,method=_RETURNVER BOSE)
Output:
1/d*a^3*(-1/5*I*B*tan(d*x+c)^5-1/4*I*A*tan(d*x+c)^4+4/3*I*B*tan(d*x+c)^3-3 /4*B*tan(d*x+c)^4+2*I*A*tan(d*x+c)^2-A*tan(d*x+c)^3-4*I*B*tan(d*x+c)+2*B*t an(d*x+c)^2+4*A*tan(d*x+c)+1/2*(-4*I*A-4*B)*ln(1+tan(d*x+c)^2)+(4*I*B-4*A) *arctan(tan(d*x+c)))
Time = 0.08 (sec) , antiderivative size = 291, normalized size of antiderivative = 1.60 \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=-\frac {2 \, {\left (60 \, {\left (-3 i \, A - 4 \, B\right )} a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} + 15 \, {\left (-35 i \, A - 39 \, B\right )} a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 5 \, {\left (-123 i \, A - 139 \, B\right )} a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, {\left (-69 i \, A - 77 \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (-75 i \, A - 83 \, B\right )} a^{3} + 30 \, {\left ({\left (-i \, A - B\right )} a^{3} e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, {\left (-i \, A - B\right )} a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, {\left (-i \, A - B\right )} a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, {\left (-i \, A - B\right )} a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, {\left (-i \, A - B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (-i \, A - B\right )} a^{3}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )\right )}}{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)^2*(a+I*a*tan(d*x+c))^3*(A+B*tan(d*x+c)),x, algorithm= "fricas")
Output:
-2/15*(60*(-3*I*A - 4*B)*a^3*e^(8*I*d*x + 8*I*c) + 15*(-35*I*A - 39*B)*a^3 *e^(6*I*d*x + 6*I*c) + 5*(-123*I*A - 139*B)*a^3*e^(4*I*d*x + 4*I*c) + 5*(- 69*I*A - 77*B)*a^3*e^(2*I*d*x + 2*I*c) + (-75*I*A - 83*B)*a^3 + 30*((-I*A - B)*a^3*e^(10*I*d*x + 10*I*c) + 5*(-I*A - B)*a^3*e^(8*I*d*x + 8*I*c) + 10 *(-I*A - B)*a^3*e^(6*I*d*x + 6*I*c) + 10*(-I*A - B)*a^3*e^(4*I*d*x + 4*I*c ) + 5*(-I*A - B)*a^3*e^(2*I*d*x + 2*I*c) + (-I*A - B)*a^3)*log(e^(2*I*d*x + 2*I*c) + 1))/(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)
Time = 0.68 (sec) , antiderivative size = 292, normalized size of antiderivative = 1.60 \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {4 i a^{3} \left (A - i B\right ) \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} + \frac {150 i A a^{3} + 166 B a^{3} + \left (690 i A a^{3} e^{2 i c} + 770 B a^{3} e^{2 i c}\right ) e^{2 i d x} + \left (1230 i A a^{3} e^{4 i c} + 1390 B a^{3} e^{4 i c}\right ) e^{4 i d x} + \left (1050 i A a^{3} e^{6 i c} + 1170 B a^{3} e^{6 i c}\right ) e^{6 i d x} + \left (360 i A a^{3} e^{8 i c} + 480 B a^{3} e^{8 i c}\right ) e^{8 i d x}}{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)**2*(a+I*a*tan(d*x+c))**3*(A+B*tan(d*x+c)),x)
Output:
4*I*a**3*(A - I*B)*log(exp(2*I*d*x) + exp(-2*I*c))/d + (150*I*A*a**3 + 166 *B*a**3 + (690*I*A*a**3*exp(2*I*c) + 770*B*a**3*exp(2*I*c))*exp(2*I*d*x) + (1230*I*A*a**3*exp(4*I*c) + 1390*B*a**3*exp(4*I*c))*exp(4*I*d*x) + (1050* I*A*a**3*exp(6*I*c) + 1170*B*a**3*exp(6*I*c))*exp(6*I*d*x) + (360*I*A*a**3 *exp(8*I*c) + 480*B*a**3*exp(8*I*c))*exp(8*I*d*x))/(15*d*exp(10*I*c)*exp(1 0*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 = 132, normalized size of antiderivative = 0.73 \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=-\frac {12 i \, B a^{3} \tan \left (d x + c\right )^{5} + 15 \, {\left (i \, A + 3 \, B\right )} a^{3} \tan \left (d x + c\right )^{4} + 20 \, {\left (3 \, A - 4 i \, B\right )} a^{3} \tan \left (d x + c\right )^{3} + 120 \, {\left (-i \, A - B\right )} a^{3} \tan \left (d x + c\right )^{2} + 240 \, {\left (d x + c\right )} {\left (A - i \, B\right )} a^{3} + 120 \, {\left (i \, A + B\right )} a^{3} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 240 \, {\left (A - i \, B\right )} a^{3} \tan \left (d x + c\right )}{60 \, d} \] Input:
integrate(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^3*(A+B*tan(d*x+c)),x, algorithm= "maxima")
Output:
-1/60*(12*I*B*a^3*tan(d*x + c)^5 + 15*(I*A + 3*B)*a^3*tan(d*x + c)^4 + 20* (3*A - 4*I*B)*a^3*tan(d*x + c)^3 + 120*(-I*A - B)*a^3*tan(d*x + c)^2 + 240 *(d*x + c)*(A - I*B)*a^3 + 120*(I*A + B)*a^3*log(tan(d*x + c)^2 + 1) - 240 *(A - I*B)*a^3*tan(d*x + c))/d
Time = 0.50 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.00 \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=-\frac {4 \, {\left (i \, A a^{3} + B a^{3}\right )} \log \left (\tan \left (d x + c\right ) + i\right )}{d} - \frac {12 i \, B a^{3} d^{4} \tan \left (d x + c\right )^{5} + 15 i \, A a^{3} d^{4} \tan \left (d x + c\right )^{4} + 45 \, B a^{3} d^{4} \tan \left (d x + c\right )^{4} + 60 \, A a^{3} d^{4} \tan \left (d x + c\right )^{3} - 80 i \, B a^{3} d^{4} \tan \left (d x + c\right )^{3} - 120 i \, A a^{3} d^{4} \tan \left (d x + c\right )^{2} - 120 \, B a^{3} d^{4} \tan \left (d x + c\right )^{2} - 240 \, A a^{3} d^{4} \tan \left (d x + c\right ) + 240 i \, B a^{3} d^{4} \tan \left (d x + c\right )}{60 \, d^{5}} \] Input:
integrate(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^3*(A+B*tan(d*x+c)),x, algorithm= "giac")
Output:
-4*(I*A*a^3 + B*a^3)*log(tan(d*x + c) + I)/d - 1/60*(12*I*B*a^3*d^4*tan(d* x + c)^5 + 15*I*A*a^3*d^4*tan(d*x + c)^4 + 45*B*a^3*d^4*tan(d*x + c)^4 + 6 0*A*a^3*d^4*tan(d*x + c)^3 - 80*I*B*a^3*d^4*tan(d*x + c)^3 - 120*I*A*a^3*d ^4*tan(d*x + c)^2 - 120*B*a^3*d^4*tan(d*x + c)^2 - 240*A*a^3*d^4*tan(d*x + c) + 240*I*B*a^3*d^4*tan(d*x + c))/d^5
Time = 3.43 (sec) , antiderivative size = 230, normalized size of antiderivative = 1.26 \[ \int \tan ^2(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 )}^3\,\left (\frac {B\,a^3\,1{}\mathrm {i}}{3}-\frac {a^3\,\left (2\,A-B\,1{}\mathrm {i}\right )}{3}+\frac {a^3\,\left (2\,B+A\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{3}\right )}{d}+\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (A\,a^3-B\,a^3\,1{}\mathrm {i}+a^3\,\left (2\,A-B\,1{}\mathrm {i}\right )-a^3\,\left (2\,B+A\,1{}\mathrm {i}\right )\,1{}\mathrm {i}\right )}{d}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^4\,\left (\frac {B\,a^3}{4}+\frac {a^3\,\left (2\,B+A\,1{}\mathrm {i}\right )}{4}\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (4\,B\,a^3+A\,a^3\,4{}\mathrm {i}\right )}{d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (\frac {A\,a^3\,1{}\mathrm {i}}{2}+\frac {B\,a^3}{2}+\frac {a^3\,\left (2\,A-B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}+\frac {a^3\,\left (2\,B+A\,1{}\mathrm {i}\right )}{2}\right )}{d}-\frac {B\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^5\,1{}\mathrm {i}}{5\,d} \] Input:
int(tan(c + d*x)^2*(A + B*tan(c + d*x))*(a + a*tan(c + d*x)*1i)^3,x)
Output:
(tan(c + d*x)^3*((B*a^3*1i)/3 - (a^3*(2*A - B*1i))/3 + (a^3*(A*1i + 2*B)*1 i)/3))/d + (tan(c + d*x)*(A*a^3 - B*a^3*1i + a^3*(2*A - B*1i) - a^3*(A*1i + 2*B)*1i))/d - (tan(c + d*x)^4*((B*a^3)/4 + (a^3*(A*1i + 2*B))/4))/d - (l og(tan(c + d*x) + 1i)*(A*a^3*4i + 4*B*a^3))/d + (tan(c + d*x)^2*((A*a^3*1i )/2 + (B*a^3)/2 + (a^3*(2*A - B*1i)*1i)/2 + (a^3*(A*1i + 2*B))/2))/d - (B* a^3*tan(c + d*x)^5*1i)/(5*d)
Time = 0.17 (sec) , antiderivative size = 149, normalized size of antiderivative = 0.82 \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {a^{3} \left (-120 \,\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right ) a i -120 \,\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right ) b -12 \tan \left (d x +c \right )^{5} b i -15 \tan \left (d x +c \right )^{4} a i -45 \tan \left (d x +c \right )^{4} b -60 \tan \left (d x +c \right )^{3} a +80 \tan \left (d x +c \right )^{3} b i +120 \tan \left (d x +c \right )^{2} a i +120 \tan \left (d x +c \right )^{2} b +240 \tan \left (d x +c \right ) a -240 \tan \left (d x +c \right ) b i -240 a d x +240 b d i x \right )}{60 d} \] Input:
int(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^3*(A+B*tan(d*x+c)),x)
Output:
(a**3*( - 120*log(tan(c + d*x)**2 + 1)*a*i - 120*log(tan(c + d*x)**2 + 1)* b - 12*tan(c + d*x)**5*b*i - 15*tan(c + d*x)**4*a*i - 45*tan(c + d*x)**4*b - 60*tan(c + d*x)**3*a + 80*tan(c + d*x)**3*b*i + 120*tan(c + d*x)**2*a*i + 120*tan(c + d*x)**2*b + 240*tan(c + d*x)*a - 240*tan(c + d*x)*b*i - 240 *a*d*x + 240*b*d*i*x))/(60*d)