\(\int \frac {\cosh (x)}{a+a \text {sech}(x)} \, dx\) [71]

   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 = 11, antiderivative size = 26 \[ \int \frac {\cosh (x)}{a+a \text {sech}(x)} \, dx=-\frac {x}{a}+\frac {2 \sinh (x)}{a}-\frac {\sinh (x)}{a+a \text {sech}(x)} \]

[Out]

-x/a+2*sinh(x)/a-sinh(x)/(a+a*sech(x))

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {3904, 3872, 2717, 8} \[ \int \frac {\cosh (x)}{a+a \text {sech}(x)} \, dx=-\frac {x}{a}+\frac {2 \sinh (x)}{a}-\frac {\sinh (x)}{a \text {sech}(x)+a} \]

[In]

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

[Out]

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

Rule 8

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

Rule 2717

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

Rule 3872

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 3904

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]

Rubi steps \begin{align*} \text {integral}& = -\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] (verified)

Time = 0.26 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.23 \[ \int \frac {\cosh (x)}{a+a \text {sech}(x)} \, dx=\frac {-2 x+\text {sech}\left (\frac {x}{2}\right ) \sinh \left (\frac {3 x}{2}\right )+3 \tanh \left (\frac {x}{2}\right )}{2 a} \]

[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 [A] (verified)

Time = 0.18 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.77

method result size
parallelrisch \(\frac {\coth \left (x \right ) \cosh \left (x \right )-x +\coth \left (x \right )-2 \,\operatorname {csch}\left (x \right )}{a}\) \(20\)
risch \(-\frac {x}{a}+\frac {{\mathrm e}^{x}}{2 a}-\frac {{\mathrm e}^{-x}}{2 a}-\frac {2}{\left ({\mathrm e}^{x}+1\right ) a}\) \(35\)
default \(\frac {\tanh \left (\frac {x}{2}\right )-\frac {1}{\tanh \left (\frac {x}{2}\right )+1}-\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )-\frac {1}{\tanh \left (\frac {x}{2}\right )-1}+\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}\) \(46\)

[In]

int(cosh(x)/(a+a*sech(x)),x,method=_RETURNVERBOSE)

[Out]

(coth(x)*cosh(x)-x+coth(x)-2*csch(x))/a

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.81 \[ \int \frac {\cosh (x)}{a+a \text {sech}(x)} \, dx=-\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 )}} \]

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

\[ \int \frac {\cosh (x)}{a+a \text {sech}(x)} \, dx=\frac {\int \frac {\cosh {\left (x \right )}}{\operatorname {sech}{\left (x \right )} + 1}\, dx}{a} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.58 \[ \int \frac {\cosh (x)}{a+a \text {sech}(x)} \, dx=-\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} \]

[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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.35 \[ \int \frac {\cosh (x)}{a+a \text {sech}(x)} \, dx=-\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} \]

[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

Mupad [B] (verification not implemented)

Time = 2.00 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.31 \[ \int \frac {\cosh (x)}{a+a \text {sech}(x)} \, dx=\frac {{\mathrm {e}}^x}{2\,a}-\frac {x}{a}-\frac {2}{a\,\left ({\mathrm {e}}^x+1\right )}-\frac {{\mathrm {e}}^{-x}}{2\,a} \]

[In]

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

[Out]

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