\(\int \frac {\sin ^2(e+f x)}{(a+b \sin ^2(e+f x))^{3/2}} \, dx\) [109]

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

Optimal result

Integrand size = 25, antiderivative size = 155 \[ \int \frac {\sin ^2(e+f x)}{\left (a+b \sin ^2(e+f x)\right )^{3/2}} \, dx=-\frac {\cos (e+f x) \sin (e+f x)}{(a+b) f \sqrt {a+b \sin ^2(e+f x)}}-\frac {E\left (e+f x\left |-\frac {b}{a}\right .\right ) \sqrt {a+b \sin ^2(e+f x)}}{b (a+b) f \sqrt {\frac {a+b \sin ^2(e+f x)}{a}}}+\frac {\operatorname {EllipticF}\left (e+f x,-\frac {b}{a}\right ) \sqrt {\frac {a+b \sin ^2(e+f x)}{a}}}{b f \sqrt {a+b \sin ^2(e+f x)}} \] Output:

-cos(f*x+e)*sin(f*x+e)/(a+b)/f/(a+b*sin(f*x+e)^2)^(1/2)-EllipticE(sin(f*x+ 
e),(-b/a)^(1/2))*(a+b*sin(f*x+e)^2)^(1/2)/b/(a+b)/f/((a+b*sin(f*x+e)^2)/a) 
^(1/2)+InverseJacobiAM(f*x+e,(-b/a)^(1/2))*((a+b*sin(f*x+e)^2)/a)^(1/2)/b/ 
f/(a+b*sin(f*x+e)^2)^(1/2)
 

Mathematica [A] (verified)

Time = 0.79 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.89 \[ \int \frac {\sin ^2(e+f x)}{\left (a+b \sin ^2(e+f x)\right )^{3/2}} \, dx=\frac {-\sqrt {2} a \sqrt {\frac {2 a+b-b \cos (2 (e+f x))}{a}} E\left (e+f x\left |-\frac {b}{a}\right .\right )+\sqrt {2} (a+b) \sqrt {\frac {2 a+b-b \cos (2 (e+f x))}{a}} \operatorname {EllipticF}\left (e+f x,-\frac {b}{a}\right )-b \sin (2 (e+f x))}{\sqrt {2} b (a+b) f \sqrt {2 a+b-b \cos (2 (e+f x))}} \] Input:

Integrate[Sin[e + f*x]^2/(a + b*Sin[e + f*x]^2)^(3/2),x]
 

Output:

(-(Sqrt[2]*a*Sqrt[(2*a + b - b*Cos[2*(e + f*x)])/a]*EllipticE[e + f*x, -(b 
/a)]) + Sqrt[2]*(a + b)*Sqrt[(2*a + b - b*Cos[2*(e + f*x)])/a]*EllipticF[e 
 + f*x, -(b/a)] - b*Sin[2*(e + f*x)])/(Sqrt[2]*b*(a + b)*f*Sqrt[2*a + b - 
b*Cos[2*(e + f*x)]])
 

Rubi [A] (verified)

Time = 0.89 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.05, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.440, Rules used = {3042, 3652, 3042, 3651, 3042, 3657, 3042, 3656, 3662, 3042, 3661}

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 {\sin ^2(e+f x)}{\left (a+b \sin ^2(e+f x)\right )^{3/2}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sin (e+f x)^2}{\left (a+b \sin (e+f x)^2\right )^{3/2}}dx\)

\(\Big \downarrow \) 3652

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3651

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3657

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3656

\(\displaystyle \frac {\frac {a (a+b) \int \frac {1}{\sqrt {b \sin (e+f x)^2+a}}dx}{b}-\frac {a \sqrt {a+b \sin ^2(e+f x)} E\left (e+f x\left |-\frac {b}{a}\right .\right )}{b f \sqrt {\frac {b \sin ^2(e+f x)}{a}+1}}}{a (a+b)}-\frac {\sin (e+f x) \cos (e+f x)}{f (a+b) \sqrt {a+b \sin ^2(e+f x)}}\)

\(\Big \downarrow \) 3662

