3.598 \(\int \frac {x+\cosh (x)+\sinh (x)}{\cosh (x)-\sinh (x)} \, dx\)

Optimal. Leaf size=20 \[ e^x x-e^x+\frac {e^{2 x}}{2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 7, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {5648, 6742, 2176, 2194, 2282, 12, 14} \[ e^x x-e^x+\frac {e^{2 x}}{2} \]

Antiderivative was successfully verified.

[In]

Int[(x + Cosh[x] + Sinh[x])/(Cosh[x] - Sinh[x]),x]

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

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]

Rule 2282

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]]]

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 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int \frac {x+\cosh (x)+\sinh (x)}{\cosh (x)-\sinh (x)} \, dx &=\int e^x (x+\cosh (x)+\sinh (x)) \, dx\\ &=\int \left (e^x x+e^x \cosh (x)+e^x \sinh (x)\right ) \, dx\\ &=\int e^x x \, dx+\int e^x \cosh (x) \, dx+\int e^x \sinh (x) \, dx\\ &=e^x x-\int e^x \, dx+\operatorname {Subst}\left (\int \frac {-1+x^2}{2 x} \, dx,x,e^x\right )+\operatorname {Subst}\left (\int \frac {1+x^2}{2 x} \, dx,x,e^x\right )\\ &=-e^x+e^x x+\frac {1}{2} \operatorname {Subst}\left (\int \frac {-1+x^2}{x} \, dx,x,e^x\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {1+x^2}{x} \, dx,x,e^x\right )\\ &=-e^x+e^x x+\frac {1}{2} \operatorname {Subst}\left (\int \left (-\frac {1}{x}+x\right ) \, dx,x,e^x\right )+\frac {1}{2} \operatorname {Subst}\left (\int \left (\frac {1}{x}+x\right ) \, dx,x,e^x\right )\\ &=-e^x+\frac {e^{2 x}}{2}+e^x x\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 23, normalized size = 1.15 \[ (x-1) \sinh (x)+\frac {1}{2} \cosh (2 x)+(x+\sinh (x)-1) \cosh (x) \]

Antiderivative was successfully verified.

[In]

Integrate[(x + Cosh[x] + Sinh[x])/(Cosh[x] - Sinh[x]),x]

[Out]

Cosh[2*x]/2 + (-1 + x)*Sinh[x] + Cosh[x]*(-1 + x + Sinh[x])

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x+\cosh (x)+\sinh (x)}{\cosh (x)-\sinh (x)} \, dx \]

Verification is Not applicable to the result.

[In]

IntegrateAlgebraic[(x + Cosh[x] + Sinh[x])/(Cosh[x] - Sinh[x]),x]

[Out]

Could not integrate

________________________________________________________________________________________

fricas [A]  time = 1.36, size = 20, normalized size = 1.00 \[ \frac {2 \, x + \cosh \relax (x) + \sinh \relax (x) - 2}{2 \, {\left (\cosh \relax (x) - \sinh \relax (x)\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x+cosh(x)+sinh(x))/(cosh(x)-sinh(x)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.63, size = 11, normalized size = 0.55 \[ \frac {1}{2} \, {\left (2 \, x + e^{x} - 2\right )} e^{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x+cosh(x)+sinh(x))/(cosh(x)-sinh(x)),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.09, size = 14, normalized size = 0.70




method result size



risch \(\left (-1+x \right ) {\mathrm e}^{x}+\frac {{\mathrm e}^{2 x}}{2}\) \(14\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x+cosh(x)+sinh(x))/(cosh(x)-sinh(x)),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.49, size = 13, normalized size = 0.65 \[ {\left (x - 1\right )} e^{x} + \frac {1}{2} \, e^{\left (2 \, x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x+cosh(x)+sinh(x))/(cosh(x)-sinh(x)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 16, normalized size = 0.80 \[ {\mathrm {e}}^x\,\left (x+\frac {{\mathrm {e}}^{-x}}{2}+\frac {{\mathrm {e}}^x}{2}-1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x + cosh(x) + sinh(x))/(cosh(x) - sinh(x)),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.42, size = 26, normalized size = 1.30 \[ \frac {x}{- \sinh {\relax (x )} + \cosh {\relax (x )}} + \frac {\sinh {\relax (x )}}{- \sinh {\relax (x )} + \cosh {\relax (x )}} - \frac {1}{- \sinh {\relax (x )} + \cosh {\relax (x )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x+cosh(x)+sinh(x))/(cosh(x)-sinh(x)),x)

[Out]

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

________________________________________________________________________________________