\(\int \frac {\csc (a+b x)}{\sqrt {d \tan (a+b x)}} \, dx\) [92]

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

Optimal result

Integrand size = 19, antiderivative size = 72 \[ \int \frac {\csc (a+b x)}{\sqrt {d \tan (a+b x)}} \, dx=-\frac {2 \cos (a+b x)}{b \sqrt {d \tan (a+b x)}}-\frac {2 E\left (\left .a-\frac {\pi }{4}+b x\right |2\right ) \sin (a+b x)}{b \sqrt {\sin (2 a+2 b x)} \sqrt {d \tan (a+b x)}} \] Output:

-2*cos(b*x+a)/b/(d*tan(b*x+a))^(1/2)+2*EllipticE(cos(a+1/4*Pi+b*x),2^(1/2) 
)*sin(b*x+a)/b/sin(2*b*x+2*a)^(1/2)/(d*tan(b*x+a))^(1/2)
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.

Time = 0.27 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.96 \[ \int \frac {\csc (a+b x)}{\sqrt {d \tan (a+b x)}} \, dx=-\frac {2 \cos (a+b x) \left (3+2 \operatorname {Hypergeometric2F1}\left (\frac {3}{4},\frac {3}{2},\frac {7}{4},-\tan ^2(a+b x)\right ) \sqrt {\sec ^2(a+b x)} \tan ^2(a+b x)\right )}{3 b \sqrt {d \tan (a+b x)}} \] Input:

Integrate[Csc[a + b*x]/Sqrt[d*Tan[a + b*x]],x]
 

Output:

(-2*Cos[a + b*x]*(3 + 2*Hypergeometric2F1[3/4, 3/2, 7/4, -Tan[a + b*x]^2]* 
Sqrt[Sec[a + b*x]^2]*Tan[a + b*x]^2))/(3*b*Sqrt[d*Tan[a + b*x]])
 

Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.51, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.421, Rules used = {3042, 3081, 3042, 3050, 3042, 3052, 3042, 3119}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\csc (a+b x)}{\sqrt {d \tan (a+b x)}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sin (a+b x) \sqrt {d \tan (a+b x)}}dx\)

\(\Big \downarrow \) 3081

\(\displaystyle \frac {\sqrt {\sin (a+b x)} \int \frac {\sqrt {\cos (a+b x)}}{\sin ^{\frac {3}{2}}(a+b x)}dx}{\sqrt {\cos (a+b x)} \sqrt {d \tan (a+b x)}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\sqrt {\sin (a+b x)} \int \frac {\sqrt {\cos (a+b x)}}{\sin (a+b x)^{3/2}}dx}{\sqrt {\cos (a+b x)} \sqrt {d \tan (a+b x)}}\)

\(\Big \downarrow \) 3050

\(\displaystyle \frac {\sqrt {\sin (a+b x)} \left (-2 \int \sqrt {\cos (a+b x)} \sqrt {\sin (a+b x)}dx-\frac {2 \cos ^{\frac {3}{2}}(a+b x)}{b \sqrt {\sin (a+b x)}}\right )}{\sqrt {\cos (a+b x)} \sqrt {d \tan (a+b x)}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\sqrt {\sin (a+b x)} \left (-2 \int \sqrt {\cos (a+b x)} \sqrt {\sin (a+b x)}dx-\frac {2 \cos ^{\frac {3}{2}}(a+b x)}{b \sqrt {\sin (a+b x)}}\right )}{\sqrt {\cos (a+b x)} \sqrt {d \tan (a+b x)}}\)

\(\Big \downarrow \) 3052

\(\displaystyle \frac {\sqrt {\sin (a+b x)} \left (-\frac {2 \sqrt {\sin (a+b x)} \sqrt {\cos (a+b x)} \int \sqrt {\sin (2 a+2 b x)}dx}{\sqrt {\sin (2 a+2 b x)}}-\frac {2 \cos ^{\frac {3}{2}}(a+b x)}{b \sqrt {\sin (a+b x)}}\right )}{\sqrt {\cos (a+b x)} \sqrt {d \tan (a+b x)}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\sqrt {\sin (a+b x)} \left (-\frac {2 \sqrt {\sin (a+b x)} \sqrt {\cos (a+b x)} \int \sqrt {\sin (2 a+2 b x)}dx}{\sqrt {\sin (2 a+2 b x)}}-\frac {2 \cos ^{\frac {3}{2}}(a+b x)}{b \sqrt {\sin (a+b x)}}\right )}{\sqrt {\cos (a+b x)} \sqrt {d \tan (a+b x)}}\)

\(\Big \downarrow \) 3119

\(\displaystyle \frac {\sqrt {\sin (a+b x)} \left (-\frac {2 \cos ^{\frac {3}{2}}(a+b x)}{b \sqrt {\sin (a+b x)}}-\frac {2 \sqrt {\sin (a+b x)} \sqrt {\cos (a+b x)} E\left (\left .a+b x-\frac {\pi }{4}\right |2\right )}{b \sqrt {\sin (2 a+2 b x)}}\right )}{\sqrt {\cos (a+b x)} \sqrt {d \tan (a+b x)}}\)

