\(\int e^{2 (a+i b x)} \csc ^2(d+b x) \sec (d+b x) \, dx\) [69]

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

Optimal result

Integrand size = 27, antiderivative size = 106 \[ \int e^{2 (a+i b x)} \csc ^2(d+b x) \sec (d+b x) \, dx=\frac {2 i e^{2 (a-i d)+i (d+b x)}}{b \left (1-e^{2 i (d+b x)}\right )}+\frac {2 i e^{2 a-2 i d} \arctan \left (e^{i (d+b x)}\right )}{b}-\frac {4 i e^{2 a-2 i d} \text {arctanh}\left (e^{i (d+b x)}\right )}{b} \] Output:

2*I*exp(2*a-2*I*d+I*(b*x+d))/b/(1-exp(2*I*(b*x+d)))+2*I*exp(2*a-2*I*d)*arc 
tan(exp(I*(b*x+d)))/b-4*I*exp(2*a-2*I*d)*arctanh(exp(I*(b*x+d)))/b
 

Mathematica [A] (verified)

Time = 0.37 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.87 \[ \int e^{2 (a+i b x)} \csc ^2(d+b x) \sec (d+b x) \, dx=-\frac {2 i e^{2 a-2 i d} \left (\frac {e^{i (d+b x)}}{-1+e^{2 i (d+b x)}}-\arctan \left (e^{i (d+b x)}\right )-\log \left (1-e^{i (d+b x)}\right )+\log \left (1+e^{i (d+b x)}\right )\right )}{b} \] Input:

Integrate[E^(2*(a + I*b*x))*Csc[d + b*x]^2*Sec[d + b*x],x]
 

Output:

((-2*I)*E^(2*a - (2*I)*d)*(E^(I*(d + b*x))/(-1 + E^((2*I)*(d + b*x))) - Ar 
cTan[E^(I*(d + b*x))] - Log[1 - E^(I*(d + b*x))] + Log[1 + E^(I*(d + b*x)) 
]))/b
 

Rubi [A] (verified)

Time = 0.39 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.26, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {4974, 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^{2 (a+i b x)} \csc ^2(b x+d) \sec (b x+d) \, dx\)

\(\Big \downarrow \) 4974

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 i e^{2 a-2 i d} \arctan \left (e^{i (b x+d)}\right )}{b}-\frac {4 i e^{2 a-2 i d} \text {arctanh}\left (e^{i (b x+d)}\right )}{b}+\frac {2 i e^{2 (a-i d)+i (b x+d)}}{b}+\frac {2 i e^{2 (a-i d)+3 i (b x+d)}}{b \left (1-e^{2 i (b x+d)}\right )}\)

Input:

Int[E^(2*(a + I*b*x))*Csc[d + b*x]^2*Sec[d + b*x],x]
 

Output:

((2*I)*E^(2*(a - I*d) + I*(d + b*x)))/b + ((2*I)*E^(2*(a - I*d) + (3*I)*(d 
 + b*x)))/(b*(1 - E^((2*I)*(d + b*x)))) + ((2*I)*E^(2*a - (2*I)*d)*ArcTan[ 
E^(I*(d + b*x))])/b - ((4*I)*E^(2*a - (2*I)*d)*ArcTanh[E^(I*(d + b*x))])/b
 

Defintions of rubi rules used

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

rule 4974
Int[(F_)^((c_.)*((a_.) + (b_.)*(x_)))*(G_)[(d_.) + (e_.)*(x_)]^(m_.)*(H_)[( 
d_.) + (e_.)*(x_)]^(n_.), x_Symbol] :> Int[ExpandTrigToExp[F^(c*(a + b*x)), 
 G[d + e*x]^m*H[d + e*x]^n, x], x] /; FreeQ[{F, a, b, c, d, e}, x] && IGtQ[ 
m, 0] && IGtQ[n, 0] && TrigQ[G] && TrigQ[H]
 
Maple [A] (verified)

Time = 0.85 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.01

method result size
risch \(\frac {2 i {\mathrm e}^{2 a} \left (-2 \,\operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +d \right )}\right ) {\mathrm e}^{2 i b x}+\arctan \left ({\mathrm e}^{i \left (b x +d \right )}\right ) {\mathrm e}^{2 i b x}-{\mathrm e}^{i \left (b x -d \right )}+2 \,{\mathrm e}^{-2 i d} \operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +d \right )}\right )-{\mathrm e}^{-2 i d} \arctan \left ({\mathrm e}^{i \left (b x +d \right )}\right )\right )}{\left (-1+{\mathrm e}^{2 i \left (b x +d \right )}\right ) b}\) \(107\)

Input:

int(exp(2*a+2*I*b*x)*csc(b*x+d)^2*sec(b*x+d),x,method=_RETURNVERBOSE)
 

Output:

