\(\int (a \cosh (x)+b \sinh (x)) \, dx\) [580]

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

Optimal result

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

[Out]

b*cosh(x)+a*sinh(x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2717, 2718} \[ \int (a \cosh (x)+b \sinh (x)) \, dx=a \sinh (x)+b \cosh (x) \]

[In]

Int[a*Cosh[x] + b*Sinh[x],x]

[Out]

b*Cosh[x] + a*Sinh[x]

Rule 2717

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

Rule 2718

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

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

Mathematica [A] (verified)

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

[In]

Integrate[a*Cosh[x] + b*Sinh[x],x]

[Out]

b*Cosh[x] + a*Sinh[x]

Maple [A] (verified)

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

method result size
default \(b \cosh \left (x \right )+a \sinh \left (x \right )\) \(10\)
parts \(b \cosh \left (x \right )+a \sinh \left (x \right )\) \(10\)
meijerg \(a \sinh \left (x \right )-b \sqrt {\pi }\, \left (\frac {1}{\sqrt {\pi }}-\frac {\cosh \left (x \right )}{\sqrt {\pi }}\right )\) \(23\)
risch \(\frac {\left (a \,{\mathrm e}^{2 x}+b \,{\mathrm e}^{2 x}-a +b \right ) {\mathrm e}^{-x}}{2}\) \(24\)

[In]

int(a*cosh(x)+b*sinh(x),x,method=_RETURNVERBOSE)

[Out]

b*cosh(x)+a*sinh(x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00 \[ \int (a \cosh (x)+b \sinh (x)) \, dx=b \cosh \left (x\right ) + a \sinh \left (x\right ) \]

[In]

integrate(a*cosh(x)+b*sinh(x),x, algorithm="fricas")

[Out]

b*cosh(x) + a*sinh(x)

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.89 \[ \int (a \cosh (x)+b \sinh (x)) \, dx=a \sinh {\left (x \right )} + b \cosh {\left (x \right )} \]

[In]

integrate(a*cosh(x)+b*sinh(x),x)

[Out]

a*sinh(x) + b*cosh(x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00 \[ \int (a \cosh (x)+b \sinh (x)) \, dx=b \cosh \left (x\right ) + a \sinh \left (x\right ) \]

[In]

integrate(a*cosh(x)+b*sinh(x),x, algorithm="maxima")

[Out]

b*cosh(x) + a*sinh(x)

Giac [B] (verification not implemented)

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

Time = 0.26 (sec) , antiderivative size = 23, normalized size of antiderivative = 2.56 \[ \int (a \cosh (x)+b \sinh (x)) \, dx=\frac {1}{2} \, b {\left (e^{\left (-x\right )} + e^{x}\right )} - \frac {1}{2} \, a {\left (e^{\left (-x\right )} - e^{x}\right )} \]

[In]

integrate(a*cosh(x)+b*sinh(x),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

int(a*cosh(x) + b*sinh(x),x)

[Out]

b*cosh(x) + a*sinh(x)