\(\int \frac {e^x (1+\sinh (x))}{1+\cosh (x)} \, dx\) [606]

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

Optimal result

Integrand size = 14, antiderivative size = 13 \[ \int \frac {e^x (1+\sinh (x))}{1+\cosh (x)} \, dx=e^x+\frac {2}{1+e^x} \]

[Out]

exp(x)+2/(1+exp(x))

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 13, 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.143, Rules used = {2320, 697} \[ \int \frac {e^x (1+\sinh (x))}{1+\cosh (x)} \, dx=e^x+\frac {2}{e^x+1} \]

[In]

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

[Out]

E^x + 2/(1 + E^x)

Rule 697

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e,
 0] && IGtQ[p, 0] &&  !(EqQ[m, 3] && NeQ[p, 1])

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {-1+2 x+x^2}{(1+x)^2} \, dx,x,e^x\right ) \\ & = \text {Subst}\left (\int \left (1-\frac {2}{(1+x)^2}\right ) \, dx,x,e^x\right ) \\ & = e^x+\frac {2}{1+e^x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.38 \[ \int \frac {e^x (1+\sinh (x))}{1+\cosh (x)} \, dx=\frac {2+e^x+e^{2 x}}{1+e^x} \]

[In]

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

[Out]

(2 + E^x + E^(2*x))/(1 + E^x)

Maple [A] (verified)

Time = 0.19 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.92

method result size
risch \({\mathrm e}^{x}+\frac {2}{1+{\mathrm e}^{x}}\) \(12\)
default \(-\tanh \left (\frac {x}{2}\right )-\frac {2}{\tanh \left (\frac {x}{2}\right )-1}\) \(18\)

[In]

int(exp(x)*(1+sinh(x))/(cosh(x)+1),x,method=_RETURNVERBOSE)

[Out]

exp(x)+2/(1+exp(x))

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.62 \[ \int \frac {e^x (1+\sinh (x))}{1+\cosh (x)} \, dx=\frac {3 \, \cosh \left (x\right ) - \sinh \left (x\right ) + 1}{\cosh \left (x\right ) - \sinh \left (x\right ) + 1} \]

[In]

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

[Out]

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

Sympy [F]

\[ \int \frac {e^x (1+\sinh (x))}{1+\cosh (x)} \, dx=\int \frac {\left (\sinh {\left (x \right )} + 1\right ) e^{x}}{\cosh {\left (x \right )} + 1}\, dx \]

[In]

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

[Out]

Integral((sinh(x) + 1)*exp(x)/(cosh(x) + 1), x)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.85 \[ \int \frac {e^x (1+\sinh (x))}{1+\cosh (x)} \, dx=\frac {2}{e^{x} + 1} + e^{x} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.85 \[ \int \frac {e^x (1+\sinh (x))}{1+\cosh (x)} \, dx=\frac {2}{e^{x} + 1} + e^{x} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.85 \[ \int \frac {e^x (1+\sinh (x))}{1+\cosh (x)} \, dx={\mathrm {e}}^x+\frac {2}{{\mathrm {e}}^x+1} \]

[In]

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

[Out]

exp(x) + 2/(exp(x) + 1)