Integrand size = 31, antiderivative size = 88 \[ \int (a+i a \tan (e+f x))^5 (c-i c \tan (e+f x))^3 \, dx=-\frac {4 i c^3 (a+i a \tan (e+f x))^5}{5 f}+\frac {2 i c^3 (a+i a \tan (e+f x))^6}{3 a f}-\frac {i c^3 (a+i a \tan (e+f x))^7}{7 a^2 f} \] Output:
-4/5*I*c^3*(a+I*a*tan(f*x+e))^5/f+2/3*I*c^3*(a+I*a*tan(f*x+e))^6/a/f-1/7*I *c^3*(a+I*a*tan(f*x+e))^7/a^2/f
Time = 2.15 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.75 \[ \int (a+i a \tan (e+f x))^5 (c-i c \tan (e+f x))^3 \, dx=\frac {a^5 c^3 \sec ^7(e+f x) (7+22 \cos (2 (e+f x))-20 i \sin (2 (e+f x))) (-i \cos (5 (e+f x))+\sin (5 (e+f x)))}{105 f} \] Input:
Integrate[(a + I*a*Tan[e + f*x])^5*(c - I*c*Tan[e + f*x])^3,x]
Output:
(a^5*c^3*Sec[e + f*x]^7*(7 + 22*Cos[2*(e + f*x)] - (20*I)*Sin[2*(e + f*x)] )*((-I)*Cos[5*(e + f*x)] + Sin[5*(e + f*x)]))/(105*f)
Time = 0.36 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.85, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {3042, 4005, 3042, 3968, 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))^5 (c-i c \tan (e+f x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+i a \tan (e+f x))^5 (c-i c \tan (e+f x))^3dx\) |
\(\Big \downarrow \) 4005 |
\(\displaystyle a^3 c^3 \int \sec ^6(e+f x) (i \tan (e+f x) a+a)^2dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^3 c^3 \int \sec (e+f x)^6 (i \tan (e+f x) a+a)^2dx\) |
\(\Big \downarrow \) 3968 |
\(\displaystyle -\frac {i c^3 \int (a-i a \tan (e+f x))^2 (i \tan (e+f x) a+a)^4d(i a \tan (e+f x))}{a^2 f}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle -\frac {i c^3 \int \left ((i \tan (e+f x) a+a)^6-4 a (i \tan (e+f x) a+a)^5+4 a^2 (i \tan (e+f x) a+a)^4\right )d(i a \tan (e+f x))}{a^2 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {i c^3 \left (\frac {4}{5} a^2 (a+i a \tan (e+f x))^5+\frac {1}{7} (a+i a \tan (e+f x))^7-\frac {2}{3} a (a+i a \tan (e+f x))^6\right )}{a^2 f}\) |
Input:
Int[(a + I*a*Tan[e + f*x])^5*(c - I*c*Tan[e + f*x])^3,x]
Output:
((-I)*c^3*((4*a^2*(a + I*a*Tan[e + f*x])^5)/5 - (2*a*(a + I*a*Tan[e + f*x] )^6)/3 + (a + I*a*Tan[e + f*x])^7/7))/(a^2*f)
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[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ ), x_Symbol] :> Simp[1/(a^(m - 2)*b*f) Subst[Int[(a - x)^(m/2 - 1)*(a + x )^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[a^m*c^m Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && EqQ[ b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] && !(IGtQ[n, 0] && (LtQ[ m, 0] || GtQ[m, n]))
Time = 0.34 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.82
method | result | size |
risch | \(\frac {128 i a^{5} c^{3} \left (35 \,{\mathrm e}^{8 i \left (f x +e \right )}+35 \,{\mathrm e}^{6 i \left (f x +e \right )}+21 \,{\mathrm e}^{4 i \left (f x +e \right )}+7 \,{\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{105 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{7}}\) | \(72\) |
derivativedivides | \(\frac {a^{5} c^{3} \left (\tan \left (f x +e \right )-\frac {\tan \left (f x +e \right )^{7}}{7}+\frac {i \tan \left (f x +e \right )^{6}}{3}-\frac {\tan \left (f x +e \right )^{5}}{5}+i \tan \left (f x +e \right )^{4}+\frac {\tan \left (f x +e \right )^{3}}{3}+i \tan \left (f x +e \right )^{2}\right )}{f}\) | \(81\) |
default | \(\frac {a^{5} c^{3} \left (\tan \left (f x +e \right )-\frac {\tan \left (f x +e \right )^{7}}{7}+\frac {i \tan \left (f x +e \right )^{6}}{3}-\frac {\tan \left (f x +e \right )^{5}}{5}+i \tan \left (f x +e \right )^{4}+\frac {\tan \left (f x +e \right )^{3}}{3}+i \tan \left (f x +e \right )^{2}\right )}{f}\) | \(81\) |
parallelrisch | \(\frac {35 i a^{5} c^{3} \tan \left (f x +e \right )^{6}-15 \tan \left (f x +e \right )^{7} a^{5} c^{3}+105 i a^{5} c^{3} \tan \left (f x +e \right )^{4}-21 \tan \left (f x +e \right )^{5} a^{5} c^{3}+105 i a^{5} c^{3} \tan \left (f x +e \right )^{2}+35 \tan \left (f x +e \right )^{3} a^{5} c^{3}+105 \tan \left (f x +e \right ) a^{5} c^{3}}{105 f}\) | \(120\) |
norman | \(\frac {a^{5} c^{3} \tan \left (f x +e \right )}{f}+\frac {i a^{5} c^{3} \tan \left (f x +e \right )^{2}}{f}+\frac {i a^{5} c^{3} \tan \left (f x +e \right )^{4}}{f}+\frac {a^{5} c^{3} \tan \left (f x +e \right )^{3}}{3 f}-\frac {a^{5} c^{3} \tan \left (f x +e \right )^{5}}{5 f}-\frac {a^{5} c^{3} \tan \left (f x +e \right )^{7}}{7 f}+\frac {i a^{5} c^{3} \tan \left (f x +e \right )^{6}}{3 f}\) | \(135\) |
parts | \(a^{5} c^{3} x +\frac {i a^{5} c^{3} \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{f}+\frac {2 i a^{5} c^{3} \left (\frac {\tan \left (f x +e \right )^{6}}{6}-\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 {6 i a^{5} c^{3} \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 {6 i a^{5} c^{3} \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 {2 a^{5} c^{3} \left (\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}-\frac {2 a^{5} c^{3} \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}-\frac {a^{5} c^{3} \left (\frac {\tan \left (f x +e \right )^{7}}{7}-\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}\) | \(302\) |
Input:
int((a+I*a*tan(f*x+e))^5*(c-I*c*tan(f*x+e))^3,x,method=_RETURNVERBOSE)
Output:
128/105*I*a^5*c^3*(35*exp(8*I*(f*x+e))+35*exp(6*I*(f*x+e))+21*exp(4*I*(f*x +e))+7*exp(2*I*(f*x+e))+1)/f/(exp(2*I*(f*x+e))+1)^7
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 166 vs. \(2 (70) = 140\).
Time = 0.08 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.89 \[ \int (a+i a \tan (e+f x))^5 (c-i c \tan (e+f x))^3 \, dx=-\frac {128 \, {\left (-35 i \, a^{5} c^{3} e^{\left (8 i \, f x + 8 i \, e\right )} - 35 i \, a^{5} c^{3} e^{\left (6 i \, f x + 6 i \, e\right )} - 21 i \, a^{5} c^{3} e^{\left (4 i \, f x + 4 i \, e\right )} - 7 i \, a^{5} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{5} c^{3}\right )}}{105 \, {\left (f e^{\left (14 i \, f x + 14 i \, e\right )} + 7 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 21 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 35 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 35 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 21 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 7 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \] Input:
integrate((a+I*a*tan(f*x+e))^5*(c-I*c*tan(f*x+e))^3,x, algorithm="fricas")
Output:
-128/105*(-35*I*a^5*c^3*e^(8*I*f*x + 8*I*e) - 35*I*a^5*c^3*e^(6*I*f*x + 6* I*e) - 21*I*a^5*c^3*e^(4*I*f*x + 4*I*e) - 7*I*a^5*c^3*e^(2*I*f*x + 2*I*e) - I*a^5*c^3)/(f*e^(14*I*f*x + 14*I*e) + 7*f*e^(12*I*f*x + 12*I*e) + 21*f*e ^(10*I*f*x + 10*I*e) + 35*f*e^(8*I*f*x + 8*I*e) + 35*f*e^(6*I*f*x + 6*I*e) + 21*f*e^(4*I*f*x + 4*I*e) + 7*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. 245 vs. \(2 (73) = 146\).
Time = 0.44 (sec) , antiderivative size = 245, normalized size of antiderivative = 2.78 \[ \int (a+i a \tan (e+f x))^5 (c-i c \tan (e+f x))^3 \, dx=\frac {4480 i a^{5} c^{3} e^{8 i e} e^{8 i f x} + 4480 i a^{5} c^{3} e^{6 i e} e^{6 i f x} + 2688 i a^{5} c^{3} e^{4 i e} e^{4 i f x} + 896 i a^{5} c^{3} e^{2 i e} e^{2 i f x} + 128 i a^{5} c^{3}}{105 f e^{14 i e} e^{14 i f x} + 735 f e^{12 i e} e^{12 i f x} + 2205 f e^{10 i e} e^{10 i f x} + 3675 f e^{8 i e} e^{8 i f x} + 3675 f e^{6 i e} e^{6 i f x} + 2205 f e^{4 i e} e^{4 i f x} + 735 f e^{2 i e} e^{2 i f x} + 105 f} \] Input:
integrate((a+I*a*tan(f*x+e))**5*(c-I*c*tan(f*x+e))**3,x)
Output:
(4480*I*a**5*c**3*exp(8*I*e)*exp(8*I*f*x) + 4480*I*a**5*c**3*exp(6*I*e)*ex p(6*I*f*x) + 2688*I*a**5*c**3*exp(4*I*e)*exp(4*I*f*x) + 896*I*a**5*c**3*ex p(2*I*e)*exp(2*I*f*x) + 128*I*a**5*c**3)/(105*f*exp(14*I*e)*exp(14*I*f*x) + 735*f*exp(12*I*e)*exp(12*I*f*x) + 2205*f*exp(10*I*e)*exp(10*I*f*x) + 367 5*f*exp(8*I*e)*exp(8*I*f*x) + 3675*f*exp(6*I*e)*exp(6*I*f*x) + 2205*f*exp( 4*I*e)*exp(4*I*f*x) + 735*f*exp(2*I*e)*exp(2*I*f*x) + 105*f)
Time = 0.11 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.32 \[ \int (a+i a \tan (e+f x))^5 (c-i c \tan (e+f x))^3 \, dx=-\frac {15 \, a^{5} c^{3} \tan \left (f x + e\right )^{7} - 35 i \, a^{5} c^{3} \tan \left (f x + e\right )^{6} + 21 \, a^{5} c^{3} \tan \left (f x + e\right )^{5} - 105 i \, a^{5} c^{3} \tan \left (f x + e\right )^{4} - 35 \, a^{5} c^{3} \tan \left (f x + e\right )^{3} - 105 i \, a^{5} c^{3} \tan \left (f x + e\right )^{2} - 105 \, a^{5} c^{3} \tan \left (f x + e\right )}{105 \, f} \] Input:
integrate((a+I*a*tan(f*x+e))^5*(c-I*c*tan(f*x+e))^3,x, algorithm="maxima")
Output:
-1/105*(15*a^5*c^3*tan(f*x + e)^7 - 35*I*a^5*c^3*tan(f*x + e)^6 + 21*a^5*c ^3*tan(f*x + e)^5 - 105*I*a^5*c^3*tan(f*x + e)^4 - 35*a^5*c^3*tan(f*x + e) ^3 - 105*I*a^5*c^3*tan(f*x + e)^2 - 105*a^5*c^3*tan(f*x + e))/f
Time = 0.82 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.32 \[ \int (a+i a \tan (e+f x))^5 (c-i c \tan (e+f x))^3 \, dx=-\frac {15 \, a^{5} c^{3} \tan \left (f x + e\right )^{7} - 35 i \, a^{5} c^{3} \tan \left (f x + e\right )^{6} + 21 \, a^{5} c^{3} \tan \left (f x + e\right )^{5} - 105 i \, a^{5} c^{3} \tan \left (f x + e\right )^{4} - 35 \, a^{5} c^{3} \tan \left (f x + e\right )^{3} - 105 i \, a^{5} c^{3} \tan \left (f x + e\right )^{2} - 105 \, a^{5} c^{3} \tan \left (f x + e\right )}{105 \, f} \] Input:
integrate((a+I*a*tan(f*x+e))^5*(c-I*c*tan(f*x+e))^3,x, algorithm="giac")
Output:
-1/105*(15*a^5*c^3*tan(f*x + e)^7 - 35*I*a^5*c^3*tan(f*x + e)^6 + 21*a^5*c ^3*tan(f*x + e)^5 - 105*I*a^5*c^3*tan(f*x + e)^4 - 35*a^5*c^3*tan(f*x + e) ^3 - 105*I*a^5*c^3*tan(f*x + e)^2 - 105*a^5*c^3*tan(f*x + e))/f
Time = 1.90 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.09 \[ \int (a+i a \tan (e+f x))^5 (c-i c \tan (e+f x))^3 \, dx=\frac {a^5\,c^3\,\left (-{\cos \left (e+f\,x\right )}^7\,35{}\mathrm {i}+64\,\sin \left (e+f\,x\right )\,{\cos \left (e+f\,x\right )}^6+32\,\sin \left (e+f\,x\right )\,{\cos \left (e+f\,x\right )}^4+24\,\sin \left (e+f\,x\right )\,{\cos \left (e+f\,x\right )}^2+\cos \left (e+f\,x\right )\,35{}\mathrm {i}-15\,\sin \left (e+f\,x\right )\right )}{105\,f\,{\cos \left (e+f\,x\right )}^7} \] Input:
int((a + a*tan(e + f*x)*1i)^5*(c - c*tan(e + f*x)*1i)^3,x)
Output:
(a^5*c^3*(cos(e + f*x)*35i - 15*sin(e + f*x) + 24*cos(e + f*x)^2*sin(e + f *x) + 32*cos(e + f*x)^4*sin(e + f*x) + 64*cos(e + f*x)^6*sin(e + f*x) - co s(e + f*x)^7*35i))/(105*f*cos(e + f*x)^7)
Time = 0.18 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.91 \[ \int (a+i a \tan (e+f x))^5 (c-i c \tan (e+f x))^3 \, dx=\frac {\tan \left (f x +e \right ) a^{5} c^{3} \left (-15 \tan \left (f x +e \right )^{6}+35 \tan \left (f x +e \right )^{5} i -21 \tan \left (f x +e \right )^{4}+105 \tan \left (f x +e \right )^{3} i +35 \tan \left (f x +e \right )^{2}+105 \tan \left (f x +e \right ) i +105\right )}{105 f} \] Input:
int((a+I*a*tan(f*x+e))^5*(c-I*c*tan(f*x+e))^3,x)
Output:
(tan(e + f*x)*a**5*c**3*( - 15*tan(e + f*x)**6 + 35*tan(e + f*x)**5*i - 21 *tan(e + f*x)**4 + 105*tan(e + f*x)**3*i + 35*tan(e + f*x)**2 + 105*tan(e + f*x)*i + 105))/(105*f)