\(\int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx\) [37]

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

Optimal result

Integrand size = 35, antiderivative size = 140 \[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=-\frac {2 \sqrt {c} \text {arctanh}\left (\frac {\sqrt {a} \sqrt {c} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}\right )}{\sqrt {a} f}+\frac {\sqrt {2} \sqrt {c-d} \text {arctanh}\left (\frac {\sqrt {a} \sqrt {c-d} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}\right )}{\sqrt {a} f} \] Output:

-2*c^(1/2)*arctanh(a^(1/2)*c^(1/2)*cos(f*x+e)/(a+a*sin(f*x+e))^(1/2)/(c+d* 
sin(f*x+e))^(1/2))/a^(1/2)/f+2^(1/2)*(c-d)^(1/2)*arctanh(1/2*a^(1/2)*(c-d) 
^(1/2)*cos(f*x+e)*2^(1/2)/(a+a*sin(f*x+e))^(1/2)/(c+d*sin(f*x+e))^(1/2))/a 
^(1/2)/f
 

Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(885\) vs. \(2(140)=280\).

Time = 16.35 (sec) , antiderivative size = 885, normalized size of antiderivative = 6.32 \[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx =\text {Too large to display} \] Input:

Integrate[(Csc[e + f*x]*Sqrt[c + d*Sin[e + f*x]])/Sqrt[a + a*Sin[e + f*x]] 
,x]
 

Output:

