3.359 \(\int \sqrt{2+3 \cos (x)} \tan (x) \, dx\)

Optimal. Leaf size=37 \[ 2 \sqrt{2} \tanh ^{-1}\left (\frac{\sqrt{3 \cos (x)+2}}{\sqrt{2}}\right )-2 \sqrt{3 \cos (x)+2} \]

[Out]

2*Sqrt[2]*ArcTanh[Sqrt[2 + 3*Cos[x]]/Sqrt[2]] - 2*Sqrt[2 + 3*Cos[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.0405188, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.308, Rules used = {2721, 50, 63, 207} \[ 2 \sqrt{2} \tanh ^{-1}\left (\frac{\sqrt{3 \cos (x)+2}}{\sqrt{2}}\right )-2 \sqrt{3 \cos (x)+2} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[2 + 3*Cos[x]]*Tan[x],x]

[Out]

2*Sqrt[2]*ArcTanh[Sqrt[2 + 3*Cos[x]]/Sqrt[2]] - 2*Sqrt[2 + 3*Cos[x]]

Rule 2721

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 207

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

Rubi steps

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

Mathematica [A]  time = 0.0191128, size = 33, normalized size = 0.89 \[ 2 \sqrt{2} \tanh ^{-1}\left (\sqrt{\frac{3 \cos (x)}{2}+1}\right )-2 \sqrt{3 \cos (x)+2} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[2 + 3*Cos[x]]*Tan[x],x]

[Out]

2*Sqrt[2]*ArcTanh[Sqrt[1 + (3*Cos[x])/2]] - 2*Sqrt[2 + 3*Cos[x]]

________________________________________________________________________________________

Maple [A]  time = 0.016, size = 31, normalized size = 0.8 \begin{align*} 2\,{\it Artanh} \left ( 1/2\,\sqrt{2+3\,\cos \left ( x \right ) }\sqrt{2} \right ) \sqrt{2}-2\,\sqrt{2+3\,\cos \left ( x \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2+3*cos(x))^(1/2)*tan(x),x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.40633, size = 63, normalized size = 1.7 \begin{align*} -\sqrt{2} \log \left (-\frac{\sqrt{2} - \sqrt{3 \, \cos \left (x\right ) + 2}}{\sqrt{2} + \sqrt{3 \, \cos \left (x\right ) + 2}}\right ) - 2 \, \sqrt{3 \, \cos \left (x\right ) + 2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-sqrt(2)*log(-(sqrt(2) - sqrt(3*cos(x) + 2))/(sqrt(2) + sqrt(3*cos(x) + 2))) - 2*sqrt(3*cos(x) + 2)

________________________________________________________________________________________

Fricas [A]  time = 3.00829, size = 182, normalized size = 4.92 \begin{align*} \frac{1}{2} \, \sqrt{2} \log \left (-\frac{9 \, \cos \left (x\right )^{2} + 4 \,{\left (3 \, \sqrt{2} \cos \left (x\right ) + 4 \, \sqrt{2}\right )} \sqrt{3 \, \cos \left (x\right ) + 2} + 48 \, \cos \left (x\right ) + 32}{\cos \left (x\right )^{2}}\right ) - 2 \, \sqrt{3 \, \cos \left (x\right ) + 2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*sqrt(2)*log(-(9*cos(x)^2 + 4*(3*sqrt(2)*cos(x) + 4*sqrt(2))*sqrt(3*cos(x) + 2) + 48*cos(x) + 32)/cos(x)^2)
 - 2*sqrt(3*cos(x) + 2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{3 \cos{\left (x \right )} + 2} \tan{\left (x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+3*cos(x))**(1/2)*tan(x),x)

[Out]

Integral(sqrt(3*cos(x) + 2)*tan(x), x)

________________________________________________________________________________________

Giac [A]  time = 1.06913, size = 68, normalized size = 1.84 \begin{align*} -\sqrt{2} \log \left (\frac{{\left | -2 \, \sqrt{2} + 2 \, \sqrt{3 \, \cos \left (x\right ) + 2} \right |}}{2 \,{\left (\sqrt{2} + \sqrt{3 \, \cos \left (x\right ) + 2}\right )}}\right ) - 2 \, \sqrt{3 \, \cos \left (x\right ) + 2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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