3.836 \(\int \frac {\cos (x)}{-\sin (x)+\sin ^3(x)} \, dx\)

Optimal. Leaf size=9 \[ \log (\cos (x))-\log (\sin (x)) \]

[Out]

ln(cos(x))-ln(sin(x))

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {4334, 266, 36, 31, 29} \[ \log (\cos (x))-\log (\sin (x)) \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]/(-Sin[x] + Sin[x]^3),x]

[Out]

Log[Cos[x]] - Log[Sin[x]]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

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

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4334

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Sin[c*(a + b*x)], x]}, Dist[d/(b
*c), Subst[Int[SubstFor[1, Sin[c*(a + b*x)]/d, u, x], x], x, Sin[c*(a + b*x)]/d], x] /; FunctionOfQ[Sin[c*(a +
 b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Cos] || EqQ[F, cos])

Rubi steps

\begin {align*} \int \frac {\cos (x)}{-\sin (x)+\sin ^3(x)} \, dx &=\operatorname {Subst}\left (\int \frac {1}{x \left (-1+x^2\right )} \, dx,x,\sin (x)\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{(-1+x) x} \, dx,x,\sin ^2(x)\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{-1+x} \, dx,x,\sin ^2(x)\right )-\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,\sin ^2(x)\right )\\ &=\log (\cos (x))-\log (\sin (x))\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 9, normalized size = 1.00 \[ \log (\cos (x))-\log (\sin (x)) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]/(-Sin[x] + Sin[x]^3),x]

[Out]

Log[Cos[x]] - Log[Sin[x]]

________________________________________________________________________________________

fricas [B]  time = 0.57, size = 19, normalized size = 2.11 \[ \frac {1}{2} \, \log \left (\cos \relax (x)^{2}\right ) - \frac {1}{2} \, \log \left (-\frac {1}{4} \, \cos \relax (x)^{2} + \frac {1}{4}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(-sin(x)+sin(x)^3),x, algorithm="fricas")

[Out]

1/2*log(cos(x)^2) - 1/2*log(-1/4*cos(x)^2 + 1/4)

________________________________________________________________________________________

giac [A]  time = 0.13, size = 18, normalized size = 2.00 \[ \frac {1}{2} \, \log \left (-\sin \relax (x)^{2} + 1\right ) - \log \left ({\left | \sin \relax (x) \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(-sin(x)+sin(x)^3),x, algorithm="giac")

[Out]

1/2*log(-sin(x)^2 + 1) - log(abs(sin(x)))

________________________________________________________________________________________

maple [B]  time = 0.08, size = 21, normalized size = 2.33 \[ -\ln \left (\sin \relax (x )\right )+\frac {\ln \left (\sin \relax (x )-1\right )}{2}+\frac {\ln \left (1+\sin \relax (x )\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)/(-sin(x)+sin(x)^3),x)

[Out]

-ln(sin(x))+1/2*ln(sin(x)-1)+1/2*ln(1+sin(x))

________________________________________________________________________________________

maxima [B]  time = 0.32, size = 20, normalized size = 2.22 \[ \frac {1}{2} \, \log \left (\sin \relax (x) + 1\right ) + \frac {1}{2} \, \log \left (\sin \relax (x) - 1\right ) - \log \left (\sin \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(-sin(x)+sin(x)^3),x, algorithm="maxima")

[Out]

1/2*log(sin(x) + 1) + 1/2*log(sin(x) - 1) - log(sin(x))

________________________________________________________________________________________

mupad [B]  time = 3.01, size = 13, normalized size = 1.44 \[ \frac {\ln \left ({\cos \relax (x)}^2\right )}{2}-\ln \left (\sin \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-cos(x)/(sin(x) - sin(x)^3),x)

[Out]

log(cos(x)^2)/2 - log(sin(x))

________________________________________________________________________________________

sympy [B]  time = 0.32, size = 20, normalized size = 2.22 \[ \frac {\log {\left (\sin {\relax (x )} - 1 \right )}}{2} + \frac {\log {\left (\sin {\relax (x )} + 1 \right )}}{2} - \log {\left (\sin {\relax (x )} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(-sin(x)+sin(x)**3),x)

[Out]

log(sin(x) - 1)/2 + log(sin(x) + 1)/2 - log(sin(x))

________________________________________________________________________________________