3.11.40 \(\int x \cosh (2 x) \text {sech}^2(x) \, dx\) [1040]

Optimal. Leaf size=12 \[ x^2+\log (\cosh (x))-x \tanh (x) \]

[Out]

x^2+ln(cosh(x))-x*tanh(x)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {5581, 3801, 3556, 30} \begin {gather*} x^2-x \tanh (x)+\log (\cosh (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x*Cosh[2*x]*Sech[x]^2,x]

[Out]

x^2 + Log[Cosh[x]] - x*Tanh[x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 3556

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

Rule 3801

Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(c + d*x)^m*((b*Tan[e
 + f*x])^(n - 1)/(f*(n - 1))), x] + (-Dist[b*d*(m/(f*(n - 1))), Int[(c + d*x)^(m - 1)*(b*Tan[e + f*x])^(n - 1)
, x], x] - Dist[b^2, Int[(c + d*x)^m*(b*Tan[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n,
1] && GtQ[m, 0]

Rule 5581

Int[((e_.) + (f_.)*(x_))^(m_.)*(F_)[(a_.) + (b_.)*(x_)]^(p_.)*(G_)[(c_.) + (d_.)*(x_)]^(q_.), x_Symbol] :> Int
[ExpandTrigExpand[(e + f*x)^m*G[c + d*x]^q, F, c + d*x, p, b/d, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && M
emberQ[{Sinh, Cosh}, F] && MemberQ[{Sech, Csch}, G] && IGtQ[p, 0] && IGtQ[q, 0] && EqQ[b*c - a*d, 0] && IGtQ[b
/d, 1]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 12, normalized size = 1.00 \begin {gather*} x^2+\log (\cosh (x))-x \tanh (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x*Cosh[2*x]*Sech[x]^2,x]

[Out]

x^2 + Log[Cosh[x]] - x*Tanh[x]

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(25\) vs. \(2(12)=24\).
time = 1.56, size = 26, normalized size = 2.17

method result size
risch \(x^{2}-2 x +\frac {2 x}{1+{\mathrm e}^{2 x}}+\ln \left (1+{\mathrm e}^{2 x}\right )\) \(26\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*cosh(2*x)*sech(x)^2,x,method=_RETURNVERBOSE)

[Out]

x^2-2*x+2*x/(1+exp(2*x))+ln(1+exp(2*x))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 33 vs. \(2 (12) = 24\).
time = 0.49, size = 33, normalized size = 2.75 \begin {gather*} \frac {x^{2} + {\left (x^{2} - 2 \, x\right )} e^{\left (2 \, x\right )}}{e^{\left (2 \, x\right )} + 1} + \log \left (e^{\left (2 \, x\right )} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 91 vs. \(2 (12) = 24\).
time = 0.36, size = 91, normalized size = 7.58 \begin {gather*} \frac {{\left (x^{2} - 2 \, x\right )} \cosh \left (x\right )^{2} + 2 \, {\left (x^{2} - 2 \, x\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (x^{2} - 2 \, x\right )} \sinh \left (x\right )^{2} + x^{2} + {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\right )} \log \left (\frac {2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 47 vs. \(2 (12) = 24\).
time = 0.40, size = 47, normalized size = 3.92 \begin {gather*} \frac {x^{2} e^{\left (2 \, x\right )} + x^{2} - 2 \, x e^{\left (2 \, x\right )} + e^{\left (2 \, x\right )} \log \left (e^{\left (2 \, x\right )} + 1\right ) + \log \left (e^{\left (2 \, x\right )} + 1\right )}{e^{\left (2 \, x\right )} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 1.74, size = 25, normalized size = 2.08 \begin {gather*} \ln \left ({\mathrm {e}}^{2\,x}+1\right )-2\,x+\frac {2\,x}{{\mathrm {e}}^{2\,x}+1}+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________