\(\int x \cosh (x) \, dx\) [226]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 4, antiderivative size = 9 \[ \int x \cosh (x) \, dx=-\cosh (x)+x \sinh (x) \]

[Out]

-cosh(x)+x*sinh(x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3377, 2718} \[ \int x \cosh (x) \, dx=x \sinh (x)-\cosh (x) \]

[In]

Int[x*Cosh[x],x]

[Out]

-Cosh[x] + x*Sinh[x]

Rule 2718

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

Rule 3377

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

Rubi steps \begin{align*} \text {integral}& = x \sinh (x)-\int \sinh (x) \, dx \\ & = -\cosh (x)+x \sinh (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00 \[ \int x \cosh (x) \, dx=-\cosh (x)+x \sinh (x) \]

[In]

Integrate[x*Cosh[x],x]

[Out]

-Cosh[x] + x*Sinh[x]

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.11

method result size
default \(-\cosh \left (x \right )+x \sinh \left (x \right )\) \(10\)
parts \(-\cosh \left (x \right )+x \sinh \left (x \right )\) \(10\)
risch \(\left (-\frac {1}{2}+\frac {x}{2}\right ) {\mathrm e}^{x}+\left (-\frac {1}{2}-\frac {x}{2}\right ) {\mathrm e}^{-x}\) \(20\)
parallelrisch \(\frac {2-2 x \tanh \left (\frac {x}{2}\right )}{\tanh ^{2}\left (\frac {x}{2}\right )-1}\) \(21\)
meijerg \(-2 \sqrt {\pi }\, \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\cosh \left (x \right )}{2 \sqrt {\pi }}-\frac {x \sinh \left (x \right )}{2 \sqrt {\pi }}\right )\) \(27\)

[In]

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

[Out]

-cosh(x)+x*sinh(x)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00 \[ \int x \cosh (x) \, dx=x \sinh \left (x\right ) - \cosh \left (x\right ) \]

[In]

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

[Out]

x*sinh(x) - cosh(x)

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.78 \[ \int x \cosh (x) \, dx=x \sinh {\left (x \right )} - \cosh {\left (x \right )} \]

[In]

integrate(x*cosh(x),x)

[Out]

x*sinh(x) - cosh(x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 34 vs. \(2 (9) = 18\).

Time = 0.21 (sec) , antiderivative size = 34, normalized size of antiderivative = 3.78 \[ \int x \cosh (x) \, dx=\frac {1}{2} \, x^{2} \cosh \left (x\right ) - \frac {1}{4} \, {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} - \frac {1}{4} \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.89 \[ \int x \cosh (x) \, dx=-\frac {1}{2} \, {\left (x + 1\right )} e^{\left (-x\right )} + \frac {1}{2} \, {\left (x - 1\right )} e^{x} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00 \[ \int x \cosh (x) \, dx=x\,\mathrm {sinh}\left (x\right )-\mathrm {cosh}\left (x\right ) \]

[In]

int(x*cosh(x),x)

[Out]

x*sinh(x) - cosh(x)