Integrand size = 31, antiderivative size = 58 \[ \int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^4 \, dx=\frac {i a^2 (c-i c \tan (e+f x))^4}{2 f}-\frac {i a^2 (c-i c \tan (e+f x))^5}{5 c f} \] Output:
1/2*I*a^2*(c-I*c*tan(f*x+e))^4/f-1/5*I*a^2*(c-I*c*tan(f*x+e))^5/c/f
Time = 0.44 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.95 \[ \int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^4 \, dx=\frac {a^2 c^4 \left (\tan (e+f x)-i \tan ^2(e+f x)-\frac {1}{2} i \tan ^4(e+f x)-\frac {1}{5} \tan ^5(e+f x)\right )}{f} \] Input:
Integrate[(a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])^4,x]
Output:
(a^2*c^4*(Tan[e + f*x] - I*Tan[e + f*x]^2 - (I/2)*Tan[e + f*x]^4 - Tan[e + f*x]^5/5))/f
Time = 0.33 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.91, 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))^2 (c-i c \tan (e+f x))^4 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^4dx\) |
\(\Big \downarrow \) 4005 |
\(\displaystyle a^2 c^2 \int \sec ^4(e+f x) (c-i c \tan (e+f x))^2dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \int \sec (e+f x)^4 (c-i c \tan (e+f x))^2dx\) |
\(\Big \downarrow \) 3968 |
\(\displaystyle \frac {i a^2 \int (c-i c \tan (e+f x))^3 (i \tan (e+f x) c+c)d(-i c \tan (e+f x))}{c f}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle \frac {i a^2 \int \left (2 c (c-i c \tan (e+f x))^3-(c-i c \tan (e+f x))^4\right )d(-i c \tan (e+f x))}{c f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {i a^2 \left (\frac {1}{2} c (c-i c \tan (e+f x))^4-\frac {1}{5} (c-i c \tan (e+f x))^5\right )}{c f}\) |
Input:
Int[(a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])^4,x]
Output:
(I*a^2*((c*(c - I*c*Tan[e + f*x])^4)/2 - (c - I*c*Tan[e + f*x])^5/5))/(c*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.21 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.67
method | result | size |
risch | \(\frac {8 i a^{2} c^{4} \left (5 \,{\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{5 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{5}}\) | \(39\) |
derivativedivides | \(\frac {a^{2} c^{4} \left (\tan \left (f x +e \right )-\frac {\tan \left (f x +e \right )^{5}}{5}-\frac {i \tan \left (f x +e \right )^{4}}{2}-i \tan \left (f x +e \right )^{2}\right )}{f}\) | \(50\) |
default | \(\frac {a^{2} c^{4} \left (\tan \left (f x +e \right )-\frac {\tan \left (f x +e \right )^{5}}{5}-\frac {i \tan \left (f x +e \right )^{4}}{2}-i \tan \left (f x +e \right )^{2}\right )}{f}\) | \(50\) |
parallelrisch | \(-\frac {5 i a^{2} c^{4} \tan \left (f x +e \right )^{4}+2 \tan \left (f x +e \right )^{5} a^{2} c^{4}+10 i a^{2} c^{4} \tan \left (f x +e \right )^{2}-10 \tan \left (f x +e \right ) a^{2} c^{4}}{10 f}\) | \(71\) |
norman | \(\frac {a^{2} c^{4} \tan \left (f x +e \right )}{f}-\frac {a^{2} c^{4} \tan \left (f x +e \right )^{5}}{5 f}-\frac {i a^{2} c^{4} \tan \left (f x +e \right )^{2}}{f}-\frac {i a^{2} c^{4} \tan \left (f x +e \right )^{4}}{2 f}\) | \(77\) |
parts | \(a^{2} c^{4} x +\frac {a^{2} c^{4} \left (\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}-\frac {4 i a^{2} c^{4} \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 {i a^{2} c^{4} \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{f}-\frac {2 i a^{2} c^{4} \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 {a^{2} c^{4} \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}-\frac {a^{2} c^{4} \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}\) | \(225\) |
Input:
int((a+I*a*tan(f*x+e))^2*(c-I*c*tan(f*x+e))^4,x,method=_RETURNVERBOSE)
Output:
8/5*I*a^2*c^4*(5*exp(2*I*(f*x+e))+1)/f/(exp(2*I*(f*x+e))+1)^5
Time = 0.06 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.57 \[ \int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^4 \, dx=-\frac {8 \, {\left (-5 i \, a^{2} c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{2} c^{4}\right )}}{5 \, {\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))^2*(c-I*c*tan(f*x+e))^4,x, algorithm="fricas")
Output:
-8/5*(-5*I*a^2*c^4*e^(2*I*f*x + 2*I*e) - I*a^2*c^4)/(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. 131 vs. \(2 (44) = 88\).
Time = 0.30 (sec) , antiderivative size = 131, normalized size of antiderivative = 2.26 \[ \int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^4 \, dx=\frac {40 i a^{2} c^{4} e^{2 i e} e^{2 i f x} + 8 i a^{2} c^{4}}{5 f e^{10 i e} e^{10 i f x} + 25 f e^{8 i e} e^{8 i f x} + 50 f e^{6 i e} e^{6 i f x} + 50 f e^{4 i e} e^{4 i f x} + 25 f e^{2 i e} e^{2 i f x} + 5 f} \] Input:
integrate((a+I*a*tan(f*x+e))**2*(c-I*c*tan(f*x+e))**4,x)
Output:
(40*I*a**2*c**4*exp(2*I*e)*exp(2*I*f*x) + 8*I*a**2*c**4)/(5*f*exp(10*I*e)* exp(10*I*f*x) + 25*f*exp(8*I*e)*exp(8*I*f*x) + 50*f*exp(6*I*e)*exp(6*I*f*x ) + 50*f*exp(4*I*e)*exp(4*I*f*x) + 25*f*exp(2*I*e)*exp(2*I*f*x) + 5*f)
Time = 0.11 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.17 \[ \int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^4 \, dx=-\frac {2 \, a^{2} c^{4} \tan \left (f x + e\right )^{5} + 5 i \, a^{2} c^{4} \tan \left (f x + e\right )^{4} + 10 i \, a^{2} c^{4} \tan \left (f x + e\right )^{2} - 10 \, a^{2} c^{4} \tan \left (f x + e\right )}{10 \, f} \] Input:
integrate((a+I*a*tan(f*x+e))^2*(c-I*c*tan(f*x+e))^4,x, algorithm="maxima")
Output:
-1/10*(2*a^2*c^4*tan(f*x + e)^5 + 5*I*a^2*c^4*tan(f*x + e)^4 + 10*I*a^2*c^ 4*tan(f*x + e)^2 - 10*a^2*c^4*tan(f*x + e))/f
Time = 0.51 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.17 \[ \int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^4 \, dx=-\frac {2 \, a^{2} c^{4} \tan \left (f x + e\right )^{5} + 5 i \, a^{2} c^{4} \tan \left (f x + e\right )^{4} + 10 i \, a^{2} c^{4} \tan \left (f x + e\right )^{2} - 10 \, a^{2} c^{4} \tan \left (f x + e\right )}{10 \, f} \] Input:
integrate((a+I*a*tan(f*x+e))^2*(c-I*c*tan(f*x+e))^4,x, algorithm="giac")
Output:
-1/10*(2*a^2*c^4*tan(f*x + e)^5 + 5*I*a^2*c^4*tan(f*x + e)^4 + 10*I*a^2*c^ 4*tan(f*x + e)^2 - 10*a^2*c^4*tan(f*x + e))/f
Time = 1.79 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.38 \[ \int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^4 \, dx=-\frac {a^2\,c^4\,\sin \left (e+f\,x\right )\,\left (-10\,{\cos \left (e+f\,x\right )}^4+{\cos \left (e+f\,x\right )}^3\,\sin \left (e+f\,x\right )\,10{}\mathrm {i}+\cos \left (e+f\,x\right )\,{\sin \left (e+f\,x\right )}^3\,5{}\mathrm {i}+2\,{\sin \left (e+f\,x\right )}^4\right )}{10\,f\,{\cos \left (e+f\,x\right )}^5} \] Input:
int((a + a*tan(e + f*x)*1i)^2*(c - c*tan(e + f*x)*1i)^4,x)
Output:
-(a^2*c^4*sin(e + f*x)*(cos(e + f*x)*sin(e + f*x)^3*5i + cos(e + f*x)^3*si n(e + f*x)*10i - 10*cos(e + f*x)^4 + 2*sin(e + f*x)^4))/(10*f*cos(e + f*x) ^5)
Time = 0.20 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.84 \[ \int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^4 \, dx=\frac {\tan \left (f x +e \right ) a^{2} c^{4} \left (-2 \tan \left (f x +e \right )^{4}-5 \tan \left (f x +e \right )^{3} i -10 \tan \left (f x +e \right ) i +10\right )}{10 f} \] Input:
int((a+I*a*tan(f*x+e))^2*(c-I*c*tan(f*x+e))^4,x)
Output:
(tan(e + f*x)*a**2*c**4*( - 2*tan(e + f*x)**4 - 5*tan(e + f*x)**3*i - 10*t an(e + f*x)*i + 10))/(10*f)