3.227 \(\int \tanh (2 x) \, dx\)

Optimal. Leaf size=9 \[ \frac{1}{2} \log (\cosh (2 x)) \]

[Out]

Log[Cosh[2*x]]/2

________________________________________________________________________________________

Rubi [A]  time = 0.0037429, antiderivative size = 9, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 4, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3475} \[ \frac{1}{2} \log (\cosh (2 x)) \]

Antiderivative was successfully verified.

[In]

Int[Tanh[2*x],x]

[Out]

Log[Cosh[2*x]]/2

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \tanh (2 x) \, dx &=\frac{1}{2} \log (\cosh (2 x))\\ \end{align*}

Mathematica [A]  time = 0.0029506, size = 9, normalized size = 1. \[ \frac{1}{2} \log (\cosh (2 x)) \]

Antiderivative was successfully verified.

[In]

Integrate[Tanh[2*x],x]

[Out]

Log[Cosh[2*x]]/2

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 8, normalized size = 0.9 \begin{align*}{\frac{\ln \left ( \cosh \left ( 2\,x \right ) \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(2*x)/cosh(2*x),x)

[Out]

1/2*ln(cosh(2*x))

________________________________________________________________________________________

Maxima [A]  time = 0.942742, size = 9, normalized size = 1. \begin{align*} \frac{1}{2} \, \log \left (\cosh \left (2 \, x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(2*x)/cosh(2*x),x, algorithm="maxima")

[Out]

1/2*log(cosh(2*x))

________________________________________________________________________________________

Fricas [B]  time = 1.73173, size = 69, normalized size = 7.67 \begin{align*} -x + \frac{1}{2} \, \log \left (\frac{2 \, \cosh \left (2 \, x\right )}{\cosh \left (2 \, x\right ) - \sinh \left (2 \, x\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(2*x)/cosh(2*x),x, algorithm="fricas")

[Out]

-x + 1/2*log(2*cosh(2*x)/(cosh(2*x) - sinh(2*x)))

________________________________________________________________________________________

Sympy [A]  time = 0.130381, size = 7, normalized size = 0.78 \begin{align*} \frac{\log{\left (\cosh{\left (2 x \right )} \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(2*x)/cosh(2*x),x)

[Out]

log(cosh(2*x))/2

________________________________________________________________________________________

Giac [A]  time = 1.09376, size = 18, normalized size = 2. \begin{align*} -x + \frac{1}{2} \, \log \left (e^{\left (4 \, x\right )} + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(2*x)/cosh(2*x),x, algorithm="giac")

[Out]

-x + 1/2*log(e^(4*x) + 1)