Input:

Int[Csc[a + b*x]/Sqrt[d*Tan[a + b*x]],x]
 

Output:

(Sqrt[Sin[a + b*x]]*((-2*Cos[a + b*x]^(3/2))/(b*Sqrt[Sin[a + b*x]]) - (2*S 
qrt[Cos[a + b*x]]*EllipticE[a - Pi/4 + b*x, 2]*Sqrt[Sin[a + b*x]])/(b*Sqrt 
[Sin[2*a + 2*b*x]])))/(Sqrt[Cos[a + b*x]]*Sqrt[d*Tan[a + b*x]])
 

Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3050
Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m 
_), x_Symbol] :> Simp[(b*Cos[e + f*x])^(n + 1)*((a*Sin[e + f*x])^(m + 1)/(a 
*b*f*(m + 1))), x] + Simp[(m + n + 2)/(a^2*(m + 1))   Int[(b*Cos[e + f*x])^ 
n*(a*Sin[e + f*x])^(m + 2), x], x] /; FreeQ[{a, b, e, f, n}, x] && LtQ[m, - 
1] && IntegersQ[2*m, 2*n]
 

rule 3052
Int[Sqrt[cos[(e_.) + (f_.)*(x_)]*(b_.)]*Sqrt[(a_.)*sin[(e_.) + (f_.)*(x_)]] 
, x_Symbol] :> Simp[Sqrt[a*Sin[e + f*x]]*(Sqrt[b*Cos[e + f*x]]/Sqrt[Sin[2*e 
 + 2*f*x]])   Int[Sqrt[Sin[2*e + 2*f*x]], x], x] /; FreeQ[{a, b, e, f}, x]
 

rule 3081
Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( 
n_), x_Symbol] :> Simp[Cos[e + f*x]^n*((b*Tan[e + f*x])^n/(a*Sin[e + f*x])^ 
n)   Int[(a*Sin[e + f*x])^(m + n)/Cos[e + f*x]^n, x], x] /; FreeQ[{a, b, e, 
 f, m, n}, x] &&  !IntegerQ[n] && (ILtQ[m, 0] || (EqQ[m, 1] && EqQ[n, -2^(- 
1)]) || IntegersQ[m - 1/2, n - 1/2])
 

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

Leaf count of result is larger than twice the leaf count of optimal. \(280\) vs. \(2(67)=134\).

Time = 0.72 (sec) , antiderivative size = 281, normalized size of antiderivative = 3.90

method result size
default \(-\frac {\sqrt {-\frac {2 \sin \left (b x +a \right ) \cos \left (b x +a \right )}{\left (\cos \left (b x +a \right )+1\right )^{2}}}\, \left (-1+2 \sqrt {\csc \left (b x +a \right )-\cot \left (b x +a \right )+1}\, \sqrt {-2 \csc \left (b x +a \right )+2 \cot \left (b x +a \right )+2}\, \sqrt {-\csc \left (b x +a \right )+\cot \left (b x +a \right )}\, \operatorname {EllipticE}\left (\sqrt {\csc \left (b x +a \right )-\cot \left (b x +a \right )+1}, \frac {\sqrt {2}}{2}\right )-\sqrt {\csc \left (b x +a \right )-\cot \left (b x +a \right )+1}\, \sqrt {-2 \csc \left (b x +a \right )+2 \cot \left (b x +a \right )+2}\, \sqrt {-\csc \left (b x +a \right )+\cot \left (b x +a \right )}\, \operatorname {EllipticF}\left (\sqrt {\csc \left (b x +a \right )-\cot \left (b x +a \right )+1}, \frac {\sqrt {2}}{2}\right )+\csc \left (b x +a \right )^{2} \left (1-\cos \left (b x +a \right )\right )^{2}\right ) \sqrt {2}}{b \sqrt {-\frac {\sin \left (b x +a \right ) \cos \left (b x +a \right )}{\left (\cos \left (b x +a \right )+1\right )^{2}}}\, \left (\csc \left (b x +a \right )^{2} \left (1-\cos \left (b x +a \right )\right )^{2}-1\right ) \sqrt {d \tan \left (b x +a \right )}}\) \(281\)

Input:

int(csc(b*x+a)/(d*tan(b*x+a))^(1/2),x,method=_RETURNVERBOSE)
 

Output:

