3.95 \(\int \csc (x) \sin (3 x) \, dx\)

Optimal. Leaf size=8 \[ x+2 \sin (x) \cos (x) \]

[Out]

x + 2*Cos[x]*Sin[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0303075, antiderivative size = 8, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {385, 203} \[ x+2 \sin (x) \cos (x) \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]*Sin[3*x],x]

[Out]

x + 2*Cos[x]*Sin[x]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> -Simp[((b*c - a*d)*x*(a + b*x^n)^(p +
 1))/(a*b*n*(p + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /
; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 203

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

Rubi steps

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

Mathematica [A]  time = 0.0116813, size = 6, normalized size = 0.75 \[ x+\sin (2 x) \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]*Sin[3*x],x]

[Out]

x + Sin[2*x]

________________________________________________________________________________________

Maple [A]  time = 0.032, size = 9, normalized size = 1.1 \begin{align*} x+2\,\cos \left ( x \right ) \sin \left ( x \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)*sin(3*x),x)

[Out]

x+2*cos(x)*sin(x)

________________________________________________________________________________________

Maxima [A]  time = 1.02185, size = 8, normalized size = 1. \begin{align*} x + \sin \left (2 \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)*sin(3*x),x, algorithm="maxima")

[Out]

x + sin(2*x)

________________________________________________________________________________________

Fricas [A]  time = 2.42448, size = 28, normalized size = 3.5 \begin{align*} 2 \, \cos \left (x\right ) \sin \left (x\right ) + x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)*sin(3*x),x, algorithm="fricas")

[Out]

2*cos(x)*sin(x) + x

________________________________________________________________________________________

Sympy [A]  time = 1.68294, size = 5, normalized size = 0.62 \begin{align*} x + \sin{\left (2 x \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)*sin(3*x),x)

[Out]

x + sin(2*x)

________________________________________________________________________________________

Giac [A]  time = 1.09955, size = 8, normalized size = 1. \begin{align*} x + \sin \left (2 \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)*sin(3*x),x, algorithm="giac")

[Out]

x + sin(2*x)