3.865 \(\int \sqrt {\csc (x)} (x \cos (x)-4 \sec (x) \tan (x)) \, dx\)

Optimal. Leaf size=20 \[ \frac {2 x}{\sqrt {\csc (x)}}-\frac {4 \sec (x)}{\csc ^{\frac {3}{2}}(x)} \]

[Out]

-4*sec(x)/csc(x)^(3/2)+2*x/csc(x)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {6742, 4213, 3771, 2639, 2626} \[ \frac {2 x}{\sqrt {\csc (x)}}-\frac {4 \sec (x)}{\csc ^{\frac {3}{2}}(x)} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[Csc[x]]*(x*Cos[x] - 4*Sec[x]*Tan[x]),x]

[Out]

(2*x)/Sqrt[Csc[x]] - (4*Sec[x])/Csc[x]^(3/2)

Rule 2626

Int[(csc[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*((b_.)*sec[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*b*(a*Csc[
e + f*x])^(m - 1)*(b*Sec[e + f*x])^(n - 1))/(f*(n - 1)), x] + Dist[(b^2*(m + n - 2))/(n - 1), Int[(a*Csc[e + f
*x])^m*(b*Sec[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && IntegersQ[2*m, 2*n]

Rule 2639

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

Rule 3771

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Dist[(b*Csc[c + d*x])^n*Sin[c + d*x]^n, Int[1/Sin[c + d
*x]^n, x], x] /; FreeQ[{b, c, d}, x] && EqQ[n^2, 1/4]

Rule 4213

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

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int \sqrt {\csc (x)} (x \cos (x)-4 \sec (x) \tan (x)) \, dx &=\int \left (x \cos (x) \sqrt {\csc (x)}-\frac {4 \sec ^2(x)}{\sqrt {\csc (x)}}\right ) \, dx\\ &=-\left (4 \int \frac {\sec ^2(x)}{\sqrt {\csc (x)}} \, dx\right )+\int x \cos (x) \sqrt {\csc (x)} \, dx\\ &=\frac {2 x}{\sqrt {\csc (x)}}-\frac {4 \sec (x)}{\csc ^{\frac {3}{2}}(x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.44, size = 17, normalized size = 0.85 \[ \frac {2 (x \csc (x)-2 \sec (x))}{\csc ^{\frac {3}{2}}(x)} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[Csc[x]]*(x*Cos[x] - 4*Sec[x]*Tan[x]),x]

[Out]

(2*(x*Csc[x] - 2*Sec[x]))/Csc[x]^(3/2)

________________________________________________________________________________________

fricas [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^(1/2)*(x*cos(x)-4*sec(x)*tan(x)),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (ha
s polynomial part)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (x \cos \relax (x) - 4 \, \sec \relax (x) \tan \relax (x)\right )} \sqrt {\csc \relax (x)}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^(1/2)*(x*cos(x)-4*sec(x)*tan(x)),x, algorithm="giac")

[Out]

integrate((x*cos(x) - 4*sec(x)*tan(x))*sqrt(csc(x)), x)

________________________________________________________________________________________

maple [F]  time = 0.50, size = 0, normalized size = 0.00 \[ \int \left (\sqrt {\csc }\relax (x )\right ) \left (x \cos \relax (x )-4 \sec \relax (x ) \tan \relax (x )\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^(1/2)*(x*cos(x)-4*sec(x)*tan(x)),x)

[Out]

int(csc(x)^(1/2)*(x*cos(x)-4*sec(x)*tan(x)),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (x \cos \relax (x) - 4 \, \sec \relax (x) \tan \relax (x)\right )} \sqrt {\csc \relax (x)}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^(1/2)*(x*cos(x)-4*sec(x)*tan(x)),x, algorithm="maxima")

[Out]

integrate((x*cos(x) - 4*sec(x)*tan(x))*sqrt(csc(x)), x)

________________________________________________________________________________________

mupad [B]  time = 3.46, size = 77, normalized size = 3.85 \[ \frac {\left (4\,{\cos \relax (x)}^3-4\,\cos \relax (x)+2\,x\,{\cos \relax (x)}^2\,\sin \relax (x)-\sin \relax (x)\,4{}\mathrm {i}-x\,{\cos \relax (x)}^3\,2{}\mathrm {i}+{\cos \relax (x)}^2\,\sin \relax (x)\,4{}\mathrm {i}+x\,\cos \relax (x)\,2{}\mathrm {i}\right )\,1{}\mathrm {i}}{\cos \relax (x)\,\sin \relax (x)\,\sqrt {\frac {1}{\sin \relax (x)}}\,\left (-\sin \relax (x)+\cos \relax (x)\,1{}\mathrm {i}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(1/sin(x))^(1/2)*((4*tan(x))/cos(x) - x*cos(x)),x)

[Out]

((4*cos(x)^3 - sin(x)*4i - x*cos(x)^3*2i - 4*cos(x) + cos(x)^2*sin(x)*4i + x*cos(x)*2i + 2*x*cos(x)^2*sin(x))*
1i)/(cos(x)*sin(x)*(1/sin(x))^(1/2)*(cos(x)*1i - sin(x)))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (x \cos {\relax (x )} - 4 \tan {\relax (x )} \sec {\relax (x )}\right ) \sqrt {\csc {\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**(1/2)*(x*cos(x)-4*sec(x)*tan(x)),x)

[Out]

Integral((x*cos(x) - 4*tan(x)*sec(x))*sqrt(csc(x)), x)

________________________________________________________________________________________