(Csc[e + f*x]*(Sqrt[c]*Log[Tan[(e + f*x)/2]] - Sqrt[2]*Sqrt[c - d]*Log[1 + 
 Tan[(e + f*x)/2]] + Sqrt[c]*Log[d + Sqrt[2]*Sqrt[c]*Sqrt[(1 + Cos[e + f*x 
])^(-1)]*Sqrt[c + d*Sin[e + f*x]] + c*Tan[(e + f*x)/2]] - Sqrt[c]*Log[c + 
Sqrt[2]*Sqrt[c]*Sqrt[(1 + Cos[e + f*x])^(-1)]*Sqrt[c + d*Sin[e + f*x]] + d 
*Tan[(e + f*x)/2]] + Sqrt[2]*Sqrt[c - d]*Log[c - d + 2*Sqrt[c - d]*Sqrt[(1 
 + Cos[e + f*x])^(-1)]*Sqrt[c + d*Sin[e + f*x]] + (-c + d)*Tan[(e + f*x)/2 
]])*Sqrt[c + d*Sin[e + f*x]])/(f*Sqrt[a*(1 + Sin[e + f*x])]*((Sqrt[c]*Csc[ 
(e + f*x)/2]*Sec[(e + f*x)/2])/2 - (Sqrt[c - d]*Sec[(e + f*x)/2]^2)/(Sqrt[ 
2]*(1 + Tan[(e + f*x)/2])) + (Sqrt[c]*((c*Sec[(e + f*x)/2]^2)/2 + (Sqrt[c] 
*d*Cos[e + f*x]*Sqrt[(1 + Cos[e + f*x])^(-1)])/(Sqrt[2]*Sqrt[c + d*Sin[e + 
 f*x]]) + (Sqrt[c]*((1 + Cos[e + f*x])^(-1))^(3/2)*Sin[e + f*x]*Sqrt[c + d 
*Sin[e + f*x]])/Sqrt[2]))/(d + Sqrt[2]*Sqrt[c]*Sqrt[(1 + Cos[e + f*x])^(-1 
)]*Sqrt[c + d*Sin[e + f*x]] + c*Tan[(e + f*x)/2]) - (Sqrt[c]*((d*Sec[(e + 
f*x)/2]^2)/2 + (Sqrt[c]*d*Cos[e + f*x]*Sqrt[(1 + Cos[e + f*x])^(-1)])/(Sqr 
t[2]*Sqrt[c + d*Sin[e + f*x]]) + (Sqrt[c]*((1 + Cos[e + f*x])^(-1))^(3/2)* 
Sin[e + f*x]*Sqrt[c + d*Sin[e + f*x]])/Sqrt[2]))/(c + Sqrt[2]*Sqrt[c]*Sqrt 
[(1 + Cos[e + f*x])^(-1)]*Sqrt[c + d*Sin[e + f*x]] + d*Tan[(e + f*x)/2]) + 
 (Sqrt[2]*Sqrt[c - d]*(((-c + d)*Sec[(e + f*x)/2]^2)/2 + (Sqrt[c - d]*d*Co 
s[e + f*x]*Sqrt[(1 + Cos[e + f*x])^(-1)])/Sqrt[c + d*Sin[e + f*x]] + Sqrt[ 
c - d]*((1 + Cos[e + f*x])^(-1))^(3/2)*Sin[e + f*x]*Sqrt[c + d*Sin[e + ...
 

Rubi [A] (verified)

Time = 0.91 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3042, 3423, 3042, 3261, 221, 3422, 219}

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 (e+f x) \sqrt {c+d \sin (e+f x)}}{\sqrt {a \sin (e+f x)+a}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sqrt {c+d \sin (e+f x)}}{\sin (e+f x) \sqrt {a \sin (e+f x)+a}}dx\)

\(\Big \downarrow \) 3423

\(\displaystyle \frac {c \int \frac {\csc (e+f x) \sqrt {\sin (e+f x) a+a}}{\sqrt {c+d \sin (e+f x)}}dx}{a}-(c-d) \int \frac {1}{\sqrt {\sin (e+f x) a+a} \sqrt {c+d \sin (e+f x)}}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {c \int \frac {\sqrt {\sin (e+f x) a+a}}{\sin (e+f x) \sqrt {c+d \sin (e+f x)}}dx}{a}-(c-d) \int \frac {1}{\sqrt {\sin (e+f x) a+a} \sqrt {c+d \sin (e+f x)}}dx\)

\(\Big \downarrow \) 3261

\(\displaystyle \frac {2 a (c-d) \int \frac {1}{2 a^2-\frac {a^3 (c-d) \cos ^2(e+f x)}{(\sin (e+f x) a+a) (c+d \sin (e+f x))}}d\frac {a \cos (e+f x)}{\sqrt {\sin (e+f x) a+a} \sqrt {c+d \sin (e+f x)}}}{f}+\frac {c \int \frac {\sqrt {\sin (e+f x) a+a}}{\sin (e+f x) \sqrt {c+d \sin (e+f x)}}dx}{a}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {c \int \frac {\sqrt {\sin (e+f x) a+a}}{\sin (e+f x) \sqrt {c+d \sin (e+f x)}}dx}{a}+\frac {\sqrt {2} \sqrt {c-d} \text {arctanh}\left (\frac {\sqrt {a} \sqrt {c-d} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {c+d \sin (e+f x)}}\right )}{\sqrt {a} f}\)

\(\Big \downarrow \) 3422

\(\displaystyle \frac {\sqrt {2} \sqrt {c-d} \text {arctanh}\left (\frac {\sqrt {a} \sqrt {c-d} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {c+d \sin (e+f x)}}\right )}{\sqrt {a} f}-\frac {2 c \int \frac {1}{1-\frac {a c \cos ^2(e+f x)}{(\sin (e+f x) a+a) (c+d \sin (e+f x))}}d\frac {\cos (e+f x)}{\sqrt {\sin (e+f x) a+a} \sqrt {c+d \sin (e+f x)}}}{f}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {\sqrt {2} \sqrt {c-d} \text {arctanh}\left (\frac {\sqrt {a} \sqrt {c-d} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {c+d \sin (e+f x)}}\right )}{\sqrt {a} f}-\frac {2 \sqrt {c} \text {arctanh}\left (\frac {\sqrt {a} \sqrt {c} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a} \sqrt {c+d \sin (e+f x)}}\right )}{\sqrt {a} f}\)

Input:

Int[(Csc[e + f*x]*Sqrt[c + d*Sin[e + f*x]])/Sqrt[a + a*Sin[e + f*x]],x]
 

Output:

(-2*Sqrt[c]*ArcTanh[(Sqrt[a]*Sqrt[c]*Cos[e + f*x])/(Sqrt[a + a*Sin[e + f*x 
]]*Sqrt[c + d*Sin[e + f*x]])])/(Sqrt[a]*f) + (Sqrt[2]*Sqrt[c - d]*ArcTanh[ 
(Sqrt[a]*Sqrt[c - d]*Cos[e + f*x])/(Sqrt[2]*Sqrt[a + a*Sin[e + f*x]]*Sqrt[ 
c + d*Sin[e + f*x]])])/(Sqrt[a]*f)
 

Defintions of rubi rules used

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

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

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

rule 3261
Int[1/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_.) + (d_.)*sin[(e 
_.) + (f_.)*(x_)]]), x_Symbol] :> Simp[-2*(a/f)   Subst[Int[1/(2*b^2 - (a*c 
 - b*d)*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*S 
in[e + f*x]]))], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && 
 EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
 

