\(\int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {\sin (e+f x)}} \, dx\) [85]

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

Optimal result

Integrand size = 25, antiderivative size = 37 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {\sin (e+f x)}} \, dx=-\frac {2 \sqrt {a} \arcsin \left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{f} \] Output:

-2*a^(1/2)*arcsin(a^(1/2)*cos(f*x+e)/(a+a*sin(f*x+e))^(1/2))/f
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.67 (sec) , antiderivative size = 164, normalized size of antiderivative = 4.43 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {\sin (e+f x)}} \, dx=\frac {(1+i) e^{\frac {1}{2} i (e+f x)} \sqrt {-i e^{-i (e+f x)} \left (-1+e^{2 i (e+f x)}\right )} \left (\arctan \left (\sqrt {-1+e^{2 i (e+f x)}}\right )-i \text {arctanh}\left (\frac {e^{i (e+f x)}}{\sqrt {-1+e^{2 i (e+f x)}}}\right )\right ) \sqrt {a (1+\sin (e+f x))}}{\sqrt {2} \sqrt {-1+e^{2 i (e+f x)}} f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )} \] Input:

Integrate[Sqrt[a + a*Sin[e + f*x]]/Sqrt[Sin[e + f*x]],x]
 

Output:

((1 + I)*E^((I/2)*(e + f*x))*Sqrt[((-I)*(-1 + E^((2*I)*(e + f*x))))/E^(I*( 
e + f*x))]*(ArcTan[Sqrt[-1 + E^((2*I)*(e + f*x))]] - I*ArcTanh[E^(I*(e + f 
*x))/Sqrt[-1 + E^((2*I)*(e + f*x))]])*Sqrt[a*(1 + Sin[e + f*x])])/(Sqrt[2] 
*Sqrt[-1 + E^((2*I)*(e + f*x))]*f*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2]))
 

Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {3042, 3253, 223}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3253

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

\(\Big \downarrow \) 223

\(\displaystyle -\frac {2 \sqrt {a} \arcsin \left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a}}\right )}{f}\)

Input:

Int[Sqrt[a + a*Sin[e + f*x]]/Sqrt[Sin[e + f*x]],x]
 

Output:

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

Defintions of rubi rules used

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

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

rule 3253
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(d_.)*sin[(e_.) + (f_.) 
*(x_)]], x_Symbol] :> Simp[-2/f   Subst[Int[1/Sqrt[1 - x^2/a], x], x, b*(Co 
s[e + f*x]/Sqrt[a + b*Sin[e + f*x]])], x] /; FreeQ[{a, b, d, e, f}, x] && E 
qQ[a^2 - b^2, 0] && EqQ[d, a/b]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(267\) vs. \(2(31)=62\).

Time = 7.93 (sec) , antiderivative size = 268, normalized size of antiderivative = 7.24

