\(\int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx\) [876]

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

Optimal result

Integrand size = 18, antiderivative size = 341 \[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 x \cos (x) \operatorname {PolyLog}\left (3,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 \cos (x) \operatorname {PolyLog}\left (3,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 \cos (x) \operatorname {PolyLog}\left (3,i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 x \cos (x) \operatorname {PolyLog}\left (3,e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i \cos (x) \operatorname {PolyLog}\left (4,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i \cos (x) \operatorname {PolyLog}\left (4,e^{i x}\right ) \sqrt {a \sec ^2(x)} \]

[Out]

x^3*(a*sec(x)^2)^(1/2)+6*I*x^2*arctan(exp(I*x))*cos(x)*(a*sec(x)^2)^(1/2)-2*x^3*arctanh(exp(I*x))*cos(x)*(a*se
c(x)^2)^(1/2)+3*I*x^2*cos(x)*polylog(2,-exp(I*x))*(a*sec(x)^2)^(1/2)-6*I*x*cos(x)*polylog(2,-I*exp(I*x))*(a*se
c(x)^2)^(1/2)+6*I*x*cos(x)*polylog(2,I*exp(I*x))*(a*sec(x)^2)^(1/2)-3*I*x^2*cos(x)*polylog(2,exp(I*x))*(a*sec(
x)^2)^(1/2)-6*x*cos(x)*polylog(3,-exp(I*x))*(a*sec(x)^2)^(1/2)+6*cos(x)*polylog(3,-I*exp(I*x))*(a*sec(x)^2)^(1
/2)-6*cos(x)*polylog(3,I*exp(I*x))*(a*sec(x)^2)^(1/2)+6*x*cos(x)*polylog(3,exp(I*x))*(a*sec(x)^2)^(1/2)-6*I*co
s(x)*polylog(4,-exp(I*x))*(a*sec(x)^2)^(1/2)+6*I*cos(x)*polylog(4,exp(I*x))*(a*sec(x)^2)^(1/2)

Rubi [A] (verified)

Time = 0.78 (sec) , antiderivative size = 341, normalized size of antiderivative = 1.00, number of steps used = 21, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.722, Rules used = {6852, 2702, 327, 213, 4505, 14, 6408, 4268, 2611, 6744, 2320, 6724, 4266} \[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \operatorname {PolyLog}\left (2,-e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-3 i x^2 \operatorname {PolyLog}\left (2,e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 i x \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+6 i x \operatorname {PolyLog}\left (2,i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 x \operatorname {PolyLog}\left (3,-e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+6 x \operatorname {PolyLog}\left (3,e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+6 \operatorname {PolyLog}\left (3,-i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 \operatorname {PolyLog}\left (3,i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 i \operatorname {PolyLog}\left (4,-e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+6 i \operatorname {PolyLog}\left (4,e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+x^3 \sqrt {a \sec ^2(x)} \]

[In]

Int[x^3*Csc[x]*Sec[x]*Sqrt[a*Sec[x]^2],x]

[Out]

x^3*Sqrt[a*Sec[x]^2] + (6*I)*x^2*ArcTan[E^(I*x)]*Cos[x]*Sqrt[a*Sec[x]^2] - 2*x^3*ArcTanh[E^(I*x)]*Cos[x]*Sqrt[
a*Sec[x]^2] + (3*I)*x^2*Cos[x]*PolyLog[2, -E^(I*x)]*Sqrt[a*Sec[x]^2] - (6*I)*x*Cos[x]*PolyLog[2, (-I)*E^(I*x)]
*Sqrt[a*Sec[x]^2] + (6*I)*x*Cos[x]*PolyLog[2, I*E^(I*x)]*Sqrt[a*Sec[x]^2] - (3*I)*x^2*Cos[x]*PolyLog[2, E^(I*x
)]*Sqrt[a*Sec[x]^2] - 6*x*Cos[x]*PolyLog[3, -E^(I*x)]*Sqrt[a*Sec[x]^2] + 6*Cos[x]*PolyLog[3, (-I)*E^(I*x)]*Sqr
t[a*Sec[x]^2] - 6*Cos[x]*PolyLog[3, I*E^(I*x)]*Sqrt[a*Sec[x]^2] + 6*x*Cos[x]*PolyLog[3, E^(I*x)]*Sqrt[a*Sec[x]
^2] - (6*I)*Cos[x]*PolyLog[4, -E^(I*x)]*Sqrt[a*Sec[x]^2] + (6*I)*Cos[x]*PolyLog[4, E^(I*x)]*Sqrt[a*Sec[x]^2]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 213

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

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

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 2611

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

Rule 2702

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 4266

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

Rule 4268

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 4505

Int[Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b_.)*(x_)]^(p_.), x_Symbol] :> Modul
e[{u = IntHide[Csc[a + b*x]^n*Sec[a + b*x]^p, x]}, Dist[(c + d*x)^m, u, x] - Dist[d*m, Int[(c + d*x)^(m - 1)*u
, x], x]] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p] && GtQ[m, 0] && NeQ[n, p]

Rule 6408

Int[((a_.) + ArcTanh[u_]*(b_.))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^(m + 1)*((a + b*ArcTan
h[u])/(d*(m + 1))), x] - Dist[b/(d*(m + 1)), Int[SimplifyIntegrand[(c + d*x)^(m + 1)*(D[u, x]/(1 - u^2)), x],
x], x] /; FreeQ[{a, b, c, d, m}, x] && NeQ[m, -1] && InverseFunctionFreeQ[u, x] &&  !FunctionOfQ[(c + d*x)^(m
+ 1), u, x] && FalseQ[PowerVariableExpn[u, m + 1, x]]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rule 6744

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

Rule 6852

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])

Rubi steps \begin{align*} \text {integral}& = \left (\cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^3 \csc (x) \sec ^2(x) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}-x^3 \text {arctanh}(\cos (x)) \cos (x) \sqrt {a \sec ^2(x)}-\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^2 (-\text {arctanh}(\cos (x))+\sec (x)) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}-x^3 \text {arctanh}(\cos (x)) \cos (x) \sqrt {a \sec ^2(x)}-\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \left (-x^2 \text {arctanh}(\cos (x))+x^2 \sec (x)\right ) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}-x^3 \text {arctanh}(\cos (x)) \cos (x) \sqrt {a \sec ^2(x)}+\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^2 \text {arctanh}(\cos (x)) \, dx-\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^2 \sec (x) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+\left (\cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^3 \csc (x) \, dx+\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x \log \left (1-i e^{i x}\right ) \, dx-\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x \log \left (1+i e^{i x}\right ) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}+\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \, dx-\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \operatorname {PolyLog}\left (2,i e^{i x}\right ) \, dx-\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^2 \log \left (1-e^{i x}\right ) \, dx+\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^2 \log \left (1+e^{i x}\right ) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)}-\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x \operatorname {PolyLog}\left (2,-e^{i x}\right ) \, dx+\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x \operatorname {PolyLog}\left (2,e^{i x}\right ) \, dx+\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,-i x)}{x} \, dx,x,e^{i x}\right )-\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,i x)}{x} \, dx,x,e^{i x}\right ) \\ & = x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 x \cos (x) \operatorname {PolyLog}\left (3,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 \cos (x) \operatorname {PolyLog}\left (3,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 \cos (x) \operatorname {PolyLog}\left (3,i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 x \cos (x) \operatorname {PolyLog}\left (3,e^{i x}\right ) \sqrt {a \sec ^2(x)}+\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \operatorname {PolyLog}\left (3,-e^{i x}\right ) \, dx-\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \operatorname {PolyLog}\left (3,e^{i x}\right ) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 x \cos (x) \operatorname {PolyLog}\left (3,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 \cos (x) \operatorname {PolyLog}\left (3,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 \cos (x) \operatorname {PolyLog}\left (3,i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 x \cos (x) \operatorname {PolyLog}\left (3,e^{i x}\right ) \sqrt {a \sec ^2(x)}-\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(3,-x)}{x} \, dx,x,e^{i x}\right )+\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(3,x)}{x} \, dx,x,e^{i x}\right ) \\ & = x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 x \cos (x) \operatorname {PolyLog}\left (3,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 \cos (x) \operatorname {PolyLog}\left (3,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 \cos (x) \operatorname {PolyLog}\left (3,i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 x \cos (x) \operatorname {PolyLog}\left (3,e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i \cos (x) \operatorname {PolyLog}\left (4,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i \cos (x) \operatorname {PolyLog}\left (4,e^{i x}\right ) \sqrt {a \sec ^2(x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.32 (sec) , antiderivative size = 290, normalized size of antiderivative = 0.85 \[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\frac {1}{8} \left (8 x^3-i \pi ^4 \cos (x)+2 i x^4 \cos (x)+8 x^3 \cos (x) \log \left (1-e^{-i x}\right )-24 x^2 \cos (x) \log \left (1-i e^{i x}\right )+24 x^2 \cos (x) \log \left (1+i e^{i x}\right )-8 x^3 \cos (x) \log \left (1+e^{i x}\right )+24 i x^2 \cos (x) \operatorname {PolyLog}\left (2,e^{-i x}\right )+24 i x^2 \cos (x) \operatorname {PolyLog}\left (2,-e^{i x}\right )-48 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right )+48 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right )+48 x \cos (x) \operatorname {PolyLog}\left (3,e^{-i x}\right )-48 x \cos (x) \operatorname {PolyLog}\left (3,-e^{i x}\right )+48 \cos (x) \operatorname {PolyLog}\left (3,-i e^{i x}\right )-48 \cos (x) \operatorname {PolyLog}\left (3,i e^{i x}\right )-48 i \cos (x) \operatorname {PolyLog}\left (4,e^{-i x}\right )-48 i \cos (x) \operatorname {PolyLog}\left (4,-e^{i x}\right )\right ) \sqrt {a \sec ^2(x)} \]

[In]

Integrate[x^3*Csc[x]*Sec[x]*Sqrt[a*Sec[x]^2],x]

[Out]

((8*x^3 - I*Pi^4*Cos[x] + (2*I)*x^4*Cos[x] + 8*x^3*Cos[x]*Log[1 - E^((-I)*x)] - 24*x^2*Cos[x]*Log[1 - I*E^(I*x
)] + 24*x^2*Cos[x]*Log[1 + I*E^(I*x)] - 8*x^3*Cos[x]*Log[1 + E^(I*x)] + (24*I)*x^2*Cos[x]*PolyLog[2, E^((-I)*x
)] + (24*I)*x^2*Cos[x]*PolyLog[2, -E^(I*x)] - (48*I)*x*Cos[x]*PolyLog[2, (-I)*E^(I*x)] + (48*I)*x*Cos[x]*PolyL
og[2, I*E^(I*x)] + 48*x*Cos[x]*PolyLog[3, E^((-I)*x)] - 48*x*Cos[x]*PolyLog[3, -E^(I*x)] + 48*Cos[x]*PolyLog[3
, (-I)*E^(I*x)] - 48*Cos[x]*PolyLog[3, I*E^(I*x)] - (48*I)*Cos[x]*PolyLog[4, E^((-I)*x)] - (48*I)*Cos[x]*PolyL
og[4, -E^(I*x)])*Sqrt[a*Sec[x]^2])/8

Maple [A] (verified)

Time = 1.34 (sec) , antiderivative size = 250, normalized size of antiderivative = 0.73

method result size
risch \(2 \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}\, x^{3}+4 \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}\, \left (\frac {3 x^{2} \ln \left (1+i {\mathrm e}^{i x}\right )}{2}-3 i x \operatorname {polylog}\left (2, -i {\mathrm e}^{i x}\right )+3 \operatorname {polylog}\left (3, -i {\mathrm e}^{i x}\right )-\frac {3 x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )}{2}+3 i x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )-3 \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+\frac {i \left (\frac {x^{4}}{4}+i x^{3} \ln \left ({\mathrm e}^{i x}+1\right )+3 x^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{i x}\right )+6 i x \operatorname {polylog}\left (3, -{\mathrm e}^{i x}\right )-6 \operatorname {polylog}\left (4, -{\mathrm e}^{i x}\right )\right )}{2}+\frac {i \left (-\frac {x^{4}}{4}-i x^{3} \ln \left (1-{\mathrm e}^{i x}\right )-3 x^{2} \operatorname {polylog}\left (2, {\mathrm e}^{i x}\right )-6 i x \operatorname {polylog}\left (3, {\mathrm e}^{i x}\right )+6 \operatorname {polylog}\left (4, {\mathrm e}^{i x}\right )\right )}{2}\right ) \cos \left (x \right )\) \(250\)

[In]

int(x^3*csc(x)*sec(x)*(a*sec(x)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2*(a*exp(2*I*x)/(exp(2*I*x)+1)^2)^(1/2)*x^3+4*(a*exp(2*I*x)/(exp(2*I*x)+1)^2)^(1/2)*(3/2*x^2*ln(1+I*exp(I*x))-
3*I*x*polylog(2,-I*exp(I*x))+3*polylog(3,-I*exp(I*x))-3/2*x^2*ln(1-I*exp(I*x))+3*I*x*polylog(2,I*exp(I*x))-3*p
olylog(3,I*exp(I*x))+1/2*I*(1/4*x^4+I*x^3*ln(exp(I*x)+1)+3*x^2*polylog(2,-exp(I*x))+6*I*x*polylog(3,-exp(I*x))
-6*polylog(4,-exp(I*x)))+1/2*I*(-1/4*x^4-I*x^3*ln(1-exp(I*x))-3*x^2*polylog(2,exp(I*x))-6*I*x*polylog(3,exp(I*
x))+6*polylog(4,exp(I*x))))*cos(x)

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. 539 vs. \(2 (253) = 506\).

Time = 0.33 (sec) , antiderivative size = 539, normalized size of antiderivative = 1.58 \[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\text {Too large to display} \]

[In]

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

[Out]

3*x*sqrt(a/cos(x)^2)*cos(x)*polylog(3, cos(x) + I*sin(x)) + 3*x*sqrt(a/cos(x)^2)*cos(x)*polylog(3, cos(x) - I*
sin(x)) - 3*x*sqrt(a/cos(x)^2)*cos(x)*polylog(3, -cos(x) + I*sin(x)) - 3*x*sqrt(a/cos(x)^2)*cos(x)*polylog(3,
-cos(x) - I*sin(x)) + 3*I*sqrt(a/cos(x)^2)*cos(x)*polylog(4, cos(x) + I*sin(x)) - 3*I*sqrt(a/cos(x)^2)*cos(x)*
polylog(4, cos(x) - I*sin(x)) + 3*I*sqrt(a/cos(x)^2)*cos(x)*polylog(4, -cos(x) + I*sin(x)) - 3*I*sqrt(a/cos(x)
^2)*cos(x)*polylog(4, -cos(x) - I*sin(x)) + 3*sqrt(a/cos(x)^2)*cos(x)*polylog(3, I*cos(x) + sin(x)) - 3*sqrt(a
/cos(x)^2)*cos(x)*polylog(3, I*cos(x) - sin(x)) + 3*sqrt(a/cos(x)^2)*cos(x)*polylog(3, -I*cos(x) + sin(x)) - 3
*sqrt(a/cos(x)^2)*cos(x)*polylog(3, -I*cos(x) - sin(x)) - 1/2*(x^3*cos(x)*log(cos(x) + I*sin(x) + 1) + x^3*cos
(x)*log(cos(x) - I*sin(x) + 1) - x^3*cos(x)*log(-cos(x) + I*sin(x) + 1) - x^3*cos(x)*log(-cos(x) - I*sin(x) +
1) + 3*I*x^2*cos(x)*dilog(cos(x) + I*sin(x)) - 3*I*x^2*cos(x)*dilog(cos(x) - I*sin(x)) + 3*I*x^2*cos(x)*dilog(
-cos(x) + I*sin(x)) - 3*I*x^2*cos(x)*dilog(-cos(x) - I*sin(x)) + 3*x^2*cos(x)*log(I*cos(x) + sin(x) + 1) - 3*x
^2*cos(x)*log(I*cos(x) - sin(x) + 1) + 3*x^2*cos(x)*log(-I*cos(x) + sin(x) + 1) - 3*x^2*cos(x)*log(-I*cos(x) -
 sin(x) + 1) - 2*x^3 - 6*I*x*cos(x)*dilog(I*cos(x) + sin(x)) - 6*I*x*cos(x)*dilog(I*cos(x) - sin(x)) + 6*I*x*c
os(x)*dilog(-I*cos(x) + sin(x)) + 6*I*x*cos(x)*dilog(-I*cos(x) - sin(x)))*sqrt(a/cos(x)^2)

Sympy [F]

\[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\int x^{3} \sqrt {a \sec ^{2}{\left (x \right )}} \csc {\left (x \right )} \sec {\left (x \right )}\, dx \]

[In]

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

[Out]

Integral(x**3*sqrt(a*sec(x)**2)*csc(x)*sec(x), 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. 567 vs. \(2 (253) = 506\).

Time = 0.33 (sec) , antiderivative size = 567, normalized size of antiderivative = 1.66 \[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=-\frac {{\left (4 i \, x^{3} \cos \left (x\right ) - 4 \, x^{3} \sin \left (x\right ) - 6 \, {\left (x^{2} \cos \left (2 \, x\right ) + i \, x^{2} \sin \left (2 \, x\right ) + x^{2}\right )} \arctan \left (\cos \left (x\right ), \sin \left (x\right ) + 1\right ) - 6 \, {\left (x^{2} \cos \left (2 \, x\right ) + i \, x^{2} \sin \left (2 \, x\right ) + x^{2}\right )} \arctan \left (\cos \left (x\right ), -\sin \left (x\right ) + 1\right ) + 2 \, {\left (x^{3} \cos \left (2 \, x\right ) + i \, x^{3} \sin \left (2 \, x\right ) + x^{3}\right )} \arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) + 2 \, {\left (x^{3} \cos \left (2 \, x\right ) + i \, x^{3} \sin \left (2 \, x\right ) + x^{3}\right )} \arctan \left (\sin \left (x\right ), -\cos \left (x\right ) + 1\right ) - 12 \, {\left (x \cos \left (2 \, x\right ) + i \, x \sin \left (2 \, x\right ) + x\right )} {\rm Li}_2\left (i \, e^{\left (i \, x\right )}\right ) + 12 \, {\left (x \cos \left (2 \, x\right ) + i \, x \sin \left (2 \, x\right ) + x\right )} {\rm Li}_2\left (-i \, e^{\left (i \, x\right )}\right ) - 6 \, {\left (x^{2} \cos \left (2 \, x\right ) + i \, x^{2} \sin \left (2 \, x\right ) + x^{2}\right )} {\rm Li}_2\left (-e^{\left (i \, x\right )}\right ) + 6 \, {\left (x^{2} \cos \left (2 \, x\right ) + i \, x^{2} \sin \left (2 \, x\right ) + x^{2}\right )} {\rm Li}_2\left (e^{\left (i \, x\right )}\right ) + {\left (-i \, x^{3} \cos \left (2 \, x\right ) + x^{3} \sin \left (2 \, x\right ) - i \, x^{3}\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) + {\left (i \, x^{3} \cos \left (2 \, x\right ) - x^{3} \sin \left (2 \, x\right ) + i \, x^{3}\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) - 3 \, {\left (i \, x^{2} \cos \left (2 \, x\right ) - x^{2} \sin \left (2 \, x\right ) + i \, x^{2}\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \sin \left (x\right ) + 1\right ) - 3 \, {\left (-i \, x^{2} \cos \left (2 \, x\right ) + x^{2} \sin \left (2 \, x\right ) - i \, x^{2}\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \sin \left (x\right ) + 1\right ) + 12 \, {\left (\cos \left (2 \, x\right ) + i \, \sin \left (2 \, x\right ) + 1\right )} {\rm Li}_{4}(-e^{\left (i \, x\right )}) - 12 \, {\left (\cos \left (2 \, x\right ) + i \, \sin \left (2 \, x\right ) + 1\right )} {\rm Li}_{4}(e^{\left (i \, x\right )}) - 12 \, {\left (i \, \cos \left (2 \, x\right ) - \sin \left (2 \, x\right ) + i\right )} {\rm Li}_{3}(i \, e^{\left (i \, x\right )}) - 12 \, {\left (-i \, \cos \left (2 \, x\right ) + \sin \left (2 \, x\right ) - i\right )} {\rm Li}_{3}(-i \, e^{\left (i \, x\right )}) - 12 \, {\left (i \, x \cos \left (2 \, x\right ) - x \sin \left (2 \, x\right ) + i \, x\right )} {\rm Li}_{3}(-e^{\left (i \, x\right )}) - 12 \, {\left (-i \, x \cos \left (2 \, x\right ) + x \sin \left (2 \, x\right ) - i \, x\right )} {\rm Li}_{3}(e^{\left (i \, x\right )})\right )} \sqrt {a}}{-2 i \, \cos \left (2 \, x\right ) + 2 \, \sin \left (2 \, x\right ) - 2 i} \]

[In]

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

[Out]

-(4*I*x^3*cos(x) - 4*x^3*sin(x) - 6*(x^2*cos(2*x) + I*x^2*sin(2*x) + x^2)*arctan2(cos(x), sin(x) + 1) - 6*(x^2
*cos(2*x) + I*x^2*sin(2*x) + x^2)*arctan2(cos(x), -sin(x) + 1) + 2*(x^3*cos(2*x) + I*x^3*sin(2*x) + x^3)*arcta
n2(sin(x), cos(x) + 1) + 2*(x^3*cos(2*x) + I*x^3*sin(2*x) + x^3)*arctan2(sin(x), -cos(x) + 1) - 12*(x*cos(2*x)
 + I*x*sin(2*x) + x)*dilog(I*e^(I*x)) + 12*(x*cos(2*x) + I*x*sin(2*x) + x)*dilog(-I*e^(I*x)) - 6*(x^2*cos(2*x)
 + I*x^2*sin(2*x) + x^2)*dilog(-e^(I*x)) + 6*(x^2*cos(2*x) + I*x^2*sin(2*x) + x^2)*dilog(e^(I*x)) + (-I*x^3*co
s(2*x) + x^3*sin(2*x) - I*x^3)*log(cos(x)^2 + sin(x)^2 + 2*cos(x) + 1) + (I*x^3*cos(2*x) - x^3*sin(2*x) + I*x^
3)*log(cos(x)^2 + sin(x)^2 - 2*cos(x) + 1) - 3*(I*x^2*cos(2*x) - x^2*sin(2*x) + I*x^2)*log(cos(x)^2 + sin(x)^2
 + 2*sin(x) + 1) - 3*(-I*x^2*cos(2*x) + x^2*sin(2*x) - I*x^2)*log(cos(x)^2 + sin(x)^2 - 2*sin(x) + 1) + 12*(co
s(2*x) + I*sin(2*x) + 1)*polylog(4, -e^(I*x)) - 12*(cos(2*x) + I*sin(2*x) + 1)*polylog(4, e^(I*x)) - 12*(I*cos
(2*x) - sin(2*x) + I)*polylog(3, I*e^(I*x)) - 12*(-I*cos(2*x) + sin(2*x) - I)*polylog(3, -I*e^(I*x)) - 12*(I*x
*cos(2*x) - x*sin(2*x) + I*x)*polylog(3, -e^(I*x)) - 12*(-I*x*cos(2*x) + x*sin(2*x) - I*x)*polylog(3, e^(I*x))
)*sqrt(a)/(-2*I*cos(2*x) + 2*sin(2*x) - 2*I)

Giac [F]

\[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\int { \sqrt {a \sec \left (x\right )^{2}} x^{3} \csc \left (x\right ) \sec \left (x\right ) \,d x } \]

[In]

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

[Out]

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

Mupad [F(-1)]

Timed out. \[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\int \frac {x^3\,\sqrt {\frac {a}{{\cos \left (x\right )}^2}}}{\cos \left (x\right )\,\sin \left (x\right )} \,d x \]

[In]

int((x^3*(a/cos(x)^2)^(1/2))/(cos(x)*sin(x)),x)

[Out]

int((x^3*(a/cos(x)^2)^(1/2))/(cos(x)*sin(x)), x)