3.1055 \(\int \frac{\cosh (a+b x)-\sinh (a+b x)}{\cosh (a+b x)+\sinh (a+b x)} \, dx\)

Optimal. Leaf size=22 \[ -\frac{1}{2 b (\sinh (a+b x)+\cosh (a+b x))^2} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0503993, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.032, Rules used = {4385} \[ -\frac{1}{2 b (\sinh (a+b x)+\cosh (a+b x))^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 4385

Int[(u_)*(y_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[ActivateTrig[y], ActivateTrig[u], x]}, Simp[(q*A
ctivateTrig[y^(m + 1)])/(m + 1), x] /;  !FalseQ[q]] /; FreeQ[m, x] && NeQ[m, -1] &&  !InertTrigFreeQ[u]

Rubi steps

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

Mathematica [B]  time = 0.0240751, size = 65, normalized size = 2.95 \[ -\frac{\sinh (2 a) \sinh (2 b x)}{2 b}-\frac{\cosh (2 a) \cosh (2 b x)}{2 b}+\frac{\sinh (2 a) \cosh (2 b x)}{2 b}+\frac{\cosh (2 a) \sinh (2 b x)}{2 b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(Cosh[2*a]*Cosh[2*b*x])/(2*b) + (Cosh[2*b*x]*Sinh[2*a])/(2*b) + (Cosh[2*a]*Sinh[2*b*x])/(2*b) - (Sinh[2*a]*Si
nh[2*b*x])/(2*b)

________________________________________________________________________________________

Maple [A]  time = 0., size = 36, normalized size = 1.6 \begin{align*}{\frac{-\cosh \left ( bx+a \right ) +\sinh \left ( bx+a \right ) }{2\,b \left ( \cosh \left ( bx+a \right ) +\sinh \left ( bx+a \right ) \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cosh(b*x+a)-sinh(b*x+a))/(cosh(b*x+a)+sinh(b*x+a)),x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.0248, size = 19, normalized size = 0.86 \begin{align*} -\frac{e^{\left (-2 \, b x - 2 \, a\right )}}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*e^(-2*b*x - 2*a)/b

________________________________________________________________________________________

Fricas [A]  time = 2.00972, size = 108, normalized size = 4.91 \begin{align*} -\frac{1}{2 \,{\left (b \cosh \left (b x + a\right )^{2} + 2 \, b \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + b \sinh \left (b x + a\right )^{2}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.649011, size = 39, normalized size = 1.77 \begin{align*} \begin{cases} - \frac{\cosh{\left (a + b x \right )}}{b \sinh{\left (a + b x \right )} + b \cosh{\left (a + b x \right )}} & \text{for}\: b \neq 0 \\\frac{x \left (- \sinh{\left (a \right )} + \cosh{\left (a \right )}\right )}{\sinh{\left (a \right )} + \cosh{\left (a \right )}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cosh(b*x+a)-sinh(b*x+a))/(cosh(b*x+a)+sinh(b*x+a)),x)

[Out]

Piecewise((-cosh(a + b*x)/(b*sinh(a + b*x) + b*cosh(a + b*x)), Ne(b, 0)), (x*(-sinh(a) + cosh(a))/(sinh(a) + c
osh(a)), True))

________________________________________________________________________________________

Giac [A]  time = 1.13724, size = 19, normalized size = 0.86 \begin{align*} -\frac{e^{\left (-2 \, b x - 2 \, a\right )}}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*e^(-2*b*x - 2*a)/b