3.117 \(\int \frac {3+\cosh (x)}{2-\cosh (x)} \, dx\)

Optimal. Leaf size=36 \[ \frac {5 x}{\sqrt {3}}-x+\frac {10 \tanh ^{-1}\left (\frac {\sinh (x)}{-\cosh (x)+\sqrt {3}+2}\right )}{\sqrt {3}} \]

[Out]

-x+5/3*x*3^(1/2)+10/3*arctanh(sinh(x)/(2-cosh(x)+3^(1/2)))*3^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2735, 2657} \[ \frac {5 x}{\sqrt {3}}-x+\frac {10 \tanh ^{-1}\left (\frac {\sinh (x)}{-\cosh (x)+\sqrt {3}+2}\right )}{\sqrt {3}} \]

Antiderivative was successfully verified.

[In]

Int[(3 + Cosh[x])/(2 - Cosh[x]),x]

[Out]

-x + (5*x)/Sqrt[3] + (10*ArcTanh[Sinh[x]/(2 + Sqrt[3] - Cosh[x])])/Sqrt[3]

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]

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rubi steps

\begin {align*} \int \frac {3+\cosh (x)}{2-\cosh (x)} \, dx &=-x+5 \int \frac {1}{2-\cosh (x)} \, dx\\ &=-x+\frac {5 x}{\sqrt {3}}+\frac {10 \tanh ^{-1}\left (\frac {\sinh (x)}{2+\sqrt {3}-\cosh (x)}\right )}{\sqrt {3}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 24, normalized size = 0.67 \[ \frac {10 \tanh ^{-1}\left (\sqrt {3} \tanh \left (\frac {x}{2}\right )\right )}{\sqrt {3}}-x \]

Antiderivative was successfully verified.

[In]

Integrate[(3 + Cosh[x])/(2 - Cosh[x]),x]

[Out]

-x + (10*ArcTanh[Sqrt[3]*Tanh[x/2]])/Sqrt[3]

________________________________________________________________________________________

fricas [A]  time = 2.70, size = 45, normalized size = 1.25 \[ \frac {5}{3} \, \sqrt {3} \log \left (-\frac {2 \, {\left (\sqrt {3} - 2\right )} \cosh \relax (x) - {\left (2 \, \sqrt {3} - 3\right )} \sinh \relax (x) - \sqrt {3} + 2}{\cosh \relax (x) - 2}\right ) - x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+cosh(x))/(2-cosh(x)),x, algorithm="fricas")

[Out]

5/3*sqrt(3)*log(-(2*(sqrt(3) - 2)*cosh(x) - (2*sqrt(3) - 3)*sinh(x) - sqrt(3) + 2)/(cosh(x) - 2)) - x

________________________________________________________________________________________

giac [A]  time = 0.14, size = 37, normalized size = 1.03 \[ -\frac {5}{3} \, \sqrt {3} \log \left (\frac {{\left | -2 \, \sqrt {3} + 2 \, e^{x} - 4 \right |}}{{\left | 2 \, \sqrt {3} + 2 \, e^{x} - 4 \right |}}\right ) - x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+cosh(x))/(2-cosh(x)),x, algorithm="giac")

[Out]

-5/3*sqrt(3)*log(abs(-2*sqrt(3) + 2*e^x - 4)/abs(2*sqrt(3) + 2*e^x - 4)) - x

________________________________________________________________________________________

maple [A]  time = 0.06, size = 32, normalized size = 0.89 \[ \frac {10 \sqrt {3}\, \arctanh \left (\tanh \left (\frac {x}{2}\right ) \sqrt {3}\right )}{3}+\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-\ln \left (\tanh \left (\frac {x}{2}\right )+1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3+cosh(x))/(2-cosh(x)),x)

[Out]

10/3*3^(1/2)*arctanh(tanh(1/2*x)*3^(1/2))+ln(tanh(1/2*x)-1)-ln(tanh(1/2*x)+1)

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 34, normalized size = 0.94 \[ \frac {5}{3} \, \sqrt {3} \log \left (-\frac {\sqrt {3} - e^{\left (-x\right )} + 2}{\sqrt {3} + e^{\left (-x\right )} - 2}\right ) - x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+cosh(x))/(2-cosh(x)),x, algorithm="maxima")

[Out]

5/3*sqrt(3)*log(-(sqrt(3) - e^(-x) + 2)/(sqrt(3) + e^(-x) - 2)) - x

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 48, normalized size = 1.33 \[ \frac {5\,\sqrt {3}\,\ln \left (10\,{\mathrm {e}}^x+\frac {5\,\sqrt {3}\,\left (4\,{\mathrm {e}}^x-2\right )}{3}\right )}{3}-\frac {5\,\sqrt {3}\,\ln \left (10\,{\mathrm {e}}^x-\frac {5\,\sqrt {3}\,\left (4\,{\mathrm {e}}^x-2\right )}{3}\right )}{3}-x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(cosh(x) + 3)/(cosh(x) - 2),x)

[Out]

(5*3^(1/2)*log(10*exp(x) + (5*3^(1/2)*(4*exp(x) - 2))/3))/3 - (5*3^(1/2)*log(10*exp(x) - (5*3^(1/2)*(4*exp(x)
- 2))/3))/3 - x

________________________________________________________________________________________

sympy [A]  time = 0.79, size = 44, normalized size = 1.22 \[ - x - \frac {5 \sqrt {3} \log {\left (\tanh {\left (\frac {x}{2} \right )} - \frac {\sqrt {3}}{3} \right )}}{3} + \frac {5 \sqrt {3} \log {\left (\tanh {\left (\frac {x}{2} \right )} + \frac {\sqrt {3}}{3} \right )}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+cosh(x))/(2-cosh(x)),x)

[Out]

-x - 5*sqrt(3)*log(tanh(x/2) - sqrt(3)/3)/3 + 5*sqrt(3)*log(tanh(x/2) + sqrt(3)/3)/3

________________________________________________________________________________________