3.23 \(\int -\frac {2 \csc (4+6 x)}{3 \cot (4+6 x)+\csc (4+6 x)} \, dx\)

Optimal. Leaf size=61 \[ \frac {\log \left (\sqrt {2} \cos (3 x+2)-\sin (3 x+2)\right )}{6 \sqrt {2}}-\frac {\log \left (\sin (3 x+2)+\sqrt {2} \cos (3 x+2)\right )}{6 \sqrt {2}} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {12, 3166, 2659, 206} \[ \frac {\log \left (\sqrt {2} \cos (3 x+2)-\sin (3 x+2)\right )}{6 \sqrt {2}}-\frac {\log \left (\sin (3 x+2)+\sqrt {2} \cos (3 x+2)\right )}{6 \sqrt {2}} \]

Antiderivative was successfully verified.

[In]

Int[(-2*Csc[4 + 6*x])/(3*Cot[4 + 6*x] + Csc[4 + 6*x]),x]

[Out]

Log[Sqrt[2]*Cos[2 + 3*x] - Sin[2 + 3*x]]/(6*Sqrt[2]) - Log[Sqrt[2]*Cos[2 + 3*x] + Sin[2 + 3*x]]/(6*Sqrt[2])

Rule 12

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

Rule 206

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

Rule 2659

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

Int[csc[(d_.) + (e_.)*(x_)]^(n_.)*((a_.) + csc[(d_.) + (e_.)*(x_)]*(b_.) + cot[(d_.) + (e_.)*(x_)]*(c_.))^(m_)
, x_Symbol] :> Int[1/(b + a*Sin[d + e*x] + c*Cos[d + e*x])^n, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[m + n, 0]
 && IntegerQ[n]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 22, normalized size = 0.36 \[ -\frac {\tanh ^{-1}\left (\frac {\tan (3 x+2)}{\sqrt {2}}\right )}{3 \sqrt {2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(-2*Csc[4 + 6*x])/(3*Cot[4 + 6*x] + Csc[4 + 6*x]),x]

[Out]

-1/3*ArcTanh[Tan[2 + 3*x]/Sqrt[2]]/Sqrt[2]

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 74, normalized size = 1.21 \[ \frac {1}{24} \, \sqrt {2} \log \left (-\frac {7 \, \cos \left (6 \, x + 4\right )^{2} + 4 \, {\left (\sqrt {2} \cos \left (6 \, x + 4\right ) + 3 \, \sqrt {2}\right )} \sin \left (6 \, x + 4\right ) - 6 \, \cos \left (6 \, x + 4\right ) - 17}{9 \, \cos \left (6 \, x + 4\right )^{2} + 6 \, \cos \left (6 \, x + 4\right ) + 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-2*csc(4+6*x)/(3*cot(4+6*x)+csc(4+6*x)),x, algorithm="fricas")

[Out]

1/24*sqrt(2)*log(-(7*cos(6*x + 4)^2 + 4*(sqrt(2)*cos(6*x + 4) + 3*sqrt(2))*sin(6*x + 4) - 6*cos(6*x + 4) - 17)
/(9*cos(6*x + 4)^2 + 6*cos(6*x + 4) + 1))

________________________________________________________________________________________

giac [A]  time = 0.24, size = 39, normalized size = 0.64 \[ \frac {1}{12} \, \sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 2 \, \tan \left (3 \, x + 2\right ) \right |}}{{\left | 2 \, \sqrt {2} + 2 \, \tan \left (3 \, x + 2\right ) \right |}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-2*csc(4+6*x)/(3*cot(4+6*x)+csc(4+6*x)),x, algorithm="giac")

[Out]

1/12*sqrt(2)*log(abs(-2*sqrt(2) + 2*tan(3*x + 2))/abs(2*sqrt(2) + 2*tan(3*x + 2)))

________________________________________________________________________________________

maple [A]  time = 0.31, size = 18, normalized size = 0.30 \[ -\frac {\sqrt {2}\, \arctanh \left (\frac {\sqrt {2}\, \tan \left (2+3 x \right )}{2}\right )}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-2*csc(4+6*x)/(3*cot(4+6*x)+csc(4+6*x)),x)

[Out]

-1/6*2^(1/2)*arctanh(1/2*2^(1/2)*tan(2+3*x))

________________________________________________________________________________________

maxima [A]  time = 0.53, size = 53, normalized size = 0.87 \[ \frac {1}{12} \, \sqrt {2} \log \left (-\frac {\sqrt {2} - \frac {\sin \left (6 \, x + 4\right )}{\cos \left (6 \, x + 4\right ) + 1}}{\sqrt {2} + \frac {\sin \left (6 \, x + 4\right )}{\cos \left (6 \, x + 4\right ) + 1}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-2*csc(4+6*x)/(3*cot(4+6*x)+csc(4+6*x)),x, algorithm="maxima")

[Out]

1/12*sqrt(2)*log(-(sqrt(2) - sin(6*x + 4)/(cos(6*x + 4) + 1))/(sqrt(2) + sin(6*x + 4)/(cos(6*x + 4) + 1)))

________________________________________________________________________________________

mupad [B]  time = 2.71, size = 17, normalized size = 0.28 \[ -\frac {\sqrt {2}\,\mathrm {atanh}\left (\frac {\sqrt {2}\,\mathrm {tan}\left (3\,x+2\right )}{2}\right )}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-2/(sin(6*x + 4)*(3*cot(6*x + 4) + 1/sin(6*x + 4))),x)

[Out]

-(2^(1/2)*atanh((2^(1/2)*tan(3*x + 2))/2))/6

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - 2 \int \frac {\csc {\left (6 x + 4 \right )}}{3 \cot {\left (6 x + 4 \right )} + \csc {\left (6 x + 4 \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-2*csc(4+6*x)/(3*cot(4+6*x)+csc(4+6*x)),x)

[Out]

-2*Integral(csc(6*x + 4)/(3*cot(6*x + 4) + csc(6*x + 4)), x)

________________________________________________________________________________________