3.3.27 \(\int \tanh (2 x) \, dx\) [227]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3556} \begin {gather*} \frac {1}{2} \log (\cosh (2 x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Tanh[2*x],x]

[Out]

Log[Cosh[2*x]]/2

Rule 3556

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.01, size = 9, normalized size = 1.00 \begin {gather*} \frac {1}{2} \log (\cosh (2 x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Tanh[2*x],x]

[Out]

Log[Cosh[2*x]]/2

________________________________________________________________________________________

Mathics [A]
time = 1.84, size = 7, normalized size = 0.78 \begin {gather*} \frac {\text {Log}\left [\text {Cosh}\left [2 x\right ]\right ]}{2} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[Sinh[2*x]/Cosh[2*x],x]')

[Out]

Log[Cosh[2 x]] / 2

________________________________________________________________________________________

Maple [A]
time = 0.01, size = 8, normalized size = 0.89

method result size
derivativedivides \(\frac {\ln \left (\cosh \left (2 x \right )\right )}{2}\) \(8\)
default \(\frac {\ln \left (\cosh \left (2 x \right )\right )}{2}\) \(8\)
risch \(-x +\frac {\ln \left ({\mathrm e}^{4 x}+1\right )}{2}\) \(14\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(2*x)/cosh(2*x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 7, normalized size = 0.78 \begin {gather*} \frac {1}{2} \, \log \left (\cosh \left (2 \, x\right )\right ) \end {gather*}

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] Leaf count of result is larger than twice the leaf count of optimal. 26 vs. \(2 (7) = 14\).
time = 0.30, size = 26, normalized size = 2.89 \begin {gather*} -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 {gather*}

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.07, size = 7, normalized size = 0.78 \begin {gather*} \frac {\log {\left (\cosh {\left (2 x \right )} \right )}}{2} \end {gather*}

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 = 0.00, size = 15, normalized size = 1.67 \begin {gather*} -x+\frac {\ln \left (\left (\mathrm {e}^{2 x}\right )^{2}+1\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.19, size = 7, normalized size = 0.78 \begin {gather*} \frac {\ln \left (\mathrm {cosh}\left (2\,x\right )\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(cosh(2*x))/2

________________________________________________________________________________________