Integrand size = 31, antiderivative size = 82 \[ \int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4 \, dx=-\frac {i a^3 c^4 \sec ^6(e+f x)}{6 f}+\frac {a^3 c^4 \tan (e+f x)}{f}+\frac {2 a^3 c^4 \tan ^3(e+f x)}{3 f}+\frac {a^3 c^4 \tan ^5(e+f x)}{5 f} \] Output:
-1/6*I*a^3*c^4*sec(f*x+e)^6/f+a^3*c^4*tan(f*x+e)/f+2/3*a^3*c^4*tan(f*x+e)^ 3/f+1/5*a^3*c^4*tan(f*x+e)^5/f
Time = 0.56 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.91 \[ \int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4 \, dx=\frac {a^3 c^4 \tan (e+f x) \left (30-15 i \tan (e+f x)+20 \tan ^2(e+f x)-15 i \tan ^3(e+f x)+6 \tan ^4(e+f x)-5 i \tan ^5(e+f x)\right )}{30 f} \] Input:
Integrate[(a + I*a*Tan[e + f*x])^3*(c - I*c*Tan[e + f*x])^4,x]
Output:
(a^3*c^4*Tan[e + f*x]*(30 - (15*I)*Tan[e + f*x] + 20*Tan[e + f*x]^2 - (15* I)*Tan[e + f*x]^3 + 6*Tan[e + f*x]^4 - (5*I)*Tan[e + f*x]^5))/(30*f)
Time = 0.39 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.79, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {3042, 4005, 3042, 3967, 3042, 4254, 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))^4 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4dx\) |
\(\Big \downarrow \) 4005 |
\(\displaystyle a^3 c^3 \int \sec ^6(e+f x) (c-i c \tan (e+f x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^3 c^3 \int \sec (e+f x)^6 (c-i c \tan (e+f x))dx\) |
\(\Big \downarrow \) 3967 |
\(\displaystyle a^3 c^3 \left (c \int \sec ^6(e+f x)dx-\frac {i c \sec ^6(e+f x)}{6 f}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^3 c^3 \left (c \int \csc \left (e+f x+\frac {\pi }{2}\right )^6dx-\frac {i c \sec ^6(e+f x)}{6 f}\right )\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle a^3 c^3 \left (-\frac {c \int \left (\tan ^4(e+f x)+2 \tan ^2(e+f x)+1\right )d(-\tan (e+f x))}{f}-\frac {i c \sec ^6(e+f x)}{6 f}\right )\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a^3 c^3 \left (-\frac {c \left (-\frac {1}{5} \tan ^5(e+f x)-\frac {2}{3} \tan ^3(e+f x)-\tan (e+f x)\right )}{f}-\frac {i c \sec ^6(e+f x)}{6 f}\right )\) |
Input:
Int[(a + I*a*Tan[e + f*x])^3*(c - I*c*Tan[e + f*x])^4,x]
Output:
a^3*c^3*(((-1/6*I)*c*Sec[e + f*x]^6)/f - (c*(-Tan[e + f*x] - (2*Tan[e + f* x]^3)/3 - Tan[e + f*x]^5/5))/f)
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)]), x_Symbol] :> Simp[b*((d*Sec[e + f*x])^m/(f*m)), x] + Simp[a Int[(d *Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2*m] || NeQ[a^2 + b^2, 0])
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]))
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Time = 0.29 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.61
method | result | size |
risch | \(\frac {16 i a^{3} c^{4} \left (15 \,{\mathrm e}^{4 i \left (f x +e \right )}+6 \,{\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{15 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{6}}\) | \(50\) |
derivativedivides | \(-\frac {i a^{3} c^{4} \left (\frac {\tan \left (f x +e \right )^{6}}{6}+\frac {\tan \left (f x +e \right )^{4}}{2}+\frac {i \tan \left (f x +e \right )^{5}}{5}+\frac {\tan \left (f x +e \right )^{2}}{2}+\frac {2 i \tan \left (f x +e \right )^{3}}{3}+i \tan \left (f x +e \right )\right )}{f}\) | \(75\) |
default | \(-\frac {i a^{3} c^{4} \left (\frac {\tan \left (f x +e \right )^{6}}{6}+\frac {\tan \left (f x +e \right )^{4}}{2}+\frac {i \tan \left (f x +e \right )^{5}}{5}+\frac {\tan \left (f x +e \right )^{2}}{2}+\frac {2 i \tan \left (f x +e \right )^{3}}{3}+i \tan \left (f x +e \right )\right )}{f}\) | \(75\) |
parallelrisch | \(-\frac {5 i a^{3} c^{4} \tan \left (f x +e \right )^{6}+15 i a^{3} c^{4} \tan \left (f x +e \right )^{4}-6 \tan \left (f x +e \right )^{5} a^{3} c^{4}+15 i a^{3} c^{4} \tan \left (f x +e \right )^{2}-20 \tan \left (f x +e \right )^{3} a^{3} c^{4}-30 \tan \left (f x +e \right ) a^{3} c^{4}}{30 f}\) | \(104\) |
norman | \(\frac {a^{3} c^{4} \tan \left (f x +e \right )}{f}+\frac {2 a^{3} c^{4} \tan \left (f x +e \right )^{3}}{3 f}+\frac {a^{3} c^{4} \tan \left (f x +e \right )^{5}}{5 f}-\frac {i a^{3} c^{4} \tan \left (f x +e \right )^{2}}{2 f}-\frac {i a^{3} c^{4} \tan \left (f x +e \right )^{4}}{2 f}-\frac {i a^{3} c^{4} \tan \left (f x +e \right )^{6}}{6 f}\) | \(116\) |
parts | \(a^{3} c^{4} x +\frac {a^{3} 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}-\frac {3 i a^{3} 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 {3 i a^{3} 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 {i a^{3} c^{4} \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f}-\frac {i a^{3} c^{4} \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 {3 a^{3} c^{4} \left (\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {3 a^{3} 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}\) | \(281\) |
Input:
int((a+I*a*tan(f*x+e))^3*(c-I*c*tan(f*x+e))^4,x,method=_RETURNVERBOSE)
Output:
16/15*I*a^3*c^4*(15*exp(4*I*(f*x+e))+6*exp(2*I*(f*x+e))+1)/f/(exp(2*I*(f*x +e))+1)^6
Time = 0.07 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.46 \[ \int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4 \, dx=-\frac {16 \, {\left (-15 i \, a^{3} c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} - 6 i \, a^{3} c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{3} c^{4}\right )}}{15 \, {\left (f e^{\left (12 i \, f x + 12 i \, e\right )} + 6 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 15 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 20 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 15 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 6 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \] Input:
integrate((a+I*a*tan(f*x+e))^3*(c-I*c*tan(f*x+e))^4,x, algorithm="fricas")
Output:
-16/15*(-15*I*a^3*c^4*e^(4*I*f*x + 4*I*e) - 6*I*a^3*c^4*e^(2*I*f*x + 2*I*e ) - I*a^3*c^4)/(f*e^(12*I*f*x + 12*I*e) + 6*f*e^(10*I*f*x + 10*I*e) + 15*f *e^(8*I*f*x + 8*I*e) + 20*f*e^(6*I*f*x + 6*I*e) + 15*f*e^(4*I*f*x + 4*I*e) + 6*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. 175 vs. \(2 (73) = 146\).
Time = 0.38 (sec) , antiderivative size = 175, normalized size of antiderivative = 2.13 \[ \int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4 \, dx=\frac {240 i a^{3} c^{4} e^{4 i e} e^{4 i f x} + 96 i a^{3} c^{4} e^{2 i e} e^{2 i f x} + 16 i a^{3} c^{4}}{15 f e^{12 i e} e^{12 i f x} + 90 f e^{10 i e} e^{10 i f x} + 225 f e^{8 i e} e^{8 i f x} + 300 f e^{6 i e} e^{6 i f x} + 225 f e^{4 i e} e^{4 i f x} + 90 f e^{2 i e} e^{2 i f x} + 15 f} \] Input:
integrate((a+I*a*tan(f*x+e))**3*(c-I*c*tan(f*x+e))**4,x)
Output:
(240*I*a**3*c**4*exp(4*I*e)*exp(4*I*f*x) + 96*I*a**3*c**4*exp(2*I*e)*exp(2 *I*f*x) + 16*I*a**3*c**4)/(15*f*exp(12*I*e)*exp(12*I*f*x) + 90*f*exp(10*I* e)*exp(10*I*f*x) + 225*f*exp(8*I*e)*exp(8*I*f*x) + 300*f*exp(6*I*e)*exp(6* I*f*x) + 225*f*exp(4*I*e)*exp(4*I*f*x) + 90*f*exp(2*I*e)*exp(2*I*f*x) + 15 *f)
Time = 0.11 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.22 \[ \int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4 \, dx=-\frac {5 i \, a^{3} c^{4} \tan \left (f x + e\right )^{6} - 6 \, a^{3} c^{4} \tan \left (f x + e\right )^{5} + 15 i \, a^{3} c^{4} \tan \left (f x + e\right )^{4} - 20 \, a^{3} c^{4} \tan \left (f x + e\right )^{3} + 15 i \, a^{3} c^{4} \tan \left (f x + e\right )^{2} - 30 \, a^{3} c^{4} \tan \left (f x + e\right )}{30 \, f} \] Input:
integrate((a+I*a*tan(f*x+e))^3*(c-I*c*tan(f*x+e))^4,x, algorithm="maxima")
Output:
-1/30*(5*I*a^3*c^4*tan(f*x + e)^6 - 6*a^3*c^4*tan(f*x + e)^5 + 15*I*a^3*c^ 4*tan(f*x + e)^4 - 20*a^3*c^4*tan(f*x + e)^3 + 15*I*a^3*c^4*tan(f*x + e)^2 - 30*a^3*c^4*tan(f*x + e))/f
Time = 0.61 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.22 \[ \int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4 \, dx=-\frac {5 i \, a^{3} c^{4} \tan \left (f x + e\right )^{6} - 6 \, a^{3} c^{4} \tan \left (f x + e\right )^{5} + 15 i \, a^{3} c^{4} \tan \left (f x + e\right )^{4} - 20 \, a^{3} c^{4} \tan \left (f x + e\right )^{3} + 15 i \, a^{3} c^{4} \tan \left (f x + e\right )^{2} - 30 \, a^{3} c^{4} \tan \left (f x + e\right )}{30 \, f} \] Input:
integrate((a+I*a*tan(f*x+e))^3*(c-I*c*tan(f*x+e))^4,x, algorithm="giac")
Output:
-1/30*(5*I*a^3*c^4*tan(f*x + e)^6 - 6*a^3*c^4*tan(f*x + e)^5 + 15*I*a^3*c^ 4*tan(f*x + e)^4 - 20*a^3*c^4*tan(f*x + e)^3 + 15*I*a^3*c^4*tan(f*x + e)^2 - 30*a^3*c^4*tan(f*x + e))/f
Time = 1.76 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.43 \[ \int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4 \, dx=\frac {a^3\,c^4\,\sin \left (e+f\,x\right )\,\left (30\,{\cos \left (e+f\,x\right )}^5-{\cos \left (e+f\,x\right )}^4\,\sin \left (e+f\,x\right )\,15{}\mathrm {i}+20\,{\cos \left (e+f\,x\right )}^3\,{\sin \left (e+f\,x\right )}^2-{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^3\,15{}\mathrm {i}+6\,\cos \left (e+f\,x\right )\,{\sin \left (e+f\,x\right )}^4-{\sin \left (e+f\,x\right )}^5\,5{}\mathrm {i}\right )}{30\,f\,{\cos \left (e+f\,x\right )}^6} \] Input:
int((a + a*tan(e + f*x)*1i)^3*(c - c*tan(e + f*x)*1i)^4,x)
Output:
(a^3*c^4*sin(e + f*x)*(6*cos(e + f*x)*sin(e + f*x)^4 - cos(e + f*x)^4*sin( e + f*x)*15i + 30*cos(e + f*x)^5 - sin(e + f*x)^5*5i - cos(e + f*x)^2*sin( e + f*x)^3*15i + 20*cos(e + f*x)^3*sin(e + f*x)^2))/(30*f*cos(e + f*x)^6)
Time = 0.23 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.85 \[ \int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4 \, dx=\frac {\tan \left (f x +e \right ) a^{3} c^{4} \left (-5 \tan \left (f x +e \right )^{5} i +6 \tan \left (f x +e \right )^{4}-15 \tan \left (f x +e \right )^{3} i +20 \tan \left (f x +e \right )^{2}-15 \tan \left (f x +e \right ) i +30\right )}{30 f} \] Input:
int((a+I*a*tan(f*x+e))^3*(c-I*c*tan(f*x+e))^4,x)
Output:
(tan(e + f*x)*a**3*c**4*( - 5*tan(e + f*x)**5*i + 6*tan(e + f*x)**4 - 15*t an(e + f*x)**3*i + 20*tan(e + f*x)**2 - 15*tan(e + f*x)*i + 30))/(30*f)