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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 15, normalized size of antiderivative = 1.00, 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 31

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

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]

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.04, 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

________________________________________________________________________________________

fricas [B]  time = 0.40, size = 32, normalized size = 2.13 \[ \frac {\log \left ({\left (a + c\right )} \cosh \relax (x) + {\left (a + c\right )} \sinh \relax (x) + a - c\right ) - \log \left (\cosh \relax (x) + \sinh \relax (x) + 1\right )}{c} \]

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

________________________________________________________________________________________

giac [B]  time = 0.13, size = 39, normalized size = 2.60 \[ \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} \]

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

________________________________________________________________________________________

maple [A]  time = 0.18, size = 14, normalized size = 0.93 \[ \frac {\ln \left (a +c \tanh \left (\frac {x}{2}\right )\right )}{c} \]

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 = 0.31, size = 36, normalized size = 2.40 \[ \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} \]

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

________________________________________________________________________________________

mupad [B]  time = 0.16, size = 46, normalized size = 3.07 \[ -\frac {2\,\mathrm {atan}\left (\frac {a\,\sqrt {-c^2}+a\,{\mathrm {e}}^x\,\sqrt {-c^2}+c\,{\mathrm {e}}^x\,\sqrt {-c^2}}{c^2}\right )}{\sqrt {-c^2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(2*atan((a*(-c^2)^(1/2) + a*exp(x)*(-c^2)^(1/2) + c*exp(x)*(-c^2)^(1/2))/c^2))/(-c^2)^(1/2)

________________________________________________________________________________________

sympy [A]  time = 0.72, size = 17, normalized size = 1.13 \[ \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} \]

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

________________________________________________________________________________________