\(\displaystyle \frac {\frac {a (a+b) \sqrt {\frac {b \sin ^2(e+f x)}{a}+1} \int \frac {1}{\sqrt {\frac {b \sin ^2(e+f x)}{a}+1}}dx}{b \sqrt {a+b \sin ^2(e+f x)}}-\frac {a \sqrt {a+b \sin ^2(e+f x)} E\left (e+f x\left |-\frac {b}{a}\right .\right )}{b f \sqrt {\frac {b \sin ^2(e+f x)}{a}+1}}}{a (a+b)}-\frac {\sin (e+f x) \cos (e+f x)}{f (a+b) \sqrt {a+b \sin ^2(e+f x)}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {a (a+b) \sqrt {\frac {b \sin ^2(e+f x)}{a}+1} \int \frac {1}{\sqrt {\frac {b \sin (e+f x)^2}{a}+1}}dx}{b \sqrt {a+b \sin ^2(e+f x)}}-\frac {a \sqrt {a+b \sin ^2(e+f x)} E\left (e+f x\left |-\frac {b}{a}\right .\right )}{b f \sqrt {\frac {b \sin ^2(e+f x)}{a}+1}}}{a (a+b)}-\frac {\sin (e+f x) \cos (e+f x)}{f (a+b) \sqrt {a+b \sin ^2(e+f x)}}\)

\(\Big \downarrow \) 3661

\(\displaystyle \frac {\frac {a (a+b) \sqrt {\frac {b \sin ^2(e+f x)}{a}+1} \operatorname {EllipticF}\left (e+f x,-\frac {b}{a}\right )}{b f \sqrt {a+b \sin ^2(e+f x)}}-\frac {a \sqrt {a+b \sin ^2(e+f x)} E\left (e+f x\left |-\frac {b}{a}\right .\right )}{b f \sqrt {\frac {b \sin ^2(e+f x)}{a}+1}}}{a (a+b)}-\frac {\sin (e+f x) \cos (e+f x)}{f (a+b) \sqrt {a+b \sin ^2(e+f x)}}\)

Input:

Int[Sin[e + f*x]^2/(a + b*Sin[e + f*x]^2)^(3/2),x]
 

Output:

-((Cos[e + f*x]*Sin[e + f*x])/((a + b)*f*Sqrt[a + b*Sin[e + f*x]^2])) + (- 
((a*EllipticE[e + f*x, -(b/a)]*Sqrt[a + b*Sin[e + f*x]^2])/(b*f*Sqrt[1 + ( 
b*Sin[e + f*x]^2)/a])) + (a*(a + b)*EllipticF[e + f*x, -(b/a)]*Sqrt[1 + (b 
*Sin[e + f*x]^2)/a])/(b*f*Sqrt[a + b*Sin[e + f*x]^2]))/(a*(a + b))
 

Defintions of rubi rules used

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

rule 3651
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)]^2)/Sqrt[(a_) + (b_.)*sin[(e_.) + 
 (f_.)*(x_)]^2], x_Symbol] :> Simp[B/b   Int[Sqrt[a + b*Sin[e + f*x]^2], x] 
, x] + Simp[(A*b - a*B)/b   Int[1/Sqrt[a + b*Sin[e + f*x]^2], x], x] /; Fre 
eQ[{a, b, e, f, A, B}, x]
 

rule 3652
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_)*((A_.) + (B_.)*sin[(e_.) 
+ (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b - a*B))*Cos[e + f*x]*Sin[e + f*x 
]*((a + b*Sin[e + f*x]^2)^(p + 1)/(2*a*f*(a + b)*(p + 1))), x] - Simp[1/(2* 
a*(a + b)*(p + 1))   Int[(a + b*Sin[e + f*x]^2)^(p + 1)*Simp[a*B - A*(2*a*( 
p + 1) + b*(2*p + 3)) + 2*(A*b - a*B)*(p + 2)*Sin[e + f*x]^2, x], x], x] /; 
 FreeQ[{a, b, e, f, A, B}, x] && LtQ[p, -1] && NeQ[a + b, 0]
 

