3.888 \(\int \frac {\sin (x)}{\cos ^3(x)-\cos ^5(x)} \, dx\)

Optimal. Leaf size=12 \[ \frac {\tan ^2(x)}{2}+\log (\tan (x)) \]

[Out]

ln(tan(x))+1/2*tan(x)^2

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 17, normalized size of antiderivative = 1.42, number of steps used = 4, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {4335, 266, 44} \[ \frac {\sec ^2(x)}{2}+\log (\sin (x))-\log (\cos (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-Log[Cos[x]] + Log[Sin[x]] + Sec[x]^2/2

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 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 4335

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 17, normalized size = 1.42 \[ \frac {\sec ^2(x)}{2}+\log (\sin (x))-\log (\cos (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-Log[Cos[x]] + Log[Sin[x]] + Sec[x]^2/2

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.14, size = 24, normalized size = 2.00 \[ \frac {1}{2 \, \cos \relax (x)^{2}} + \frac {1}{2} \, \log \left (-\cos \relax (x)^{2} + 1\right ) - \log \left ({\left | \cos \relax (x) \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.08, size = 27, normalized size = 2.25 \[ \frac {1}{2 \cos \relax (x )^{2}}-\ln \left (\cos \relax (x )\right )+\frac {\ln \left (-1+\cos \relax (x )\right )}{2}+\frac {\ln \left (1+\cos \relax (x )\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2/cos(x)^2-ln(cos(x))+1/2*ln(-1+cos(x))+1/2*ln(1+cos(x))

________________________________________________________________________________________

maxima [B]  time = 0.31, size = 26, normalized size = 2.17 \[ \frac {1}{2 \, \cos \relax (x)^{2}} + \frac {1}{2} \, \log \left (\cos \relax (x) + 1\right ) + \frac {1}{2} \, \log \left (\cos \relax (x) - 1\right ) - \log \left (\cos \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 19, normalized size = 1.58 \[ \frac {\ln \left ({\sin \relax (x)}^2\right )}{2}-\ln \left (\cos \relax (x)\right )+\frac {1}{2\,{\cos \relax (x)}^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 1.49, size = 29, normalized size = 2.42 \[ \frac {\log {\left (\cos {\relax (x )} - 1 \right )}}{2} + \frac {\log {\left (\cos {\relax (x )} + 1 \right )}}{2} - \log {\left (\cos {\relax (x )} \right )} + \frac {1}{2 \cos ^{2}{\relax (x )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________