\(\int \csc ^{-1}(c e^{a+b x}) \, dx\) [40]

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

Optimal result

Integrand size = 10, antiderivative size = 85 \[ \int \csc ^{-1}\left (c e^{a+b x}\right ) \, dx=\frac {i \csc ^{-1}\left (c e^{a+b x}\right )^2}{2 b}-\frac {\csc ^{-1}\left (c e^{a+b x}\right ) \log \left (1-e^{2 i \csc ^{-1}\left (c e^{a+b x}\right )}\right )}{b}+\frac {i \operatorname {PolyLog}\left (2,e^{2 i \csc ^{-1}\left (c e^{a+b x}\right )}\right )}{2 b} \]

[Out]

1/2*I*arccsc(c*exp(b*x+a))^2/b-arccsc(c*exp(b*x+a))*ln(1-(I/c/exp(b*x+a)+(1-1/c^2/exp(b*x+a)^2)^(1/2))^2)/b+1/
2*I*polylog(2,(I/c/exp(b*x+a)+(1-1/c^2/exp(b*x+a)^2)^(1/2))^2)/b

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.700, Rules used = {2320, 5327, 4721, 3798, 2221, 2317, 2438} \[ \int \csc ^{-1}\left (c e^{a+b x}\right ) \, dx=\frac {i \operatorname {PolyLog}\left (2,e^{2 i \csc ^{-1}\left (c e^{a+b x}\right )}\right )}{2 b}+\frac {i \csc ^{-1}\left (c e^{a+b x}\right )^2}{2 b}-\frac {\csc ^{-1}\left (c e^{a+b x}\right ) \log \left (1-e^{2 i \csc ^{-1}\left (c e^{a+b x}\right )}\right )}{b} \]

[In]

Int[ArcCsc[c*E^(a + b*x)],x]

[Out]

((I/2)*ArcCsc[c*E^(a + b*x)]^2)/b - (ArcCsc[c*E^(a + b*x)]*Log[1 - E^((2*I)*ArcCsc[c*E^(a + b*x)])])/b + ((I/2
)*PolyLog[2, E^((2*I)*ArcCsc[c*E^(a + b*x)])])/b

Rule 2221

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x]
 - Dist[d*(m/(b*f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2317

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 3798

Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + Pi*(k_.) + (f_.)*(x_)], x_Symbol] :> Simp[I*((c + d*x)^(m + 1)/(d*(
m + 1))), x] - Dist[2*I, Int[(c + d*x)^m*E^(2*I*k*Pi)*(E^(2*I*(e + f*x))/(1 + E^(2*I*k*Pi)*E^(2*I*(e + f*x))))
, x], x] /; FreeQ[{c, d, e, f}, x] && IntegerQ[4*k] && IGtQ[m, 0]

Rule 4721

Int[((a_.) + ArcSin[(c_.)*(x_)]*(b_.))^(n_.)/(x_), x_Symbol] :> Subst[Int[(a + b*x)^n*Cot[x], x], x, ArcSin[c*
x]] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0]

Rule 5327

Int[((a_.) + ArcCsc[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> -Subst[Int[(a + b*ArcSin[x/c])/x, x], x, 1/x] /; Fre
eQ[{a, b, c}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\csc ^{-1}(c x)}{x} \, dx,x,e^{a+b x}\right )}{b} \\ & = -\frac {\text {Subst}\left (\int \frac {\arcsin \left (\frac {x}{c}\right )}{x} \, dx,x,e^{-a-b x}\right )}{b} \\ & = -\frac {\text {Subst}\left (\int x \cot (x) \, dx,x,\arcsin \left (\frac {e^{-a-b x}}{c}\right )\right )}{b} \\ & = \frac {i \arcsin \left (\frac {e^{-a-b x}}{c}\right )^2}{2 b}+\frac {(2 i) \text {Subst}\left (\int \frac {e^{2 i x} x}{1-e^{2 i x}} \, dx,x,\arcsin \left (\frac {e^{-a-b x}}{c}\right )\right )}{b} \\ & = \frac {i \arcsin \left (\frac {e^{-a-b x}}{c}\right )^2}{2 b}-\frac {\arcsin \left (\frac {e^{-a-b x}}{c}\right ) \log \left (1-e^{2 i \arcsin \left (\frac {e^{-a-b x}}{c}\right )}\right )}{b}+\frac {\text {Subst}\left (\int \log \left (1-e^{2 i x}\right ) \, dx,x,\arcsin \left (\frac {e^{-a-b x}}{c}\right )\right )}{b} \\ & = \frac {i \arcsin \left (\frac {e^{-a-b x}}{c}\right )^2}{2 b}-\frac {\arcsin \left (\frac {e^{-a-b x}}{c}\right ) \log \left (1-e^{2 i \arcsin \left (\frac {e^{-a-b x}}{c}\right )}\right )}{b}-\frac {i \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 i \arcsin \left (\frac {e^{-a-b x}}{c}\right )}\right )}{2 b} \\ & = \frac {i \arcsin \left (\frac {e^{-a-b x}}{c}\right )^2}{2 b}-\frac {\arcsin \left (\frac {e^{-a-b x}}{c}\right ) \log \left (1-e^{2 i \arcsin \left (\frac {e^{-a-b x}}{c}\right )}\right )}{b}+\frac {i \operatorname {PolyLog}\left (2,e^{2 i \arcsin \left (\frac {e^{-a-b x}}{c}\right )}\right )}{2 b} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(280\) vs. \(2(85)=170\).

