\(\int e^{c (a+b x)} \cot ^2(d+e x) \, dx\) [23]

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

Optimal result

Integrand size = 18, antiderivative size = 126 \[ \int e^{c (a+b x)} \cot ^2(d+e x) \, dx=-\frac {e^{c (a+b x)}}{b c}+\frac {4 e^{c (a+b x)} \operatorname {Hypergeometric2F1}\left (1,-\frac {i b c}{2 e},1-\frac {i b c}{2 e},e^{2 i (d+e x)}\right )}{b c}-\frac {4 e^{c (a+b x)} \operatorname {Hypergeometric2F1}\left (2,-\frac {i b c}{2 e},1-\frac {i b c}{2 e},e^{2 i (d+e x)}\right )}{b c} \] Output:

-exp(c*(b*x+a))/b/c+4*exp(c*(b*x+a))*hypergeom([1, -1/2*I*b*c/e],[1-1/2*I* 
b*c/e],exp(2*I*(e*x+d)))/b/c-4*exp(c*(b*x+a))*hypergeom([2, -1/2*I*b*c/e], 
[1-1/2*I*b*c/e],exp(2*I*(e*x+d)))/b/c
 

Mathematica [A] (verified)

Time = 1.12 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.36 \[ \int e^{c (a+b x)} \cot ^2(d+e x) \, dx=e^{c (a+b x)} \left (-\frac {1}{b c}+\frac {2 e^{2 i d} \left (i b c e^{2 i e x} \operatorname {Hypergeometric2F1}\left (1,1-\frac {i b c}{2 e},2-\frac {i b c}{2 e},e^{2 i (d+e x)}\right )+(-i b c+2 e) \operatorname {Hypergeometric2F1}\left (1,-\frac {i b c}{2 e},1-\frac {i b c}{2 e},e^{2 i (d+e x)}\right )\right )}{(b c+2 i e) e \left (-1+e^{2 i d}\right )}+\frac {\csc (d) \csc (d+e x) \sin (e x)}{e}\right ) \] Input:

Integrate[E^(c*(a + b*x))*Cot[d + e*x]^2,x]
 

Output:

E^(c*(a + b*x))*(-(1/(b*c)) + (2*E^((2*I)*d)*(I*b*c*E^((2*I)*e*x)*Hypergeo 
metric2F1[1, 1 - ((I/2)*b*c)/e, 2 - ((I/2)*b*c)/e, E^((2*I)*(d + e*x))] + 
((-I)*b*c + 2*e)*Hypergeometric2F1[1, ((-1/2*I)*b*c)/e, 1 - ((I/2)*b*c)/e, 
 E^((2*I)*(d + e*x))]))/((b*c + (2*I)*e)*e*(-1 + E^((2*I)*d))) + (Csc[d]*C 
sc[d + e*x]*Sin[e*x])/e)
 

Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {4943, 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 e^{c (a+b x)} \cot ^2(d+e x) \, dx\)

\(\Big \downarrow \) 4943

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {4 e^{c (a+b x)} \operatorname {Hypergeometric2F1}\left (1,-\frac {i b c}{2 e},1-\frac {i b c}{2 e},e^{2 i (d+e x)}\right )}{b c}-\frac {4 e^{c (a+b x)} \operatorname {Hypergeometric2F1}\left (2,-\frac {i b c}{2 e},1-\frac {i b c}{2 e},e^{2 i (d+e x)}\right )}{b c}-\frac {e^{c (a+b x)}}{b c}\)

Input:

Int[E^(c*(a + b*x))*Cot[d + e*x]^2,x]
 

Output:

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

Defintions of rubi rules used

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

rule 4943
Int[Cot[(d_.) + (e_.)*(x_)]^(n_.)*(F_)^((c_.)*((a_.) + (b_.)*(x_))), x_Symb 
ol] :> Simp[(-I)^n   Int[ExpandIntegrand[F^(c*(a + b*x))*((1 + E^(2*I*(d + 
e*x)))^n/(1 - E^(2*I*(d + e*x)))^n), x], x], x] /; FreeQ[{F, a, b, c, d, e} 
, x] && IntegerQ[n]
 
Maple [F]

\[\int {\mathrm e}^{c \left (b x +a \right )} \cot \left (e x +d \right )^{2}d x\]

Input:

int(exp(c*(b*x+a))*cot(e*x+d)^2,x)
 

Output:

int(exp(c*(b*x+a))*cot(e*x+d)^2,x)
 

Fricas [F]

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

integrate(exp(c*(b*x+a))*cot(e*x+d)^2,x, algorithm="fricas")
 

Output:

integral(cot(e*x + d)^2*e^(b*c*x + a*c), x)
 

Sympy [F]

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

integrate(exp(c*(b*x+a))*cot(e*x+d)**2,x)
 

Output:

exp(a*c)*Integral(exp(b*c*x)*cot(d + e*x)**2, x)
 

Maxima [F]

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

integrate(exp(c*(b*x+a))*cot(e*x+d)^2,x, algorithm="maxima")
 

Output:

-(e*cos(2*e*x + 2*d)^2*e^(b*c*x + a*c) + 2*b*c*e^(b*c*x + a*c)*sin(2*e*x + 
 2*d) + e*e^(b*c*x + a*c)*sin(2*e*x + 2*d)^2 - 2*e*cos(2*e*x + 2*d)*e^(b*c 
*x + a*c) + e*e^(b*c*x + a*c) + (b^2*c^2*e^2*cos(2*e*x + 2*d)^2 + b^2*c^2* 
e^2*sin(2*e*x + 2*d)^2 - 2*b^2*c^2*e^2*cos(2*e*x + 2*d) + b^2*c^2*e^2)*int 
egrate(e^(b*c*x + a*c)*sin(e*x + d)/(e^2*cos(e*x + d)^2 + e^2*sin(e*x + d) 
^2 + 2*e^2*cos(e*x + d) + e^2), x) - (b^2*c^2*e^2*cos(2*e*x + 2*d)^2 + b^2 
*c^2*e^2*sin(2*e*x + 2*d)^2 - 2*b^2*c^2*e^2*cos(2*e*x + 2*d) + b^2*c^2*e^2 
)*integrate(e^(b*c*x + a*c)*sin(e*x + d)/(e^2*cos(e*x + d)^2 + e^2*sin(e*x 
 + d)^2 - 2*e^2*cos(e*x + d) + e^2), x))/(b*c*e*cos(2*e*x + 2*d)^2 + b*c*e 
*sin(2*e*x + 2*d)^2 - 2*b*c*e*cos(2*e*x + 2*d) + b*c*e)
 

Giac [F]

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

integrate(exp(c*(b*x+a))*cot(e*x+d)^2,x, algorithm="giac")
 

Output:

integrate(cot(e*x + d)^2*e^((b*x + a)*c), x)
 

Mupad [F(-1)]

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

int(cot(d + e*x)^2*exp(c*(a + b*x)),x)
 

Output:

int(cot(d + e*x)^2*exp(c*(a + b*x)), x)
 

Reduce [F]

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

int(exp(c*(b*x+a))*cot(e*x+d)^2,x)
 

Output:

e**(a*c)*int(e**(b*c*x)*cot(d + e*x)**2,x)