2*I*exp(2*a)*(-2*arctanh(exp(I*(b*x+d)))*exp(2*I*b*x)+arctan(exp(I*(b*x+d) 
))*exp(2*I*b*x)-exp(I*(b*x-d))+2*exp(-2*I*d)*arctanh(exp(I*(b*x+d)))-exp(- 
2*I*d)*arctan(exp(I*(b*x+d))))/(-1+exp(2*I*(b*x+d)))/b
 

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 173 vs. \(2 (77) = 154\).

Time = 0.09 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.63 \[ \int e^{2 (a+i b x)} \csc ^2(d+b x) \sec (d+b x) \, dx=-\frac {2 \, {\left (i \, e^{\left (2 i \, b x + 2 \, a\right )} - i \, e^{\left (2 \, a - 2 i \, d\right )}\right )} \log \left (e^{\left (i \, b x + i \, d\right )} + 1\right ) + {\left (e^{\left (2 i \, b x + 2 \, a\right )} - e^{\left (2 \, a - 2 i \, d\right )}\right )} \log \left (e^{\left (i \, b x + i \, d\right )} + i\right ) - {\left (e^{\left (2 i \, b x + 2 \, a\right )} - e^{\left (2 \, a - 2 i \, d\right )}\right )} \log \left (e^{\left (i \, b x + i \, d\right )} - i\right ) + 2 \, {\left (-i \, e^{\left (2 i \, b x + 2 \, a\right )} + i \, e^{\left (2 \, a - 2 i \, d\right )}\right )} \log \left (e^{\left (i \, b x + i \, d\right )} - 1\right ) + 2 i \, e^{\left (i \, b x + 2 \, a - i \, d\right )}}{b e^{\left (2 i \, b x + 2 i \, d\right )} - b} \] Input:

integrate(exp(2*a+2*I*b*x)*csc(b*x+d)^2*sec(b*x+d),x, algorithm="fricas")
 

Output:

-(2*(I*e^(2*I*b*x + 2*a) - I*e^(2*a - 2*I*d))*log(e^(I*b*x + I*d) + 1) + ( 
e^(2*I*b*x + 2*a) - e^(2*a - 2*I*d))*log(e^(I*b*x + I*d) + I) - (e^(2*I*b* 
x + 2*a) - e^(2*a - 2*I*d))*log(e^(I*b*x + I*d) - I) + 2*(-I*e^(2*I*b*x + 
2*a) + I*e^(2*a - 2*I*d))*log(e^(I*b*x + I*d) - 1) + 2*I*e^(I*b*x + 2*a - 
I*d))/(b*e^(2*I*b*x + 2*I*d) - b)
 

Sympy [F]

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

integrate(exp(2*a+2*I*b*x)*csc(b*x+d)**2*sec(b*x+d),x)
                                                                                    
                                                                                    
 

Output:

exp(2*a)*Integral(exp(2*I*b*x)*csc(b*x + d)**2*sec(b*x + d), x)
 

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1095 vs. \(2 (77) = 154\).

Time = 0.18 (sec) , antiderivative size = 1095, normalized size of antiderivative = 10.33 \[ \int e^{2 (a+i b x)} \csc ^2(d+b x) \sec (d+b x) \, dx=\text {Too large to display} \] Input:

integrate(exp(2*a+2*I*b*x)*csc(b*x+d)^2*sec(b*x+d),x, algorithm="maxima")
 

Output:

