3.71 \(\int \frac{\cosh (x)}{a+a \text{sech}(x)} \, dx\)

Optimal. Leaf size=26 \[ -\frac{x}{a}+\frac{2 \sinh (x)}{a}-\frac{\sinh (x)}{a \text{sech}(x)+a} \]

[Out]

-(x/a) + (2*Sinh[x])/a - Sinh[x]/(a + a*Sech[x])

________________________________________________________________________________________

Rubi [A]  time = 0.0568475, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.364, Rules used = {3819, 3787, 2637, 8} \[ -\frac{x}{a}+\frac{2 \sinh (x)}{a}-\frac{\sinh (x)}{a \text{sech}(x)+a} \]

Antiderivative was successfully verified.

[In]

Int[Cosh[x]/(a + a*Sech[x]),x]

[Out]

-(x/a) + (2*Sinh[x])/a - Sinh[x]/(a + a*Sech[x])

Rule 3819

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[(Cot[e + f*
x]*(d*Csc[e + f*x])^n)/(f*(a + b*Csc[e + f*x])), x] - Dist[1/a^2, Int[(d*Csc[e + f*x])^n*(a*(n - 1) - b*n*Csc[
e + f*x]), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && LtQ[n, 0]

Rule 3787

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 2637

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

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\cosh (x)}{a+a \text{sech}(x)} \, dx &=-\frac{\sinh (x)}{a+a \text{sech}(x)}-\frac{\int \cosh (x) (-2 a+a \text{sech}(x)) \, dx}{a^2}\\ &=-\frac{\sinh (x)}{a+a \text{sech}(x)}-\frac{\int 1 \, dx}{a}+\frac{2 \int \cosh (x) \, dx}{a}\\ &=-\frac{x}{a}+\frac{2 \sinh (x)}{a}-\frac{\sinh (x)}{a+a \text{sech}(x)}\\ \end{align*}

Mathematica [A]  time = 0.0602496, size = 32, normalized size = 1.23 \[ \frac{-2 x+3 \tanh \left (\frac{x}{2}\right )+\sinh \left (\frac{3 x}{2}\right ) \text{sech}\left (\frac{x}{2}\right )}{2 a} \]

Antiderivative was successfully verified.

[In]

Integrate[Cosh[x]/(a + a*Sech[x]),x]

[Out]

(-2*x + Sech[x/2]*Sinh[(3*x)/2] + 3*Tanh[x/2])/(2*a)

________________________________________________________________________________________

Maple [B]  time = 0.027, size = 59, normalized size = 2.3 \begin{align*}{\frac{1}{a}\tanh \left ({\frac{x}{2}} \right ) }-{\frac{1}{a} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}}-{\frac{1}{a}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }-{\frac{1}{a} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}}+{\frac{1}{a}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(x)/(a+a*sech(x)),x)

[Out]

1/a*tanh(1/2*x)-1/a/(tanh(1/2*x)+1)-1/a*ln(tanh(1/2*x)+1)-1/a/(tanh(1/2*x)-1)+1/a*ln(tanh(1/2*x)-1)

________________________________________________________________________________________

Maxima [A]  time = 1.12146, size = 55, normalized size = 2.12 \begin{align*} -\frac{x}{a} + \frac{5 \, e^{\left (-x\right )} + 1}{2 \,{\left (a e^{\left (-x\right )} + a e^{\left (-2 \, x\right )}\right )}} - \frac{e^{\left (-x\right )}}{2 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)/(a+a*sech(x)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.42953, size = 151, normalized size = 5.81 \begin{align*} -\frac{2 \, x \cosh \left (x\right ) - \cosh \left (x\right )^{2} + 2 \,{\left (x - \cosh \left (x\right ) - 1\right )} \sinh \left (x\right ) - \sinh \left (x\right )^{2} + 2 \, x + 5}{2 \,{\left (a \cosh \left (x\right ) + a \sinh \left (x\right ) + a\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)/(a+a*sech(x)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\cosh{\left (x \right )}}{\operatorname{sech}{\left (x \right )} + 1}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)/(a+a*sech(x)),x)

[Out]

Integral(cosh(x)/(sech(x) + 1), x)/a

________________________________________________________________________________________

Giac [A]  time = 1.1658, size = 47, normalized size = 1.81 \begin{align*} -\frac{x}{a} - \frac{{\left (5 \, e^{x} + 1\right )} e^{\left (-x\right )}}{2 \, a{\left (e^{x} + 1\right )}} + \frac{e^{x}}{2 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)/(a+a*sech(x)),x, algorithm="giac")

[Out]

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