\(\int \frac {(c+d x)^m}{(a+i a \cot (e+f x))^2} \, dx\) [35]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 23, antiderivative size = 171 \[ \int \frac {(c+d x)^m}{(a+i a \cot (e+f x))^2} \, dx=\frac {(c+d x)^{1+m}}{4 a^2 d (1+m)}+\frac {i 2^{-2-m} e^{2 i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {2 i f (c+d x)}{d}\right )}{a^2 f}-\frac {i 4^{-2-m} e^{4 i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {4 i f (c+d x)}{d}\right )}{a^2 f} \] Output:

1/4*(d*x+c)^(1+m)/a^2/d/(1+m)+I*2^(-2-m)*exp(2*I*(e-c*f/d))*(d*x+c)^m*GAMM 
A(1+m,-2*I*f*(d*x+c)/d)/a^2/f/((-I*f*(d*x+c)/d)^m)-I*4^(-2-m)*exp(4*I*(e-c 
*f/d))*(d*x+c)^m*GAMMA(1+m,-4*I*f*(d*x+c)/d)/a^2/f/((-I*f*(d*x+c)/d)^m)
 

Mathematica [A] (verified)

Time = 2.90 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.89 \[ \int \frac {(c+d x)^m}{(a+i a \cot (e+f x))^2} \, dx=\frac {(c+d x)^m \left (\frac {4 f (c+d x)}{d (1+m)}+i 2^{2-m} e^{2 i \left (e-\frac {c f}{d}\right )} \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {2 i f (c+d x)}{d}\right )-i 4^{-m} e^{4 i \left (e-\frac {c f}{d}\right )} \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {4 i f (c+d x)}{d}\right )\right )}{16 a^2 f} \] Input:

Integrate[(c + d*x)^m/(a + I*a*Cot[e + f*x])^2,x]
 

Output:

((c + d*x)^m*((4*f*(c + d*x))/(d*(1 + m)) + (I*2^(2 - m)*E^((2*I)*(e - (c* 
f)/d))*Gamma[1 + m, ((-2*I)*f*(c + d*x))/d])/(((-I)*f*(c + d*x))/d)^m - (I 
*E^((4*I)*(e - (c*f)/d))*Gamma[1 + m, ((-4*I)*f*(c + d*x))/d])/(4^m*(((-I) 
*f*(c + d*x))/d)^m)))/(16*a^2*f)
 

Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 171, 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.130, Rules used = {3042, 4212, 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)^m}{(a+i a \cot (e+f x))^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(c+d x)^m}{\left (a-i a \tan \left (e+f x+\frac {\pi }{2}\right )\right )^2}dx\)

\(\Big \downarrow \) 4212

