Integrand size = 31, antiderivative size = 101 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^2} \, dx=\frac {3 x}{8 a c^2}-\frac {i}{8 a f (c-i c \tan (e+f x))^2}-\frac {i}{4 a f \left (c^2-i c^2 \tan (e+f x)\right )}+\frac {i}{8 a f \left (c^2+i c^2 \tan (e+f x)\right )} \] Output:
3/8*x/a/c^2-1/8*I/a/f/(c-I*c*tan(f*x+e))^2-1/4*I/a/f/(c^2-I*c^2*tan(f*x+e) )+1/8*I/a/f/(c^2+I*c^2*tan(f*x+e))
Time = 0.57 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.89 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^2} \, 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)) (i+\tan (e+f x))^2}{8 a c^2 f (-i+\tan (e+f x)) (i+\tan (e+f x))^2} \] Input:
Integrate[1/((a + I*a*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^2),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])*(I + Tan[e + f*x])^2)/(8*a*c^2*f*(-I + Tan[e + f*x])*(I + Ta n[e + f*x])^2)
Time = 0.39 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.95, 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, 54, 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 \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^2}dx\) |
\(\Big \downarrow \) 4005 |
\(\displaystyle \frac {\int \frac {\cos ^2(e+f x)}{c-i c \tan (e+f x)}dx}{a c}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {1}{\sec (e+f x)^2 (c-i c \tan (e+f x))}dx}{a c}\) |
\(\Big \downarrow \) 3968 |
\(\displaystyle \frac {i c^2 \int \frac {1}{(c-i c \tan (e+f x))^3 (i \tan (e+f x) c+c)^2}d(-i c \tan (e+f x))}{a f}\) |
\(\Big \downarrow \) 54 |
\(\displaystyle \frac {i c^2 \int \left (\frac {1}{4 c^3 (c-i c \tan (e+f x))^2}+\frac {1}{8 c^3 (i \tan (e+f x) c+c)^2}+\frac {1}{4 c^2 (c-i c \tan (e+f x))^3}+\frac {3}{8 c^3 \left (\tan ^2(e+f x) c^2+c^2\right )}\right )d(-i c \tan (e+f x))}{a f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {i c^2 \left (-\frac {3 i \arctan (\tan (e+f x))}{8 c^4}-\frac {1}{4 c^3 (c-i c \tan (e+f x))}+\frac {1}{8 c^3 (c+i c \tan (e+f x))}-\frac {1}{8 c^2 (c-i c \tan (e+f x))^2}\right )}{a f}\) |
Input:
Int[1/((a + I*a*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^2),x]
Output:
(I*c^2*((((-3*I)/8)*ArcTan[Tan[e + f*x]])/c^4 - 1/(8*c^2*(c - I*c*Tan[e + f*x])^2) - 1/(4*c^3*(c - I*c*Tan[e + f*x])) + 1/(8*c^3*(c + I*c*Tan[e + f* x]))))/(a*f)
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[E xpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[m, 0] && IntegerQ[n] && !(IGtQ[n, 0] && LtQ[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.19 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.72
method | result | size |
risch | \(\frac {3 x}{8 a \,c^{2}}-\frac {i {\mathrm e}^{4 i \left (f x +e \right )}}{32 a \,c^{2} f}-\frac {i \cos \left (2 f x +2 e \right )}{8 a \,c^{2} f}+\frac {\sin \left (2 f x +2 e \right )}{4 a \,c^{2} f}\) | \(73\) |
derivativedivides | \(\frac {i}{8 f a \,c^{2} \left (i+\tan \left (f x +e \right )\right )^{2}}+\frac {3 \arctan \left (\tan \left (f x +e \right )\right )}{8 f a \,c^{2}}+\frac {1}{4 f a \,c^{2} \left (i+\tan \left (f x +e \right )\right )}+\frac {1}{8 f a \,c^{2} \left (-i+\tan \left (f x +e \right )\right )}\) | \(87\) |
default | \(\frac {i}{8 f a \,c^{2} \left (i+\tan \left (f x +e \right )\right )^{2}}+\frac {3 \arctan \left (\tan \left (f x +e \right )\right )}{8 f a \,c^{2}}+\frac {1}{4 f a \,c^{2} \left (i+\tan \left (f x +e \right )\right )}+\frac {1}{8 f a \,c^{2} \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}}{\left (1+\tan \left (f x +e \right )^{2}\right )^{2} c}\) | \(109\) |
Input:
int(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))^2,x,method=_RETURNVERBOSE)
Output:
3/8*x/a/c^2-1/32*I/a/c^2/f*exp(4*I*(f*x+e))-1/8*I/a/c^2/f*cos(2*f*x+2*e)+1 /4/a/c^2/f*sin(2*f*x+2*e)
Time = 0.07 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.56 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^2} \, dx=\frac {{\left (12 \, f x e^{\left (2 i \, f x + 2 i \, e\right )} - i \, e^{\left (6 i \, f x + 6 i \, e\right )} - 6 i \, e^{\left (4 i \, f x + 4 i \, e\right )} + 2 i\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{32 \, a c^{2} f} \] Input:
integrate(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))^2,x, algorithm="fricas")
Output:
1/32*(12*f*x*e^(2*I*f*x + 2*I*e) - I*e^(6*I*f*x + 6*I*e) - 6*I*e^(4*I*f*x + 4*I*e) + 2*I)*e^(-2*I*f*x - 2*I*e)/(a*c^2*f)
Time = 0.20 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.70 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^2} \, dx=\begin {cases} \frac {\left (- 256 i a^{2} c^{4} f^{2} e^{6 i e} e^{4 i f x} - 1536 i a^{2} c^{4} f^{2} e^{4 i e} e^{2 i f x} + 512 i a^{2} c^{4} f^{2} e^{- 2 i f x}\right ) e^{- 2 i e}}{8192 a^{3} c^{6} f^{3}} & \text {for}\: a^{3} c^{6} f^{3} e^{2 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^{- 2 i e}}{8 a c^{2}} - \frac {3}{8 a c^{2}}\right ) & \text {otherwise} \end {cases} + \frac {3 x}{8 a c^{2}} \] Input:
integrate(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))**2,x)
Output:
Piecewise(((-256*I*a**2*c**4*f**2*exp(6*I*e)*exp(4*I*f*x) - 1536*I*a**2*c* *4*f**2*exp(4*I*e)*exp(2*I*f*x) + 512*I*a**2*c**4*f**2*exp(-2*I*f*x))*exp( -2*I*e)/(8192*a**3*c**6*f**3), Ne(a**3*c**6*f**3*exp(2*I*e), 0)), (x*((exp (6*I*e) + 3*exp(4*I*e) + 3*exp(2*I*e) + 1)*exp(-2*I*e)/(8*a*c**2) - 3/(8*a *c**2)), True)) + 3*x/(8*a*c**2)
Exception generated. \[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^2} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))^2,x, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati ve exponent.
Time = 0.47 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.91 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^2} \, dx=\frac {3 i \, \log \left (\tan \left (f x + e\right ) + i\right )}{16 \, a c^{2} f} - \frac {3 i \, \log \left (\tan \left (f x + e\right ) - i\right )}{16 \, a c^{2} 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 c^{2} f {\left (\tan \left (f x + e\right ) + i\right )}^{2} {\left (\tan \left (f x + e\right ) - i\right )}} \] Input:
integrate(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))^2,x, algorithm="giac")
Output:
3/16*I*log(tan(f*x + e) + I)/(a*c^2*f) - 3/16*I*log(tan(f*x + e) - I)/(a*c ^2*f) - 1/8*I*(3*I*tan(f*x + e)^2 - 3*tan(f*x + e) + 2*I)/(a*c^2*f*(tan(f* x + e) + I)^2*(tan(f*x + e) - I))
Time = 1.88 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.65 \[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^2} \, dx=\frac {3\,x}{8\,a\,c^2}+\frac {\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,3{}\mathrm {i}}{8}-\frac {3\,\mathrm {tan}\left (e+f\,x\right )}{8}+\frac {1}{4}{}\mathrm {i}}{a\,c^2\,f\,\left (1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )\,{\left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}^2} \] Input:
int(1/((a + a*tan(e + f*x)*1i)*(c - c*tan(e + f*x)*1i)^2),x)
Output:
(3*x)/(8*a*c^2) + ((tan(e + f*x)^2*3i)/8 - (3*tan(e + f*x))/8 + 1i/4)/(a*c ^2*f*(tan(e + f*x)*1i + 1)*(tan(e + f*x) + 1i)^2)
\[ \int \frac {1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^2} \, 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 \,c^{2}} \] Input:
int(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))^2,x)
Output:
( - int(1/(tan(e + f*x)**3*i - tan(e + f*x)**2 + tan(e + f*x)*i - 1),x))/( a*c**2)