3.749 \(\int \frac{1}{a+a \cosh (x)+c \sinh (x)} \, dx\)

Optimal. Leaf size=15 \[ \frac{\log \left (a+c \tanh \left (\frac{x}{2}\right )\right )}{c} \]

[Out]

Log[a + c*Tanh[x/2]]/c

________________________________________________________________________________________

Rubi [A]  time = 0.0187025, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3124, 31} \[ \frac{\log \left (a+c \tanh \left (\frac{x}{2}\right )\right )}{c} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Cosh[x] + c*Sinh[x])^(-1),x]

[Out]

Log[a + c*Tanh[x/2]]/c

Rule 3124

Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(-1), x_Symbol] :> Module[{f = Free
Factors[Tan[(d + e*x)/2], x]}, Dist[(2*f)/e, Subst[Int[1/(a + b + 2*c*f*x + (a - b)*f^2*x^2), x], x, Tan[(d +
e*x)/2]/f], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[a^2 - b^2 - c^2, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{1}{a+a \cosh (x)+c \sinh (x)} \, dx &=2 \operatorname{Subst}\left (\int \frac{1}{2 a+2 c x} \, dx,x,\tanh \left (\frac{x}{2}\right )\right )\\ &=\frac{\log \left (a+c \tanh \left (\frac{x}{2}\right )\right )}{c}\\ \end{align*}

Mathematica [B]  time = 0.0366816, size = 35, normalized size = 2.33 \[ \frac{\log \left (a \cosh \left (\frac{x}{2}\right )+c \sinh \left (\frac{x}{2}\right )\right )}{c}-\frac{\log \left (\cosh \left (\frac{x}{2}\right )\right )}{c} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Cosh[x] + c*Sinh[x])^(-1),x]

[Out]

-(Log[Cosh[x/2]]/c) + Log[a*Cosh[x/2] + c*Sinh[x/2]]/c

________________________________________________________________________________________

Maple [A]  time = 0.036, size = 14, normalized size = 0.9 \begin{align*}{\frac{1}{c}\ln \left ( a+c\tanh \left ({\frac{x}{2}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+a*cosh(x)+c*sinh(x)),x)

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.02476, size = 49, normalized size = 3.27 \begin{align*} \frac{\log \left (-{\left (a - c\right )} e^{\left (-x\right )} - a - c\right )}{c} - \frac{\log \left (e^{\left (-x\right )} + 1\right )}{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(-(a - c)*e^(-x) - a - c)/c - log(e^(-x) + 1)/c

________________________________________________________________________________________

Fricas [B]  time = 2.29608, size = 109, normalized size = 7.27 \begin{align*} \frac{\log \left ({\left (a + c\right )} \cosh \left (x\right ) +{\left (a + c\right )} \sinh \left (x\right ) + a - c\right ) - \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right )}{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(log((a + c)*cosh(x) + (a + c)*sinh(x) + a - c) - log(cosh(x) + sinh(x) + 1))/c

________________________________________________________________________________________

Sympy [A]  time = 1.65989, size = 17, normalized size = 1.13 \begin{align*} \begin{cases} \frac{\log{\left (\frac{a}{c} + \tanh{\left (\frac{x}{2} \right )} \right )}}{c} & \text{for}\: c \neq 0 \\\frac{\tanh{\left (\frac{x}{2} \right )}}{a} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*cosh(x)+c*sinh(x)),x)

[Out]

Piecewise((log(a/c + tanh(x/2))/c, Ne(c, 0)), (tanh(x/2)/a, True))

________________________________________________________________________________________

Giac [B]  time = 1.15186, size = 53, normalized size = 3.53 \begin{align*} \frac{{\left (a + c\right )} \log \left ({\left | a e^{x} + c e^{x} + a - c \right |}\right )}{a c + c^{2}} - \frac{\log \left (e^{x} + 1\right )}{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(a + c)*log(abs(a*e^x + c*e^x + a - c))/(a*c + c^2) - log(e^x + 1)/c