3.147 \(\int \frac {\sin (a x)}{(b+c \sin (a x))^2} \, dx\)

Optimal. Leaf size=77 \[ -\frac {2 c \tan ^{-1}\left (\frac {b \tan \left (\frac {a x}{2}\right )+c}{\sqrt {b^2-c^2}}\right )}{a \left (b^2-c^2\right )^{3/2}}-\frac {b \cos (a x)}{a \left (b^2-c^2\right ) (c \sin (a x)+b)} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2754, 12, 2660, 618, 204} \[ -\frac {2 c \tan ^{-1}\left (\frac {b \tan \left (\frac {a x}{2}\right )+c}{\sqrt {b^2-c^2}}\right )}{a \left (b^2-c^2\right )^{3/2}}-\frac {b \cos (a x)}{a \left (b^2-c^2\right ) (c \sin (a x)+b)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(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 2754

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] + Dist[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]

Rubi steps

\begin {align*} \int \frac {\sin (a x)}{(b+c \sin (a x))^2} \, dx &=-\frac {b \cos (a x)}{a \left (b^2-c^2\right ) (b+c \sin (a x))}+\frac {\int \frac {c}{b+c \sin (a x)} \, dx}{-b^2+c^2}\\ &=-\frac {b \cos (a x)}{a \left (b^2-c^2\right ) (b+c \sin (a x))}-\frac {c \int \frac {1}{b+c \sin (a x)} \, dx}{b^2-c^2}\\ &=-\frac {b \cos (a x)}{a \left (b^2-c^2\right ) (b+c \sin (a x))}-\frac {(2 c) \operatorname {Subst}\left (\int \frac {1}{b+2 c x+b x^2} \, dx,x,\tan \left (\frac {a x}{2}\right )\right )}{a \left (b^2-c^2\right )}\\ &=-\frac {b \cos (a x)}{a \left (b^2-c^2\right ) (b+c \sin (a x))}+\frac {(4 c) \operatorname {Subst}\left (\int \frac {1}{-4 \left (b^2-c^2\right )-x^2} \, dx,x,2 c+2 b \tan \left (\frac {a x}{2}\right )\right )}{a \left (b^2-c^2\right )}\\ &=-\frac {2 c \tan ^{-1}\left (\frac {c+b \tan \left (\frac {a x}{2}\right )}{\sqrt {b^2-c^2}}\right )}{a \left (b^2-c^2\right )^{3/2}}-\frac {b \cos (a x)}{a \left (b^2-c^2\right ) (b+c \sin (a x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.26, size = 76, normalized size = 0.99 \[ -\frac {\frac {2 c \tan ^{-1}\left (\frac {b \tan \left (\frac {a x}{2}\right )+c}{\sqrt {b^2-c^2}}\right )}{\left (b^2-c^2\right )^{3/2}}+\frac {b \cos (a x)}{(b-c) (b+c) (c \sin (a x)+b)}}{a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 312, normalized size = 4.05 \[ \left [\frac {{\left (c^{2} \sin \left (a x\right ) + b c\right )} \sqrt {-b^{2} + c^{2}} \log \left (\frac {{\left (2 \, b^{2} - c^{2}\right )} \cos \left (a x\right )^{2} - 2 \, b c \sin \left (a x\right ) - b^{2} - c^{2} + 2 \, {\left (b \cos \left (a x\right ) \sin \left (a x\right ) + c \cos \left (a x\right )\right )} \sqrt {-b^{2} + c^{2}}}{c^{2} \cos \left (a x\right )^{2} - 2 \, b c \sin \left (a x\right ) - b^{2} - c^{2}}\right ) - 2 \, {\left (b^{3} - b c^{2}\right )} \cos \left (a x\right )}{2 \, {\left (a b^{5} - 2 \, a b^{3} c^{2} + a b c^{4} + {\left (a b^{4} c - 2 \, a b^{2} c^{3} + a c^{5}\right )} \sin \left (a x\right )\right )}}, \frac {{\left (c^{2} \sin \left (a x\right ) + b c\right )} \sqrt {b^{2} - c^{2}} \arctan \left (-\frac {b \sin \left (a x\right ) + c}{\sqrt {b^{2} - c^{2}} \cos \left (a x\right )}\right ) - {\left (b^{3} - b c^{2}\right )} \cos \left (a x\right )}{a b^{5} - 2 \, a b^{3} c^{2} + a b c^{4} + {\left (a b^{4} c - 2 \, a b^{2} c^{3} + a c^{5}\right )} \sin \left (a x\right )}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 1.05, size = 98, normalized size = 1.27 \[ -\frac {2 \, {\left (\frac {{\left (\pi \left \lfloor \frac {a x}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\relax (b) + \arctan \left (\frac {b \tan \left (\frac {1}{2} \, a x\right ) + c}{\sqrt {b^{2} - c^{2}}}\right )\right )} c}{{\left (b^{2} - c^{2}\right )}^{\frac {3}{2}}} + \frac {c \tan \left (\frac {1}{2} \, a x\right ) + b}{{\left (b \tan \left (\frac {1}{2} \, a x\right )^{2} + 2 \, c \tan \left (\frac {1}{2} \, a x\right ) + b\right )} {\left (b^{2} - c^{2}\right )}}\right )}}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.10, size = 143, normalized size = 1.86 \[ -\frac {8 c \arctan \left (\frac {2 b \tan \left (\frac {a x}{2}\right )+2 c}{2 \sqrt {b^{2}-c^{2}}}\right )}{\left (4 b^{2}-4 c^{2}\right ) \sqrt {b^{2}-c^{2}}\, a}-\frac {8 c \tan \left (\frac {a x}{2}\right )}{\left (4 b^{2}-4 c^{2}\right ) \left (b \left (\tan ^{2}\left (\frac {a x}{2}\right )\right )+2 c \tan \left (\frac {a x}{2}\right )+b \right ) a}-\frac {8 b}{\left (4 b^{2}-4 c^{2}\right ) \left (b \left (\tan ^{2}\left (\frac {a x}{2}\right )\right )+2 c \tan \left (\frac {a x}{2}\right )+b \right ) a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*c^2-4*b^2>0)', see `assume?`
 for more details)Is 4*c^2-4*b^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 0.49, size = 133, normalized size = 1.73 \[ -\frac {\frac {2\,b}{b^2-c^2}+\frac {2\,c\,\mathrm {tan}\left (\frac {a\,x}{2}\right )}{b^2-c^2}}{a\,\left (b\,{\mathrm {tan}\left (\frac {a\,x}{2}\right )}^2+2\,c\,\mathrm {tan}\left (\frac {a\,x}{2}\right )+b\right )}-\frac {2\,c\,\mathrm {atan}\left (\frac {\left (\frac {2\,c^2}{{\left (b+c\right )}^{3/2}\,{\left (b-c\right )}^{3/2}}+\frac {2\,b\,c\,\mathrm {tan}\left (\frac {a\,x}{2}\right )}{{\left (b+c\right )}^{3/2}\,{\left (b-c\right )}^{3/2}}\right )\,\left (b^2-c^2\right )}{2\,c}\right )}{a\,{\left (b+c\right )}^{3/2}\,{\left (b-c\right )}^{3/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

- ((2*b)/(b^2 - c^2) + (2*c*tan((a*x)/2))/(b^2 - c^2))/(a*(b + 2*c*tan((a*x)/2) + b*tan((a*x)/2)^2)) - (2*c*at
an((((2*c^2)/((b + c)^(3/2)*(b - c)^(3/2)) + (2*b*c*tan((a*x)/2))/((b + c)^(3/2)*(b - c)^(3/2)))*(b^2 - c^2))/
(2*c)))/(a*(b + c)^(3/2)*(b - c)^(3/2))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________