3.4.59 \(\int \sqrt {2+3 \cos (x)} \tan (x) \, dx\) [359]

Optimal. Leaf size=37 \[ 2 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {2+3 \cos (x)}}{\sqrt {2}}\right )-2 \sqrt {2+3 \cos (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)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 37, normalized size of antiderivative = 1.00, 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 = {2800, 52, 65, 213} \begin {gather*} 2 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {3 \cos (x)+2}}{\sqrt {2}}\right )-2 \sqrt {3 \cos (x)+2} \end {gather*}

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 52

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 65

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 213

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

Rule 2800

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]

Rubi steps

\begin {align*} \int \sqrt {2+3 \cos (x)} \tan (x) \, dx &=-\text {Subst}\left (\int \frac {\sqrt {2+x}}{x} \, dx,x,3 \cos (x)\right )\\ &=-2 \sqrt {2+3 \cos (x)}-2 \text {Subst}\left (\int \frac {1}{x \sqrt {2+x}} \, dx,x,3 \cos (x)\right )\\ &=-2 \sqrt {2+3 \cos (x)}-4 \text {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.01, size = 33, normalized size = 0.89 \begin {gather*} 2 \sqrt {2} \tanh ^{-1}\left (\sqrt {1+\frac {3 \cos (x)}{2}}\right )-2 \sqrt {2+3 \cos (x)} \end {gather*}

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]]

________________________________________________________________________________________

Mathics [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {cought exception: maximum recursion depth exceeded} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

mathics('Integrate[Sqrt[2 + 3*Cos[x]]*Tan[x],x]')

[Out]

cought exception: maximum recursion depth exceeded

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 31, normalized size = 0.84

method result size
derivativedivides \(2 \arctanh \left (\frac {\sqrt {2+3 \cos \left (x \right )}\, \sqrt {2}}{2}\right ) \sqrt {2}-2 \sqrt {2+3 \cos \left (x \right )}\) \(31\)
default \(2 \arctanh \left (\frac {\sqrt {2+3 \cos \left (x \right )}\, \sqrt {2}}{2}\right ) \sqrt {2}-2 \sqrt {2+3 \cos \left (x \right )}\) \(31\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[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 = 0.38, size = 47, normalized size = 1.27 \begin {gather*} -\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 {gather*}

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 = 0.42, size = 58, normalized size = 1.57 \begin {gather*} \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 {gather*}

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.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {3 \cos {\left (x \right )} + 2} \tan {\left (x \right )}\, dx \end {gather*}

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 = 0.00, size = 68, normalized size = 1.84 \begin {gather*} -2 \sqrt {3 \cos x+2}-\frac {2 \ln \left (\frac {\left |2 \sqrt {3 \cos x+2}-2 \sqrt {2}\right |}{2 \sqrt {3 \cos x+2}+2 \sqrt {2}}\right )}{\sqrt {2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[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)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \mathrm {tan}\left (x\right )\,\sqrt {3\,\cos \left (x\right )+2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________