Integrand size = 39, antiderivative size = 61 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x)) \, dx=-\frac {a^3 (i A-B) c (1+i \tan (e+f x))^3}{3 f}-\frac {a^3 B c (1+i \tan (e+f x))^4}{4 f} \] Output:
-1/3*a^3*(I*A-B)*c*(1+I*tan(f*x+e))^3/f-1/4*a^3*B*c*(1+I*tan(f*x+e))^4/f
Time = 2.13 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.15 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x)) \, dx=-\frac {a^3 c \left (3 B-12 A \tan (e+f x)+(-12 i A-6 B) \tan ^2(e+f x)+4 (A-2 i B) \tan ^3(e+f x)+3 B \tan ^4(e+f x)\right )}{12 f} \] Input:
Integrate[(a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f *x]),x]
Output:
-1/12*(a^3*c*(3*B - 12*A*Tan[e + f*x] + ((-12*I)*A - 6*B)*Tan[e + f*x]^2 + 4*(A - (2*I)*B)*Tan[e + f*x]^3 + 3*B*Tan[e + f*x]^4))/f
Time = 0.46 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.90, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {3042, 4071, 27, 49, 2009}
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 (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x)) (A+B \tan (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x)) (A+B \tan (e+f x))dx\) |
\(\Big \downarrow \) 4071 |
\(\displaystyle \frac {a c \int a^2 (i \tan (e+f x)+1)^2 (A+B \tan (e+f x))d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {a^3 c \int (i \tan (e+f x)+1)^2 (A+B \tan (e+f x))d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle \frac {a^3 c \int \left ((A+i B) (i \tan (e+f x)+1)^2-i B (i \tan (e+f x)+1)^3\right )d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^3 c \left (-\frac {1}{3} (-B+i A) (1+i \tan (e+f x))^3-\frac {1}{4} B (1+i \tan (e+f x))^4\right )}{f}\) |
Input:
Int[(a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x]),x ]
Output:
(a^3*c*(-1/3*((I*A - B)*(1 + I*Tan[e + f*x])^3) - (B*(1 + I*Tan[e + f*x])^ 4)/4))/f
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 0] && IGtQ[m + n + 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] :> Si mp[a*(c/f) Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x], x , Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]
Time = 0.24 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.03
method | result | size |
derivativedivides | \(\frac {a^{3} c \left (-\frac {B \tan \left (f x +e \right )^{4}}{4}-\frac {\left (-2 i B +A \right ) \tan \left (f x +e \right )^{3}}{3}-\frac {\left (-2 i A -B \right ) \tan \left (f x +e \right )^{2}}{2}+A \tan \left (f x +e \right )\right )}{f}\) | \(63\) |
default | \(\frac {a^{3} c \left (-\frac {B \tan \left (f x +e \right )^{4}}{4}-\frac {\left (-2 i B +A \right ) \tan \left (f x +e \right )^{3}}{3}-\frac {\left (-2 i A -B \right ) \tan \left (f x +e \right )^{2}}{2}+A \tan \left (f x +e \right )\right )}{f}\) | \(63\) |
norman | \(\frac {A \,a^{3} c \tan \left (f x +e \right )}{f}-\frac {\left (-2 i B \,a^{3} c +A \,a^{3} c \right ) \tan \left (f x +e \right )^{3}}{3 f}+\frac {\left (2 i A \,a^{3} c +B \,a^{3} c \right ) \tan \left (f x +e \right )^{2}}{2 f}-\frac {B \,a^{3} c \tan \left (f x +e \right )^{4}}{4 f}\) | \(91\) |
parallelrisch | \(\frac {8 i B \tan \left (f x +e \right )^{3} a^{3} c -3 B \tan \left (f x +e \right )^{4} a^{3} c +12 i A \tan \left (f x +e \right )^{2} a^{3} c -4 A \tan \left (f x +e \right )^{3} a^{3} c +6 B \tan \left (f x +e \right )^{2} a^{3} c +12 A \tan \left (f x +e \right ) a^{3} c}{12 f}\) | \(97\) |
risch | \(\frac {4 a^{3} c \left (6 i A \,{\mathrm e}^{6 i \left (f x +e \right )}+6 B \,{\mathrm e}^{6 i \left (f x +e \right )}+12 i A \,{\mathrm e}^{4 i \left (f x +e \right )}+6 B \,{\mathrm e}^{4 i \left (f x +e \right )}+8 i A \,{\mathrm e}^{2 i \left (f x +e \right )}+4 B \,{\mathrm e}^{2 i \left (f x +e \right )}+2 i A +B \right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{4}}\) | \(104\) |
parts | \(\frac {\left (2 i A \,a^{3} c +B \,a^{3} c \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f}+\frac {\left (2 i B \,a^{3} c -A \,a^{3} c \right ) \left (\frac {\tan \left (f x +e \right )^{3}}{3}-\tan \left (f x +e \right )+\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+A \,a^{3} c x +\frac {2 i A \,a^{3} c \left (\frac {\tan \left (f x +e \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {2 i B \,a^{3} c \left (\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}-\frac {B \,a^{3} c \left (\frac {\tan \left (f x +e \right )^{4}}{4}-\frac {\tan \left (f x +e \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}\) | \(192\) |
Input:
int((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e)),x,method=_RET URNVERBOSE)
Output:
1/f*a^3*c*(-1/4*B*tan(f*x+e)^4-1/3*(A-2*I*B)*tan(f*x+e)^3-1/2*(-B-2*I*A)*t an(f*x+e)^2+A*tan(f*x+e))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 132 vs. \(2 (51) = 102\).
Time = 0.07 (sec) , antiderivative size = 132, normalized size of antiderivative = 2.16 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x)) \, dx=-\frac {4 \, {\left (6 \, {\left (-i \, A - B\right )} a^{3} c e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, {\left (-2 i \, A - B\right )} a^{3} c e^{\left (4 i \, f x + 4 i \, e\right )} + 4 \, {\left (-2 i \, A - B\right )} a^{3} c e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-2 i \, A - B\right )} a^{3} c\right )}}{3 \, {\left (f e^{\left (8 i \, f x + 8 i \, e\right )} + 4 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 4 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \] Input:
integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e)),x, algo rithm="fricas")
Output:
-4/3*(6*(-I*A - B)*a^3*c*e^(6*I*f*x + 6*I*e) + 6*(-2*I*A - B)*a^3*c*e^(4*I *f*x + 4*I*e) + 4*(-2*I*A - B)*a^3*c*e^(2*I*f*x + 2*I*e) + (-2*I*A - B)*a^ 3*c)/(f*e^(8*I*f*x + 8*I*e) + 4*f*e^(6*I*f*x + 6*I*e) + 6*f*e^(4*I*f*x + 4 *I*e) + 4*f*e^(2*I*f*x + 2*I*e) + f)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 218 vs. \(2 (48) = 96\).
Time = 0.30 (sec) , antiderivative size = 218, normalized size of antiderivative = 3.57 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x)) \, dx=\frac {8 i A a^{3} c + 4 B a^{3} c + \left (32 i A a^{3} c e^{2 i e} + 16 B a^{3} c e^{2 i e}\right ) e^{2 i f x} + \left (48 i A a^{3} c e^{4 i e} + 24 B a^{3} c e^{4 i e}\right ) e^{4 i f x} + \left (24 i A a^{3} c e^{6 i e} + 24 B a^{3} c e^{6 i e}\right ) e^{6 i f x}}{3 f e^{8 i e} e^{8 i f x} + 12 f e^{6 i e} e^{6 i f x} + 18 f e^{4 i e} e^{4 i f x} + 12 f e^{2 i e} e^{2 i f x} + 3 f} \] Input:
integrate((a+I*a*tan(f*x+e))**3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e)),x)
Output:
(8*I*A*a**3*c + 4*B*a**3*c + (32*I*A*a**3*c*exp(2*I*e) + 16*B*a**3*c*exp(2 *I*e))*exp(2*I*f*x) + (48*I*A*a**3*c*exp(4*I*e) + 24*B*a**3*c*exp(4*I*e))* exp(4*I*f*x) + (24*I*A*a**3*c*exp(6*I*e) + 24*B*a**3*c*exp(6*I*e))*exp(6*I *f*x))/(3*f*exp(8*I*e)*exp(8*I*f*x) + 12*f*exp(6*I*e)*exp(6*I*f*x) + 18*f* exp(4*I*e)*exp(4*I*f*x) + 12*f*exp(2*I*e)*exp(2*I*f*x) + 3*f)
Time = 0.12 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.18 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x)) \, dx=-\frac {3 \, B a^{3} c \tan \left (f x + e\right )^{4} + 4 \, {\left (A - 2 i \, B\right )} a^{3} c \tan \left (f x + e\right )^{3} - 6 \, {\left (2 i \, A + B\right )} a^{3} c \tan \left (f x + e\right )^{2} - 12 \, A a^{3} c \tan \left (f x + e\right )}{12 \, f} \] Input:
integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e)),x, algo rithm="maxima")
Output:
-1/12*(3*B*a^3*c*tan(f*x + e)^4 + 4*(A - 2*I*B)*a^3*c*tan(f*x + e)^3 - 6*( 2*I*A + B)*a^3*c*tan(f*x + e)^2 - 12*A*a^3*c*tan(f*x + e))/f
Time = 0.51 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.54 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x)) \, dx=-\frac {3 \, B a^{3} c \tan \left (f x + e\right )^{4} + 4 \, A a^{3} c \tan \left (f x + e\right )^{3} - 8 i \, B a^{3} c \tan \left (f x + e\right )^{3} - 12 i \, A a^{3} c \tan \left (f x + e\right )^{2} - 6 \, B a^{3} c \tan \left (f x + e\right )^{2} - 12 \, A a^{3} c \tan \left (f x + e\right )}{12 \, f} \] Input:
integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e)),x, algo rithm="giac")
Output:
-1/12*(3*B*a^3*c*tan(f*x + e)^4 + 4*A*a^3*c*tan(f*x + e)^3 - 8*I*B*a^3*c*t an(f*x + e)^3 - 12*I*A*a^3*c*tan(f*x + e)^2 - 6*B*a^3*c*tan(f*x + e)^2 - 1 2*A*a^3*c*tan(f*x + e))/f
Time = 5.05 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.18 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x)) \, dx=\frac {-\frac {B\,c\,a^3\,{\mathrm {tan}\left (e+f\,x\right )}^4}{4}-\frac {c\,\left (A-B\,2{}\mathrm {i}\right )\,a^3\,{\mathrm {tan}\left (e+f\,x\right )}^3}{3}+\frac {c\,\left (B+A\,2{}\mathrm {i}\right )\,a^3\,{\mathrm {tan}\left (e+f\,x\right )}^2}{2}+A\,c\,a^3\,\mathrm {tan}\left (e+f\,x\right )}{f} \] Input:
int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^3*(c - c*tan(e + f*x)*1i) ,x)
Output:
(A*a^3*c*tan(e + f*x) + (a^3*c*tan(e + f*x)^2*(A*2i + B))/2 - (a^3*c*tan(e + f*x)^3*(A - B*2i))/3 - (B*a^3*c*tan(e + f*x)^4)/4)/f
Time = 0.17 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.18 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x)) \, dx=\frac {\tan \left (f x +e \right ) a^{3} c \left (-3 \tan \left (f x +e \right )^{3} b -4 \tan \left (f x +e \right )^{2} a +8 \tan \left (f x +e \right )^{2} b i +12 \tan \left (f x +e \right ) a i +6 \tan \left (f x +e \right ) b +12 a \right )}{12 f} \] Input:
int((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e)),x)
Output:
(tan(e + f*x)*a**3*c*( - 3*tan(e + f*x)**3*b - 4*tan(e + f*x)**2*a + 8*tan (e + f*x)**2*b*i + 12*tan(e + f*x)*a*i + 6*tan(e + f*x)*b + 12*a))/(12*f)