Integrand size = 31, antiderivative size = 87 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))} \, dx=\frac {3 x}{8 a^2 c}+\frac {i \cos ^4(e+f x)}{4 a^2 c f}+\frac {3 \cos (e+f x) \sin (e+f x)}{8 a^2 c f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a^2 c f} \] Output:
3/8*x/a^2/c+1/4*I*cos(f*x+e)^4/a^2/c/f+3/8*cos(f*x+e)*sin(f*x+e)/a^2/c/f+1 /4*cos(f*x+e)^3*sin(f*x+e)/a^2/c/f
Time = 0.68 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.03 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))} \, dx=\frac {2-3 i \tan (e+f x)+3 \tan ^2(e+f x)+3 \arctan (\tan (e+f x)) (-i+\tan (e+f x))^2 (i+\tan (e+f x))}{8 a^2 c f (-i+\tan (e+f x))^2 (i+\tan (e+f x))} \] Input:
Integrate[1/((a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])),x]
Output:
(2 - (3*I)*Tan[e + f*x] + 3*Tan[e + f*x]^2 + 3*ArcTan[Tan[e + f*x]]*(-I + Tan[e + f*x])^2*(I + Tan[e + f*x]))/(8*a^2*c*f*(-I + Tan[e + f*x])^2*(I + Tan[e + f*x]))
Time = 0.45 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.91, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.290, Rules used = {3042, 4005, 3042, 3967, 3042, 3115, 3042, 3115, 24}
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 \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))}dx\) |
\(\Big \downarrow \) 4005 |
\(\displaystyle \frac {\int \cos ^4(e+f x) (c-i c \tan (e+f x))dx}{a^2 c^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {c-i c \tan (e+f x)}{\sec (e+f x)^4}dx}{a^2 c^2}\) |
\(\Big \downarrow \) 3967 |
\(\displaystyle \frac {c \int \cos ^4(e+f x)dx+\frac {i c \cos ^4(e+f x)}{4 f}}{a^2 c^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {c \int \sin \left (e+f x+\frac {\pi }{2}\right )^4dx+\frac {i c \cos ^4(e+f x)}{4 f}}{a^2 c^2}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {c \left (\frac {3}{4} \int \cos ^2(e+f x)dx+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 f}\right )+\frac {i c \cos ^4(e+f x)}{4 f}}{a^2 c^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {c \left (\frac {3}{4} \int \sin \left (e+f x+\frac {\pi }{2}\right )^2dx+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 f}\right )+\frac {i c \cos ^4(e+f x)}{4 f}}{a^2 c^2}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {c \left (\frac {3}{4} \left (\frac {\int 1dx}{2}+\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 f}\right )+\frac {i c \cos ^4(e+f x)}{4 f}}{a^2 c^2}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {c \left (\frac {\sin (e+f x) \cos ^3(e+f x)}{4 f}+\frac {3}{4} \left (\frac {\sin (e+f x) \cos (e+f x)}{2 f}+\frac {x}{2}\right )\right )+\frac {i c \cos ^4(e+f x)}{4 f}}{a^2 c^2}\) |
Input:
Int[1/((a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])),x]
Output:
(((I/4)*c*Cos[e + f*x]^4)/f + c*((Cos[e + f*x]^3*Sin[e + f*x])/(4*f) + (3* (x/2 + (Cos[e + f*x]*Sin[e + f*x])/(2*f)))/4))/(a^2*c^2)
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
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]))
Time = 0.19 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.84
method | result | size |
risch | \(\frac {3 x}{8 a^{2} c}+\frac {i {\mathrm e}^{-4 i \left (f x +e \right )}}{32 a^{2} c f}+\frac {i \cos \left (2 f x +2 e \right )}{8 a^{2} c f}+\frac {\sin \left (2 f x +2 e \right )}{4 a^{2} c f}\) | \(73\) |
derivativedivides | \(\frac {3 \arctan \left (\tan \left (f x +e \right )\right )}{8 f \,a^{2} c}-\frac {i}{8 f \,a^{2} c \left (-i+\tan \left (f x +e \right )\right )^{2}}+\frac {1}{4 f \,a^{2} c \left (-i+\tan \left (f x +e \right )\right )}+\frac {1}{8 f \,a^{2} c \left (i+\tan \left (f x +e \right )\right )}\) | \(87\) |
default | \(\frac {3 \arctan \left (\tan \left (f x +e \right )\right )}{8 f \,a^{2} c}-\frac {i}{8 f \,a^{2} c \left (-i+\tan \left (f x +e \right )\right )^{2}}+\frac {1}{4 f \,a^{2} c \left (-i+\tan \left (f x +e \right )\right )}+\frac {1}{8 f \,a^{2} c \left (i+\tan \left (f x +e \right )\right )}\) | \(87\) |
norman | \(\frac {\frac {3 x}{8 a c}+\frac {5 \tan \left (f x +e \right )}{8 a c f}+\frac {3 \tan \left (f x +e \right )^{3}}{8 a c f}+\frac {3 x \tan \left (f x +e \right )^{2}}{4 a c}+\frac {3 x \tan \left (f x +e \right )^{4}}{8 a c}+\frac {i}{4 a c f}}{a \left (1+\tan \left (f x +e \right )^{2}\right )^{2}}\) | \(109\) |
Input:
int(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e)),x,method=_RETURNVERBOSE)
Output:
3/8*x/a^2/c+1/32*I/a^2/c/f*exp(-4*I*(f*x+e))+1/8*I/a^2/c/f*cos(2*f*x+2*e)+ 1/4/a^2/c/f*sin(2*f*x+2*e)
Time = 0.10 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.66 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))} \, dx=\frac {{\left (12 \, f x e^{\left (4 i \, f x + 4 i \, e\right )} - 2 i \, e^{\left (6 i \, f x + 6 i \, e\right )} + 6 i \, e^{\left (2 i \, f x + 2 i \, e\right )} + i\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{32 \, a^{2} c f} \] Input:
integrate(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e)),x, algorithm="fricas")
Output:
1/32*(12*f*x*e^(4*I*f*x + 4*I*e) - 2*I*e^(6*I*f*x + 6*I*e) + 6*I*e^(2*I*f* x + 2*I*e) + I)*e^(-4*I*f*x - 4*I*e)/(a^2*c*f)
Time = 0.23 (sec) , antiderivative size = 178, normalized size of antiderivative = 2.05 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))} \, dx=\begin {cases} \frac {\left (- 512 i a^{4} c^{2} f^{2} e^{8 i e} e^{2 i f x} + 1536 i a^{4} c^{2} f^{2} e^{4 i e} e^{- 2 i f x} + 256 i a^{4} c^{2} f^{2} e^{2 i e} e^{- 4 i f x}\right ) e^{- 6 i e}}{8192 a^{6} c^{3} f^{3}} & \text {for}\: a^{6} c^{3} f^{3} e^{6 i e} \neq 0 \\x \left (\frac {\left (e^{6 i e} + 3 e^{4 i e} + 3 e^{2 i e} + 1\right ) e^{- 4 i e}}{8 a^{2} c} - \frac {3}{8 a^{2} c}\right ) & \text {otherwise} \end {cases} + \frac {3 x}{8 a^{2} c} \] Input:
integrate(1/(a+I*a*tan(f*x+e))**2/(c-I*c*tan(f*x+e)),x)
Output:
Piecewise(((-512*I*a**4*c**2*f**2*exp(8*I*e)*exp(2*I*f*x) + 1536*I*a**4*c* *2*f**2*exp(4*I*e)*exp(-2*I*f*x) + 256*I*a**4*c**2*f**2*exp(2*I*e)*exp(-4* I*f*x))*exp(-6*I*e)/(8192*a**6*c**3*f**3), Ne(a**6*c**3*f**3*exp(6*I*e), 0 )), (x*((exp(6*I*e) + 3*exp(4*I*e) + 3*exp(2*I*e) + 1)*exp(-4*I*e)/(8*a**2 *c) - 3/(8*a**2*c)), True)) + 3*x/(8*a**2*c)
Exception generated. \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e)),x, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati ve exponent.
Time = 0.51 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.06 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))} \, dx=\frac {3 i \, \log \left (\tan \left (f x + e\right ) + i\right )}{16 \, a^{2} c f} - \frac {3 i \, \log \left (\tan \left (f x + e\right ) - i\right )}{16 \, a^{2} c f} + \frac {i \, {\left (-3 i \, \tan \left (f x + e\right )^{2} - 3 \, \tan \left (f x + e\right ) - 2 i\right )}}{8 \, a^{2} c f {\left (\tan \left (f x + e\right ) + i\right )} {\left (\tan \left (f x + e\right ) - i\right )}^{2}} \] Input:
integrate(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e)),x, algorithm="giac")
Output:
3/16*I*log(tan(f*x + e) + I)/(a^2*c*f) - 3/16*I*log(tan(f*x + e) - I)/(a^2 *c*f) + 1/8*I*(-3*I*tan(f*x + e)^2 - 3*tan(f*x + e) - 2*I)/(a^2*c*f*(tan(f *x + e) + I)*(tan(f*x + e) - I)^2)
Time = 1.86 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.76 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))} \, dx=\frac {3\,x}{8\,a^2\,c}-\frac {\frac {3\,{\mathrm {tan}\left (e+f\,x\right )}^2}{8}-\frac {\mathrm {tan}\left (e+f\,x\right )\,3{}\mathrm {i}}{8}+\frac {1}{4}}{a^2\,c\,f\,{\left (1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^2\,\left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )} \] Input:
int(1/((a + a*tan(e + f*x)*1i)^2*(c - c*tan(e + f*x)*1i)),x)
Output:
(3*x)/(8*a^2*c) - ((3*tan(e + f*x)^2)/8 - (tan(e + f*x)*3i)/8 + 1/4)/(a^2* c*f*(tan(e + f*x)*1i + 1)^2*(tan(e + f*x) + 1i))
\[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))} \, dx=\frac {\int \frac {1}{\tan \left (f x +e \right )^{3} i +\tan \left (f x +e \right )^{2}+\tan \left (f x +e \right ) i +1}d x}{a^{2} c} \] Input:
int(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e)),x)
Output:
int(1/(tan(e + f*x)**3*i + tan(e + f*x)**2 + tan(e + f*x)*i + 1),x)/(a**2* c)