Time = 0.42 (sec) , antiderivative size = 280, normalized size of antiderivative = 3.29 \[ \int \csc ^{-1}\left (c e^{a+b x}\right ) \, dx=x \csc ^{-1}\left (c e^{a+b x}\right )+\frac {e^{-a-b x} \left (4 \sqrt {-1+c^2 e^{2 (a+b x)}} \arctan \left (\sqrt {-1+c^2 e^{2 (a+b x)}}\right ) \left (2 b x-\log \left (c^2 e^{2 (a+b x)}\right )\right )+\sqrt {1-c^2 e^{2 (a+b x)}} \left (\log ^2\left (c^2 e^{2 (a+b x)}\right )-4 \log \left (c^2 e^{2 (a+b x)}\right ) \log \left (\frac {1}{2} \left (1+\sqrt {1-c^2 e^{2 (a+b x)}}\right )\right )+2 \log ^2\left (\frac {1}{2} \left (1+\sqrt {1-c^2 e^{2 (a+b x)}}\right )\right )\right )-4 \sqrt {1-c^2 e^{2 (a+b x)}} \operatorname {PolyLog}\left (2,\frac {1}{2} \left (1-\sqrt {1-c^2 e^{2 (a+b x)}}\right )\right )\right )}{8 b c \sqrt {1-\frac {e^{-2 (a+b x)}}{c^2}}} \]

[In]

Integrate[ArcCsc[c*E^(a + b*x)],x]

[Out]

x*ArcCsc[c*E^(a + b*x)] + (E^(-a - b*x)*(4*Sqrt[-1 + c^2*E^(2*(a + b*x))]*ArcTan[Sqrt[-1 + c^2*E^(2*(a + b*x))
]]*(2*b*x - Log[c^2*E^(2*(a + b*x))]) + Sqrt[1 - c^2*E^(2*(a + b*x))]*(Log[c^2*E^(2*(a + b*x))]^2 - 4*Log[c^2*
E^(2*(a + b*x))]*Log[(1 + Sqrt[1 - c^2*E^(2*(a + b*x))])/2] + 2*Log[(1 + Sqrt[1 - c^2*E^(2*(a + b*x))])/2]^2)
- 4*Sqrt[1 - c^2*E^(2*(a + b*x))]*PolyLog[2, (1 - Sqrt[1 - c^2*E^(2*(a + b*x))])/2]))/(8*b*c*Sqrt[1 - 1/(c^2*E
^(2*(a + b*x)))])

Maple [A] (verified)

Time = 1.85 (sec) , antiderivative size = 188, normalized size of antiderivative = 2.21

method result size
derivativedivides \(\frac {\frac {i \operatorname {arccsc}\left ({\mathrm e}^{b x +a} c \right )^{2}}{2}-\operatorname {arccsc}\left ({\mathrm e}^{b x +a} c \right ) \ln \left (1-\frac {i {\mathrm e}^{-b x -a}}{c}-\sqrt {1-\frac {{\mathrm e}^{-2 b x -2 a}}{c^{2}}}\right )+i \operatorname {polylog}\left (2, \frac {i {\mathrm e}^{-b x -a}}{c}+\sqrt {1-\frac {{\mathrm e}^{-2 b x -2 a}}{c^{2}}}\right )-\operatorname {arccsc}\left ({\mathrm e}^{b x +a} c \right ) \ln \left (1+\frac {i {\mathrm e}^{-b x -a}}{c}+\sqrt {1-\frac {{\mathrm e}^{-2 b x -2 a}}{c^{2}}}\right )+i \operatorname {polylog}\left (2, -\frac {i {\mathrm e}^{-b x -a}}{c}-\sqrt {1-\frac {{\mathrm e}^{-2 b x -2 a}}{c^{2}}}\right )}{b}\) \(188\)
default \(\frac {\frac {i \operatorname {arccsc}\left ({\mathrm e}^{b x +a} c \right )^{2}}{2}-\operatorname {arccsc}\left ({\mathrm e}^{b x +a} c \right ) \ln \left (1-\frac {i {\mathrm e}^{-b x -a}}{c}-\sqrt {1-\frac {{\mathrm e}^{-2 b x -2 a}}{c^{2}}}\right )+i \operatorname {polylog}\left (2, \frac {i {\mathrm e}^{-b x -a}}{c}+\sqrt {1-\frac {{\mathrm e}^{-2 b x -2 a}}{c^{2}}}\right )-\operatorname {arccsc}\left ({\mathrm e}^{b x +a} c \right ) \ln \left (1+\frac {i {\mathrm e}^{-b x -a}}{c}+\sqrt {1-\frac {{\mathrm e}^{-2 b x -2 a}}{c^{2}}}\right )+i \operatorname {polylog}\left (2, -\frac {i {\mathrm e}^{-b x -a}}{c}-\sqrt {1-\frac {{\mathrm e}^{-2 b x -2 a}}{c^{2}}}\right )}{b}\) \(188\)

