Integrand size = 41, antiderivative size = 62 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=\frac {a^2 B c^2 \sec ^4(e+f x)}{4 f}+\frac {a^2 A c^2 \tan (e+f x)}{f}+\frac {a^2 A c^2 \tan ^3(e+f x)}{3 f} \] Output:
1/4*a^2*B*c^2*sec(f*x+e)^4/f+a^2*A*c^2*tan(f*x+e)/f+1/3*a^2*A*c^2*tan(f*x+ e)^3/f
Time = 0.12 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.85 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=\frac {a^2 B c^2 \sec ^4(e+f x)}{4 f}+\frac {a^2 A c^2 \left (\tan (e+f x)+\frac {1}{3} \tan ^3(e+f x)\right )}{f} \] Input:
Integrate[(a + I*a*Tan[e + f*x])^2*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f *x])^2,x]
Output:
(a^2*B*c^2*Sec[e + f*x]^4)/(4*f) + (a^2*A*c^2*(Tan[e + f*x] + Tan[e + f*x] ^3/3))/f
Time = 0.48 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.79, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.146, Rules used = {3042, 4071, 27, 82, 455, 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))^2 (A+B \tan (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^2 (A+B \tan (e+f x))dx\) |
\(\Big \downarrow \) 4071 |
\(\displaystyle \frac {a c \int a c (1-i \tan (e+f x)) (i \tan (e+f x)+1) (A+B \tan (e+f x))d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {a^2 c^2 \int (1-i \tan (e+f x)) (i \tan (e+f x)+1) (A+B \tan (e+f x))d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 82 |
\(\displaystyle \frac {a^2 c^2 \int (A+B \tan (e+f x)) \left (\tan ^2(e+f x)+1\right )d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 455 |
\(\displaystyle \frac {a^2 c^2 \left (A \int \left (\tan ^2(e+f x)+1\right )d\tan (e+f x)+\frac {1}{4} B \left (\tan ^2(e+f x)+1\right )^2\right )}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^2 c^2 \left (A \left (\frac {1}{3} \tan ^3(e+f x)+\tan (e+f x)\right )+\frac {1}{4} B \left (\tan ^2(e+f x)+1\right )^2\right )}{f}\) |
Input:
Int[(a + I*a*Tan[e + f*x])^2*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^2 ,x]
Output:
(a^2*c^2*((B*(1 + Tan[e + f*x]^2)^2)/4 + A*(Tan[e + f*x] + Tan[e + f*x]^3/ 3)))/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_.)*((e_.) + (f_.)*(x_) )^(p_.), x_] :> Int[(a*c + b*d*x^2)^m*(e + f*x)^p, x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[n, m] && IntegerQ[m]
Int[((c_) + (d_.)*(x_))*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[d*(( a + b*x^2)^(p + 1)/(2*b*(p + 1))), x] + Simp[c Int[(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, p}, x] && !LeQ[p, -1]
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.19 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.85
method | result | size |
derivativedivides | \(\frac {c^{2} a^{2} \left (\frac {B \tan \left (f x +e \right )^{4}}{4}+\frac {A \tan \left (f x +e \right )^{3}}{3}+\frac {B \tan \left (f x +e \right )^{2}}{2}+A \tan \left (f x +e \right )\right )}{f}\) | \(53\) |
default | \(\frac {c^{2} a^{2} \left (\frac {B \tan \left (f x +e \right )^{4}}{4}+\frac {A \tan \left (f x +e \right )^{3}}{3}+\frac {B \tan \left (f x +e \right )^{2}}{2}+A \tan \left (f x +e \right )\right )}{f}\) | \(53\) |
risch | \(\frac {4 c^{2} a^{2} \left (3 i A \,{\mathrm e}^{4 i \left (f x +e \right )}+3 B \,{\mathrm e}^{4 i \left (f x +e \right )}+4 i A \,{\mathrm e}^{2 i \left (f x +e \right )}+i A \right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{4}}\) | \(68\) |
parallelrisch | \(\frac {3 B \,a^{2} c^{2} \tan \left (f x +e \right )^{4}+4 A \,a^{2} c^{2} \tan \left (f x +e \right )^{3}+6 B \,a^{2} c^{2} \tan \left (f x +e \right )^{2}+12 A \,a^{2} c^{2} \tan \left (f x +e \right )}{12 f}\) | \(73\) |
norman | \(\frac {a^{2} A \,c^{2} \tan \left (f x +e \right )}{f}+\frac {B \,a^{2} c^{2} \tan \left (f x +e \right )^{2}}{2 f}+\frac {B \,a^{2} c^{2} \tan \left (f x +e \right )^{4}}{4 f}+\frac {a^{2} A \,c^{2} \tan \left (f x +e \right )^{3}}{3 f}\) | \(79\) |
parts | \(A \,a^{2} c^{2} x +\frac {A \,a^{2} c^{2} \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 {B \,a^{2} c^{2} \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f}+\frac {B \,a^{2} c^{2} \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 \,a^{2} c^{2} \left (\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {2 B \,a^{2} c^{2} \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}\) | \(180\) |
Input:
int((a+I*a*tan(f*x+e))^2*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^2,x,method=_R ETURNVERBOSE)
Output:
1/f*c^2*a^2*(1/4*B*tan(f*x+e)^4+1/3*A*tan(f*x+e)^3+1/2*B*tan(f*x+e)^2+A*ta n(f*x+e))
Result contains complex when optimal does not.
Time = 0.08 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.69 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=-\frac {4 \, {\left (3 \, {\left (-i \, A - B\right )} a^{2} c^{2} e^{\left (4 i \, f x + 4 i \, e\right )} - 4 i \, A a^{2} c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, A a^{2} c^{2}\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))^2*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^2,x, al gorithm="fricas")
Output:
-4/3*(3*(-I*A - B)*a^2*c^2*e^(4*I*f*x + 4*I*e) - 4*I*A*a^2*c^2*e^(2*I*f*x + 2*I*e) - I*A*a^2*c^2)/(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)
Result contains complex when optimal does not.
Time = 0.29 (sec) , antiderivative size = 160, normalized size of antiderivative = 2.58 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=\frac {16 i A a^{2} c^{2} e^{2 i e} e^{2 i f x} + 4 i A a^{2} c^{2} + \left (12 i A a^{2} c^{2} e^{4 i e} + 12 B a^{2} c^{2} e^{4 i e}\right ) e^{4 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))**2*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**2,x)
Output:
(16*I*A*a**2*c**2*exp(2*I*e)*exp(2*I*f*x) + 4*I*A*a**2*c**2 + (12*I*A*a**2 *c**2*exp(4*I*e) + 12*B*a**2*c**2*exp(4*I*e))*exp(4*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.11 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.16 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=\frac {3 \, B a^{2} c^{2} \tan \left (f x + e\right )^{4} + 4 \, A a^{2} c^{2} \tan \left (f x + e\right )^{3} + 6 \, B a^{2} c^{2} \tan \left (f x + e\right )^{2} + 12 \, A a^{2} c^{2} \tan \left (f x + e\right )}{12 \, f} \] Input:
integrate((a+I*a*tan(f*x+e))^2*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^2,x, al gorithm="maxima")
Output:
1/12*(3*B*a^2*c^2*tan(f*x + e)^4 + 4*A*a^2*c^2*tan(f*x + e)^3 + 6*B*a^2*c^ 2*tan(f*x + e)^2 + 12*A*a^2*c^2*tan(f*x + e))/f
Time = 0.46 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.16 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=\frac {3 \, B a^{2} c^{2} \tan \left (f x + e\right )^{4} + 4 \, A a^{2} c^{2} \tan \left (f x + e\right )^{3} + 6 \, B a^{2} c^{2} \tan \left (f x + e\right )^{2} + 12 \, A a^{2} c^{2} \tan \left (f x + e\right )}{12 \, f} \] Input:
integrate((a+I*a*tan(f*x+e))^2*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^2,x, al gorithm="giac")
Output:
1/12*(3*B*a^2*c^2*tan(f*x + e)^4 + 4*A*a^2*c^2*tan(f*x + e)^3 + 6*B*a^2*c^ 2*tan(f*x + e)^2 + 12*A*a^2*c^2*tan(f*x + e))/f
Time = 5.10 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.32 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=\frac {a^2\,c^2\,\sin \left (e+f\,x\right )\,\left (12\,A\,{\cos \left (e+f\,x\right )}^3+6\,B\,{\cos \left (e+f\,x\right )}^2\,\sin \left (e+f\,x\right )+4\,A\,\cos \left (e+f\,x\right )\,{\sin \left (e+f\,x\right )}^2+3\,B\,{\sin \left (e+f\,x\right )}^3\right )}{12\,f\,{\cos \left (e+f\,x\right )}^4} \] Input:
int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^2*(c - c*tan(e + f*x)*1i) ^2,x)
Output:
(a^2*c^2*sin(e + f*x)*(12*A*cos(e + f*x)^3 + 3*B*sin(e + f*x)^3 + 4*A*cos( e + f*x)*sin(e + f*x)^2 + 6*B*cos(e + f*x)^2*sin(e + f*x)))/(12*f*cos(e + f*x)^4)
Time = 0.15 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.84 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx=\frac {\tan \left (f x +e \right ) a^{2} c^{2} \left (3 \tan \left (f x +e \right )^{3} b +4 \tan \left (f x +e \right )^{2} a +6 \tan \left (f x +e \right ) b +12 a \right )}{12 f} \] Input:
int((a+I*a*tan(f*x+e))^2*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^2,x)
Output:
(tan(e + f*x)*a**2*c**2*(3*tan(e + f*x)**3*b + 4*tan(e + f*x)**2*a + 6*tan (e + f*x)*b + 12*a))/(12*f)