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

Optimal. Leaf size=11 \[ \log \left (\sin ^2(x)-3 \sin (x)+2\right ) \]

[Out]

ln(2-3*sin(x)+sin(x)^2)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {4334, 628} \[ \log \left (\sin ^2(x)-3 \sin (x)+2\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[2 - 3*Sin[x] + Sin[x]^2]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

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) (-3+2 \sin (x))}{2-3 \sin (x)+\sin ^2(x)} \, dx &=\operatorname {Subst}\left (\int \frac {-3+2 x}{2-3 x+x^2} \, dx,x,\sin (x)\right )\\ &=\log \left (2-3 \sin (x)+\sin ^2(x)\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.09, size = 26, normalized size = 2.36 \[ \log (2-\sin (x))+2 \log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

2*Log[Cos[x/2] - Sin[x/2]] + Log[2 - Sin[x]]

________________________________________________________________________________________

fricas [A]  time = 0.70, size = 15, normalized size = 1.36 \[ \log \left (-\frac {1}{2} \, \sin \relax (x) + 1\right ) + \log \left (-\sin \relax (x) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.13, size = 15, normalized size = 1.36 \[ \log \left (-\sin \relax (x) + 2\right ) + \log \left (-\sin \relax (x) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 12, normalized size = 1.09 \[ \ln \left (2-3 \sin \relax (x )+\sin ^{2}\relax (x )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

ln(2-3*sin(x)+sin(x)^2)

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 11, normalized size = 1.00 \[ \log \left (\sin \relax (x)^{2} - 3 \, \sin \relax (x) + 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(sin(x)^2 - 3*sin(x) + 2)

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 11, normalized size = 1.00 \[ \ln \left ({\sin \relax (x)}^2-3\,\sin \relax (x)+2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(sin(x)^2 - 3*sin(x) + 2)

________________________________________________________________________________________

sympy [A]  time = 0.19, size = 12, normalized size = 1.09 \[ \log {\left (\sin {\relax (x )} - 2 \right )} + \log {\left (\sin {\relax (x )} - 1 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________