\(\int e^x \cosh (a+b x) \, dx\) [299]

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

Optimal result

Integrand size = 10, antiderivative size = 41 \[ \int e^x \cosh (a+b x) \, dx=\frac {e^x \cosh (a+b x)}{1-b^2}-\frac {b e^x \sinh (a+b x)}{1-b^2} \]

[Out]

exp(x)*cosh(b*x+a)/(-b^2+1)-b*exp(x)*sinh(b*x+a)/(-b^2+1)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {5583} \[ \int e^x \cosh (a+b x) \, dx=\frac {e^x \cosh (a+b x)}{1-b^2}-\frac {b e^x \sinh (a+b x)}{1-b^2} \]

[In]

Int[E^x*Cosh[a + b*x],x]

[Out]

(E^x*Cosh[a + b*x])/(1 - b^2) - (b*E^x*Sinh[a + b*x])/(1 - b^2)

Rule 5583

Int[Cosh[(d_.) + (e_.)*(x_)]*(F_)^((c_.)*((a_.) + (b_.)*(x_))), x_Symbol] :> Simp[(-b)*c*Log[F]*F^(c*(a + b*x)
)*(Cosh[d + e*x]/(e^2 - b^2*c^2*Log[F]^2)), x] + Simp[e*F^(c*(a + b*x))*(Sinh[d + e*x]/(e^2 - b^2*c^2*Log[F]^2
)), x] /; FreeQ[{F, a, b, c, d, e}, x] && NeQ[e^2 - b^2*c^2*Log[F]^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {e^x \cosh (a+b x)}{1-b^2}-\frac {b e^x \sinh (a+b x)}{1-b^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.68 \[ \int e^x \cosh (a+b x) \, dx=\frac {e^x (-\cosh (a+b x)+b \sinh (a+b x))}{-1+b^2} \]

[In]

Integrate[E^x*Cosh[a + b*x],x]

[Out]

(E^x*(-Cosh[a + b*x] + b*Sinh[a + b*x]))/(-1 + b^2)

Maple [A] (verified)

Time = 0.13 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.68

method result size
parallelrisch \(\frac {{\mathrm e}^{x} \left (b \sinh \left (b x +a \right )-\cosh \left (b x +a \right )\right )}{b^{2}-1}\) \(28\)
risch \(\frac {{\mathrm e}^{b x +a +x}}{2+2 b}-\frac {{\mathrm e}^{-b x -a +x}}{2 \left (b -1\right )}\) \(33\)
default \(\frac {\sinh \left (x \left (b -1\right )+a \right )}{2 b -2}+\frac {\sinh \left (\left (1+b \right ) x +a \right )}{2+2 b}-\frac {\cosh \left (x \left (b -1\right )+a \right )}{2 \left (b -1\right )}+\frac {\cosh \left (\left (1+b \right ) x +a \right )}{2+2 b}\) \(62\)

[In]

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

[Out]

exp(x)/(b^2-1)*(b*sinh(b*x+a)-cosh(b*x+a))

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 99 vs. \(2 (31) = 62\).

Time = 0.23 (sec) , antiderivative size = 99, normalized size of antiderivative = 2.41 \[ \int e^x \cosh (a+b x) \, dx=\begin {cases} \frac {x e^{x} \sinh {\left (a - x \right )}}{2} + \frac {x e^{x} \cosh {\left (a - x \right )}}{2} - \frac {e^{x} \sinh {\left (a - x \right )}}{2} & \text {for}\: b = -1 \\- \frac {x e^{x} \sinh {\left (a + x \right )}}{2} + \frac {x e^{x} \cosh {\left (a + x \right )}}{2} + \frac {e^{x} \cosh {\left (a + x \right )}}{2} & \text {for}\: b = 1 \\\frac {b e^{x} \sinh {\left (a + b x \right )}}{b^{2} - 1} - \frac {e^{x} \cosh {\left (a + b x \right )}}{b^{2} - 1} & \text {otherwise} \end {cases} \]

[In]

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

[Out]

Piecewise((x*exp(x)*sinh(a - x)/2 + x*exp(x)*cosh(a - x)/2 - exp(x)*sinh(a - x)/2, Eq(b, -1)), (-x*exp(x)*sinh
(a + x)/2 + x*exp(x)*cosh(a + x)/2 + exp(x)*cosh(a + x)/2, Eq(b, 1)), (b*exp(x)*sinh(a + b*x)/(b**2 - 1) - exp
(x)*cosh(a + b*x)/(b**2 - 1), True))

Maxima [F(-2)]

Exception generated. \[ \int e^x \cosh (a+b x) \, dx=\text {Exception raised: ValueError} \]

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(-b>0)', see `assume?` for more
 details)Is

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 1.72 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.10 \[ \int e^x \cosh (a+b x) \, dx=-\frac {{\mathrm {e}}^{x-a-b\,x}\,\left (b+{\mathrm {e}}^{2\,a+2\,b\,x}-b\,{\mathrm {e}}^{2\,a+2\,b\,x}+1\right )}{2\,\left (b^2-1\right )} \]

[In]

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

[Out]

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