3.603 \(\int \frac{e^{m x}}{\cosh (x)+\sinh (x)} \, dx\)

Optimal. Leaf size=13 \[ \frac{e^{(m-1) x}}{m-1} \]

[Out]

E^((-1 + m)*x)/(-1 + m)

________________________________________________________________________________________

Rubi [A]  time = 0.0291286, antiderivative size = 19, normalized size of antiderivative = 1.46, number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {5648, 2227, 2194} \[ -\frac{e^{-(1-m) x}}{1-m} \]

Antiderivative was successfully verified.

[In]

Int[E^(m*x)/(Cosh[x] + Sinh[x]),x]

[Out]

-(1/(E^((1 - m)*x)*(1 - m)))

Rule 5648

Int[(u_.)*(Cosh[v_]*(a_.) + (b_.)*Sinh[v_])^(n_.), x_Symbol] :> Int[u*(a*E^((a*v)/b))^n, x] /; FreeQ[{a, b, n}
, x] && EqQ[a^2 - b^2, 0]

Rule 2227

Int[(u_.)*(F_)^((a_.) + (b_.)*(v_)), x_Symbol] :> Int[u*F^(a + b*NormalizePowerOfLinear[v, x]), x] /; FreeQ[{F
, a, b}, x] && PolynomialQ[u, x] && PowerOfLinearQ[v, x] &&  !PowerOfLinearMatchQ[v, x]

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rubi steps

\begin{align*} \int \frac{e^{m x}}{\cosh (x)+\sinh (x)} \, dx &=\int e^{-x+m x} \, dx\\ &=\int e^{-(1-m) x} \, dx\\ &=-\frac{e^{-(1-m) x}}{1-m}\\ \end{align*}

Mathematica [A]  time = 0.0302059, size = 18, normalized size = 1.38 \[ \frac{e^{m x} (\cosh (x)-\sinh (x))}{m-1} \]

Antiderivative was successfully verified.

[In]

Integrate[E^(m*x)/(Cosh[x] + Sinh[x]),x]

[Out]

(E^(m*x)*(Cosh[x] - Sinh[x]))/(-1 + m)

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 18, normalized size = 1.4 \begin{align*}{\frac{{{\rm e}^{mx}}}{ \left ( -1+m \right ) \left ( \cosh \left ( x \right ) +\sinh \left ( x \right ) \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(m*x)/(cosh(x)+sinh(x)),x)

[Out]

1/(-1+m)*exp(m*x)/(cosh(x)+sinh(x))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(m*x)/(cosh(x)+sinh(x)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.11526, size = 82, normalized size = 6.31 \begin{align*} \frac{\cosh \left (m x\right ) + \sinh \left (m x\right )}{{\left (m - 1\right )} \cosh \left (x\right ) +{\left (m - 1\right )} \sinh \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(m*x)/(cosh(x)+sinh(x)),x, algorithm="fricas")

[Out]

(cosh(m*x) + sinh(m*x))/((m - 1)*cosh(x) + (m - 1)*sinh(x))

________________________________________________________________________________________

Sympy [A]  time = 0.54703, size = 32, normalized size = 2.46 \begin{align*} \begin{cases} \frac{e^{m x}}{m \sinh{\left (x \right )} + m \cosh{\left (x \right )} - \sinh{\left (x \right )} - \cosh{\left (x \right )}} & \text{for}\: m \neq 1 \\\frac{x e^{x}}{\sinh{\left (x \right )} + \cosh{\left (x \right )}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(m*x)/(cosh(x)+sinh(x)),x)

[Out]

Piecewise((exp(m*x)/(m*sinh(x) + m*cosh(x) - sinh(x) - cosh(x)), Ne(m, 1)), (x*exp(x)/(sinh(x) + cosh(x)), Tru
e))

________________________________________________________________________________________

Giac [A]  time = 1.11001, size = 22, normalized size = 1.69 \begin{align*} \frac{e^{\left (m x\right )}}{m e^{x} - e^{x}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(m*x)/(cosh(x)+sinh(x)),x, algorithm="giac")

[Out]

e^(m*x)/(m*e^x - e^x)