\(\int \frac {\cos ^2(c+d x) \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx\) [1076]

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

Optimal result

Integrand size = 27, antiderivative size = 106 \[ \int \frac {\cos ^2(c+d x) \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {2 a x}{b^3}-\frac {2 \left (2 a^2-b^2\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{b^3 \sqrt {a^2-b^2} d}+\frac {\cos (c+d x) (2 a+b \sin (c+d x))}{b^2 d (a+b \sin (c+d x))} \] Output:

2*a*x/b^3-2*(2*a^2-b^2)*arctan((b+a*tan(1/2*d*x+1/2*c))/(a^2-b^2)^(1/2))/b 
^3/(a^2-b^2)^(1/2)/d+cos(d*x+c)*(2*a+b*sin(d*x+c))/b^2/d/(a+b*sin(d*x+c))
 

Mathematica [A] (verified)

Time = 1.16 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.23 \[ \int \frac {\cos ^2(c+d x) \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {-\frac {4 \left (2 a^2-b^2\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {4 a^2 c+4 a^2 d x+4 a b \cos (c+d x)+4 a b (c+d x) \sin (c+d x)+b^2 \sin (2 (c+d x))}{a+b \sin (c+d x)}}{2 b^3 d} \] Input:

Integrate[(Cos[c + d*x]^2*Sin[c + d*x])/(a + b*Sin[c + d*x])^2,x]
 

Output:

((-4*(2*a^2 - b^2)*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/Sqrt[ 
a^2 - b^2] + (4*a^2*c + 4*a^2*d*x + 4*a*b*Cos[c + d*x] + 4*a*b*(c + d*x)*S 
in[c + d*x] + b^2*Sin[2*(c + d*x)])/(a + b*Sin[c + d*x]))/(2*b^3*d)
 

Rubi [A] (verified)

Time = 0.52 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.10, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3342, 25, 3042, 3214, 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 (c+d x) \cos ^2(c+d x)}{(a+b \sin (c+d x))^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sin (c+d x) \cos (c+d x)^2}{(a+b \sin (c+d x))^2}dx\)

\(\Big \downarrow \) 3342

\(\displaystyle \frac {\cos (c+d x) (2 a+b \sin (c+d x))}{b^2 d (a+b \sin (c+d x))}-\frac {\int -\frac {b+2 a \sin (c+d x)}{a+b \sin (c+d x)}dx}{b^2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int \frac {b+2 a \sin (c+d x)}{a+b \sin (c+d x)}dx}{b^2}+\frac {\cos (c+d x) (2 a+b \sin (c+d x))}{b^2 d (a+b \sin (c+d x))}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {b+2 a \sin (c+d x)}{a+b \sin (c+d x)}dx}{b^2}+\frac {\cos (c+d x) (2 a+b \sin (c+d x))}{b^2 d (a+b \sin (c+d x))}\)

\(\Big \downarrow \) 3214

\(\displaystyle \frac {\frac {2 a x}{b}-\frac {\left (2 a^2-b^2\right ) \int \frac {1}{a+b \sin (c+d x)}dx}{b}}{b^2}+\frac {\cos (c+d x) (2 a+b \sin (c+d x))}{b^2 d (a+b \sin (c+d x))}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {2 a x}{b}-\frac {\left (2 a^2-b^2\right ) \int \frac {1}{a+b \sin (c+d x)}dx}{b}}{b^2}+\frac {\cos (c+d x) (2 a+b \sin (c+d x))}{b^2 d (a+b \sin (c+d x))}\)

\(\Big \downarrow \) 3139

\(\displaystyle \frac {\frac {2 a x}{b}-\frac {2 \left (2 a^2-b^2\right ) \int \frac {1}{a \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 b \tan \left (\frac {1}{2} (c+d x)\right )+a}d\tan \left (\frac {1}{2} (c+d x)\right )}{b d}}{b^2}+\frac {\cos (c+d x) (2 a+b \sin (c+d x))}{b^2 d (a+b \sin (c+d x))}\)

\(\Big \downarrow \) 1083

\(\displaystyle \frac {\frac {4 \left (2 a^2-b^2\right ) \int \frac {1}{-\left (2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )^2-4 \left (a^2-b^2\right )}d\left (2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )}{b d}+\frac {2 a x}{b}}{b^2}+\frac {\cos (c+d x) (2 a+b \sin (c+d x))}{b^2 d (a+b \sin (c+d x))}\)

\(\Big \downarrow \) 217

\(\displaystyle \frac {\frac {2 a x}{b}-\frac {2 \left (2 a^2-b^2\right ) \arctan \left (\frac {2 a \tan \left (\frac {1}{2} (c+d x)\right )+2 b}{2 \sqrt {a^2-b^2}}\right )}{b d \sqrt {a^2-b^2}}}{b^2}+\frac {\cos (c+d x) (2 a+b \sin (c+d x))}{b^2 d (a+b \sin (c+d x))}\)

Input:

Int[(Cos[c + d*x]^2*Sin[c + d*x])/(a + b*Sin[c + d*x])^2,x]
 

Output:

((2*a*x)/b - (2*(2*a^2 - b^2)*ArcTan[(2*b + 2*a*Tan[(c + d*x)/2])/(2*Sqrt[ 
a^2 - b^2])])/(b*Sqrt[a^2 - b^2]*d))/b^2 + (Cos[c + d*x]*(2*a + b*Sin[c + 
d*x]))/(b^2*d*(a + b*Sin[c + d*x]))
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 217
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])
 

rule 1083
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]
 

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

rule 3139
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]
 

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