rule 3656
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Simp[(Sqrt[a 
]/f)*EllipticE[e + f*x, -b/a], x] /; FreeQ[{a, b, e, f}, x] && GtQ[a, 0]
 

rule 3657
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Simp[Sqrt[a 
+ b*Sin[e + f*x]^2]/Sqrt[1 + b*(Sin[e + f*x]^2/a)]   Int[Sqrt[1 + (b*Sin[e 
+ f*x]^2)/a], x], x] /; FreeQ[{a, b, e, f}, x] &&  !GtQ[a, 0]
 

rule 3661
Int[1/Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Simp[(1/(S 
qrt[a]*f))*EllipticF[e + f*x, -b/a], x] /; FreeQ[{a, b, e, f}, x] && GtQ[a, 
 0]
 

rule 3662
Int[1/Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Simp[Sqrt[ 
1 + b*(Sin[e + f*x]^2/a)]/Sqrt[a + b*Sin[e + f*x]^2]   Int[1/Sqrt[1 + (b*Si 
n[e + f*x]^2)/a], x], x] /; FreeQ[{a, b, e, f}, x] &&  !GtQ[a, 0]
 
Maple [A] (verified)

Time = 1.78 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.23

method result size
default \(\frac {a \sqrt {\frac {\cos \left (2 f x +2 e \right )}{2}+\frac {1}{2}}\, \sqrt {\frac {a +b \sin \left (f x +e \right )^{2}}{a}}\, \operatorname {EllipticF}\left (\sin \left (f x +e \right ), \sqrt {-\frac {b}{a}}\right )+\sqrt {\frac {\cos \left (2 f x +2 e \right )}{2}+\frac {1}{2}}\, \sqrt {\frac {a +b \sin \left (f x +e \right )^{2}}{a}}\, \operatorname {EllipticF}\left (\sin \left (f x +e \right ), \sqrt {-\frac {b}{a}}\right ) b -a \sqrt {\frac {\cos \left (2 f x +2 e \right )}{2}+\frac {1}{2}}\, \sqrt {\frac {a +b \sin \left (f x +e \right )^{2}}{a}}\, \operatorname {EllipticE}\left (\sin \left (f x +e \right ), \sqrt {-\frac {b}{a}}\right )+b \sin \left (f x +e \right )^{3}-b \sin \left (f x +e \right )}{b \left (a +b \right ) \cos \left (f x +e \right ) \sqrt {a +b \sin \left (f x +e \right )^{2}}\, f}\) \(191\)

Input:

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

Output:

(a*(cos(f*x+e)^2)^(1/2)*((a+b*sin(f*x+e)^2)/a)^(1/2)*EllipticF(sin(f*x+e), 
(-b/a)^(1/2))+(cos(f*x+e)^2)^(1/2)*((a+b*sin(f*x+e)^2)/a)^(1/2)*EllipticF( 
sin(f*x+e),(-b/a)^(1/2))*b-a*(cos(f*x+e)^2)^(1/2)*((a+b*sin(f*x+e)^2)/a)^( 
1/2)*EllipticE(sin(f*x+e),(-b/a)^(1/2))+b*sin(f*x+e)^3-b*sin(f*x+e))/b/(a+ 
b)/cos(f*x+e)/(a+b*sin(f*x+e)^2)^(1/2)/f
 

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.14 (sec) , antiderivative size = 780, normalized size of antiderivative = 5.03 \[ \int \frac {\sin ^2(e+f x)}{\left (a+b \sin ^2(e+f x)\right )^{3/2}} \, dx =\text {Too large to display} \] Input:

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

Output:

1/2*(2*sqrt(-b*cos(f*x + e)^2 + a + b)*b^2*cos(f*x + e)*sin(f*x + e) - 2*( 
(-2*I*a*b - I*b^2)*cos(f*x + e)^2 + 2*I*a^2 + 3*I*a*b + I*b^2)*sqrt(-b)*sq 
rt((2*b*sqrt((a^2 + a*b)/b^2) + 2*a + b)/b)*elliptic_f(arcsin(sqrt((2*b*sq 
rt((a^2 + a*b)/b^2) + 2*a + b)/b)*(cos(f*x + e) + I*sin(f*x + e))), (8*a^2 
 + 8*a*b + b^2 - 4*(2*a*b + b^2)*sqrt((a^2 + a*b)/b^2))/b^2) - 2*((2*I*a*b 
 + I*b^2)*cos(f*x + e)^2 - 2*I*a^2 - 3*I*a*b - I*b^2)*sqrt(-b)*sqrt((2*b*s 
qrt((a^2 + a*b)/b^2) + 2*a + b)/b)*elliptic_f(arcsin(sqrt((2*b*sqrt((a^2 + 
 a*b)/b^2) + 2*a + b)/b)*(cos(f*x + e) - I*sin(f*x + e))), (8*a^2 + 8*a*b 
+ b^2 - 4*(2*a*b + b^2)*sqrt((a^2 + a*b)/b^2))/b^2) + (2*(-I*b^2*cos(f*x + 
 e)^2 + I*a*b + I*b^2)*sqrt(-b)*sqrt((a^2 + a*b)/b^2) - ((2*I*a*b + I*b^2) 
*cos(f*x + e)^2 - 2*I*a^2 - 3*I*a*b - I*b^2)*sqrt(-b))*sqrt((2*b*sqrt((a^2 
 + a*b)/b^2) + 2*a + b)/b)*elliptic_e(arcsin(sqrt((2*b*sqrt((a^2 + a*b)/b^ 
2) + 2*a + b)/b)*(cos(f*x + e) + I*sin(f*x + e))), (8*a^2 + 8*a*b + b^2 - 
4*(2*a*b + b^2)*sqrt((a^2 + a*b)/b^2))/b^2) + (2*(I*b^2*cos(f*x + e)^2 - I 
*a*b - I*b^2)*sqrt(-b)*sqrt((a^2 + a*b)/b^2) - ((-2*I*a*b - I*b^2)*cos(f*x 
 + e)^2 + 2*I*a^2 + 3*I*a*b + I*b^2)*sqrt(-b))*sqrt((2*b*sqrt((a^2 + a*b)/ 
b^2) + 2*a + b)/b)*elliptic_e(arcsin(sqrt((2*b*sqrt((a^2 + a*b)/b^2) + 2*a 
 + b)/b)*(cos(f*x + e) - I*sin(f*x + e))), (8*a^2 + 8*a*b + b^2 - 4*(2*a*b 
 + b^2)*sqrt((a^2 + a*b)/b^2))/b^2))/((a*b^3 + b^4)*f*cos(f*x + e)^2 - (a^ 
2*b^2 + 2*a*b^3 + b^4)*f)
 

Sympy [F(-1)]

Timed out. \[ \int \frac {\sin ^2(e+f x)}{\left (a+b \sin ^2(e+f x)\right )^{3/2}} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [F]

\[ \int \frac {\sin ^2(e+f x)}{\left (a+b \sin ^2(e+f x)\right )^{3/2}} \, dx=\int { \frac {\sin \left (f x + e\right )^{2}}{{\left (b \sin \left (f x + e\right )^{2} + a\right )}^{\frac {3}{2}}} \,d x } \] Input:

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

Output:

integrate(sin(f*x + e)^2/(b*sin(f*x + e)^2 + a)^(3/2), x)
 

Giac [F]

\[ \int \frac {\sin ^2(e+f x)}{\left (a+b \sin ^2(e+f x)\right )^{3/2}} \, dx=\int { \frac {\sin \left (f x + e\right )^{2}}{{\left (b \sin \left (f x + e\right )^{2} + a\right )}^{\frac {3}{2}}} \,d x } \] Input:

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

Output:

integrate(sin(f*x + e)^2/(b*sin(f*x + e)^2 + a)^(3/2), x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

int((sqrt(sin(e + f*x)**2*b + a)*sin(e + f*x)**2)/(sin(e + f*x)**4*b**2 + 
2*sin(e + f*x)**2*a*b + a**2),x)