Integrand size = 21, antiderivative size = 151 \[ \int \frac {c+d x}{(a+i a \tan (e+f x))^2} \, dx=-\frac {3 i d x}{16 a^2 f}-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}+\frac {d}{16 f^2 (a+i a \tan (e+f x))^2}+\frac {i (c+d x)}{4 f (a+i a \tan (e+f x))^2}+\frac {3 d}{16 f^2 \left (a^2+i a^2 \tan (e+f x)\right )}+\frac {i (c+d x)}{4 f \left (a^2+i a^2 \tan (e+f x)\right )} \] Output:
-3/16*I*d*x/a^2/f-1/8*d*x^2/a^2+1/4*x*(d*x+c)/a^2+1/16*d/f^2/(a+I*a*tan(f* x+e))^2+1/4*I*(d*x+c)/f/(a+I*a*tan(f*x+e))^2+3/16*d/f^2/(a^2+I*a^2*tan(f*x +e))+1/4*I*(d*x+c)/f/(a^2+I*a^2*tan(f*x+e))
Time = 0.96 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.86 \[ \int \frac {c+d x}{(a+i a \tan (e+f x))^2} \, dx=-\frac {\sec ^2(e+f x) \left (8 (d+2 i c f+2 i d f x)+\left (4 c f (i+4 f x)+d \left (1+4 i f x+8 f^2 x^2\right )\right ) \cos (2 (e+f x))+\left (4 c f (1+4 i f x)+d \left (-i+4 f x+8 i f^2 x^2\right )\right ) \sin (2 (e+f x))\right )}{64 a^2 f^2 (-i+\tan (e+f x))^2} \] Input:
Integrate[(c + d*x)/(a + I*a*Tan[e + f*x])^2,x]
Output:
-1/64*(Sec[e + f*x]^2*(8*(d + (2*I)*c*f + (2*I)*d*f*x) + (4*c*f*(I + 4*f*x ) + d*(1 + (4*I)*f*x + 8*f^2*x^2))*Cos[2*(e + f*x)] + (4*c*f*(1 + (4*I)*f* x) + d*(-I + 4*f*x + (8*I)*f^2*x^2))*Sin[2*(e + f*x)]))/(a^2*f^2*(-I + Tan [e + f*x])^2)
Time = 0.39 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 4213, 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 {c+d x}{(a+i a \tan (e+f x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {c+d x}{(a+i a \tan (e+f x))^2}dx\) |
\(\Big \downarrow \) 4213 |
\(\displaystyle -d \int \left (\frac {x}{4 a^2}+\frac {i}{4 f \left (i \tan (e+f x) a^2+a^2\right )}+\frac {i}{4 f (i \tan (e+f x) a+a)^2}\right )dx+\frac {i (c+d x)}{4 f \left (a^2+i a^2 \tan (e+f x)\right )}+\frac {x (c+d x)}{4 a^2}+\frac {i (c+d x)}{4 f (a+i a \tan (e+f x))^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {i (c+d x)}{4 f \left (a^2+i a^2 \tan (e+f x)\right )}+\frac {x (c+d x)}{4 a^2}-d \left (-\frac {3}{16 f^2 \left (a^2+i a^2 \tan (e+f x)\right )}+\frac {3 i x}{16 a^2 f}+\frac {x^2}{8 a^2}-\frac {1}{16 f^2 (a+i a \tan (e+f x))^2}\right )+\frac {i (c+d x)}{4 f (a+i a \tan (e+f x))^2}\) |
Input:
Int[(c + d*x)/(a + I*a*Tan[e + f*x])^2,x]
Output:
(x*(c + d*x))/(4*a^2) + ((I/4)*(c + d*x))/(f*(a + I*a*Tan[e + f*x])^2) + ( (I/4)*(c + d*x))/(f*(a^2 + I*a^2*Tan[e + f*x])) - d*((((3*I)/16)*x)/(a^2*f ) + x^2/(8*a^2) - 1/(16*f^2*(a + I*a*Tan[e + f*x])^2) - 3/(16*f^2*(a^2 + I *a^2*Tan[e + f*x])))
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> With[{u = IntHide[(a + b*Tan[e + f*x])^n, x]}, Simp[(c + d*x) ^m u, x] - Simp[d*m Int[(c + d*x)^(m - 1) u, x], x]] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[a^2 + b^2, 0] && ILtQ[n, -1] && GtQ[m, 0]
Time = 0.70 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.54
method | result | size |
risch | \(\frac {d \,x^{2}}{8 a^{2}}+\frac {c x}{4 a^{2}}+\frac {i \left (2 d f x +2 c f -i d \right ) {\mathrm e}^{-2 i \left (f x +e \right )}}{8 a^{2} f^{2}}+\frac {i \left (4 d f x +4 c f -i d \right ) {\mathrm e}^{-4 i \left (f x +e \right )}}{64 a^{2} f^{2}}\) | \(82\) |
Input:
int((d*x+c)/(a+I*a*tan(f*x+e))^2,x,method=_RETURNVERBOSE)
Output:
1/8*d*x^2/a^2+1/4/a^2*c*x+1/8*I*(2*d*f*x-I*d+2*c*f)/a^2/f^2*exp(-2*I*(f*x+ e))+1/64*I*(4*d*f*x-I*d+4*c*f)/a^2/f^2*exp(-4*I*(f*x+e))
Time = 0.07 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.52 \[ \int \frac {c+d x}{(a+i a \tan (e+f x))^2} \, dx=\frac {{\left (4 i \, d f x + 4 i \, c f + 8 \, {\left (d f^{2} x^{2} + 2 \, c f^{2} x\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 8 \, {\left (-2 i \, d f x - 2 i \, c f - d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + d\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{64 \, a^{2} f^{2}} \] Input:
integrate((d*x+c)/(a+I*a*tan(f*x+e))^2,x, algorithm="fricas")
Output:
1/64*(4*I*d*f*x + 4*I*c*f + 8*(d*f^2*x^2 + 2*c*f^2*x)*e^(4*I*f*x + 4*I*e) - 8*(-2*I*d*f*x - 2*I*c*f - d)*e^(2*I*f*x + 2*I*e) + d)*e^(-4*I*f*x - 4*I* e)/(a^2*f^2)
Time = 0.22 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.50 \[ \int \frac {c+d x}{(a+i a \tan (e+f x))^2} \, dx=\begin {cases} \frac {\left (\left (32 i a^{2} c f^{3} e^{2 i e} + 32 i a^{2} d f^{3} x e^{2 i e} + 8 a^{2} d f^{2} e^{2 i e}\right ) e^{- 4 i f x} + \left (128 i a^{2} c f^{3} e^{4 i e} + 128 i a^{2} d f^{3} x e^{4 i e} + 64 a^{2} d f^{2} e^{4 i e}\right ) e^{- 2 i f x}\right ) e^{- 6 i e}}{512 a^{4} f^{4}} & \text {for}\: a^{4} f^{4} e^{6 i e} \neq 0 \\\frac {x^{2} \cdot \left (2 d e^{2 i e} + d\right ) e^{- 4 i e}}{8 a^{2}} + \frac {x \left (2 c e^{2 i e} + c\right ) e^{- 4 i e}}{4 a^{2}} & \text {otherwise} \end {cases} + \frac {c x}{4 a^{2}} + \frac {d x^{2}}{8 a^{2}} \] Input:
integrate((d*x+c)/(a+I*a*tan(f*x+e))**2,x)
Output:
Piecewise((((32*I*a**2*c*f**3*exp(2*I*e) + 32*I*a**2*d*f**3*x*exp(2*I*e) + 8*a**2*d*f**2*exp(2*I*e))*exp(-4*I*f*x) + (128*I*a**2*c*f**3*exp(4*I*e) + 128*I*a**2*d*f**3*x*exp(4*I*e) + 64*a**2*d*f**2*exp(4*I*e))*exp(-2*I*f*x) )*exp(-6*I*e)/(512*a**4*f**4), Ne(a**4*f**4*exp(6*I*e), 0)), (x**2*(2*d*ex p(2*I*e) + d)*exp(-4*I*e)/(8*a**2) + x*(2*c*exp(2*I*e) + c)*exp(-4*I*e)/(4 *a**2), True)) + c*x/(4*a**2) + d*x**2/(8*a**2)
Exception generated. \[ \int \frac {c+d x}{(a+i a \tan (e+f x))^2} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate((d*x+c)/(a+I*a*tan(f*x+e))^2,x, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati ve exponent.
Time = 0.19 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.67 \[ \int \frac {c+d x}{(a+i a \tan (e+f x))^2} \, dx=\frac {{\left (8 \, d f^{2} x^{2} e^{\left (4 i \, f x + 4 i \, e\right )} + 16 \, c f^{2} x e^{\left (4 i \, f x + 4 i \, e\right )} + 16 i \, d f x e^{\left (2 i \, f x + 2 i \, e\right )} + 4 i \, d f x + 16 i \, c f e^{\left (2 i \, f x + 2 i \, e\right )} + 4 i \, c f + 8 \, d e^{\left (2 i \, f x + 2 i \, e\right )} + d\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{64 \, a^{2} f^{2}} \] Input:
integrate((d*x+c)/(a+I*a*tan(f*x+e))^2,x, algorithm="giac")
Output:
1/64*(8*d*f^2*x^2*e^(4*I*f*x + 4*I*e) + 16*c*f^2*x*e^(4*I*f*x + 4*I*e) + 1 6*I*d*f*x*e^(2*I*f*x + 2*I*e) + 4*I*d*f*x + 16*I*c*f*e^(2*I*f*x + 2*I*e) + 4*I*c*f + 8*d*e^(2*I*f*x + 2*I*e) + d)*e^(-4*I*f*x - 4*I*e)/(a^2*f^2)
Time = 8.07 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.68 \[ \int \frac {c+d x}{(a+i a \tan (e+f x))^2} \, dx=\frac {d\,x^2}{8\,a^2}-{\mathrm {e}}^{-e\,4{}\mathrm {i}-f\,x\,4{}\mathrm {i}}\,\left (\frac {\left (-4\,c\,f+d\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{64\,a^2\,f^2}-\frac {d\,x\,1{}\mathrm {i}}{16\,a^2\,f}\right )-{\mathrm {e}}^{-e\,2{}\mathrm {i}-f\,x\,2{}\mathrm {i}}\,\left (\frac {\left (-2\,c\,f+d\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{8\,a^2\,f^2}-\frac {d\,x\,1{}\mathrm {i}}{4\,a^2\,f}\right )+\frac {c\,x}{4\,a^2} \] Input:
int((c + d*x)/(a + a*tan(e + f*x)*1i)^2,x)
Output:
(d*x^2)/(8*a^2) - exp(- e*4i - f*x*4i)*(((d*1i - 4*c*f)*1i)/(64*a^2*f^2) - (d*x*1i)/(16*a^2*f)) - exp(- e*2i - f*x*2i)*(((d*1i - 2*c*f)*1i)/(8*a^2*f ^2) - (d*x*1i)/(4*a^2*f)) + (c*x)/(4*a^2)
\[ \int \frac {c+d x}{(a+i a \tan (e+f x))^2} \, dx=\frac {-\left (\int \frac {x}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) d -\left (\int \frac {1}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) c}{a^{2}} \] Input:
int((d*x+c)/(a+I*a*tan(f*x+e))^2,x)
Output:
( - (int(x/(tan(e + f*x)**2 - 2*tan(e + f*x)*i - 1),x)*d + int(1/(tan(e + f*x)**2 - 2*tan(e + f*x)*i - 1),x)*c))/a**2