-1/b*(-2*sin(b*x+a)*cos(b*x+a)/(cos(b*x+a)+1)^2)^(1/2)*(-1+2*(csc(b*x+a)-c 
ot(b*x+a)+1)^(1/2)*(-2*csc(b*x+a)+2*cot(b*x+a)+2)^(1/2)*(-csc(b*x+a)+cot(b 
*x+a))^(1/2)*EllipticE((csc(b*x+a)-cot(b*x+a)+1)^(1/2),1/2*2^(1/2))-(csc(b 
*x+a)-cot(b*x+a)+1)^(1/2)*(-2*csc(b*x+a)+2*cot(b*x+a)+2)^(1/2)*(-csc(b*x+a 
)+cot(b*x+a))^(1/2)*EllipticF((csc(b*x+a)-cot(b*x+a)+1)^(1/2),1/2*2^(1/2)) 
+csc(b*x+a)^2*(1-cos(b*x+a))^2)/(-sin(b*x+a)*cos(b*x+a)/(cos(b*x+a)+1)^2)^ 
(1/2)/(csc(b*x+a)^2*(1-cos(b*x+a))^2-1)/(d*tan(b*x+a))^(1/2)*2^(1/2)
 

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.14 (sec) , antiderivative size = 169, normalized size of antiderivative = 2.35 \[ \int \frac {\csc (a+b x)}{\sqrt {d \tan (a+b x)}} \, dx=-\frac {2 \, \sqrt {\frac {d \sin \left (b x + a\right )}{\cos \left (b x + a\right )}} \cos \left (b x + a\right )^{2} + i \, \sqrt {i \, d} E(\arcsin \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right )\,|\,-1) \sin \left (b x + a\right ) - i \, \sqrt {-i \, d} E(\arcsin \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right )\,|\,-1) \sin \left (b x + a\right ) - i \, \sqrt {i \, d} F(\arcsin \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right )\,|\,-1) \sin \left (b x + a\right ) + i \, \sqrt {-i \, d} F(\arcsin \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right )\,|\,-1) \sin \left (b x + a\right )}{b d \sin \left (b x + a\right )} \] Input:

integrate(csc(b*x+a)/(d*tan(b*x+a))^(1/2),x, algorithm="fricas")
 

Output:

-(2*sqrt(d*sin(b*x + a)/cos(b*x + a))*cos(b*x + a)^2 + I*sqrt(I*d)*ellipti 
c_e(arcsin(cos(b*x + a) + I*sin(b*x + a)), -1)*sin(b*x + a) - I*sqrt(-I*d) 
*elliptic_e(arcsin(cos(b*x + a) - I*sin(b*x + a)), -1)*sin(b*x + a) - I*sq 
rt(I*d)*elliptic_f(arcsin(cos(b*x + a) + I*sin(b*x + a)), -1)*sin(b*x + a) 
 + I*sqrt(-I*d)*elliptic_f(arcsin(cos(b*x + a) - I*sin(b*x + a)), -1)*sin( 
b*x + a))/(b*d*sin(b*x + a))
 

Sympy [F]

\[ \int \frac {\csc (a+b x)}{\sqrt {d \tan (a+b x)}} \, dx=\int \frac {\csc {\left (a + b x \right )}}{\sqrt {d \tan {\left (a + b x \right )}}}\, dx \] Input:

integrate(csc(b*x+a)/(d*tan(b*x+a))**(1/2),x)
 

Output:

Integral(csc(a + b*x)/sqrt(d*tan(a + b*x)), x)
 

Maxima [F]

\[ \int \frac {\csc (a+b x)}{\sqrt {d \tan (a+b x)}} \, dx=\int { \frac {\csc \left (b x + a\right )}{\sqrt {d \tan \left (b x + a\right )}} \,d x } \] Input:

integrate(csc(b*x+a)/(d*tan(b*x+a))^(1/2),x, algorithm="maxima")
 

Output:

integrate(csc(b*x + a)/sqrt(d*tan(b*x + a)), x)
 

Giac [F]

\[ \int \frac {\csc (a+b x)}{\sqrt {d \tan (a+b x)}} \, dx=\int { \frac {\csc \left (b x + a\right )}{\sqrt {d \tan \left (b x + a\right )}} \,d x } \] Input:

integrate(csc(b*x+a)/(d*tan(b*x+a))^(1/2),x, algorithm="giac")
 

Output:

integrate(csc(b*x + a)/sqrt(d*tan(b*x + a)), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\csc (a+b x)}{\sqrt {d \tan (a+b x)}} \, dx=\int \frac {1}{\sin \left (a+b\,x\right )\,\sqrt {d\,\mathrm {tan}\left (a+b\,x\right )}} \,d x \] Input:

int(1/(sin(a + b*x)*(d*tan(a + b*x))^(1/2)),x)
 

Output:

int(1/(sin(a + b*x)*(d*tan(a + b*x))^(1/2)), x)
 

Reduce [F]

\[ \int \frac {\csc (a+b x)}{\sqrt {d \tan (a+b x)}} \, dx=\frac {\sqrt {d}\, \left (\int \frac {\sqrt {\tan \left (b x +a \right )}\, \csc \left (b x +a \right )}{\tan \left (b x +a \right )}d x \right )}{d} \] Input:

int(csc(b*x+a)/(d*tan(b*x+a))^(1/2),x)
 

Output:

(sqrt(d)*int((sqrt(tan(a + b*x))*csc(a + b*x))/tan(a + b*x),x))/d