3.670 \(\int \cos (x) \sqrt {1+\csc (x)} \, dx\)

Optimal. Leaf size=21 \[ \sin (x) \sqrt {\csc (x)+1}+\tanh ^{-1}\left (\sqrt {\csc (x)+1}\right ) \]

[Out]

arctanh((1+csc(x))^(1/2))+sin(x)*(1+csc(x))^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {3873, 47, 63, 207} \[ \sin (x) \sqrt {\csc (x)+1}+\tanh ^{-1}\left (\sqrt {\csc (x)+1}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]*Sqrt[1 + Csc[x]],x]

[Out]

ArcTanh[Sqrt[1 + Csc[x]]] + Sqrt[1 + Csc[x]]*Sin[x]

Rule 47

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + 1)), x] - Dist[(d*n)/(b*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d},
x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && LtQ[m, -1] &&  !(IntegerQ[n] &&  !IntegerQ[m]) &&  !(ILeQ[m + n + 2, 0
] && (FractionQ[m] || GeQ[2*n + m + 1, 0])) && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

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

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> -Dist[(f*b^(p - 1)
)^(-1), Subst[Int[((-a + b*x)^((p - 1)/2)*(a + b*x)^(m + (p - 1)/2))/x^(p + 1), x], x, Csc[e + f*x]], x] /; Fr
eeQ[{a, b, e, f, m}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \cos (x) \sqrt {1+\csc (x)} \, dx &=-\operatorname {Subst}\left (\int \frac {\sqrt {1+x}}{x^2} \, dx,x,\csc (x)\right )\\ &=\sqrt {1+\csc (x)} \sin (x)-\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{x \sqrt {1+x}} \, dx,x,\csc (x)\right )\\ &=\sqrt {1+\csc (x)} \sin (x)-\operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {1+\csc (x)}\right )\\ &=\tanh ^{-1}\left (\sqrt {1+\csc (x)}\right )+\sqrt {1+\csc (x)} \sin (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 21, normalized size = 1.00 \[ \sin (x) \sqrt {\csc (x)+1}+\tanh ^{-1}\left (\sqrt {\csc (x)+1}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]*Sqrt[1 + Csc[x]],x]

[Out]

ArcTanh[Sqrt[1 + Csc[x]]] + Sqrt[1 + Csc[x]]*Sin[x]

________________________________________________________________________________________

fricas [B]  time = 0.99, size = 79, normalized size = 3.76 \[ \sqrt {\frac {\sin \relax (x) + 1}{\sin \relax (x)}} \sin \relax (x) + \frac {1}{2} \, \log \left (\frac {2 \, {\left (\sqrt {\frac {\sin \relax (x) + 1}{\sin \relax (x)}} \sin \relax (x) + \sin \relax (x) + 1\right )}}{\cos \relax (x) + \sin \relax (x) + 1}\right ) - \frac {1}{2} \, \log \left (-\frac {2 \, {\left (\sqrt {\frac {\sin \relax (x) + 1}{\sin \relax (x)}} \sin \relax (x) - \sin \relax (x) - 1\right )}}{\cos \relax (x) + \sin \relax (x) + 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*(1+csc(x))^(1/2),x, algorithm="fricas")

[Out]

sqrt((sin(x) + 1)/sin(x))*sin(x) + 1/2*log(2*(sqrt((sin(x) + 1)/sin(x))*sin(x) + sin(x) + 1)/(cos(x) + sin(x)
+ 1)) - 1/2*log(-2*(sqrt((sin(x) + 1)/sin(x))*sin(x) - sin(x) - 1)/(cos(x) + sin(x) + 1))

________________________________________________________________________________________

giac [B]  time = 0.15, size = 38, normalized size = 1.81 \[ \frac {1}{2} \, {\left (2 \, \sqrt {\sin \relax (x)^{2} + \sin \relax (x)} - \log \left ({\left | 2 \, \sqrt {\sin \relax (x)^{2} + \sin \relax (x)} - 2 \, \sin \relax (x) - 1 \right |}\right )\right )} \mathrm {sgn}\left (\sin \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*(1+csc(x))^(1/2),x, algorithm="giac")

[Out]

1/2*(2*sqrt(sin(x)^2 + sin(x)) - log(abs(2*sqrt(sin(x)^2 + sin(x)) - 2*sin(x) - 1)))*sgn(sin(x))

________________________________________________________________________________________

maple [B]  time = 0.08, size = 48, normalized size = 2.29 \[ \frac {1}{2 \sqrt {1+\csc \relax (x )}-2}-\frac {\ln \left (\sqrt {1+\csc \relax (x )}-1\right )}{2}+\frac {1}{2 \sqrt {1+\csc \relax (x )}+2}+\frac {\ln \left (\sqrt {1+\csc \relax (x )}+1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)*(1+csc(x))^(1/2),x)

[Out]

1/2/((1+csc(x))^(1/2)-1)-1/2*ln((1+csc(x))^(1/2)-1)+1/2/((1+csc(x))^(1/2)+1)+1/2*ln((1+csc(x))^(1/2)+1)

________________________________________________________________________________________

maxima [B]  time = 0.33, size = 38, normalized size = 1.81 \[ \sqrt {\frac {1}{\sin \relax (x)} + 1} \sin \relax (x) + \frac {1}{2} \, \log \left (\sqrt {\frac {1}{\sin \relax (x)} + 1} + 1\right ) - \frac {1}{2} \, \log \left (\sqrt {\frac {1}{\sin \relax (x)} + 1} - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*(1+csc(x))^(1/2),x, algorithm="maxima")

[Out]

sqrt(1/sin(x) + 1)*sin(x) + 1/2*log(sqrt(1/sin(x) + 1) + 1) - 1/2*log(sqrt(1/sin(x) + 1) - 1)

________________________________________________________________________________________

mupad [B]  time = 3.10, size = 47, normalized size = 2.24 \[ \sin \relax (x)\,\sqrt {\frac {1}{\sin \relax (x)}+1}+\frac {\ln \left (\sin \relax (x)+\sqrt {{\sin \relax (x)}^2+\sin \relax (x)}+\frac {1}{2}\right )\,\sin \relax (x)\,\sqrt {\frac {1}{\sin \relax (x)}+1}}{2\,\sqrt {{\sin \relax (x)}^2+\sin \relax (x)}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sin(x)*(1/sin(x) + 1)^(1/2) + (log(sin(x) + (sin(x) + sin(x)^2)^(1/2) + 1/2)*sin(x)*(1/sin(x) + 1)^(1/2))/(2*(
sin(x) + sin(x)^2)^(1/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\csc {\relax (x )} + 1} \cos {\relax (x )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*(1+csc(x))**(1/2),x)

[Out]

Integral(sqrt(csc(x) + 1)*cos(x), x)

________________________________________________________________________________________