3.1 \(\int \frac{2}{3-\cos (4+6 x)} \, dx\)

Optimal. Leaf size=44 \[ \frac{x}{\sqrt{2}}+\frac{\tan ^{-1}\left (\frac{\sin (6 x+4)}{-\cos (6 x+4)+2 \sqrt{2}+3}\right )}{3 \sqrt{2}} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0397767, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {12, 2657} \[ \frac{x}{\sqrt{2}}+\frac{\tan ^{-1}\left (\frac{\sin (6 x+4)}{-\cos (6 x+4)+2 \sqrt{2}+3}\right )}{3 \sqrt{2}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

x/Sqrt[2] + ArcTan[Sin[4 + 6*x]/(3 + 2*Sqrt[2] - Cos[4 + 6*x])]/(3*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 2657

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{q = Rt[a^2 - b^2, 2]}, Simp[x/q, x] + Simp
[(2*ArcTan[(b*Cos[c + d*x])/(a + q + b*Sin[c + d*x])])/(d*q), x]] /; FreeQ[{a, b, c, d}, x] && GtQ[a^2 - b^2,
0] && PosQ[a]

Rubi steps

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

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

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[Sqrt[2]*Tan[2 + 3*x]]/(3*Sqrt[2])

________________________________________________________________________________________

Maple [A]  time = 0.016, size = 17, normalized size = 0.4 \begin{align*}{\frac{\sqrt{2}\arctan \left ( \tan \left ( 2+3\,x \right ) \sqrt{2} \right ) }{6}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.69744, size = 35, normalized size = 0.8 \begin{align*} \frac{1}{6} \, \sqrt{2} \arctan \left (\frac{\sqrt{2} \sin \left (6 \, x + 4\right )}{\cos \left (6 \, x + 4\right ) + 1}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/6*sqrt(2)*arctan(sqrt(2)*sin(6*x + 4)/(cos(6*x + 4) + 1))

________________________________________________________________________________________

Fricas [A]  time = 1.42568, size = 101, normalized size = 2.3 \begin{align*} -\frac{1}{12} \, \sqrt{2} \arctan \left (\frac{3 \, \sqrt{2} \cos \left (6 \, x + 4\right ) - \sqrt{2}}{4 \, \sin \left (6 \, x + 4\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.324355, size = 32, normalized size = 0.73 \begin{align*} \frac{\sqrt{2} \left (\operatorname{atan}{\left (\sqrt{2} \tan{\left (3 x + 2 \right )} \right )} + \pi \left \lfloor{\frac{3 x - \frac{\pi }{2} + 2}{\pi }}\right \rfloor \right )}{6} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sqrt(2)*(atan(sqrt(2)*tan(3*x + 2)) + pi*floor((3*x - pi/2 + 2)/pi))/6

________________________________________________________________________________________

Giac [A]  time = 1.13833, size = 77, normalized size = 1.75 \begin{align*} \frac{1}{6} \, \sqrt{2}{\left (3 \, x + \arctan \left (-\frac{\sqrt{2} \sin \left (6 \, x + 4\right ) - 2 \, \sin \left (6 \, x + 4\right )}{\sqrt{2} \cos \left (6 \, x + 4\right ) + \sqrt{2} - 2 \, \cos \left (6 \, x + 4\right ) + 2}\right ) + 2\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/6*sqrt(2)*(3*x + arctan(-(sqrt(2)*sin(6*x + 4) - 2*sin(6*x + 4))/(sqrt(2)*cos(6*x + 4) + sqrt(2) - 2*cos(6*x
 + 4) + 2)) + 2)