Integrand size = 13, antiderivative size = 118 \[ \int \frac {\sin ^2(x)}{(a+b \sin (x))^3} \, dx=\frac {\left (a^2+2 b^2\right ) \arctan \left (\frac {b+a \tan \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}}+\frac {a^2 \cos (x)}{2 b \left (a^2-b^2\right ) (a+b \sin (x))^2}-\frac {a \left (a^2-4 b^2\right ) \cos (x)}{2 b \left (a^2-b^2\right )^2 (a+b \sin (x))} \] Output:
(a^2+2*b^2)*arctan((b+a*tan(1/2*x))/(a^2-b^2)^(1/2))/(a^2-b^2)^(5/2)+1/2*a ^2*cos(x)/b/(a^2-b^2)/(a+b*sin(x))^2-1/2*a*(a^2-4*b^2)*cos(x)/b/(a^2-b^2)^ 2/(a+b*sin(x))
Time = 0.47 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.80 \[ \int \frac {\sin ^2(x)}{(a+b \sin (x))^3} \, dx=\frac {\left (a^2+2 b^2\right ) \arctan \left (\frac {b+a \tan \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}}+\frac {a \cos (x) \left (3 a b-\left (a^2-4 b^2\right ) \sin (x)\right )}{2 (a-b)^2 (a+b)^2 (a+b \sin (x))^2} \] Input:
Integrate[Sin[x]^2/(a + b*Sin[x])^3,x]
Output:
((a^2 + 2*b^2)*ArcTan[(b + a*Tan[x/2])/Sqrt[a^2 - b^2]])/(a^2 - b^2)^(5/2) + (a*Cos[x]*(3*a*b - (a^2 - 4*b^2)*Sin[x]))/(2*(a - b)^2*(a + b)^2*(a + b *Sin[x])^2)
Time = 0.53 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.19, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.769, Rules used = {3042, 3269, 3042, 3233, 25, 27, 3042, 3139, 1083, 217}
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(x)}{(a+b \sin (x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (x)^2}{(a+b \sin (x))^3}dx\) |
\(\Big \downarrow \) 3269 |
\(\displaystyle \frac {\int \frac {2 a b+\left (a^2-2 b^2\right ) \sin (x)}{(a+b \sin (x))^2}dx}{2 b \left (a^2-b^2\right )}+\frac {a^2 \cos (x)}{2 b \left (a^2-b^2\right ) (a+b \sin (x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {2 a b+\left (a^2-2 b^2\right ) \sin (x)}{(a+b \sin (x))^2}dx}{2 b \left (a^2-b^2\right )}+\frac {a^2 \cos (x)}{2 b \left (a^2-b^2\right ) (a+b \sin (x))^2}\) |
\(\Big \downarrow \) 3233 |
\(\displaystyle \frac {-\frac {\int -\frac {b \left (a^2+2 b^2\right )}{a+b \sin (x)}dx}{a^2-b^2}-\frac {a \left (a^2-4 b^2\right ) \cos (x)}{\left (a^2-b^2\right ) (a+b \sin (x))}}{2 b \left (a^2-b^2\right )}+\frac {a^2 \cos (x)}{2 b \left (a^2-b^2\right ) (a+b \sin (x))^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\int \frac {b \left (a^2+2 b^2\right )}{a+b \sin (x)}dx}{a^2-b^2}-\frac {a \left (a^2-4 b^2\right ) \cos (x)}{\left (a^2-b^2\right ) (a+b \sin (x))}}{2 b \left (a^2-b^2\right )}+\frac {a^2 \cos (x)}{2 b \left (a^2-b^2\right ) (a+b \sin (x))^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {b \left (a^2+2 b^2\right ) \int \frac {1}{a+b \sin (x)}dx}{a^2-b^2}-\frac {a \left (a^2-4 b^2\right ) \cos (x)}{\left (a^2-b^2\right ) (a+b \sin (x))}}{2 b \left (a^2-b^2\right )}+\frac {a^2 \cos (x)}{2 b \left (a^2-b^2\right ) (a+b \sin (x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {b \left (a^2+2 b^2\right ) \int \frac {1}{a+b \sin (x)}dx}{a^2-b^2}-\frac {a \left (a^2-4 b^2\right ) \cos (x)}{\left (a^2-b^2\right ) (a+b \sin (x))}}{2 b \left (a^2-b^2\right )}+\frac {a^2 \cos (x)}{2 b \left (a^2-b^2\right ) (a+b \sin (x))^2}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle \frac {\frac {2 b \left (a^2+2 b^2\right ) \int \frac {1}{a \tan ^2\left (\frac {x}{2}\right )+2 b \tan \left (\frac {x}{2}\right )+a}d\tan \left (\frac {x}{2}\right )}{a^2-b^2}-\frac {a \left (a^2-4 b^2\right ) \cos (x)}{\left (a^2-b^2\right ) (a+b \sin (x))}}{2 b \left (a^2-b^2\right )}+\frac {a^2 \cos (x)}{2 b \left (a^2-b^2\right ) (a+b \sin (x))^2}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {-\frac {4 b \left (a^2+2 b^2\right ) \int \frac {1}{-\left (2 b+2 a \tan \left (\frac {x}{2}\right )\right )^2-4 \left (a^2-b^2\right )}d\left (2 b+2 a \tan \left (\frac {x}{2}\right )\right )}{a^2-b^2}-\frac {a \left (a^2-4 b^2\right ) \cos (x)}{\left (a^2-b^2\right ) (a+b \sin (x))}}{2 b \left (a^2-b^2\right )}+\frac {a^2 \cos (x)}{2 b \left (a^2-b^2\right ) (a+b \sin (x))^2}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {\frac {2 b \left (a^2+2 b^2\right ) \arctan \left (\frac {2 a \tan \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}}-\frac {a \left (a^2-4 b^2\right ) \cos (x)}{\left (a^2-b^2\right ) (a+b \sin (x))}}{2 b \left (a^2-b^2\right )}+\frac {a^2 \cos (x)}{2 b \left (a^2-b^2\right ) (a+b \sin (x))^2}\) |
Input:
Int[Sin[x]^2/(a + b*Sin[x])^3,x]
Output:
(a^2*Cos[x])/(2*b*(a^2 - b^2)*(a + b*Sin[x])^2) + ((2*b*(a^2 + 2*b^2)*ArcT an[(2*b + 2*a*Tan[x/2])/(2*Sqrt[a^2 - b^2])])/(a^2 - b^2)^(3/2) - (a*(a^2 - 4*b^2)*Cos[x])/((a^2 - b^2)*(a + b*Sin[x])))/(2*b*(a^2 - b^2))
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = Fre eFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + 2*b*e*x + a *e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ [a^2 - b^2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(b*c - a*d))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(f*(m + 1)*(a^2 - b^2))), x] + Simp[1/((m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[(a*c - b*d)*(m + 1) - (b*c - a*d)*( m + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegerQ[2*m]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[(-(b^2*c^2 - 2*a*b*c*d + a^2*d^2))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1)*(a^2 - b^2))), x] - Simp[ 1/(b*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(m + 1) *(2*b*c*d - a*(c^2 + d^2)) + (a^2*d^2 - 2*a*b*c*d*(m + 2) + b^2*(d^2*(m + 1 ) + c^2*(m + 2)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1]
Time = 0.55 (sec) , antiderivative size = 213, normalized size of antiderivative = 1.81
method | result | size |
default | \(\frac {\frac {8 \left (a^{2}+2 b^{2}\right ) a \tan \left (\frac {x}{2}\right )^{3}}{8 a^{4}-16 b^{2} a^{2}+8 b^{4}}+\frac {3 b \left (a^{2}+2 b^{2}\right ) \tan \left (\frac {x}{2}\right )^{2}}{a^{4}-2 b^{2} a^{2}+b^{4}}-\frac {a \left (a^{2}-10 b^{2}\right ) \tan \left (\frac {x}{2}\right )}{a^{4}-2 b^{2} a^{2}+b^{4}}+\frac {3 a^{2} b}{a^{4}-2 b^{2} a^{2}+b^{4}}}{\left (a \tan \left (\frac {x}{2}\right )^{2}+2 b \tan \left (\frac {x}{2}\right )+a \right )^{2}}+\frac {\left (a^{2}+2 b^{2}\right ) \arctan \left (\frac {2 a \tan \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{\left (a^{4}-2 b^{2} a^{2}+b^{4}\right ) \sqrt {a^{2}-b^{2}}}\) | \(213\) |
risch | \(\frac {i a \left (-2 i a^{3} b \,{\mathrm e}^{3 i x}+5 i a \,b^{3} {\mathrm e}^{3 i x}+2 i b \,a^{3} {\mathrm e}^{i x}-11 i a \,b^{3} {\mathrm e}^{i x}+2 a^{4} {\mathrm e}^{2 i x}-7 a^{2} b^{2} {\mathrm e}^{2 i x}-4 b^{4} {\mathrm e}^{2 i x}-b^{2} a^{2}+4 b^{4}\right )}{\left (-i b \,{\mathrm e}^{2 i x}+i b +2 a \,{\mathrm e}^{i x}\right )^{2} \left (a^{2}-b^{2}\right )^{2} b^{2}}+\frac {a^{2} \ln \left ({\mathrm e}^{i x}+\frac {i a \sqrt {-a^{2}+b^{2}}+a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right )}{2 \sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2}}+\frac {\ln \left ({\mathrm e}^{i x}+\frac {i a \sqrt {-a^{2}+b^{2}}+a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) b^{2}}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2}}-\frac {a^{2} \ln \left ({\mathrm e}^{i x}+\frac {i a \sqrt {-a^{2}+b^{2}}-a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right )}{2 \sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2}}-\frac {\ln \left ({\mathrm e}^{i x}+\frac {i a \sqrt {-a^{2}+b^{2}}-a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) b^{2}}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2}}\) | \(434\) |
Input:
int(sin(x)^2/(a+b*sin(x))^3,x,method=_RETURNVERBOSE)
Output:
8*(1/8*(a^2+2*b^2)*a/(a^4-2*a^2*b^2+b^4)*tan(1/2*x)^3+3/8*b*(a^2+2*b^2)/(a ^4-2*a^2*b^2+b^4)*tan(1/2*x)^2-1/8*a*(a^2-10*b^2)/(a^4-2*a^2*b^2+b^4)*tan( 1/2*x)+3/8*a^2*b/(a^4-2*a^2*b^2+b^4))/(a*tan(1/2*x)^2+2*b*tan(1/2*x)+a)^2+ (a^2+2*b^2)/(a^4-2*a^2*b^2+b^4)/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tan(1/2*x) +2*b)/(a^2-b^2)^(1/2))
Leaf count of result is larger than twice the leaf count of optimal. 226 vs. \(2 (108) = 216\).
Time = 0.11 (sec) , antiderivative size = 516, normalized size of antiderivative = 4.37 \[ \int \frac {\sin ^2(x)}{(a+b \sin (x))^3} \, dx=\left [-\frac {2 \, {\left (a^{5} - 5 \, a^{3} b^{2} + 4 \, a b^{4}\right )} \cos \left (x\right ) \sin \left (x\right ) + {\left (a^{4} + 3 \, a^{2} b^{2} + 2 \, b^{4} - {\left (a^{2} b^{2} + 2 \, b^{4}\right )} \cos \left (x\right )^{2} + 2 \, {\left (a^{3} b + 2 \, a b^{3}\right )} \sin \left (x\right )\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {{\left (2 \, a^{2} - b^{2}\right )} \cos \left (x\right )^{2} - 2 \, a b \sin \left (x\right ) - a^{2} - b^{2} + 2 \, {\left (a \cos \left (x\right ) \sin \left (x\right ) + b \cos \left (x\right )\right )} \sqrt {-a^{2} + b^{2}}}{b^{2} \cos \left (x\right )^{2} - 2 \, a b \sin \left (x\right ) - a^{2} - b^{2}}\right ) - 6 \, {\left (a^{4} b - a^{2} b^{3}\right )} \cos \left (x\right )}{4 \, {\left (a^{8} - 2 \, a^{6} b^{2} + 2 \, a^{2} b^{6} - b^{8} - {\left (a^{6} b^{2} - 3 \, a^{4} b^{4} + 3 \, a^{2} b^{6} - b^{8}\right )} \cos \left (x\right )^{2} + 2 \, {\left (a^{7} b - 3 \, a^{5} b^{3} + 3 \, a^{3} b^{5} - a b^{7}\right )} \sin \left (x\right )\right )}}, -\frac {{\left (a^{5} - 5 \, a^{3} b^{2} + 4 \, a b^{4}\right )} \cos \left (x\right ) \sin \left (x\right ) + {\left (a^{4} + 3 \, a^{2} b^{2} + 2 \, b^{4} - {\left (a^{2} b^{2} + 2 \, b^{4}\right )} \cos \left (x\right )^{2} + 2 \, {\left (a^{3} b + 2 \, a b^{3}\right )} \sin \left (x\right )\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \sin \left (x\right ) + b}{\sqrt {a^{2} - b^{2}} \cos \left (x\right )}\right ) - 3 \, {\left (a^{4} b - a^{2} b^{3}\right )} \cos \left (x\right )}{2 \, {\left (a^{8} - 2 \, a^{6} b^{2} + 2 \, a^{2} b^{6} - b^{8} - {\left (a^{6} b^{2} - 3 \, a^{4} b^{4} + 3 \, a^{2} b^{6} - b^{8}\right )} \cos \left (x\right )^{2} + 2 \, {\left (a^{7} b - 3 \, a^{5} b^{3} + 3 \, a^{3} b^{5} - a b^{7}\right )} \sin \left (x\right )\right )}}\right ] \] Input:
integrate(sin(x)^2/(a+b*sin(x))^3,x, algorithm="fricas")
Output:
[-1/4*(2*(a^5 - 5*a^3*b^2 + 4*a*b^4)*cos(x)*sin(x) + (a^4 + 3*a^2*b^2 + 2* b^4 - (a^2*b^2 + 2*b^4)*cos(x)^2 + 2*(a^3*b + 2*a*b^3)*sin(x))*sqrt(-a^2 + b^2)*log(((2*a^2 - b^2)*cos(x)^2 - 2*a*b*sin(x) - a^2 - b^2 + 2*(a*cos(x) *sin(x) + b*cos(x))*sqrt(-a^2 + b^2))/(b^2*cos(x)^2 - 2*a*b*sin(x) - a^2 - b^2)) - 6*(a^4*b - a^2*b^3)*cos(x))/(a^8 - 2*a^6*b^2 + 2*a^2*b^6 - b^8 - (a^6*b^2 - 3*a^4*b^4 + 3*a^2*b^6 - b^8)*cos(x)^2 + 2*(a^7*b - 3*a^5*b^3 + 3*a^3*b^5 - a*b^7)*sin(x)), -1/2*((a^5 - 5*a^3*b^2 + 4*a*b^4)*cos(x)*sin(x ) + (a^4 + 3*a^2*b^2 + 2*b^4 - (a^2*b^2 + 2*b^4)*cos(x)^2 + 2*(a^3*b + 2*a *b^3)*sin(x))*sqrt(a^2 - b^2)*arctan(-(a*sin(x) + b)/(sqrt(a^2 - b^2)*cos( x))) - 3*(a^4*b - a^2*b^3)*cos(x))/(a^8 - 2*a^6*b^2 + 2*a^2*b^6 - b^8 - (a ^6*b^2 - 3*a^4*b^4 + 3*a^2*b^6 - b^8)*cos(x)^2 + 2*(a^7*b - 3*a^5*b^3 + 3* a^3*b^5 - a*b^7)*sin(x))]
Timed out. \[ \int \frac {\sin ^2(x)}{(a+b \sin (x))^3} \, dx=\text {Timed out} \] Input:
integrate(sin(x)**2/(a+b*sin(x))**3,x)
Output:
Timed out
Exception generated. \[ \int \frac {\sin ^2(x)}{(a+b \sin (x))^3} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(sin(x)^2/(a+b*sin(x))^3,x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Time = 0.13 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.54 \[ \int \frac {\sin ^2(x)}{(a+b \sin (x))^3} \, dx=\frac {{\left (\pi \left \lfloor \frac {x}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, x\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )\right )} {\left (a^{2} + 2 \, b^{2}\right )}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt {a^{2} - b^{2}}} + \frac {a^{3} \tan \left (\frac {1}{2} \, x\right )^{3} + 2 \, a b^{2} \tan \left (\frac {1}{2} \, x\right )^{3} + 3 \, a^{2} b \tan \left (\frac {1}{2} \, x\right )^{2} + 6 \, b^{3} \tan \left (\frac {1}{2} \, x\right )^{2} - a^{3} \tan \left (\frac {1}{2} \, x\right ) + 10 \, a b^{2} \tan \left (\frac {1}{2} \, x\right ) + 3 \, a^{2} b}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} {\left (a \tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, x\right ) + a\right )}^{2}} \] Input:
integrate(sin(x)^2/(a+b*sin(x))^3,x, algorithm="giac")
Output:
(pi*floor(1/2*x/pi + 1/2)*sgn(a) + arctan((a*tan(1/2*x) + b)/sqrt(a^2 - b^ 2)))*(a^2 + 2*b^2)/((a^4 - 2*a^2*b^2 + b^4)*sqrt(a^2 - b^2)) + (a^3*tan(1/ 2*x)^3 + 2*a*b^2*tan(1/2*x)^3 + 3*a^2*b*tan(1/2*x)^2 + 6*b^3*tan(1/2*x)^2 - a^3*tan(1/2*x) + 10*a*b^2*tan(1/2*x) + 3*a^2*b)/((a^4 - 2*a^2*b^2 + b^4) *(a*tan(1/2*x)^2 + 2*b*tan(1/2*x) + a)^2)
Time = 16.95 (sec) , antiderivative size = 318, normalized size of antiderivative = 2.69 \[ \int \frac {\sin ^2(x)}{(a+b \sin (x))^3} \, dx=\frac {\frac {3\,a^2\,b}{a^4-2\,a^2\,b^2+b^4}-\frac {a\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (a^2-10\,b^2\right )}{a^4-2\,a^2\,b^2+b^4}+\frac {a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3\,\left (a^2+2\,b^2\right )}{a^4-2\,a^2\,b^2+b^4}+\frac {3\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (a^2+2\,b^2\right )}{a^4-2\,a^2\,b^2+b^4}}{{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (2\,a^2+4\,b^2\right )+a^2+a^2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4+4\,a\,b\,\mathrm {tan}\left (\frac {x}{2}\right )+4\,a\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}+\frac {\mathrm {atan}\left (\frac {\left (\frac {\left (a^2+2\,b^2\right )\,\left (2\,a^4\,b-4\,a^2\,b^3+2\,b^5\right )}{2\,{\left (a+b\right )}^{5/2}\,{\left (a-b\right )}^{5/2}\,\left (a^4-2\,a^2\,b^2+b^4\right )}+\frac {a\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (a^2+2\,b^2\right )}{{\left (a+b\right )}^{5/2}\,{\left (a-b\right )}^{5/2}}\right )\,\left (a^4-2\,a^2\,b^2+b^4\right )}{a^2+2\,b^2}\right )\,\left (a^2+2\,b^2\right )}{{\left (a+b\right )}^{5/2}\,{\left (a-b\right )}^{5/2}} \] Input:
int(sin(x)^2/(a + b*sin(x))^3,x)
Output:
((3*a^2*b)/(a^4 + b^4 - 2*a^2*b^2) - (a*tan(x/2)*(a^2 - 10*b^2))/(a^4 + b^ 4 - 2*a^2*b^2) + (a*tan(x/2)^3*(a^2 + 2*b^2))/(a^4 + b^4 - 2*a^2*b^2) + (3 *b*tan(x/2)^2*(a^2 + 2*b^2))/(a^4 + b^4 - 2*a^2*b^2))/(tan(x/2)^2*(2*a^2 + 4*b^2) + a^2 + a^2*tan(x/2)^4 + 4*a*b*tan(x/2) + 4*a*b*tan(x/2)^3) + (ata n(((((a^2 + 2*b^2)*(2*a^4*b + 2*b^5 - 4*a^2*b^3))/(2*(a + b)^(5/2)*(a - b) ^(5/2)*(a^4 + b^4 - 2*a^2*b^2)) + (a*tan(x/2)*(a^2 + 2*b^2))/((a + b)^(5/2 )*(a - b)^(5/2)))*(a^4 + b^4 - 2*a^2*b^2))/(a^2 + 2*b^2))*(a^2 + 2*b^2))/( (a + b)^(5/2)*(a - b)^(5/2))
Time = 0.18 (sec) , antiderivative size = 493, normalized size of antiderivative = 4.18 \[ \int \frac {\sin ^2(x)}{(a+b \sin (x))^3} \, dx=\frac {4 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {x}{2}\right ) a +b}{\sqrt {a^{2}-b^{2}}}\right ) \sin \left (x \right )^{2} a^{2} b^{3}+8 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {x}{2}\right ) a +b}{\sqrt {a^{2}-b^{2}}}\right ) \sin \left (x \right )^{2} b^{5}+8 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {x}{2}\right ) a +b}{\sqrt {a^{2}-b^{2}}}\right ) \sin \left (x \right ) a^{3} b^{2}+16 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {x}{2}\right ) a +b}{\sqrt {a^{2}-b^{2}}}\right ) \sin \left (x \right ) a \,b^{4}+4 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {x}{2}\right ) a +b}{\sqrt {a^{2}-b^{2}}}\right ) a^{4} b +8 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {x}{2}\right ) a +b}{\sqrt {a^{2}-b^{2}}}\right ) a^{2} b^{3}-2 \cos \left (x \right ) \sin \left (x \right ) a^{5} b +10 \cos \left (x \right ) \sin \left (x \right ) a^{3} b^{3}-8 \cos \left (x \right ) \sin \left (x \right ) a \,b^{5}+6 \cos \left (x \right ) a^{4} b^{2}-6 \cos \left (x \right ) a^{2} b^{4}-\sin \left (x \right )^{2} a^{4} b^{2}+5 \sin \left (x \right )^{2} a^{2} b^{4}-4 \sin \left (x \right )^{2} b^{6}-2 \sin \left (x \right ) a^{5} b +10 \sin \left (x \right ) a^{3} b^{3}-8 \sin \left (x \right ) a \,b^{5}-a^{6}+5 a^{4} b^{2}-4 a^{2} b^{4}}{4 b \left (\sin \left (x \right )^{2} a^{6} b^{2}-3 \sin \left (x \right )^{2} a^{4} b^{4}+3 \sin \left (x \right )^{2} a^{2} b^{6}-\sin \left (x \right )^{2} b^{8}+2 \sin \left (x \right ) a^{7} b -6 \sin \left (x \right ) a^{5} b^{3}+6 \sin \left (x \right ) a^{3} b^{5}-2 \sin \left (x \right ) a \,b^{7}+a^{8}-3 a^{6} b^{2}+3 a^{4} b^{4}-a^{2} b^{6}\right )} \] Input:
int(sin(x)^2/(a+b*sin(x))^3,x)
Output:
(4*sqrt(a**2 - b**2)*atan((tan(x/2)*a + b)/sqrt(a**2 - b**2))*sin(x)**2*a* *2*b**3 + 8*sqrt(a**2 - b**2)*atan((tan(x/2)*a + b)/sqrt(a**2 - b**2))*sin (x)**2*b**5 + 8*sqrt(a**2 - b**2)*atan((tan(x/2)*a + b)/sqrt(a**2 - b**2)) *sin(x)*a**3*b**2 + 16*sqrt(a**2 - b**2)*atan((tan(x/2)*a + b)/sqrt(a**2 - b**2))*sin(x)*a*b**4 + 4*sqrt(a**2 - b**2)*atan((tan(x/2)*a + b)/sqrt(a** 2 - b**2))*a**4*b + 8*sqrt(a**2 - b**2)*atan((tan(x/2)*a + b)/sqrt(a**2 - b**2))*a**2*b**3 - 2*cos(x)*sin(x)*a**5*b + 10*cos(x)*sin(x)*a**3*b**3 - 8 *cos(x)*sin(x)*a*b**5 + 6*cos(x)*a**4*b**2 - 6*cos(x)*a**2*b**4 - sin(x)** 2*a**4*b**2 + 5*sin(x)**2*a**2*b**4 - 4*sin(x)**2*b**6 - 2*sin(x)*a**5*b + 10*sin(x)*a**3*b**3 - 8*sin(x)*a*b**5 - a**6 + 5*a**4*b**2 - 4*a**2*b**4) /(4*b*(sin(x)**2*a**6*b**2 - 3*sin(x)**2*a**4*b**4 + 3*sin(x)**2*a**2*b**6 - sin(x)**2*b**8 + 2*sin(x)*a**7*b - 6*sin(x)*a**5*b**3 + 6*sin(x)*a**3*b **5 - 2*sin(x)*a*b**7 + a**8 - 3*a**6*b**2 + 3*a**4*b**4 - a**2*b**6))