3.3.29 \(\int \cosh (x) \tanh (2 x) \, dx\) [229]

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

[Out]

cosh(x)-1/2*arctanh(cosh(x)*2^(1/2))*2^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {12, 327, 213} \begin {gather*} \cosh (x)-\frac {\tanh ^{-1}\left (\sqrt {2} \cosh (x)\right )}{\sqrt {2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cosh[x]*Tanh[2*x],x]

[Out]

-(ArcTanh[Sqrt[2]*Cosh[x]]/Sqrt[2]) + Cosh[x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.09, size = 164, normalized size = 8.63 \begin {gather*} \frac {-2 i \text {ArcTan}\left (\frac {\cosh \left (\frac {x}{2}\right )+\sinh \left (\frac {x}{2}\right )}{\left (1+\sqrt {2}\right ) \cosh \left (\frac {x}{2}\right )-\left (-1+\sqrt {2}\right ) \sinh \left (\frac {x}{2}\right )}\right )+2 i \text {ArcTan}\left (\frac {\cosh \left (\frac {x}{2}\right )+\sinh \left (\frac {x}{2}\right )}{\left (-1+\sqrt {2}\right ) \cosh \left (\frac {x}{2}\right )-\left (1+\sqrt {2}\right ) \sinh \left (\frac {x}{2}\right )}\right )-4 \tanh ^{-1}\left (\sqrt {2}-i \tanh \left (\frac {x}{2}\right )\right )+4 \sqrt {2} \cosh (x)+\log \left (\sqrt {2}-2 \cosh (x)\right )-\log \left (\sqrt {2}+2 \cosh (x)\right )}{4 \sqrt {2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cosh[x]*Tanh[2*x],x]

[Out]

((-2*I)*ArcTan[(Cosh[x/2] + Sinh[x/2])/((1 + Sqrt[2])*Cosh[x/2] - (-1 + Sqrt[2])*Sinh[x/2])] + (2*I)*ArcTan[(C
osh[x/2] + Sinh[x/2])/((-1 + Sqrt[2])*Cosh[x/2] - (1 + Sqrt[2])*Sinh[x/2])] - 4*ArcTanh[Sqrt[2] - I*Tanh[x/2]]
 + 4*Sqrt[2]*Cosh[x] + Log[Sqrt[2] - 2*Cosh[x]] - Log[Sqrt[2] + 2*Cosh[x]])/(4*Sqrt[2])

________________________________________________________________________________________

Maple [A]
time = 0.50, size = 16, normalized size = 0.84

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(x)*tanh(2*x),x,method=_RETURNVERBOSE)

[Out]

cosh(x)-1/2*arctanh(cosh(x)*2^(1/2))*2^(1/2)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 52 vs. \(2 (15) = 30\).
time = 0.47, size = 52, normalized size = 2.74 \begin {gather*} -\frac {1}{4} \, \sqrt {2} \log \left (\sqrt {2} e^{\left (-x\right )} + e^{\left (-2 \, x\right )} + 1\right ) + \frac {1}{4} \, \sqrt {2} \log \left (-\sqrt {2} e^{\left (-x\right )} + e^{\left (-2 \, x\right )} + 1\right ) + \frac {1}{2} \, e^{\left (-x\right )} + \frac {1}{2} \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 73 vs. \(2 (15) = 30\).
time = 0.36, size = 73, normalized size = 3.84 \begin {gather*} \frac {2 \, \cosh \left (x\right )^{2} + {\left (\sqrt {2} \cosh \left (x\right ) + \sqrt {2} \sinh \left (x\right )\right )} \log \left (\frac {\cosh \left (x\right )^{2} + \sinh \left (x\right )^{2} - 2 \, \sqrt {2} \cosh \left (x\right ) + 2}{\cosh \left (x\right )^{2} + \sinh \left (x\right )^{2}}\right ) + 4 \, \cosh \left (x\right ) \sinh \left (x\right ) + 2 \, \sinh \left (x\right )^{2} + 2}{4 \, {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*(2*cosh(x)^2 + (sqrt(2)*cosh(x) + sqrt(2)*sinh(x))*log((cosh(x)^2 + sinh(x)^2 - 2*sqrt(2)*cosh(x) + 2)/(co
sh(x)^2 + sinh(x)^2)) + 4*cosh(x)*sinh(x) + 2*sinh(x)^2 + 2)/(cosh(x) + sinh(x))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \cosh {\left (x \right )} \tanh {\left (2 x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)*tanh(2*x),x)

[Out]

Integral(cosh(x)*tanh(2*x), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 45 vs. \(2 (15) = 30\).
time = 0.39, size = 45, normalized size = 2.37 \begin {gather*} \frac {1}{4} \, \sqrt {2} \log \left (-\frac {\sqrt {2} - e^{\left (-x\right )} - e^{x}}{\sqrt {2} + e^{\left (-x\right )} + e^{x}}\right ) + \frac {1}{2} \, e^{\left (-x\right )} + \frac {1}{2} \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 1.45, size = 48, normalized size = 2.53 \begin {gather*} \frac {{\mathrm {e}}^{-x}}{2}+\frac {{\mathrm {e}}^x}{2}-\frac {\sqrt {2}\,\ln \left ({\mathrm {e}}^{2\,x}+\sqrt {2}\,{\mathrm {e}}^x+1\right )}{4}+\frac {\sqrt {2}\,\ln \left ({\mathrm {e}}^{2\,x}-\sqrt {2}\,{\mathrm {e}}^x+1\right )}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(2*x)*cosh(x),x)

[Out]

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

________________________________________________________________________________________