method result size
default \(\frac {2 \sqrt {\frac {\sin \left (\frac {f x}{2}+\frac {e}{2}\right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )}{\left (\cos \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}}\, \sqrt {\left (2 \sin \left (\frac {f x}{2}+\frac {e}{2}\right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) a}\, \left (\arctan \left (\frac {\sqrt {2}\, \sqrt {\frac {\sin \left (\frac {f x}{2}+\frac {e}{2}\right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )}{\left (\cos \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}}\, \sin \left (\frac {f x}{2}+\frac {e}{2}\right )+\cos \left (\frac {f x}{2}+\frac {e}{2}\right )-1}{-1+\cos \left (\frac {f x}{2}+\frac {e}{2}\right )}\right )+\arctan \left (\frac {\sqrt {2}\, \sqrt {\frac {\sin \left (\frac {f x}{2}+\frac {e}{2}\right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )}{\left (\cos \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}}\, \sin \left (\frac {f x}{2}+\frac {e}{2}\right )-\cos \left (\frac {f x}{2}+\frac {e}{2}\right )+1}{-1+\cos \left (\frac {f x}{2}+\frac {e}{2}\right )}\right )\right ) \left (\cos \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{f \left (\cos \left (\frac {f x}{2}+\frac {e}{2}\right )+\sin \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \sqrt {\sin \left (\frac {f x}{2}+\frac {e}{2}\right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )}}\) \(268\)

Input:

int((a+sin(f*x+e)*a)^(1/2)/sin(f*x+e)^(1/2),x,method=_RETURNVERBOSE)
 

Output:

2/f*(sin(1/2*f*x+1/2*e)*cos(1/2*f*x+1/2*e)/(cos(1/2*f*x+1/2*e)+1)^2)^(1/2) 
*((2*sin(1/2*f*x+1/2*e)*cos(1/2*f*x+1/2*e)+1)*a)^(1/2)*(arctan((2^(1/2)*(s 
in(1/2*f*x+1/2*e)*cos(1/2*f*x+1/2*e)/(cos(1/2*f*x+1/2*e)+1)^2)^(1/2)*sin(1 
/2*f*x+1/2*e)+cos(1/2*f*x+1/2*e)-1)/(-1+cos(1/2*f*x+1/2*e)))+arctan((2^(1/ 
2)*(sin(1/2*f*x+1/2*e)*cos(1/2*f*x+1/2*e)/(cos(1/2*f*x+1/2*e)+1)^2)^(1/2)* 
sin(1/2*f*x+1/2*e)-cos(1/2*f*x+1/2*e)+1)/(-1+cos(1/2*f*x+1/2*e))))*(cos(1/ 
2*f*x+1/2*e)+1)/(cos(1/2*f*x+1/2*e)+sin(1/2*f*x+1/2*e))/(sin(1/2*f*x+1/2*e 
)*cos(1/2*f*x+1/2*e))^(1/2)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 91 vs. \(2 (31) = 62\).

Time = 0.15 (sec) , antiderivative size = 330, normalized size of antiderivative = 8.92 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {\sin (e+f x)}} \, dx=\left [\frac {\sqrt {-a} \log \left (\frac {128 \, a \cos \left (f x + e\right )^{5} - 128 \, a \cos \left (f x + e\right )^{4} - 416 \, a \cos \left (f x + e\right )^{3} + 128 \, a \cos \left (f x + e\right )^{2} - 8 \, {\left (16 \, \cos \left (f x + e\right )^{4} - 24 \, \cos \left (f x + e\right )^{3} - 66 \, \cos \left (f x + e\right )^{2} + {\left (16 \, \cos \left (f x + e\right )^{3} + 40 \, \cos \left (f x + e\right )^{2} - 26 \, \cos \left (f x + e\right ) - 51\right )} \sin \left (f x + e\right ) + 25 \, \cos \left (f x + e\right ) + 51\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-a} \sqrt {\sin \left (f x + e\right )} + 289 \, a \cos \left (f x + e\right ) + {\left (128 \, a \cos \left (f x + e\right )^{4} + 256 \, a \cos \left (f x + e\right )^{3} - 160 \, a \cos \left (f x + e\right )^{2} - 288 \, a \cos \left (f x + e\right ) + a\right )} \sin \left (f x + e\right ) + a}{\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1}\right )}{4 \, f}, \frac {\sqrt {a} \arctan \left (\frac {{\left (8 \, \cos \left (f x + e\right )^{2} + 8 \, \sin \left (f x + e\right ) - 9\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {a} \sqrt {\sin \left (f x + e\right )}}{4 \, {\left (2 \, a \cos \left (f x + e\right )^{3} + a \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 2 \, a \cos \left (f x + e\right )\right )}}\right )}{2 \, f}\right ] \] Input:

integrate((a+a*sin(f*x+e))^(1/2)/sin(f*x+e)^(1/2),x, algorithm="fricas")
 

Output:

[1/4*sqrt(-a)*log((128*a*cos(f*x + e)^5 - 128*a*cos(f*x + e)^4 - 416*a*cos 
(f*x + e)^3 + 128*a*cos(f*x + e)^2 - 8*(16*cos(f*x + e)^4 - 24*cos(f*x + e 
)^3 - 66*cos(f*x + e)^2 + (16*cos(f*x + e)^3 + 40*cos(f*x + e)^2 - 26*cos( 
f*x + e) - 51)*sin(f*x + e) + 25*cos(f*x + e) + 51)*sqrt(a*sin(f*x + e) + 
a)*sqrt(-a)*sqrt(sin(f*x + e)) + 289*a*cos(f*x + e) + (128*a*cos(f*x + e)^ 
4 + 256*a*cos(f*x + e)^3 - 160*a*cos(f*x + e)^2 - 288*a*cos(f*x + e) + a)* 
sin(f*x + e) + a)/(cos(f*x + e) + sin(f*x + e) + 1))/f, 1/2*sqrt(a)*arctan 
(1/4*(8*cos(f*x + e)^2 + 8*sin(f*x + e) - 9)*sqrt(a*sin(f*x + e) + a)*sqrt 
(a)*sqrt(sin(f*x + e))/(2*a*cos(f*x + e)^3 + a*cos(f*x + e)*sin(f*x + e) - 
 2*a*cos(f*x + e)))/f]
 

Sympy [F]

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

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

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 210 vs. \(2 (31) = 62\).

Time = 0.14 (sec) , antiderivative size = 210, normalized size of antiderivative = 5.68 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {\sin (e+f x)}} \, dx=-\frac {2 \, \sqrt {2} \sqrt {a} \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )^{\frac {3}{2}} - 3 \, \sqrt {2} {\left (\sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + 2 \, \sqrt {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}\right ) + \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - 2 \, \sqrt {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}\right )\right )} \sqrt {a} + 6 \, \sqrt {2} \sqrt {a} \sqrt {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}} - \frac {2 \, {\left (\frac {3 \, \sqrt {2} \sqrt {a} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sqrt {2} \sqrt {a} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}}{\sqrt {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}}}{3 \, f} \] Input:

integrate((a+a*sin(f*x+e))^(1/2)/sin(f*x+e)^(1/2),x, algorithm="maxima")
 

Output:

-1/3*(2*sqrt(2)*sqrt(a)*(sin(f*x + e)/(cos(f*x + e) + 1))^(3/2) - 3*sqrt(2 
)*(sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2) + 2*sqrt(sin(f*x + e)/(cos(f*x + e) 
 + 1)))) + sqrt(2)*arctan(-1/2*sqrt(2)*(sqrt(2) - 2*sqrt(sin(f*x + e)/(cos 
(f*x + e) + 1)))))*sqrt(a) + 6*sqrt(2)*sqrt(a)*sqrt(sin(f*x + e)/(cos(f*x 
+ e) + 1)) - 2*(3*sqrt(2)*sqrt(a)*sin(f*x + e)/(cos(f*x + e) + 1) + sqrt(2 
)*sqrt(a)*sin(f*x + e)^2/(cos(f*x + e) + 1)^2)/sqrt(sin(f*x + e)/(cos(f*x 
+ e) + 1)))/f
 

Giac [F]

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

integrate((a+a*sin(f*x+e))^(1/2)/sin(f*x+e)^(1/2),x, algorithm="giac")
 

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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