Integrand size = 41, antiderivative size = 101 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=-\frac {2 a^3 (i A-B) c^2 (1+i \tan (e+f x))^3}{3 f}+\frac {a^3 (i A-3 B) c^2 (1+i \tan (e+f x))^4}{4 f}+\frac {a^3 B c^2 (1+i \tan (e+f x))^5}{5 f} \] Output:
-2/3*a^3*(I*A-B)*c^2*(1+I*tan(f*x+e))^3/f+1/4*a^3*(I*A-3*B)*c^2*(1+I*tan(f *x+e))^4/f+1/5*a^3*B*c^2*(1+I*tan(f*x+e))^5/f
Time = 3.65 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.90 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=\frac {a^3 c^2 \sec ^5(e+f x) (30 (i A+B) \cos (e+f x)+2 (25 A+7 i B+6 (5 A-i B) \cos (2 (e+f x))+(5 A-i B) \cos (4 (e+f x))) \sin (e+f x))}{120 f} \] Input:
Integrate[(a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f *x])^2,x]
Output:
(a^3*c^2*Sec[e + f*x]^5*(30*(I*A + B)*Cos[e + f*x] + 2*(25*A + (7*I)*B + 6 *(5*A - I*B)*Cos[2*(e + f*x)] + (5*A - I*B)*Cos[4*(e + f*x)])*Sin[e + f*x] ))/(120*f)
Time = 0.54 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.83, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {3042, 4071, 27, 86, 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))^2 (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))^2 (A+B \tan (e+f x))dx\) |
\(\Big \downarrow \) 4071 |
\(\displaystyle \frac {a c \int a^2 c (1-i \tan (e+f x)) (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^2 \int (1-i \tan (e+f x)) (i \tan (e+f x)+1)^2 (A+B \tan (e+f x))d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \frac {a^3 c^2 \int \left (i B (i \tan (e+f x)+1)^4+(-A-3 i B) (i \tan (e+f x)+1)^3+2 (A+i B) (i \tan (e+f x)+1)^2\right )d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^3 c^2 \left (\frac {1}{4} (-3 B+i A) (1+i \tan (e+f x))^4-\frac {2}{3} (-B+i A) (1+i \tan (e+f x))^3+\frac {1}{5} B (1+i \tan (e+f x))^5\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])^2 ,x]
Output:
(a^3*c^2*((-2*(I*A - B)*(1 + I*Tan[e + f*x])^3)/3 + ((I*A - 3*B)*(1 + I*Ta n[e + f*x])^4)/4 + (B*(1 + I*Tan[e + f*x])^5)/5))/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_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
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.29 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.93
method | result | size |
derivativedivides | \(\frac {i c^{2} a^{3} \left (\frac {B \tan \left (f x +e \right )^{5}}{5}+\frac {\left (-i B +A \right ) \tan \left (f x +e \right )^{4}}{4}+\frac {\left (i A -2 i \left (i B +A \right )-B \right ) \tan \left (f x +e \right )^{3}}{3}+\frac {\left (-i B +A \right ) \tan \left (f x +e \right )^{2}}{2}-i \tan \left (f x +e \right ) A \right )}{f}\) | \(94\) |
default | \(\frac {i c^{2} a^{3} \left (\frac {B \tan \left (f x +e \right )^{5}}{5}+\frac {\left (-i B +A \right ) \tan \left (f x +e \right )^{4}}{4}+\frac {\left (i A -2 i \left (i B +A \right )-B \right ) \tan \left (f x +e \right )^{3}}{3}+\frac {\left (-i B +A \right ) \tan \left (f x +e \right )^{2}}{2}-i \tan \left (f x +e \right ) A \right )}{f}\) | \(94\) |
risch | \(\frac {4 c^{2} a^{3} \left (30 i A \,{\mathrm e}^{6 i \left (f x +e \right )}+30 B \,{\mathrm e}^{6 i \left (f x +e \right )}+50 i A \,{\mathrm e}^{4 i \left (f x +e \right )}+10 B \,{\mathrm e}^{4 i \left (f x +e \right )}+25 i A \,{\mathrm e}^{2 i \left (f x +e \right )}+5 B \,{\mathrm e}^{2 i \left (f x +e \right )}+5 i A +B \right )}{15 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{5}}\) | \(106\) |
norman | \(\frac {A \,a^{3} c^{2} \tan \left (f x +e \right )}{f}+\frac {\left (i A \,a^{3} c^{2}+B \,a^{3} c^{2}\right ) \tan \left (f x +e \right )^{2}}{2 f}+\frac {\left (i A \,a^{3} c^{2}+B \,a^{3} c^{2}\right ) \tan \left (f x +e \right )^{4}}{4 f}+\frac {\left (i B \,a^{3} c^{2}+A \,a^{3} c^{2}\right ) \tan \left (f x +e \right )^{3}}{3 f}+\frac {i B \,a^{3} c^{2} \tan \left (f x +e \right )^{5}}{5 f}\) | \(136\) |
parallelrisch | \(\frac {12 i B \,a^{3} c^{2} \tan \left (f x +e \right )^{5}+15 i A \tan \left (f x +e \right )^{4} a^{3} c^{2}+20 i B \tan \left (f x +e \right )^{3} a^{3} c^{2}+15 B \tan \left (f x +e \right )^{4} a^{3} c^{2}+30 i A \tan \left (f x +e \right )^{2} a^{3} c^{2}+20 A \tan \left (f x +e \right )^{3} a^{3} c^{2}+30 B \tan \left (f x +e \right )^{2} a^{3} c^{2}+60 A \tan \left (f x +e \right ) a^{3} c^{2}}{60 f}\) | \(145\) |
parts | \(\frac {\left (i A \,a^{3} c^{2}+B \,a^{3} c^{2}\right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f}+\frac {\left (i A \,a^{3} c^{2}+B \,a^{3} c^{2}\right ) \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}+\frac {\left (i B \,a^{3} c^{2}+2 A \,a^{3} c^{2}\right ) \left (\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {\left (2 i A \,a^{3} c^{2}+2 B \,a^{3} c^{2}\right ) \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 {\left (2 i B \,a^{3} c^{2}+A \,a^{3} c^{2}\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^{2} x +\frac {i B \,a^{3} c^{2} \left (\frac {\tan \left (f x +e \right )^{5}}{5}-\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}\) | \(289\) |
Input:
int((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^2,x,method=_R ETURNVERBOSE)
Output:
I/f*c^2*a^3*(1/5*B*tan(f*x+e)^5+1/4*(A-I*B)*tan(f*x+e)^4+1/3*(I*A-2*I*(A+I *B)-B)*tan(f*x+e)^3+1/2*(A-I*B)*tan(f*x+e)^2-I*tan(f*x+e)*A)
Time = 0.07 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.50 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=-\frac {4 \, {\left (30 \, {\left (-i \, A - B\right )} a^{3} c^{2} e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, {\left (-5 i \, A - B\right )} a^{3} c^{2} e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, {\left (-5 i \, A - B\right )} a^{3} c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-5 i \, A - B\right )} a^{3} c^{2}\right )}}{15 \, {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, 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))^2,x, al gorithm="fricas")
Output:
-4/15*(30*(-I*A - B)*a^3*c^2*e^(6*I*f*x + 6*I*e) + 10*(-5*I*A - B)*a^3*c^2 *e^(4*I*f*x + 4*I*e) + 5*(-5*I*A - B)*a^3*c^2*e^(2*I*f*x + 2*I*e) + (-5*I* A - B)*a^3*c^2)/(f*e^(10*I*f*x + 10*I*e) + 5*f*e^(8*I*f*x + 8*I*e) + 10*f* e^(6*I*f*x + 6*I*e) + 10*f*e^(4*I*f*x + 4*I*e) + 5*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. 250 vs. \(2 (80) = 160\).
Time = 0.41 (sec) , antiderivative size = 250, normalized size of antiderivative = 2.48 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=\frac {20 i A a^{3} c^{2} + 4 B a^{3} c^{2} + \left (100 i A a^{3} c^{2} e^{2 i e} + 20 B a^{3} c^{2} e^{2 i e}\right ) e^{2 i f x} + \left (200 i A a^{3} c^{2} e^{4 i e} + 40 B a^{3} c^{2} e^{4 i e}\right ) e^{4 i f x} + \left (120 i A a^{3} c^{2} e^{6 i e} + 120 B a^{3} c^{2} e^{6 i e}\right ) e^{6 i f x}}{15 f e^{10 i e} e^{10 i f x} + 75 f e^{8 i e} e^{8 i f x} + 150 f e^{6 i e} e^{6 i f x} + 150 f e^{4 i e} e^{4 i f x} + 75 f e^{2 i e} e^{2 i f x} + 15 f} \] Input:
integrate((a+I*a*tan(f*x+e))**3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**2,x)
Output:
(20*I*A*a**3*c**2 + 4*B*a**3*c**2 + (100*I*A*a**3*c**2*exp(2*I*e) + 20*B*a **3*c**2*exp(2*I*e))*exp(2*I*f*x) + (200*I*A*a**3*c**2*exp(4*I*e) + 40*B*a **3*c**2*exp(4*I*e))*exp(4*I*f*x) + (120*I*A*a**3*c**2*exp(6*I*e) + 120*B* a**3*c**2*exp(6*I*e))*exp(6*I*f*x))/(15*f*exp(10*I*e)*exp(10*I*f*x) + 75*f *exp(8*I*e)*exp(8*I*f*x) + 150*f*exp(6*I*e)*exp(6*I*f*x) + 150*f*exp(4*I*e )*exp(4*I*f*x) + 75*f*exp(2*I*e)*exp(2*I*f*x) + 15*f)
Time = 0.12 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.04 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=\frac {12 i \, B a^{3} c^{2} \tan \left (f x + e\right )^{5} - 15 \, {\left (-i \, A - B\right )} a^{3} c^{2} \tan \left (f x + e\right )^{4} + 20 \, {\left (A + i \, B\right )} a^{3} c^{2} \tan \left (f x + e\right )^{3} - 30 \, {\left (-i \, A - B\right )} a^{3} c^{2} \tan \left (f x + e\right )^{2} + 60 \, A a^{3} c^{2} \tan \left (f x + e\right )}{60 \, f} \] Input:
integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^2,x, al gorithm="maxima")
Output:
1/60*(12*I*B*a^3*c^2*tan(f*x + e)^5 - 15*(-I*A - B)*a^3*c^2*tan(f*x + e)^4 + 20*(A + I*B)*a^3*c^2*tan(f*x + e)^3 - 30*(-I*A - B)*a^3*c^2*tan(f*x + e )^2 + 60*A*a^3*c^2*tan(f*x + e))/f
Time = 0.48 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.39 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=-\frac {-12 i \, B a^{3} c^{2} \tan \left (f x + e\right )^{5} - 15 i \, A a^{3} c^{2} \tan \left (f x + e\right )^{4} - 15 \, B a^{3} c^{2} \tan \left (f x + e\right )^{4} - 20 \, A a^{3} c^{2} \tan \left (f x + e\right )^{3} - 20 i \, B a^{3} c^{2} \tan \left (f x + e\right )^{3} - 30 i \, A a^{3} c^{2} \tan \left (f x + e\right )^{2} - 30 \, B a^{3} c^{2} \tan \left (f x + e\right )^{2} - 60 \, A a^{3} c^{2} \tan \left (f x + e\right )}{60 \, f} \] Input:
integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^2,x, al gorithm="giac")
Output:
-1/60*(-12*I*B*a^3*c^2*tan(f*x + e)^5 - 15*I*A*a^3*c^2*tan(f*x + e)^4 - 15 *B*a^3*c^2*tan(f*x + e)^4 - 20*A*a^3*c^2*tan(f*x + e)^3 - 20*I*B*a^3*c^2*t an(f*x + e)^3 - 30*I*A*a^3*c^2*tan(f*x + e)^2 - 30*B*a^3*c^2*tan(f*x + e)^ 2 - 60*A*a^3*c^2*tan(f*x + e))/f
Time = 5.40 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.07 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=\frac {A\,a^3\,c^2\,\mathrm {tan}\left (e+f\,x\right )-\frac {a^3\,c^2\,{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (-B+A\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{3}+\frac {a^3\,c^2\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (A-B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}+\frac {a^3\,c^2\,{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (A-B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{4}+\frac {B\,a^3\,c^2\,{\mathrm {tan}\left (e+f\,x\right )}^5\,1{}\mathrm {i}}{5}}{f} \] Input:
int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^3*(c - c*tan(e + f*x)*1i) ^2,x)
Output:
(A*a^3*c^2*tan(e + f*x) - (a^3*c^2*tan(e + f*x)^3*(A*1i - B)*1i)/3 + (a^3* c^2*tan(e + f*x)^2*(A - B*1i)*1i)/2 + (a^3*c^2*tan(e + f*x)^4*(A - B*1i)*1 i)/4 + (B*a^3*c^2*tan(e + f*x)^5*1i)/5)/f
Time = 0.16 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.97 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=\frac {\tan \left (f x +e \right ) a^{3} c^{2} \left (12 \tan \left (f x +e \right )^{4} b i +15 \tan \left (f x +e \right )^{3} a i +15 \tan \left (f x +e \right )^{3} b +20 \tan \left (f x +e \right )^{2} a +20 \tan \left (f x +e \right )^{2} b i +30 \tan \left (f x +e \right ) a i +30 \tan \left (f x +e \right ) b +60 a \right )}{60 f} \] Input:
int((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^2,x)
Output:
(tan(e + f*x)*a**3*c**2*(12*tan(e + f*x)**4*b*i + 15*tan(e + f*x)**3*a*i + 15*tan(e + f*x)**3*b + 20*tan(e + f*x)**2*a + 20*tan(e + f*x)**2*b*i + 30 *tan(e + f*x)*a*i + 30*tan(e + f*x)*b + 60*a))/(60*f)