Integrand size = 33, antiderivative size = 118 \[ \int \frac {\sqrt {\csc (d+e x)}}{\sqrt {a+c \cot (d+e x)+b \csc (d+e x)}} \, dx=\frac {2 \sqrt {\csc (d+e x)} \operatorname {EllipticF}\left (\frac {1}{2} \left (d+e x-\tan ^{-1}(c,a)\right ),\frac {2 \sqrt {a^2+c^2}}{b+\sqrt {a^2+c^2}}\right ) \sqrt {\frac {b+c \cos (d+e x)+a \sin (d+e x)}{b+\sqrt {a^2+c^2}}}}{e \sqrt {a+c \cot (d+e x)+b \csc (d+e x)}} \]
2*(cos(1/2*d+1/2*e*x-1/2*arctan(c,a))^2)^(1/2)/cos(1/2*d+1/2*e*x-1/2*arcta n(c,a))*EllipticF(sin(1/2*d+1/2*e*x-1/2*arctan(c,a)),2^(1/2)*((a^2+c^2)^(1 /2)/(b+(a^2+c^2)^(1/2)))^(1/2))*csc(e*x+d)^(1/2)*((b+c*cos(e*x+d)+a*sin(e* x+d))/(b+(a^2+c^2)^(1/2)))^(1/2)/e/(a+c*cot(e*x+d)+b*csc(e*x+d))^(1/2)
Result contains higher order function than in optimal. Order 6 vs. order 4 in optimal.
Time = 1.08 (sec) , antiderivative size = 339, normalized size of antiderivative = 2.87 \[ \int \frac {\sqrt {\csc (d+e x)}}{\sqrt {a+c \cot (d+e x)+b \csc (d+e x)}} \, dx=\frac {2 \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},\frac {1}{2},\frac {3}{2},\frac {b+a \sqrt {1+\frac {c^2}{a^2}} \sin \left (d+e x+\arctan \left (\frac {c}{a}\right )\right )}{b-a \sqrt {1+\frac {c^2}{a^2}}},\frac {b+a \sqrt {1+\frac {c^2}{a^2}} \sin \left (d+e x+\arctan \left (\frac {c}{a}\right )\right )}{b+a \sqrt {1+\frac {c^2}{a^2}}}\right ) \sqrt {\csc (d+e x)} \sec \left (d+e x+\arctan \left (\frac {c}{a}\right )\right ) \sqrt {b+c \cos (d+e x)+a \sin (d+e x)} \sqrt {-\frac {a \sqrt {1+\frac {c^2}{a^2}} \left (-1+\sin \left (d+e x+\arctan \left (\frac {c}{a}\right )\right )\right )}{b+a \sqrt {1+\frac {c^2}{a^2}}}} \sqrt {\frac {a \sqrt {1+\frac {c^2}{a^2}} \left (1+\sin \left (d+e x+\arctan \left (\frac {c}{a}\right )\right )\right )}{-b+a \sqrt {1+\frac {c^2}{a^2}}}} \sqrt {b+a \sqrt {1+\frac {c^2}{a^2}} \sin \left (d+e x+\arctan \left (\frac {c}{a}\right )\right )}}{a \sqrt {1+\frac {c^2}{a^2}} e \sqrt {a+c \cot (d+e x)+b \csc (d+e x)}} \]
(2*AppellF1[1/2, 1/2, 1/2, 3/2, (b + a*Sqrt[1 + c^2/a^2]*Sin[d + e*x + Arc Tan[c/a]])/(b - a*Sqrt[1 + c^2/a^2]), (b + a*Sqrt[1 + c^2/a^2]*Sin[d + e*x + ArcTan[c/a]])/(b + a*Sqrt[1 + c^2/a^2])]*Sqrt[Csc[d + e*x]]*Sec[d + e*x + ArcTan[c/a]]*Sqrt[b + c*Cos[d + e*x] + a*Sin[d + e*x]]*Sqrt[-((a*Sqrt[1 + c^2/a^2]*(-1 + Sin[d + e*x + ArcTan[c/a]]))/(b + a*Sqrt[1 + c^2/a^2]))] *Sqrt[(a*Sqrt[1 + c^2/a^2]*(1 + Sin[d + e*x + ArcTan[c/a]]))/(-b + a*Sqrt[ 1 + c^2/a^2])]*Sqrt[b + a*Sqrt[1 + c^2/a^2]*Sin[d + e*x + ArcTan[c/a]]])/( a*Sqrt[1 + c^2/a^2]*e*Sqrt[a + c*Cot[d + e*x] + b*Csc[d + e*x]])
Time = 0.51 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3042, 3647, 3042, 3606, 3042, 3140}
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 {\sqrt {\csc (d+e x)}}{\sqrt {a+b \csc (d+e x)+c \cot (d+e x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {\csc (d+e x)}}{\sqrt {a+b \csc (d+e x)+c \cot (d+e x)}}dx\) |
\(\Big \downarrow \) 3647 |
\(\displaystyle \frac {\sqrt {\csc (d+e x)} \sqrt {a \sin (d+e x)+b+c \cos (d+e x)} \int \frac {1}{\sqrt {b+c \cos (d+e x)+a \sin (d+e x)}}dx}{\sqrt {a+b \csc (d+e x)+c \cot (d+e x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sqrt {\csc (d+e x)} \sqrt {a \sin (d+e x)+b+c \cos (d+e x)} \int \frac {1}{\sqrt {b+c \cos (d+e x)+a \sin (d+e x)}}dx}{\sqrt {a+b \csc (d+e x)+c \cot (d+e x)}}\) |
\(\Big \downarrow \) 3606 |
\(\displaystyle \frac {\sqrt {\csc (d+e x)} \sqrt {\frac {a \sin (d+e x)+b+c \cos (d+e x)}{\sqrt {a^2+c^2}+b}} \int \frac {1}{\sqrt {\frac {b}{b+\sqrt {a^2+c^2}}+\frac {\sqrt {a^2+c^2} \cos \left (d+e x-\tan ^{-1}(c,a)\right )}{b+\sqrt {a^2+c^2}}}}dx}{\sqrt {a+b \csc (d+e x)+c \cot (d+e x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sqrt {\csc (d+e x)} \sqrt {\frac {a \sin (d+e x)+b+c \cos (d+e x)}{\sqrt {a^2+c^2}+b}} \int \frac {1}{\sqrt {\frac {b}{b+\sqrt {a^2+c^2}}+\frac {\sqrt {a^2+c^2} \sin \left (d+e x-\tan ^{-1}(c,a)+\frac {\pi }{2}\right )}{b+\sqrt {a^2+c^2}}}}dx}{\sqrt {a+b \csc (d+e x)+c \cot (d+e x)}}\) |
\(\Big \downarrow \) 3140 |
\(\displaystyle \frac {2 \sqrt {\csc (d+e x)} \sqrt {\frac {a \sin (d+e x)+b+c \cos (d+e x)}{\sqrt {a^2+c^2}+b}} \operatorname {EllipticF}\left (\frac {1}{2} \left (d+e x-\tan ^{-1}(c,a)\right ),\frac {2 \sqrt {a^2+c^2}}{b+\sqrt {a^2+c^2}}\right )}{e \sqrt {a+b \csc (d+e x)+c \cot (d+e x)}}\) |
(2*Sqrt[Csc[d + e*x]]*EllipticF[(d + e*x - ArcTan[c, a])/2, (2*Sqrt[a^2 + c^2])/(b + Sqrt[a^2 + c^2])]*Sqrt[(b + c*Cos[d + e*x] + a*Sin[d + e*x])/(b + Sqrt[a^2 + c^2])])/(e*Sqrt[a + c*Cot[d + e*x] + b*Csc[d + e*x]])
3.5.64.3.1 Defintions of rubi rules used
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/(d*S qrt[a + b]))*EllipticF[(1/2)*(c - Pi/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[ {a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
Int[1/Sqrt[cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*( x_)]], x_Symbol] :> Simp[Sqrt[(a + b*Cos[d + e*x] + c*Sin[d + e*x])/(a + Sq rt[b^2 + c^2])]/Sqrt[a + b*Cos[d + e*x] + c*Sin[d + e*x]] Int[1/Sqrt[a/(a + Sqrt[b^2 + c^2]) + (Sqrt[b^2 + c^2]/(a + Sqrt[b^2 + c^2]))*Cos[d + e*x - ArcTan[b, c]]], x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[a^2 - b^2 - c^2 , 0] && NeQ[b^2 + c^2, 0] && !GtQ[a + Sqrt[b^2 + c^2], 0]
Int[csc[(d_.) + (e_.)*(x_)]^(n_.)*((a_.) + csc[(d_.) + (e_.)*(x_)]*(b_.) + cot[(d_.) + (e_.)*(x_)]*(c_.))^(m_), x_Symbol] :> Simp[Csc[d + e*x]^n*((b + a*Sin[d + e*x] + c*Cos[d + e*x])^n/(a + b*Csc[d + e*x] + c*Cot[d + e*x])^n ) Int[1/(b + a*Sin[d + e*x] + c*Cos[d + e*x])^n, x], x] /; FreeQ[{a, b, c , d, e}, x] && EqQ[m + n, 0] && !IntegerQ[n]
Result contains complex when optimal does not.
Time = 31.07 (sec) , antiderivative size = 644, normalized size of antiderivative = 5.46
method | result | size |
default | \(\frac {2 i \sqrt {2}\, \left (i b -i c +\sqrt {a^{2}-b^{2}+c^{2}}+a \right ) \sqrt {\csc \left (e x +d \right )}\, \sqrt {a +c \cot \left (e x +d \right )+b \csc \left (e x +d \right )}\, \operatorname {EllipticF}\left (\frac {\sqrt {2}\, \sqrt {-\frac {\left (i \cos \left (e x +d \right )+i-\sin \left (e x +d \right )\right )^{2} \left (i b -i c -\sqrt {a^{2}-b^{2}+c^{2}}-a \right )}{\left (1+\cos \left (e x +d \right )\right ) \left (i b -i c +\sqrt {a^{2}-b^{2}+c^{2}}+a \right )}}}{2}, \sqrt {\frac {\left (i b -i c +\sqrt {a^{2}-b^{2}+c^{2}}+a \right ) \left (i b -i c +\sqrt {a^{2}-b^{2}+c^{2}}-a \right )}{\left (i b -i c -\sqrt {a^{2}-b^{2}+c^{2}}-a \right ) \left (i b -i c -\sqrt {a^{2}-b^{2}+c^{2}}+a \right )}}\right ) \sqrt {-\frac {\left (i \cos \left (e x +d \right )+i-\sin \left (e x +d \right )\right )^{2} \left (i b -i c -\sqrt {a^{2}-b^{2}+c^{2}}-a \right )}{\left (1+\cos \left (e x +d \right )\right ) \left (i b -i c +\sqrt {a^{2}-b^{2}+c^{2}}+a \right )}}\, \sqrt {\frac {i \left (\sqrt {a^{2}-b^{2}+c^{2}}\, \sin \left (e x +d \right )-b \cos \left (e x +d \right )+c \cos \left (e x +d \right )+a \sin \left (e x +d \right )+b -c \right )}{\left (i \sin \left (e x +d \right )-\cos \left (e x +d \right )+1\right ) \left (i b -i c +\sqrt {a^{2}-b^{2}+c^{2}}+a \right )}}\, \sqrt {-\frac {i \left (\sqrt {a^{2}-b^{2}+c^{2}}\, \sin \left (e x +d \right )+b \cos \left (e x +d \right )-c \cos \left (e x +d \right )-a \sin \left (e x +d \right )-b +c \right )}{\left (i \sin \left (e x +d \right )-\cos \left (e x +d \right )+1\right ) \left (i b -i c -\sqrt {a^{2}-b^{2}+c^{2}}+a \right )}}\, \left (i \sin \left (e x +d \right )^{2}-\cos \left (e x +d \right ) \sin \left (e x +d \right )\right )}{e \left (b +c \cos \left (e x +d \right )+a \sin \left (e x +d \right )\right ) \left (i b -i c -\sqrt {a^{2}-b^{2}+c^{2}}-a \right )}\) | \(644\) |
2*I/e*2^(1/2)*(I*b-I*c+(a^2-b^2+c^2)^(1/2)+a)*csc(e*x+d)^(1/2)*(a+c*cot(e* x+d)+b*csc(e*x+d))^(1/2)*EllipticF(1/2*2^(1/2)*(-(I*cos(e*x+d)+I-sin(e*x+d ))^2/(1+cos(e*x+d))*(I*b-I*c-(a^2-b^2+c^2)^(1/2)-a)/(I*b-I*c+(a^2-b^2+c^2) ^(1/2)+a))^(1/2),((I*b-I*c+(a^2-b^2+c^2)^(1/2)+a)*(I*b-I*c+(a^2-b^2+c^2)^( 1/2)-a)/(I*b-I*c-(a^2-b^2+c^2)^(1/2)-a)/(I*b-I*c-(a^2-b^2+c^2)^(1/2)+a))^( 1/2))*(-(I*cos(e*x+d)+I-sin(e*x+d))^2/(1+cos(e*x+d))*(I*b-I*c-(a^2-b^2+c^2 )^(1/2)-a)/(I*b-I*c+(a^2-b^2+c^2)^(1/2)+a))^(1/2)*(I*((a^2-b^2+c^2)^(1/2)* sin(e*x+d)-b*cos(e*x+d)+c*cos(e*x+d)+a*sin(e*x+d)+b-c)/(I*sin(e*x+d)-cos(e *x+d)+1)/(I*b-I*c+(a^2-b^2+c^2)^(1/2)+a))^(1/2)*(-I*((a^2-b^2+c^2)^(1/2)*s in(e*x+d)+b*cos(e*x+d)-c*cos(e*x+d)-a*sin(e*x+d)-b+c)/(I*sin(e*x+d)-cos(e* x+d)+1)/(I*b-I*c-(a^2-b^2+c^2)^(1/2)+a))^(1/2)/(b+c*cos(e*x+d)+a*sin(e*x+d ))*(I*sin(e*x+d)^2-cos(e*x+d)*sin(e*x+d))/(I*b-I*c-(a^2-b^2+c^2)^(1/2)-a)
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.10 (sec) , antiderivative size = 508, normalized size of antiderivative = 4.31 \[ \int \frac {\sqrt {\csc (d+e x)}}{\sqrt {a+c \cot (d+e x)+b \csc (d+e x)}} \, dx=\frac {{\left (i \, a - c\right )} \sqrt {-2 i \, a - 2 \, c} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (3 \, a^{4} - 4 \, a^{2} b^{2} + 4 \, b^{2} c^{2} + 6 i \, a c^{3} - 3 \, c^{4} + 2 i \, {\left (3 \, a^{3} - 4 \, a b^{2}\right )} c\right )}}{3 \, {\left (a^{4} + 2 \, a^{2} c^{2} + c^{4}\right )}}, -\frac {8 \, {\left (-9 i \, a^{5} b + 8 i \, a^{3} b^{3} + 27 i \, a b c^{4} - 9 \, b c^{5} + 2 \, {\left (9 \, a^{2} b + 4 \, b^{3}\right )} c^{3} + 6 i \, {\left (3 \, a^{3} b - 4 \, a b^{3}\right )} c^{2} + 3 \, {\left (9 \, a^{4} b - 8 \, a^{2} b^{3}\right )} c\right )}}{27 \, {\left (a^{6} + 3 \, a^{4} c^{2} + 3 \, a^{2} c^{4} + c^{6}\right )}}, \frac {-2 i \, a b + 2 \, b c + 3 \, {\left (a^{2} + c^{2}\right )} \cos \left (e x + d\right ) - 3 \, {\left (i \, a^{2} + i \, c^{2}\right )} \sin \left (e x + d\right )}{3 \, {\left (a^{2} + c^{2}\right )}}\right ) + \sqrt {2 i \, a - 2 \, c} {\left (-i \, a - c\right )} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (3 \, a^{4} - 4 \, a^{2} b^{2} + 4 \, b^{2} c^{2} - 6 i \, a c^{3} - 3 \, c^{4} - 2 i \, {\left (3 \, a^{3} - 4 \, a b^{2}\right )} c\right )}}{3 \, {\left (a^{4} + 2 \, a^{2} c^{2} + c^{4}\right )}}, -\frac {8 \, {\left (9 i \, a^{5} b - 8 i \, a^{3} b^{3} - 27 i \, a b c^{4} - 9 \, b c^{5} + 2 \, {\left (9 \, a^{2} b + 4 \, b^{3}\right )} c^{3} - 6 i \, {\left (3 \, a^{3} b - 4 \, a b^{3}\right )} c^{2} + 3 \, {\left (9 \, a^{4} b - 8 \, a^{2} b^{3}\right )} c\right )}}{27 \, {\left (a^{6} + 3 \, a^{4} c^{2} + 3 \, a^{2} c^{4} + c^{6}\right )}}, \frac {2 i \, a b + 2 \, b c + 3 \, {\left (a^{2} + c^{2}\right )} \cos \left (e x + d\right ) - 3 \, {\left (-i \, a^{2} - i \, c^{2}\right )} \sin \left (e x + d\right )}{3 \, {\left (a^{2} + c^{2}\right )}}\right )}{{\left (a^{2} + c^{2}\right )} e} \]
((I*a - c)*sqrt(-2*I*a - 2*c)*weierstrassPInverse(4/3*(3*a^4 - 4*a^2*b^2 + 4*b^2*c^2 + 6*I*a*c^3 - 3*c^4 + 2*I*(3*a^3 - 4*a*b^2)*c)/(a^4 + 2*a^2*c^2 + c^4), -8/27*(-9*I*a^5*b + 8*I*a^3*b^3 + 27*I*a*b*c^4 - 9*b*c^5 + 2*(9*a ^2*b + 4*b^3)*c^3 + 6*I*(3*a^3*b - 4*a*b^3)*c^2 + 3*(9*a^4*b - 8*a^2*b^3)* c)/(a^6 + 3*a^4*c^2 + 3*a^2*c^4 + c^6), 1/3*(-2*I*a*b + 2*b*c + 3*(a^2 + c ^2)*cos(e*x + d) - 3*(I*a^2 + I*c^2)*sin(e*x + d))/(a^2 + c^2)) + sqrt(2*I *a - 2*c)*(-I*a - c)*weierstrassPInverse(4/3*(3*a^4 - 4*a^2*b^2 + 4*b^2*c^ 2 - 6*I*a*c^3 - 3*c^4 - 2*I*(3*a^3 - 4*a*b^2)*c)/(a^4 + 2*a^2*c^2 + c^4), -8/27*(9*I*a^5*b - 8*I*a^3*b^3 - 27*I*a*b*c^4 - 9*b*c^5 + 2*(9*a^2*b + 4*b ^3)*c^3 - 6*I*(3*a^3*b - 4*a*b^3)*c^2 + 3*(9*a^4*b - 8*a^2*b^3)*c)/(a^6 + 3*a^4*c^2 + 3*a^2*c^4 + c^6), 1/3*(2*I*a*b + 2*b*c + 3*(a^2 + c^2)*cos(e*x + d) - 3*(-I*a^2 - I*c^2)*sin(e*x + d))/(a^2 + c^2)))/((a^2 + c^2)*e)
\[ \int \frac {\sqrt {\csc (d+e x)}}{\sqrt {a+c \cot (d+e x)+b \csc (d+e x)}} \, dx=\int \frac {\sqrt {\csc {\left (d + e x \right )}}}{\sqrt {a + b \csc {\left (d + e x \right )} + c \cot {\left (d + e x \right )}}}\, dx \]
\[ \int \frac {\sqrt {\csc (d+e x)}}{\sqrt {a+c \cot (d+e x)+b \csc (d+e x)}} \, dx=\int { \frac {\sqrt {\csc \left (e x + d\right )}}{\sqrt {c \cot \left (e x + d\right ) + b \csc \left (e x + d\right ) + a}} \,d x } \]
\[ \int \frac {\sqrt {\csc (d+e x)}}{\sqrt {a+c \cot (d+e x)+b \csc (d+e x)}} \, dx=\int { \frac {\sqrt {\csc \left (e x + d\right )}}{\sqrt {c \cot \left (e x + d\right ) + b \csc \left (e x + d\right ) + a}} \,d x } \]
Timed out. \[ \int \frac {\sqrt {\csc (d+e x)}}{\sqrt {a+c \cot (d+e x)+b \csc (d+e x)}} \, dx=\int \frac {\sqrt {\frac {1}{\sin \left (d+e\,x\right )}}}{\sqrt {a+c\,\mathrm {cot}\left (d+e\,x\right )+\frac {b}{\sin \left (d+e\,x\right )}}} \,d x \]