-(2*((cos(2*d)*e^(2*a) - I*e^(2*a)*sin(2*d))*cos(2*b*x + 3*d) - (cos(d)*e^ 
(2*a) + I*e^(2*a)*sin(d))*cos(2*d) - (-I*cos(2*d)*e^(2*a) - e^(2*a)*sin(2* 
d))*sin(2*b*x + 3*d) - (-I*cos(d)*e^(2*a) + e^(2*a)*sin(d))*sin(2*d))*arct 
an2(2*(cos(b*x + 2*d)*cos(d) + sin(b*x + 2*d)*sin(d))/(cos(b*x + 2*d)^2 + 
cos(d)^2 + 2*cos(d)*sin(b*x + 2*d) + sin(b*x + 2*d)^2 - 2*cos(b*x + 2*d)*s 
in(d) + sin(d)^2), (cos(b*x + 2*d)^2 - cos(d)^2 + sin(b*x + 2*d)^2 - sin(d 
)^2)/(cos(b*x + 2*d)^2 + cos(d)^2 + 2*cos(d)*sin(b*x + 2*d) + sin(b*x + 2* 
d)^2 - 2*cos(b*x + 2*d)*sin(d) + sin(d)^2)) - 4*((I*cos(2*d)*e^(2*a) + e^( 
2*a)*sin(2*d))*cos(2*b*x + 3*d) + (-I*cos(d)*e^(2*a) + e^(2*a)*sin(d))*cos 
(2*d) - (cos(2*d)*e^(2*a) - I*e^(2*a)*sin(2*d))*sin(2*b*x + 3*d) - (cos(d) 
*e^(2*a) + I*e^(2*a)*sin(d))*sin(2*d))*arctan2(sin(b*x) + sin(d), cos(b*x) 
 - cos(d)) - 4*((-I*cos(2*d)*e^(2*a) - e^(2*a)*sin(2*d))*cos(2*b*x + 3*d) 
+ (I*cos(d)*e^(2*a) - e^(2*a)*sin(d))*cos(2*d) + (cos(2*d)*e^(2*a) - I*e^( 
2*a)*sin(2*d))*sin(2*b*x + 3*d) + (cos(d)*e^(2*a) + I*e^(2*a)*sin(d))*sin( 
2*d))*arctan2(sin(b*x) - sin(d), cos(b*x) + cos(d)) + 4*cos(b*x)*e^(2*a) + 
 2*((cos(2*d)*e^(2*a) - I*e^(2*a)*sin(2*d))*cos(2*b*x + 3*d) - (cos(d)*e^( 
2*a) + I*e^(2*a)*sin(d))*cos(2*d) - (-I*cos(2*d)*e^(2*a) - e^(2*a)*sin(2*d 
))*sin(2*b*x + 3*d) - (-I*cos(d)*e^(2*a) + e^(2*a)*sin(d))*sin(2*d))*log(c 
os(b*x)^2 + 2*cos(b*x)*cos(d) + cos(d)^2 + sin(b*x)^2 - 2*sin(b*x)*sin(d) 
+ sin(d)^2) - 2*((cos(2*d)*e^(2*a) - I*e^(2*a)*sin(2*d))*cos(2*b*x + 3*...
 

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 218 vs. \(2 (77) = 154\).

Time = 0.20 (sec) , antiderivative size = 218, normalized size of antiderivative = 2.06 \[ \int e^{2 (a+i b x)} \csc ^2(d+b x) \sec (d+b x) \, dx=\frac {-2 i \, e^{\left (2 i \, b x + 2 \, a\right )} \log \left (e^{\left (i \, b x + i \, d\right )} + 1\right ) + 2 i \, e^{\left (2 \, a - 2 i \, d\right )} \log \left (e^{\left (i \, b x + i \, d\right )} + 1\right ) + 2 i \, e^{\left (2 i \, b x + 2 \, a\right )} \log \left (e^{\left (i \, b x + i \, d\right )} - 1\right ) - 2 i \, e^{\left (2 \, a - 2 i \, d\right )} \log \left (e^{\left (i \, b x + i \, d\right )} - 1\right ) - e^{\left (2 i \, b x + 2 \, a\right )} \log \left (i \, e^{\left (i \, b x + i \, d\right )} - 1\right ) + e^{\left (2 \, a - 2 i \, d\right )} \log \left (i \, e^{\left (i \, b x + i \, d\right )} - 1\right ) + e^{\left (2 i \, b x + 2 \, a\right )} \log \left (-i \, e^{\left (i \, b x + i \, d\right )} - 1\right ) - e^{\left (2 \, a - 2 i \, d\right )} \log \left (-i \, e^{\left (i \, b x + i \, d\right )} - 1\right ) - 2 i \, e^{\left (i \, b x + 2 \, a - i \, d\right )}}{b {\left (e^{\left (2 i \, b x + 2 i \, d\right )} - 1\right )}} \] Input:

integrate(exp(2*a+2*I*b*x)*csc(b*x+d)^2*sec(b*x+d),x, algorithm="giac")
 

Output:

(-2*I*e^(2*I*b*x + 2*a)*log(e^(I*b*x + I*d) + 1) + 2*I*e^(2*a - 2*I*d)*log 
(e^(I*b*x + I*d) + 1) + 2*I*e^(2*I*b*x + 2*a)*log(e^(I*b*x + I*d) - 1) - 2 
*I*e^(2*a - 2*I*d)*log(e^(I*b*x + I*d) - 1) - e^(2*I*b*x + 2*a)*log(I*e^(I 
*b*x + I*d) - 1) + e^(2*a - 2*I*d)*log(I*e^(I*b*x + I*d) - 1) + e^(2*I*b*x 
 + 2*a)*log(-I*e^(I*b*x + I*d) - 1) - e^(2*a - 2*I*d)*log(-I*e^(I*b*x + I* 
d) - 1) - 2*I*e^(I*b*x + 2*a - I*d))/(b*(e^(2*I*b*x + 2*I*d) - 1))
 

Mupad [F(-1)]

Timed out. \[ \int e^{2 (a+i b x)} \csc ^2(d+b x) \sec (d+b x) \, dx=\int \frac {{\mathrm {e}}^{2\,a+b\,x\,2{}\mathrm {i}}}{\cos \left (d+b\,x\right )\,{\sin \left (d+b\,x\right )}^2} \,d x \] Input:

int(exp(2*a + b*x*2i)/(cos(d + b*x)*sin(d + b*x)^2),x)
 

Output:

int(exp(2*a + b*x*2i)/(cos(d + b*x)*sin(d + b*x)^2), x)
 

Reduce [F]

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

int(exp(2*a+2*I*b*x)*csc(b*x+d)^2*sec(b*x+d),x)
 

Output:

e**(2*a)*int(e**(2*b*i*x)*csc(b*x + d)**2*sec(b*x + d),x)