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

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

Optimal result

Integrand size = 6, antiderivative size = 36 \[ \int \csc ^{-1}(a+b x) \, dx=\frac {(a+b x) \csc ^{-1}(a+b x)}{b}+\frac {\text {arctanh}\left (\sqrt {1-\frac {1}{(a+b x)^2}}\right )}{b} \]

[Out]

(b*x+a)*arccsc(b*x+a)/b+arctanh((1-1/(b*x+a)^2)^(1/2))/b

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.833, Rules used = {5359, 379, 272, 65, 212} \[ \int \csc ^{-1}(a+b x) \, dx=\frac {\text {arctanh}\left (\sqrt {1-\frac {1}{(a+b x)^2}}\right )}{b}+\frac {(a+b x) \csc ^{-1}(a+b x)}{b} \]

[In]

Int[ArcCsc[a + b*x],x]

[Out]

((a + b*x)*ArcCsc[a + b*x])/b + ArcTanh[Sqrt[1 - (a + b*x)^(-2)]]/b

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 379

Int[(u_)^(m_.)*((a_) + (b_.)*(v_)^(n_))^(p_.), x_Symbol] :> Dist[u^m/(Coefficient[v, x, 1]*v^m), Subst[Int[x^m
*(a + b*x^n)^p, x], x, v], x] /; FreeQ[{a, b, m, n, p}, x] && LinearPairQ[u, v, x]

Rule 5359

Int[ArcCsc[(c_) + (d_.)*(x_)], x_Symbol] :> Simp[(c + d*x)*(ArcCsc[c + d*x]/d), x] + Int[1/((c + d*x)*Sqrt[1 -
 1/(c + d*x)^2]), x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {(a+b x) \csc ^{-1}(a+b x)}{b}+\int \frac {1}{(a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}} \, dx \\ & = \frac {(a+b x) \csc ^{-1}(a+b x)}{b}+\frac {\text {Subst}\left (\int \frac {1}{\sqrt {1-\frac {1}{x^2}} x} \, dx,x,a+b x\right )}{b} \\ & = \frac {(a+b x) \csc ^{-1}(a+b x)}{b}-\frac {\text {Subst}\left (\int \frac {1}{\sqrt {1-x} x} \, dx,x,\frac {1}{(a+b x)^2}\right )}{2 b} \\ & = \frac {(a+b x) \csc ^{-1}(a+b x)}{b}+\frac {\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {1-\frac {1}{(a+b x)^2}}\right )}{b} \\ & = \frac {(a+b x) \csc ^{-1}(a+b x)}{b}+\frac {\text {arctanh}\left (\sqrt {1-\frac {1}{(a+b x)^2}}\right )}{b} \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.40 (sec) , antiderivative size = 469, normalized size of antiderivative = 13.03 \[ \int \csc ^{-1}(a+b x) \, dx=x \csc ^{-1}(a+b x)-\frac {(a+b x) \sqrt {\frac {-1+a^2+2 a b x+b^2 x^2}{(a+b x)^2}} \left (\sqrt [4]{-1} \left (-i+\sqrt {-1+a^2}\right ) \sqrt {2 i-i a^2+2 \sqrt {-1+a^2}} \arctan \left (\frac {(-1)^{3/4} \sqrt {2 i-i a^2+2 \sqrt {-1+a^2}} b x}{a \sqrt {-1+a^2}-a \sqrt {-1+a^2+2 a b x+b^2 x^2}}\right )+(-1)^{3/4} \left (i+\sqrt {-1+a^2}\right ) \sqrt {-2 i+i a^2+2 \sqrt {-1+a^2}} \arctan \left (\frac {\sqrt [4]{-1} \sqrt {-2 i+i a^2+2 \sqrt {-1+a^2}} b x}{a \sqrt {-1+a^2}-a \sqrt {-1+a^2+2 a b x+b^2 x^2}}\right )+a \left (a \arctan \left (\frac {\sqrt {-1+a^2} b^2 x^2}{a^4+a^3 b x+b^2 x^2-a^2 \left (1+\sqrt {-1+a^2} \sqrt {-1+a^2+2 a b x+b^2 x^2}\right )}\right )-\log \left (\sqrt {-1+a^2}-b x-\sqrt {-1+a^2+2 a b x+b^2 x^2}\right )+\log \left (b^2 \left (\sqrt {-1+a^2}+b x-\sqrt {-1+a^2+2 a b x+b^2 x^2}\right )\right )\right )\right )}{a b \sqrt {-1+a^2+2 a b x+b^2 x^2}} \]

[In]

Integrate[ArcCsc[a + b*x],x]

[Out]

