3.868 \(\int \frac{x \csc (x) \sec (x)}{\sqrt{a \sec ^2(x)}} \, dx\)

Optimal. Leaf size=76 \[ \frac{i \sec (x) \text{PolyLog}\left (2,-e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{i \sec (x) \text{PolyLog}\left (2,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{2 x \sec (x) \tanh ^{-1}\left (e^{i x}\right )}{\sqrt{a \sec ^2(x)}} \]

[Out]

(-2*x*ArcTanh[E^(I*x)]*Sec[x])/Sqrt[a*Sec[x]^2] + (I*PolyLog[2, -E^(I*x)]*Sec[x])/Sqrt[a*Sec[x]^2] - (I*PolyLo
g[2, E^(I*x)]*Sec[x])/Sqrt[a*Sec[x]^2]

________________________________________________________________________________________

Rubi [A]  time = 0.534855, antiderivative size = 76, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {6720, 4183, 2279, 2391} \[ \frac{i \sec (x) \text{PolyLog}\left (2,-e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{i \sec (x) \text{PolyLog}\left (2,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{2 x \sec (x) \tanh ^{-1}\left (e^{i x}\right )}{\sqrt{a \sec ^2(x)}} \]

Antiderivative was successfully verified.

[In]

Int[(x*Csc[x]*Sec[x])/Sqrt[a*Sec[x]^2],x]

[Out]

(-2*x*ArcTanh[E^(I*x)]*Sec[x])/Sqrt[a*Sec[x]^2] + (I*PolyLog[2, -E^(I*x)]*Sec[x])/Sqrt[a*Sec[x]^2] - (I*PolyLo
g[2, E^(I*x)]*Sec[x])/Sqrt[a*Sec[x]^2]

Rule 6720

Int[(u_.)*((a_.)*(v_)^(m_.))^(p_), x_Symbol] :> Dist[(a^IntPart[p]*(a*v^m)^FracPart[p])/v^(m*FracPart[p]), Int
[u*v^(m*p), x], x] /; FreeQ[{a, m, p}, x] &&  !IntegerQ[p] &&  !FreeQ[v, x] &&  !(EqQ[a, 1] && EqQ[m, 1]) &&
!(EqQ[v, x] && EqQ[m, 1])

Rule 4183

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

Rule 2279

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 2391

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]

Rubi steps

\begin{align*} \int \frac{x \csc (x) \sec (x)}{\sqrt{a \sec ^2(x)}} \, dx &=\frac{\sec (x) \int x \csc (x) \, dx}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{2 x \tanh ^{-1}\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{\sec (x) \int \log \left (1-e^{i x}\right ) \, dx}{\sqrt{a \sec ^2(x)}}+\frac{\sec (x) \int \log \left (1+e^{i x}\right ) \, dx}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{2 x \tanh ^{-1}\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}+\frac{(i \sec (x)) \operatorname{Subst}\left (\int \frac{\log (1-x)}{x} \, dx,x,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{(i \sec (x)) \operatorname{Subst}\left (\int \frac{\log (1+x)}{x} \, dx,x,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{2 x \tanh ^{-1}\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}+\frac{i \text{Li}_2\left (-e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{i \text{Li}_2\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}\\ \end{align*}

Mathematica [A]  time = 0.0614066, size = 69, normalized size = 0.91 \[ \frac{\sec (x) \left (i \text{PolyLog}\left (2,-e^{i x}\right )-i \text{PolyLog}\left (2,e^{i x}\right )+x \left (\log \left (1-e^{i x}\right )-\log \left (1+e^{i x}\right )\right )\right )}{\sqrt{a \sec ^2(x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(x*Csc[x]*Sec[x])/Sqrt[a*Sec[x]^2],x]

[Out]

((x*(Log[1 - E^(I*x)] - Log[1 + E^(I*x)]) + I*PolyLog[2, -E^(I*x)] - I*PolyLog[2, E^(I*x)])*Sec[x])/Sqrt[a*Sec
[x]^2]

________________________________________________________________________________________

Maple [A]  time = 0.078, size = 98, normalized size = 1.3 \begin{align*}{\frac{-2\,i}{1+{{\rm e}^{2\,ix}}} \left ( -{\frac{i}{2}}{{\rm e}^{ix}}x\ln \left ({{\rm e}^{ix}}+1 \right ) -{\frac{{{\rm e}^{ix}}{\it polylog} \left ( 2,-{{\rm e}^{ix}} \right ) }{2}}+{\frac{i}{2}}{{\rm e}^{ix}}x\ln \left ( 1-{{\rm e}^{ix}} \right ) +{\frac{{{\rm e}^{ix}}{\it polylog} \left ( 2,{{\rm e}^{ix}} \right ) }{2}} \right ){\frac{1}{\sqrt{{\frac{a{{\rm e}^{2\,ix}}}{ \left ( 1+{{\rm e}^{2\,ix}} \right ) ^{2}}}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*csc(x)*sec(x)/(a*sec(x)^2)^(1/2),x)

[Out]

-2*I/(a*exp(2*I*x)/(1+exp(2*I*x))^2)^(1/2)/(1+exp(2*I*x))*(-1/2*I*exp(I*x)*x*ln(exp(I*x)+1)-1/2*exp(I*x)*polyl
og(2,-exp(I*x))+1/2*I*exp(I*x)*x*ln(1-exp(I*x))+1/2*exp(I*x)*polylog(2,exp(I*x)))

________________________________________________________________________________________

Maxima [A]  time = 1.52844, size = 107, normalized size = 1.41 \begin{align*} -\frac{2 i \, x \arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) + 2 i \, x \arctan \left (\sin \left (x\right ), -\cos \left (x\right ) + 1\right ) + x \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) - x \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) - 2 i \,{\rm Li}_2\left (-e^{\left (i \, x\right )}\right ) + 2 i \,{\rm Li}_2\left (e^{\left (i \, x\right )}\right )}{2 \, \sqrt{a}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*csc(x)*sec(x)/(a*sec(x)^2)^(1/2),x, algorithm="maxima")

[Out]

-1/2*(2*I*x*arctan2(sin(x), cos(x) + 1) + 2*I*x*arctan2(sin(x), -cos(x) + 1) + x*log(cos(x)^2 + sin(x)^2 + 2*c
os(x) + 1) - x*log(cos(x)^2 + sin(x)^2 - 2*cos(x) + 1) - 2*I*dilog(-e^(I*x)) + 2*I*dilog(e^(I*x)))/sqrt(a)

________________________________________________________________________________________

Fricas [B]  time = 2.45447, size = 439, normalized size = 5.78 \begin{align*} -\frac{{\left (x \cos \left (x\right ) \log \left (\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) + x \cos \left (x\right ) \log \left (\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) - x \cos \left (x\right ) \log \left (-\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) - x \cos \left (x\right ) \log \left (-\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) + i \, \cos \left (x\right ){\rm Li}_2\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - i \, \cos \left (x\right ){\rm Li}_2\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right ) + i \, \cos \left (x\right ){\rm Li}_2\left (-\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - i \, \cos \left (x\right ){\rm Li}_2\left (-\cos \left (x\right ) - i \, \sin \left (x\right )\right )\right )} \sqrt{\frac{a}{\cos \left (x\right )^{2}}}}{2 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*csc(x)*sec(x)/(a*sec(x)^2)^(1/2),x, algorithm="fricas")

[Out]

-1/2*(x*cos(x)*log(cos(x) + I*sin(x) + 1) + x*cos(x)*log(cos(x) - I*sin(x) + 1) - x*cos(x)*log(-cos(x) + I*sin
(x) + 1) - x*cos(x)*log(-cos(x) - I*sin(x) + 1) + I*cos(x)*dilog(cos(x) + I*sin(x)) - I*cos(x)*dilog(cos(x) -
I*sin(x)) + I*cos(x)*dilog(-cos(x) + I*sin(x)) - I*cos(x)*dilog(-cos(x) - I*sin(x)))*sqrt(a/cos(x)^2)/a

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x \csc{\left (x \right )} \sec{\left (x \right )}}{\sqrt{a \sec ^{2}{\left (x \right )}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*csc(x)*sec(x)/(a*sec(x)**2)**(1/2),x)

[Out]

Integral(x*csc(x)*sec(x)/sqrt(a*sec(x)**2), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x \csc \left (x\right ) \sec \left (x\right )}{\sqrt{a \sec \left (x\right )^{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*csc(x)*sec(x)/(a*sec(x)^2)^(1/2),x, algorithm="giac")

[Out]

integrate(x*csc(x)*sec(x)/sqrt(a*sec(x)^2), x)