\(\displaystyle \int \left (-\frac {e^{2 i e+2 i f x} (c+d x)^m}{2 a^2}+\frac {e^{4 i e+4 i f x} (c+d x)^m}{4 a^2}+\frac {(c+d x)^m}{4 a^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {i 2^{-m-2} e^{2 i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,-\frac {2 i f (c+d x)}{d}\right )}{a^2 f}-\frac {i 4^{-m-2} e^{4 i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,-\frac {4 i f (c+d x)}{d}\right )}{a^2 f}+\frac {(c+d x)^{m+1}}{4 a^2 d (m+1)}\)

Input:

Int[(c + d*x)^m/(a + I*a*Cot[e + f*x])^2,x]
 

Output:

(c + d*x)^(1 + m)/(4*a^2*d*(1 + m)) + (I*2^(-2 - m)*E^((2*I)*(e - (c*f)/d) 
)*(c + d*x)^m*Gamma[1 + m, ((-2*I)*f*(c + d*x))/d])/(a^2*f*(((-I)*f*(c + d 
*x))/d)^m) - (I*4^(-2 - m)*E^((4*I)*(e - (c*f)/d))*(c + d*x)^m*Gamma[1 + m 
, ((-4*I)*f*(c + d*x))/d])/(a^2*f*(((-I)*f*(c + d*x))/d)^m)
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4212
Int[((c_.) + (d_.)*(x_))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), 
x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (1/(2*a) + E^(2*(a/b)*(e + f* 
x))/(2*a))^(-n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 + b^2 
, 0] && ILtQ[n, 0]
 
Maple [F]

\[\int \frac {\left (d x +c \right )^{m}}{\left (a +i a \cot \left (f x +e \right )\right )^{2}}d x\]

Input:

int((d*x+c)^m/(a+I*a*cot(f*x+e))^2,x)
 

Output:

int((d*x+c)^m/(a+I*a*cot(f*x+e))^2,x)
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 144, normalized size of antiderivative = 0.84 \[ \int \frac {(c+d x)^m}{(a+i a \cot (e+f x))^2} \, dx=-\frac {4 \, {\left (-i \, d m - i \, d\right )} e^{\left (-\frac {d m \log \left (-\frac {2 i \, f}{d}\right ) - 2 i \, d e + 2 i \, c f}{d}\right )} \Gamma \left (m + 1, -\frac {2 \, {\left (i \, d f x + i \, c f\right )}}{d}\right ) - {\left (-i \, d m - i \, d\right )} e^{\left (-\frac {d m \log \left (-\frac {4 i \, f}{d}\right ) - 4 i \, d e + 4 i \, c f}{d}\right )} \Gamma \left (m + 1, -\frac {4 \, {\left (i \, d f x + i \, c f\right )}}{d}\right ) - 4 \, {\left (d f x + c f\right )} {\left (d x + c\right )}^{m}}{16 \, {\left (a^{2} d f m + a^{2} d f\right )}} \] Input:

integrate((d*x+c)^m/(a+I*a*cot(f*x+e))^2,x, algorithm="fricas")
 

Output:

-1/16*(4*(-I*d*m - I*d)*e^(-(d*m*log(-2*I*f/d) - 2*I*d*e + 2*I*c*f)/d)*gam 
ma(m + 1, -2*(I*d*f*x + I*c*f)/d) - (-I*d*m - I*d)*e^(-(d*m*log(-4*I*f/d) 
- 4*I*d*e + 4*I*c*f)/d)*gamma(m + 1, -4*(I*d*f*x + I*c*f)/d) - 4*(d*f*x + 
c*f)*(d*x + c)^m)/(a^2*d*f*m + a^2*d*f)
 

Sympy [F]

\[ \int \frac {(c+d x)^m}{(a+i a \cot (e+f x))^2} \, dx=- \frac {\int \frac {\left (c + d x\right )^{m}}{\cot ^{2}{\left (e + f x \right )} - 2 i \cot {\left (e + f x \right )} - 1}\, dx}{a^{2}} \] Input:

integrate((d*x+c)**m/(a+I*a*cot(f*x+e))**2,x)
 

Output:

-Integral((c + d*x)**m/(cot(e + f*x)**2 - 2*I*cot(e + f*x) - 1), x)/a**2
 

Maxima [F]

\[ \int \frac {(c+d x)^m}{(a+i a \cot (e+f x))^2} \, dx=\int { \frac {{\left (d x + c\right )}^{m}}{{\left (i \, a \cot \left (f x + e\right ) + a\right )}^{2}} \,d x } \] Input:

integrate((d*x+c)^m/(a+I*a*cot(f*x+e))^2,x, algorithm="maxima")
 

Output:

1/4*((d*m + d)*integrate((d*x + c)^m*cos(4*f*x + 4*e), x) - 2*(d*m + d)*in 
tegrate((d*x + c)^m*cos(2*f*x + 2*e), x) + (I*d*m + I*d)*integrate((d*x + 
c)^m*sin(4*f*x + 4*e), x) - 2*(I*d*m + I*d)*integrate((d*x + c)^m*sin(2*f* 
x + 2*e), x) + e^(m*log(d*x + c) + log(d*x + c)))/(a^2*d*m + a^2*d)
 

Giac [F]

\[ \int \frac {(c+d x)^m}{(a+i a \cot (e+f x))^2} \, dx=\int { \frac {{\left (d x + c\right )}^{m}}{{\left (i \, a \cot \left (f x + e\right ) + a\right )}^{2}} \,d x } \] Input:

integrate((d*x+c)^m/(a+I*a*cot(f*x+e))^2,x, algorithm="giac")
 

Output:

integrate((d*x + c)^m/(I*a*cot(f*x + e) + a)^2, x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(c+d x)^m}{(a+i a \cot (e+f x))^2} \, dx=\int \frac {{\left (c+d\,x\right )}^m}{{\left (a+a\,\mathrm {cot}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^2} \,d x \] Input:

int((c + d*x)^m/(a + a*cot(e + f*x)*1i)^2,x)
 

Output:

int((c + d*x)^m/(a + a*cot(e + f*x)*1i)^2, x)
 

Reduce [F]

\[ \int \frac {(c+d x)^m}{(a+i a \cot (e+f x))^2} \, dx=-\frac {\int \frac {\left (d x +c \right )^{m}}{\cot \left (f x +e \right )^{2}-2 \cot \left (f x +e \right ) i -1}d x}{a^{2}} \] Input:

int((d*x+c)^m/(a+I*a*cot(f*x+e))^2,x)
 

Output:

( - int((c + d*x)**m/(cot(e + f*x)**2 - 2*cot(e + f*x)*i - 1),x))/a**2