rule 3342
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[g*(g*C 
os[e + f*x])^(p - 1)*(a + b*Sin[e + f*x])^(m + 1)*((b*c*(m + p + 1) - a*d*p 
 + b*d*(m + 1)*Sin[e + f*x])/(b^2*f*(m + 1)*(m + p + 1))), x] + Simp[g^2*(( 
p - 1)/(b^2*(m + 1)*(m + p + 1)))   Int[(g*Cos[e + f*x])^(p - 2)*(a + b*Sin 
[e + f*x])^(m + 1)*Simp[b*d*(m + 1) + (b*c*(m + p + 1) - a*d*p)*Sin[e + f*x 
], x], x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[a^2 - b^2, 0] && Lt 
Q[m, -1] && GtQ[p, 1] && NeQ[m + p + 1, 0] && IntegerQ[2*m]
 
Maple [A] (verified)

Time = 0.74 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.42

method result size
derivativedivides \(\frac {-\frac {4 \left (\frac {-\frac {b^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}-\frac {a b}{2}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a}+\frac {\left (2 a^{2}-b^{2}\right ) \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{2 \sqrt {a^{2}-b^{2}}}\right )}{b^{3}}+\frac {\frac {4 b}{2+2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+4 a \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{3}}}{d}\) \(151\)
default \(\frac {-\frac {4 \left (\frac {-\frac {b^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}-\frac {a b}{2}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a}+\frac {\left (2 a^{2}-b^{2}\right ) \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{2 \sqrt {a^{2}-b^{2}}}\right )}{b^{3}}+\frac {\frac {4 b}{2+2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+4 a \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{3}}}{d}\) \(151\)
risch \(\frac {2 a x}{b^{3}}+\frac {{\mathrm e}^{i \left (d x +c \right )}}{2 b^{2} d}+\frac {{\mathrm e}^{-i \left (d x +c \right )}}{2 b^{2} d}+\frac {2 i a \left (-i a \,{\mathrm e}^{i \left (d x +c \right )}+b \right )}{d \,b^{3} \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}-b +2 i a \,{\mathrm e}^{i \left (d x +c \right )}\right )}-\frac {2 i \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i \left (\sqrt {a^{2}-b^{2}}\, a +a^{2}-b^{2}\right )}{b \sqrt {a^{2}-b^{2}}}\right ) a^{2}}{\sqrt {a^{2}-b^{2}}\, d \,b^{3}}+\frac {i \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i \left (\sqrt {a^{2}-b^{2}}\, a +a^{2}-b^{2}\right )}{b \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, d b}+\frac {2 i a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i \left (\sqrt {a^{2}-b^{2}}\, a -a^{2}+b^{2}\right )}{b \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, d \,b^{3}}-\frac {i \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i \left (\sqrt {a^{2}-b^{2}}\, a -a^{2}+b^{2}\right )}{b \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, d b}\) \(384\)

Input:

int(cos(d*x+c)^2*sin(d*x+c)/(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
 

Output:

1/d*(-4/b^3*((-1/2*b^2*tan(1/2*d*x+1/2*c)-1/2*a*b)/(tan(1/2*d*x+1/2*c)^2*a 
+2*b*tan(1/2*d*x+1/2*c)+a)+1/2*(2*a^2-b^2)/(a^2-b^2)^(1/2)*arctan(1/2*(2*a 
*tan(1/2*d*x+1/2*c)+2*b)/(a^2-b^2)^(1/2)))+4/b^3*(1/2*b/(1+tan(1/2*d*x+1/2 
*c)^2)+a*arctan(tan(1/2*d*x+1/2*c))))
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 479, normalized size of antiderivative = 4.52 \[ \int \frac {\cos ^2(c+d x) \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\left [\frac {4 \, {\left (a^{4} - a^{2} b^{2}\right )} d x + {\left (2 \, a^{3} - a b^{2} + {\left (2 \, a^{2} b - b^{3}\right )} \sin \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {{\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2} + 2 \, {\left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b \cos \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}}}{b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}}\right ) + 4 \, {\left (a^{3} b - a b^{3}\right )} \cos \left (d x + c\right ) + 2 \, {\left (2 \, {\left (a^{3} b - a b^{3}\right )} d x + {\left (a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{2 \, {\left ({\left (a^{2} b^{4} - b^{6}\right )} d \sin \left (d x + c\right ) + {\left (a^{3} b^{3} - a b^{5}\right )} d\right )}}, \frac {2 \, {\left (a^{4} - a^{2} b^{2}\right )} d x + {\left (2 \, a^{3} - a b^{2} + {\left (2 \, a^{2} b - b^{3}\right )} \sin \left (d x + c\right )\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \sin \left (d x + c\right ) + b}{\sqrt {a^{2} - b^{2}} \cos \left (d x + c\right )}\right ) + 2 \, {\left (a^{3} b - a b^{3}\right )} \cos \left (d x + c\right ) + {\left (2 \, {\left (a^{3} b - a b^{3}\right )} d x + {\left (a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{{\left (a^{2} b^{4} - b^{6}\right )} d \sin \left (d x + c\right ) + {\left (a^{3} b^{3} - a b^{5}\right )} d}\right ] \] Input:

integrate(cos(d*x+c)^2*sin(d*x+c)/(a+b*sin(d*x+c))^2,x, algorithm="fricas" 
)
 

Output:

[1/2*(4*(a^4 - a^2*b^2)*d*x + (2*a^3 - a*b^2 + (2*a^2*b - b^3)*sin(d*x + c 
))*sqrt(-a^2 + b^2)*log(((2*a^2 - b^2)*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) 
 - a^2 - b^2 + 2*(a*cos(d*x + c)*sin(d*x + c) + b*cos(d*x + c))*sqrt(-a^2 
+ b^2))/(b^2*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2)) + 4*(a^3*b 
- a*b^3)*cos(d*x + c) + 2*(2*(a^3*b - a*b^3)*d*x + (a^2*b^2 - b^4)*cos(d*x 
 + c))*sin(d*x + c))/((a^2*b^4 - b^6)*d*sin(d*x + c) + (a^3*b^3 - a*b^5)*d 
), (2*(a^4 - a^2*b^2)*d*x + (2*a^3 - a*b^2 + (2*a^2*b - b^3)*sin(d*x + c)) 
*sqrt(a^2 - b^2)*arctan(-(a*sin(d*x + c) + b)/(sqrt(a^2 - b^2)*cos(d*x + c 
))) + 2*(a^3*b - a*b^3)*cos(d*x + c) + (2*(a^3*b - a*b^3)*d*x + (a^2*b^2 - 
 b^4)*cos(d*x + c))*sin(d*x + c))/((a^2*b^4 - b^6)*d*sin(d*x + c) + (a^3*b 
^3 - a*b^5)*d)]
 

Sympy [F(-1)]

Timed out. \[ \int \frac {\cos ^2(c+d x) \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {Timed out} \] Input:

integrate(cos(d*x+c)**2*sin(d*x+c)/(a+b*sin(d*x+c))**2,x)
 

Output:

Timed out
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {\cos ^2(c+d x) \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {Exception raised: ValueError} \] Input:

integrate(cos(d*x+c)^2*sin(d*x+c)/(a+b*sin(d*x+c))^2,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
 

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.80 \[ \int \frac {\cos ^2(c+d x) \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {2 \, {\left (\frac {{\left (d x + c\right )} a}{b^{3}} - \frac {{\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )\right )} {\left (2 \, a^{2} - b^{2}\right )}}{\sqrt {a^{2} - b^{2}} b^{3}} + \frac {b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, a}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a\right )} b^{2}}\right )}}{d} \] Input:

integrate(cos(d*x+c)^2*sin(d*x+c)/(a+b*sin(d*x+c))^2,x, algorithm="giac")
 

Output:

2*((d*x + c)*a/b^3 - (pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(a) + arctan((a* 
tan(1/2*d*x + 1/2*c) + b)/sqrt(a^2 - b^2)))*(2*a^2 - b^2)/(sqrt(a^2 - b^2) 
*b^3) + (b*tan(1/2*d*x + 1/2*c)^3 + 2*a*tan(1/2*d*x + 1/2*c)^2 + 3*b*tan(1 
/2*d*x + 1/2*c) + 2*a)/((a*tan(1/2*d*x + 1/2*c)^4 + 2*b*tan(1/2*d*x + 1/2* 
c)^3 + 2*a*tan(1/2*d*x + 1/2*c)^2 + 2*b*tan(1/2*d*x + 1/2*c) + a)*b^2))/d
 

Mupad [B] (verification not implemented)

Time = 36.83 (sec) , antiderivative size = 269, normalized size of antiderivative = 2.54 \[ \int \frac {\cos ^2(c+d x) \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{b}+\frac {4\,a}{b^2}+\frac {6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{b}+\frac {4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{b^2}}{d\,\left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )}+\frac {2\,a\,x}{b^3}-\frac {\ln \left (b+a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sqrt {b^2-a^2}\right )\,\sqrt {-\left (a+b\right )\,\left (a-b\right )}\,\left (2\,a^2-b^2\right )}{d\,\left (b^5-a^2\,b^3\right )}-\frac {\ln \left (b+a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sqrt {b^2-a^2}\right )\,\left (2\,a^2\,\sqrt {b^2-a^2}-b^2\,\sqrt {b^2-a^2}\right )}{b^3\,d\,\left (a^2-b^2\right )} \] Input:

int((cos(c + d*x)^2*sin(c + d*x))/(a + b*sin(c + d*x))^2,x)
 

Output:

((2*tan(c/2 + (d*x)/2)^3)/b + (4*a)/b^2 + (6*tan(c/2 + (d*x)/2))/b + (4*a* 
tan(c/2 + (d*x)/2)^2)/b^2)/(d*(a + 2*b*tan(c/2 + (d*x)/2) + 2*a*tan(c/2 + 
(d*x)/2)^2 + a*tan(c/2 + (d*x)/2)^4 + 2*b*tan(c/2 + (d*x)/2)^3)) + (2*a*x) 
/b^3 - (log(b + a*tan(c/2 + (d*x)/2) - (b^2 - a^2)^(1/2))*(-(a + b)*(a - b 
))^(1/2)*(2*a^2 - b^2))/(d*(b^5 - a^2*b^3)) - (log(b + a*tan(c/2 + (d*x)/2 
) + (b^2 - a^2)^(1/2))*(2*a^2*(b^2 - a^2)^(1/2) - b^2*(b^2 - a^2)^(1/2)))/ 
(b^3*d*(a^2 - b^2))
 

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 364, normalized size of antiderivative = 3.43 \[ \int \frac {\cos ^2(c+d x) \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {-4 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a +b}{\sqrt {a^{2}-b^{2}}}\right ) \sin \left (d x +c \right ) a^{2} b +2 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a +b}{\sqrt {a^{2}-b^{2}}}\right ) \sin \left (d x +c \right ) b^{3}-4 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a +b}{\sqrt {a^{2}-b^{2}}}\right ) a^{3}+2 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a +b}{\sqrt {a^{2}-b^{2}}}\right ) a \,b^{2}+\cos \left (d x +c \right ) \sin \left (d x +c \right ) a^{2} b^{2}-\cos \left (d x +c \right ) \sin \left (d x +c \right ) b^{4}+2 \cos \left (d x +c \right ) a^{3} b -2 \cos \left (d x +c \right ) a \,b^{3}+2 \sin \left (d x +c \right ) a^{3} b d x +\sin \left (d x +c \right ) a^{2} b^{2}-2 \sin \left (d x +c \right ) a \,b^{3} d x -\sin \left (d x +c \right ) b^{4}+2 a^{4} d x +a^{3} b -2 a^{2} b^{2} d x -a \,b^{3}}{b^{3} d \left (\sin \left (d x +c \right ) a^{2} b -\sin \left (d x +c \right ) b^{3}+a^{3}-a \,b^{2}\right )} \] Input:

int(cos(d*x+c)^2*sin(d*x+c)/(a+b*sin(d*x+c))^2,x)
 

Output:

( - 4*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*s 
in(c + d*x)*a**2*b + 2*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sqr 
t(a**2 - b**2))*sin(c + d*x)*b**3 - 4*sqrt(a**2 - b**2)*atan((tan((c + d*x 
)/2)*a + b)/sqrt(a**2 - b**2))*a**3 + 2*sqrt(a**2 - b**2)*atan((tan((c + d 
*x)/2)*a + b)/sqrt(a**2 - b**2))*a*b**2 + cos(c + d*x)*sin(c + d*x)*a**2*b 
**2 - cos(c + d*x)*sin(c + d*x)*b**4 + 2*cos(c + d*x)*a**3*b - 2*cos(c + d 
*x)*a*b**3 + 2*sin(c + d*x)*a**3*b*d*x + sin(c + d*x)*a**2*b**2 - 2*sin(c 
+ d*x)*a*b**3*d*x - sin(c + d*x)*b**4 + 2*a**4*d*x + a**3*b - 2*a**2*b**2* 
d*x - a*b**3)/(b**3*d*(sin(c + d*x)*a**2*b - sin(c + d*x)*b**3 + a**3 - a* 
b**2))