rule 3422
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/(sin[(e_.) + (f_.)*(x_)]*Sqr 
t[(c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Simp[-2*(a/f)   Subs 
t[Int[1/(1 - a*c*x^2), x], x, Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c 
 + d*Sin[e + f*x]])], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 
0] && EqQ[a^2 - b^2, 0] && NeQ[b*c + a*d, 0]
 

rule 3423
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/(sin[(e_.) + (f_.)*(x_)]*Sqr 
t[(c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Simp[(b*c - a*d)/c 
 Int[1/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]]), x], x] + Simp[a 
/c   Int[Sqrt[c + d*Sin[e + f*x]]/(Sin[e + f*x]*Sqrt[a + b*Sin[e + f*x]]), 
x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^ 
2, 0] && EqQ[c^2 - d^2, 0]
 
Maple [B] (warning: unable to verify)

Leaf count of result is larger than twice the leaf count of optimal. \(790\) vs. \(2(113)=226\).

Time = 8.82 (sec) , antiderivative size = 791, normalized size of antiderivative = 5.65

method result size
default \(\text {Expression too large to display}\) \(791\)

Input:

int(csc(f*x+e)*(c+d*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x,method=_RET 
URNVERBOSE)
 

Output:

-1/2/f/c^(1/2)/(2*c-2*d)^(1/2)/((2*sin(1/2*f*x+1/2*e)*cos(1/2*f*x+1/2*e)+1 
)*a)^(1/2)*((1-cos(1/2*f*x+1/2*e))^2*csc(1/2*f*x+1/2*e)^2-2*csc(1/2*f*x+1/ 
2*e)+2*cot(1/2*f*x+1/2*e)-1)*(c+2*d*sin(1/2*f*x+1/2*e)*cos(1/2*f*x+1/2*e)) 
^(1/2)*(c*ln(-4*c^(1/2)*((c+2*d*sin(1/2*f*x+1/2*e)*cos(1/2*f*x+1/2*e))/(co 
s(1/2*f*x+1/2*e)+1)^2)^(1/2)-4*c^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*x+1/2*e))/(cos(1/2*f*x+1/ 
2*e)+sin(1/2*f*x+1/2*e)))*c^(1/2)*d)/((c+2*d*sin(1/2*f*x+1/2*e)*cos(1/2...
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 288 vs. \(2 (113) = 226\).

Time = 0.41 (sec) , antiderivative size = 2791, normalized size of antiderivative = 19.94 \[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\text {Too large to display} \] Input:

integrate(csc(f*x+e)*(c+d*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x, algo 
rithm="fricas")
 

Output:

[1/4*(sqrt(2)*sqrt((c - d)/a)*log(((c^2 - 14*c*d + 17*d^2)*cos(f*x + e)^3 
+ 4*sqrt(2)*((c - 3*d)*cos(f*x + e)^2 - (3*c - d)*cos(f*x + e) + ((c - 3*d 
)*cos(f*x + e) + 4*c - 4*d)*sin(f*x + e) - 4*c + 4*d)*sqrt(a*sin(f*x + e) 
+ a)*sqrt(d*sin(f*x + e) + c)*sqrt((c - d)/a) - (13*c^2 - 22*c*d - 3*d^2)* 
cos(f*x + e)^2 - 4*c^2 - 8*c*d - 4*d^2 - 2*(9*c^2 - 14*c*d + 9*d^2)*cos(f* 
x + e) + ((c^2 - 14*c*d + 17*d^2)*cos(f*x + e)^2 - 4*c^2 - 8*c*d - 4*d^2 + 
 2*(7*c^2 - 18*c*d + 7*d^2)*cos(f*x + e))*sin(f*x + e))/(cos(f*x + e)^3 + 
3*cos(f*x + e)^2 + (cos(f*x + e)^2 - 2*cos(f*x + e) - 4)*sin(f*x + e) - 2* 
cos(f*x + e) - 4)) + sqrt(c/a)*log(((c^4 - 28*c^3*d + 70*c^2*d^2 - 28*c*d^ 
3 + d^4)*cos(f*x + e)^5 - (31*c^4 - 196*c^3*d + 154*c^2*d^2 - 4*c*d^3 - d^ 
4)*cos(f*x + e)^4 + c^4 + 4*c^3*d + 6*c^2*d^2 + 4*c*d^3 + d^4 - 2*(81*c^4 
- 252*c^3*d + 150*c^2*d^2 - 28*c*d^3 + d^4)*cos(f*x + e)^3 + 2*(79*c^4 - 1 
00*c^3*d + 74*c^2*d^2 - 4*c*d^3 - d^4)*cos(f*x + e)^2 - 8*((c^3 - 7*c^2*d 
+ 7*c*d^2 - d^3)*cos(f*x + e)^4 - 2*(5*c^3 - 14*c^2*d + 5*c*d^2)*cos(f*x + 
 e)^3 + 51*c^3 - 59*c^2*d + 17*c*d^2 - d^3 - 2*(18*c^3 - 33*c^2*d + 12*c*d 
^2 - d^3)*cos(f*x + e)^2 + 2*(13*c^3 - 14*c^2*d + 5*c*d^2)*cos(f*x + e) + 
((c^3 - 7*c^2*d + 7*c*d^2 - d^3)*cos(f*x + e)^3 - 51*c^3 + 59*c^2*d - 17*c 
*d^2 + d^3 + (11*c^3 - 35*c^2*d + 17*c*d^2 - d^3)*cos(f*x + e)^2 - (25*c^3 
 - 31*c^2*d + 7*c*d^2 - d^3)*cos(f*x + e))*sin(f*x + e))*sqrt(a*sin(f*x + 
e) + a)*sqrt(d*sin(f*x + e) + c)*sqrt(c/a) + (289*c^4 - 476*c^3*d + 230...
 

Sympy [F]

\[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\int \frac {\sqrt {c + d \sin {\left (e + f x \right )}} \csc {\left (e + f x \right )}}{\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \] Input:

integrate(csc(f*x+e)*(c+d*sin(f*x+e))**(1/2)/(a+a*sin(f*x+e))**(1/2),x)
 

Output:

Integral(sqrt(c + d*sin(e + f*x))*csc(e + f*x)/sqrt(a*(sin(e + f*x) + 1)), 
 x)
 

Maxima [F]

\[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\int { \frac {\sqrt {d \sin \left (f x + e\right ) + c} \csc \left (f x + e\right )}{\sqrt {a \sin \left (f x + e\right ) + a}} \,d x } \] Input:

integrate(csc(f*x+e)*(c+d*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x, algo 
rithm="maxima")
 

Output:

integrate(sqrt(d*sin(f*x + e) + c)*csc(f*x + e)/sqrt(a*sin(f*x + e) + a), 
x)
 

Giac [F(-1)]

Timed out. \[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\text {Timed out} \] Input:

integrate(csc(f*x+e)*(c+d*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x, algo 
rithm="giac")
 

Output:

Timed out
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\int \frac {\sqrt {c+d\,\sin \left (e+f\,x\right )}}{\sin \left (e+f\,x\right )\,\sqrt {a+a\,\sin \left (e+f\,x\right )}} \,d x \] Input:

int((c + d*sin(e + f*x))^(1/2)/(sin(e + f*x)*(a + a*sin(e + f*x))^(1/2)),x 
)
 

Output:

int((c + d*sin(e + f*x))^(1/2)/(sin(e + f*x)*(a + a*sin(e + f*x))^(1/2)), 
x)
                                                                                    
                                                                                    
 

Reduce [F]

\[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\frac {\sqrt {a}\, \left (\int \frac {\sqrt {\sin \left (f x +e \right ) d +c}\, \sqrt {\sin \left (f x +e \right )+1}\, \csc \left (f x +e \right )}{\sin \left (f x +e \right )+1}d x \right )}{a} \] Input:

int(csc(f*x+e)*(c+d*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x)
 

Output:

(sqrt(a)*int((sqrt(sin(e + f*x)*d + c)*sqrt(sin(e + f*x) + 1)*csc(e + f*x) 
)/(sin(e + f*x) + 1),x))/a