x*ArcCsc[a + b*x] - ((a + b*x)*Sqrt[(-1 + a^2 + 2*a*b*x + b^2*x^2)/(a + b*x)^2]*((-1)^(1/4)*(-I + Sqrt[-1 + a^
2])*Sqrt[2*I - I*a^2 + 2*Sqrt[-1 + a^2]]*ArcTan[((-1)^(3/4)*Sqrt[2*I - I*a^2 + 2*Sqrt[-1 + a^2]]*b*x)/(a*Sqrt[
-1 + a^2] - a*Sqrt[-1 + a^2 + 2*a*b*x + b^2*x^2])] + (-1)^(3/4)*(I + Sqrt[-1 + a^2])*Sqrt[-2*I + I*a^2 + 2*Sqr
t[-1 + a^2]]*ArcTan[((-1)^(1/4)*Sqrt[-2*I + I*a^2 + 2*Sqrt[-1 + a^2]]*b*x)/(a*Sqrt[-1 + a^2] - a*Sqrt[-1 + a^2
 + 2*a*b*x + b^2*x^2])] + a*(a*ArcTan[(Sqrt[-1 + a^2]*b^2*x^2)/(a^4 + a^3*b*x + b^2*x^2 - a^2*(1 + Sqrt[-1 + a
^2]*Sqrt[-1 + a^2 + 2*a*b*x + b^2*x^2]))] - Log[Sqrt[-1 + a^2] - b*x - Sqrt[-1 + a^2 + 2*a*b*x + b^2*x^2]] + L
og[b^2*(Sqrt[-1 + a^2] + b*x - Sqrt[-1 + a^2 + 2*a*b*x + b^2*x^2])])))/(a*b*Sqrt[-1 + a^2 + 2*a*b*x + b^2*x^2]
)

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.19

method result size
derivativedivides \(\frac {\operatorname {arccsc}\left (b x +a \right ) \left (b x +a \right )+\ln \left (b x +a +\left (b x +a \right ) \sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right )}{b}\) \(43\)
default \(\frac {\operatorname {arccsc}\left (b x +a \right ) \left (b x +a \right )+\ln \left (b x +a +\left (b x +a \right ) \sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right )}{b}\) \(43\)
parts \(x \,\operatorname {arccsc}\left (b x +a \right )+\frac {\sqrt {b^{2} x^{2}+2 a b x +a^{2}-1}\, \left (a \arctan \left (\frac {1}{\sqrt {b^{2} x^{2}+2 a b x +a^{2}-1}}\right ) \sqrt {b^{2}}+\ln \left (\frac {b^{2} x +\sqrt {b^{2} x^{2}+2 a b x +a^{2}-1}\, \sqrt {b^{2}}+a b}{\sqrt {b^{2}}}\right ) b \right )}{b \sqrt {\frac {b^{2} x^{2}+2 a b x +a^{2}-1}{\left (b x +a \right )^{2}}}\, \left (b x +a \right ) \sqrt {b^{2}}}\) \(143\)

[In]

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

[Out]

1/b*(arccsc(b*x+a)*(b*x+a)+ln(b*x+a+(b*x+a)*(1-1/(b*x+a)^2)^(1/2)))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 75 vs. \(2 (34) = 68\).

Time = 0.27 (sec) , antiderivative size = 75, normalized size of antiderivative = 2.08 \[ \int \csc ^{-1}(a+b x) \, dx=\frac {b x \operatorname {arccsc}\left (b x + a\right ) - 2 \, a \arctan \left (-b x - a + \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1}\right ) - \log \left (-b x - a + \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1}\right )}{b} \]

[In]

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

[Out]

(b*x*arccsc(b*x + a) - 2*a*arctan(-b*x - a + sqrt(b^2*x^2 + 2*a*b*x + a^2 - 1)) - log(-b*x - a + sqrt(b^2*x^2
+ 2*a*b*x + a^2 - 1)))/b

Sympy [F]

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.53 \[ \int \csc ^{-1}(a+b x) \, dx=\frac {2 \, {\left (b x + a\right )} \operatorname {arccsc}\left (b x + a\right ) + \log \left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} + 1\right ) - \log \left (-\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} + 1\right )}{2 \, b} \]

[In]

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

[Out]

1/2*(2*(b*x + a)*arccsc(b*x + a) + log(sqrt(-1/(b*x + a)^2 + 1) + 1) - log(-sqrt(-1/(b*x + a)^2 + 1) + 1))/b

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 81 vs. \(2 (34) = 68\).

Time = 0.30 (sec) , antiderivative size = 81, normalized size of antiderivative = 2.25 \[ \int \csc ^{-1}(a+b x) \, dx=\frac {1}{2} \, b {\left (\frac {2 \, {\left (b x + a\right )} \arcsin \left (-\frac {1}{{\left (b x + a\right )} {\left (\frac {a}{b x + a} - 1\right )} - a}\right )}{b^{2}} + \frac {\log \left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} + 1\right ) - \log \left (-\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} + 1\right )}{b^{2}}\right )} \]

[In]

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

[Out]

1/2*b*(2*(b*x + a)*arcsin(-1/((b*x + a)*(a/(b*x + a) - 1) - a))/b^2 + (log(sqrt(-1/(b*x + a)^2 + 1) + 1) - log
(-sqrt(-1/(b*x + a)^2 + 1) + 1))/b^2)

Mupad [B] (verification not implemented)

Time = 1.01 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.92 \[ \int \csc ^{-1}(a+b x) \, dx=\frac {\mathrm {atanh}\left (\frac {1}{\sqrt {1-\frac {1}{{\left (a+b\,x\right )}^2}}}\right )+\mathrm {asin}\left (\frac {1}{a+b\,x}\right )\,\left (a+b\,x\right )}{b} \]

[In]

int(asin(1/(a + b*x)),x)

[Out]

(atanh(1/(1 - 1/(a + b*x)^2)^(1/2)) + asin(1/(a + b*x))*(a + b*x))/b