[In]

int(arccsc(exp(b*x+a)*c),x,method=_RETURNVERBOSE)

[Out]

1/b*(1/2*I*arccsc(exp(b*x+a)*c)^2-arccsc(exp(b*x+a)*c)*ln(1-I/exp(b*x+a)/c-(1-1/c^2/exp(b*x+a)^2)^(1/2))+I*pol
ylog(2,I/c/exp(b*x+a)+(1-1/c^2/exp(b*x+a)^2)^(1/2))-arccsc(exp(b*x+a)*c)*ln(1+I/c/exp(b*x+a)+(1-1/c^2/exp(b*x+
a)^2)^(1/2))+I*polylog(2,-I/exp(b*x+a)/c-(1-1/c^2/exp(b*x+a)^2)^(1/2)))

Fricas [F(-2)]

Exception generated. \[ \int \csc ^{-1}\left (c e^{a+b x}\right ) \, dx=\text {Exception raised: TypeError} \]

[In]

integrate(arccsc(c*exp(b*x+a)),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (co
nstant residues)

Sympy [F]

\[ \int \csc ^{-1}\left (c e^{a+b x}\right ) \, dx=\int \operatorname {acsc}{\left (c e^{a + b x} \right )}\, dx \]

[In]

integrate(acsc(c*exp(b*x+a)),x)

[Out]

Integral(acsc(c*exp(a + b*x)), x)

Maxima [F]

\[ \int \csc ^{-1}\left (c e^{a+b x}\right ) \, dx=\int { \operatorname {arccsc}\left (c e^{\left (b x + a\right )}\right ) \,d x } \]

[In]

integrate(arccsc(c*exp(b*x+a)),x, algorithm="maxima")

[Out]

1/2*(2*b^2*c^2*integrate(x*e^(2*b*x + 2*a + 1/2*log(c*e^(b*x + a) + 1) + 1/2*log(c*e^(b*x + a) - 1))/(c^2*e^(2
*b*x + 2*a) + (c^2*e^(2*b*x + 2*a) - 1)*e^(log(c*e^(b*x + a) + 1) + log(c*e^(b*x + a) - 1)) - 1), x) - 2*I*b^2
*c^2*integrate(x*e^(2*b*x + 2*a)/(c^2*e^(2*b*x + 2*a) + (c^2*e^(2*b*x + 2*a) - 1)*e^(log(c*e^(b*x + a) + 1) +
log(c*e^(b*x + a) - 1)) - 1), x) + I*b^2*x^2 - I*b*x*log(c^2*e^(2*b*x + 2*a)) + I*b*x*log(c*e^(b*x + a) + 1) +
 I*b*x*log(-c*e^(b*x + a) + 1) - 2*((-I*a - arctan2(1, sqrt(c*e^(b*x + a) + 1)*sqrt(c*e^(b*x + a) - 1)))*b - I
*b*log(c))*x + I*dilog(c*e^(b*x + a)) + I*dilog(-c*e^(b*x + a)))/b

Giac [F]

\[ \int \csc ^{-1}\left (c e^{a+b x}\right ) \, dx=\int { \operatorname {arccsc}\left (c e^{\left (b x + a\right )}\right ) \,d x } \]

[In]

integrate(arccsc(c*exp(b*x+a)),x, algorithm="giac")

[Out]

integrate(arccsc(c*e^(b*x + a)), x)

Mupad [B] (verification not implemented)

Time = 1.45 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.07 \[ \int \csc ^{-1}\left (c e^{a+b x}\right ) \, dx=\frac {\mathrm {polylog}\left (2,{\mathrm {e}}^{\mathrm {asin}\left (\frac {{\mathrm {e}}^{-a-b\,x}}{c}\right )\,2{}\mathrm {i}}\right )\,1{}\mathrm {i}}{2\,b}+\frac {{\mathrm {asin}\left (\frac {{\mathrm {e}}^{-a-b\,x}}{c}\right )}^2\,1{}\mathrm {i}}{2\,b}-\frac {\ln \left (1-{\mathrm {e}}^{\mathrm {asin}\left (\frac {{\mathrm {e}}^{-a-b\,x}}{c}\right )\,2{}\mathrm {i}}\right )\,\mathrm {asin}\left (\frac {{\mathrm {e}}^{-a-b\,x}}{c}\right )}{b} \]

[In]

int(asin(exp(- a - b*x)/c),x)

[Out]

(polylog(2, exp(asin(exp(- a - b*x)/c)*2i))*1i)/(2*b) + (asin(exp(- a - b*x)/c)^2*1i)/(2*b) - (log(1 - exp(asi
n(exp(- a - b*x)/c)*2i))*asin(exp(- a - b*x)/c))/b