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

Optimal. Leaf size=225 \[ 2 i x \text {Li}_2\left (-e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 i x \text {Li}_2\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 i \text {Li}_2\left (-i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+2 i \text {Li}_2\left (i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 \text {Li}_3\left (-e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+2 \text {Li}_3\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+x^2 \sqrt {a \sec ^2(x)}-2 x^2 \cos (x) \tanh ^{-1}\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}+4 i x \cos (x) \tan ^{-1}\left (e^{i x}\right ) \sqrt {a \sec ^2(x)} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.53, antiderivative size = 225, normalized size of antiderivative = 1.00, number of steps used = 17, number of rules used = 14, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.778, Rules used = {6720, 2622, 321, 207, 4420, 14, 6273, 4183, 2531, 2282, 6589, 4181, 2279, 2391} \[ 2 i x \cos (x) \text {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-2 i x \cos (x) \text {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)}-2 i \cos (x) \text {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+2 i \cos (x) \text {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}-2 \cos (x) \text {PolyLog}\left (3,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+2 \cos (x) \text {PolyLog}\left (3,e^{i x}\right ) \sqrt {a \sec ^2(x)}+x^2 \sqrt {a \sec ^2(x)}-2 x^2 \cos (x) \tanh ^{-1}\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}+4 i x \cos (x) \tan ^{-1}\left (e^{i x}\right ) \sqrt {a \sec ^2(x)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

x^2*Sqrt[a*Sec[x]^2] + (4*I)*x*ArcTan[E^(I*x)]*Cos[x]*Sqrt[a*Sec[x]^2] - 2*x^2*ArcTanh[E^(I*x)]*Cos[x]*Sqrt[a*
Sec[x]^2] + (2*I)*x*Cos[x]*PolyLog[2, -E^(I*x)]*Sqrt[a*Sec[x]^2] - (2*I)*Cos[x]*PolyLog[2, (-I)*E^(I*x)]*Sqrt[
a*Sec[x]^2] + (2*I)*Cos[x]*PolyLog[2, I*E^(I*x)]*Sqrt[a*Sec[x]^2] - (2*I)*x*Cos[x]*PolyLog[2, E^(I*x)]*Sqrt[a*
Sec[x]^2] - 2*Cos[x]*PolyLog[3, -E^(I*x)]*Sqrt[a*Sec[x]^2] + 2*Cos[x]*PolyLog[3, 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 207

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

Rule 321

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 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 2282

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

Rule 2531

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 2622

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 4181

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 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 4420

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 6273

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 6589

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 174, normalized size = 0.77 \[ \sqrt {a \sec ^2(x)} \left (2 i x \left (\text {Li}_2\left (-e^{i x}\right )-\text {Li}_2\left (e^{i x}\right )\right ) \cos (x)+2 \left (\text {Li}_3\left (e^{i x}\right )-\text {Li}_3\left (-e^{i x}\right )\right ) \cos (x)-2 \cos (x) \left (i \left (\text {Li}_2\left (-i e^{i x}\right )-\text {Li}_2\left (i e^{i x}\right )\right )+x \left (\log \left (1-i e^{i x}\right )-\log \left (1+i e^{i x}\right )\right )\right )+x^2+x^2 \left (\log \left (1-e^{i x}\right )-\log \left (1+e^{i x}\right )\right ) \cos (x)\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [C]  time = 0.81, size = 337, normalized size = 1.50 \[ \sqrt {\frac {a}{\cos \relax (x)^{2}}} \cos \relax (x) {\rm polylog}\left (3, \cos \relax (x) + i \, \sin \relax (x)\right ) + \sqrt {\frac {a}{\cos \relax (x)^{2}}} \cos \relax (x) {\rm polylog}\left (3, \cos \relax (x) - i \, \sin \relax (x)\right ) - \sqrt {\frac {a}{\cos \relax (x)^{2}}} \cos \relax (x) {\rm polylog}\left (3, -\cos \relax (x) + i \, \sin \relax (x)\right ) - \sqrt {\frac {a}{\cos \relax (x)^{2}}} \cos \relax (x) {\rm polylog}\left (3, -\cos \relax (x) - i \, \sin \relax (x)\right ) - \frac {1}{2} \, {\left (x^{2} \cos \relax (x) \log \left (\cos \relax (x) + i \, \sin \relax (x) + 1\right ) + x^{2} \cos \relax (x) \log \left (\cos \relax (x) - i \, \sin \relax (x) + 1\right ) - x^{2} \cos \relax (x) \log \left (-\cos \relax (x) + i \, \sin \relax (x) + 1\right ) - x^{2} \cos \relax (x) \log \left (-\cos \relax (x) - i \, \sin \relax (x) + 1\right ) + 2 i \, x \cos \relax (x) {\rm Li}_2\left (\cos \relax (x) + i \, \sin \relax (x)\right ) - 2 i \, x \cos \relax (x) {\rm Li}_2\left (\cos \relax (x) - i \, \sin \relax (x)\right ) + 2 i \, x \cos \relax (x) {\rm Li}_2\left (-\cos \relax (x) + i \, \sin \relax (x)\right ) - 2 i \, x \cos \relax (x) {\rm Li}_2\left (-\cos \relax (x) - i \, \sin \relax (x)\right ) + 2 \, x \cos \relax (x) \log \left (i \, \cos \relax (x) + \sin \relax (x) + 1\right ) - 2 \, x \cos \relax (x) \log \left (i \, \cos \relax (x) - \sin \relax (x) + 1\right ) + 2 \, x \cos \relax (x) \log \left (-i \, \cos \relax (x) + \sin \relax (x) + 1\right ) - 2 \, x \cos \relax (x) \log \left (-i \, \cos \relax (x) - \sin \relax (x) + 1\right ) - 2 \, x^{2} - 2 i \, \cos \relax (x) {\rm Li}_2\left (i \, \cos \relax (x) + \sin \relax (x)\right ) - 2 i \, \cos \relax (x) {\rm Li}_2\left (i \, \cos \relax (x) - \sin \relax (x)\right ) + 2 i \, \cos \relax (x) {\rm Li}_2\left (-i \, \cos \relax (x) + \sin \relax (x)\right ) + 2 i \, \cos \relax (x) {\rm Li}_2\left (-i \, \cos \relax (x) - \sin \relax (x)\right )\right )} \sqrt {\frac {a}{\cos \relax (x)^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \sec \relax (x)^{2}} x^{2} \csc \relax (x) \sec \relax (x)\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.30, size = 200, normalized size = 0.89 \[ 2 \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}\, x^{2}-4 i \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}\, \left (2 i \left (\frac {x \ln \left (1+i {\mathrm e}^{i x}\right )}{2}-\frac {x \ln \left (1-i {\mathrm e}^{i x}\right )}{2}-\frac {i \dilog \left (1+i {\mathrm e}^{i x}\right )}{2}+\frac {i \dilog \left (1-i {\mathrm e}^{i x}\right )}{2}\right )-\frac {i \left (-\frac {i x^{3}}{3}+x^{2} \ln \left (1+{\mathrm e}^{i x}\right )-2 i x \polylog \left (2, -{\mathrm e}^{i x}\right )+2 \polylog \left (3, -{\mathrm e}^{i x}\right )\right )}{2}-\frac {i \left (\frac {i x^{3}}{3}-x^{2} \ln \left (1-{\mathrm e}^{i x}\right )+2 i x \polylog \left (2, {\mathrm e}^{i x}\right )-2 \polylog \left (3, {\mathrm e}^{i x}\right )\right )}{2}\right ) \cos \relax (x ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(4*I*x^2*cos(x) - 4*x^2*sin(x) + 2*(x^2*cos(2*x) + I*x^2*sin(2*x) + x^2)*arctan2(sin(x), cos(x) + 1) + 2*(x^2
*cos(2*x) + I*x^2*sin(2*x) + x^2)*arctan2(sin(x), -cos(x) + 1) - 4*(x*cos(2*x) + I*x*sin(2*x) + x)*dilog(-e^(I
*x)) + 4*(x*cos(2*x) + I*x*sin(2*x) + x)*dilog(e^(I*x)) + (-8*I*cos(2*x) + 8*sin(2*x) - 8*I)*integrate((x*cos(
2*x)*cos(x) + x*sin(2*x)*sin(x) + x*cos(x))/(cos(2*x)^2 + sin(2*x)^2 + 2*cos(2*x) + 1), x) - (8*cos(2*x) + 8*I
*sin(2*x) + 8)*integrate((x*cos(x)*sin(2*x) - x*cos(2*x)*sin(x) - x*sin(x))/(cos(2*x)^2 + sin(2*x)^2 + 2*cos(2
*x) + 1), x) + (-I*x^2*cos(2*x) + x^2*sin(2*x) - I*x^2)*log(cos(x)^2 + sin(x)^2 + 2*cos(x) + 1) + (I*x^2*cos(2
*x) - x^2*sin(2*x) + I*x^2)*log(cos(x)^2 + sin(x)^2 - 2*cos(x) + 1) + (-4*I*cos(2*x) + 4*sin(2*x) - 4*I)*polyl
og(3, -e^(I*x)) + (4*I*cos(2*x) - 4*sin(2*x) + 4*I)*polylog(3, e^(I*x)))*sqrt(a)/(-2*I*cos(2*x) + 2*sin(2*x) -
 2*I)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {x^2\,\sqrt {\frac {a}{{\cos \relax (x)}^2}}}{\cos \relax (x)\,\sin \relax (x)} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{2} \sqrt {a \sec ^{2}{\relax (x )}} \csc {\relax (x )} \sec {\relax (x )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________