3.67 \(\int \frac {1}{a+b \cosh (c+d x)} \, dx\)

Optimal. Leaf size=49 \[ \frac {2 \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{d \sqrt {a-b} \sqrt {a+b}} \]

[Out]

2*arctanh((a-b)^(1/2)*tanh(1/2*d*x+1/2*c)/(a+b)^(1/2))/d/(a-b)^(1/2)/(a+b)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 49, 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 = {2659, 205} \[ \frac {2 \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{d \sqrt {a-b} \sqrt {a+b}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*ArcTanh[(Sqrt[a - b]*Tanh[(c + d*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*Sqrt[a + b]*d)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2659

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

Rubi steps

\begin {align*} \int \frac {1}{a+b \cosh (c+d x)} \, dx &=-\frac {(2 i) \operatorname {Subst}\left (\int \frac {1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{d}\\ &=\frac {2 \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} \sqrt {a+b} d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 48, normalized size = 0.98 \[ -\frac {2 \tan ^{-1}\left (\frac {(a-b) \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b^2-a^2}}\right )}{d \sqrt {b^2-a^2}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-2*ArcTan[((a - b)*Tanh[(c + d*x)/2])/Sqrt[-a^2 + b^2]])/(Sqrt[-a^2 + b^2]*d)

________________________________________________________________________________________

fricas [A]  time = 0.58, size = 237, normalized size = 4.84 \[ \left [\frac {\log \left (\frac {b^{2} \cosh \left (d x + c\right )^{2} + b^{2} \sinh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) + 2 \, a^{2} - b^{2} + 2 \, {\left (b^{2} \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right ) - 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{b \cosh \left (d x + c\right )^{2} + b \sinh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) + 2 \, {\left (b \cosh \left (d x + c\right ) + a\right )} \sinh \left (d x + c\right ) + b}\right )}{\sqrt {a^{2} - b^{2}} d}, -\frac {2 \, \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{a^{2} - b^{2}}\right )}{{\left (a^{2} - b^{2}\right )} d}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[log((b^2*cosh(d*x + c)^2 + b^2*sinh(d*x + c)^2 + 2*a*b*cosh(d*x + c) + 2*a^2 - b^2 + 2*(b^2*cosh(d*x + c) + a
*b)*sinh(d*x + c) - 2*sqrt(a^2 - b^2)*(b*cosh(d*x + c) + b*sinh(d*x + c) + a))/(b*cosh(d*x + c)^2 + b*sinh(d*x
 + c)^2 + 2*a*cosh(d*x + c) + 2*(b*cosh(d*x + c) + a)*sinh(d*x + c) + b))/(sqrt(a^2 - b^2)*d), -2*sqrt(-a^2 +
b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cosh(d*x + c) + b*sinh(d*x + c) + a)/(a^2 - b^2))/((a^2 - b^2)*d)]

________________________________________________________________________________________

giac [A]  time = 0.14, size = 39, normalized size = 0.80 \[ \frac {2 \, \arctan \left (\frac {b e^{\left (d x + c\right )} + a}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*arctan((b*e^(d*x + c) + a)/sqrt(-a^2 + b^2))/(sqrt(-a^2 + b^2)*d)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 44, normalized size = 0.90 \[ \frac {2 \arctanh \left (\frac {\left (a -b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{d \sqrt {\left (a +b \right ) \left (a -b \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/d/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tanh(1/2*d*x+1/2*c)/((a+b)*(a-b))^(1/2))

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?`
 for more details)Is 4*a^2-4*b^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 1.22, size = 53, normalized size = 1.08 \[ \frac {2\,\mathrm {atan}\left (\frac {a\,d+b\,d\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c}{\sqrt {b^2\,d^2-a^2\,d^2}}\right )}{\sqrt {b^2\,d^2-a^2\,d^2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 4.62, size = 163, normalized size = 3.33 \[ \begin {cases} \frac {\tilde {\infty } x}{\cosh {\relax (c )}} & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac {\tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{b d} & \text {for}\: a = b \\- \frac {1}{b d \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )}} & \text {for}\: a = - b \\\frac {x}{a + b \cosh {\relax (c )}} & \text {for}\: d = 0 \\- \frac {\log {\left (- \sqrt {\frac {a}{a - b} + \frac {b}{a - b}} + \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} \right )}}{a d \sqrt {\frac {a}{a - b} + \frac {b}{a - b}} - b d \sqrt {\frac {a}{a - b} + \frac {b}{a - b}}} + \frac {\log {\left (\sqrt {\frac {a}{a - b} + \frac {b}{a - b}} + \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} \right )}}{a d \sqrt {\frac {a}{a - b} + \frac {b}{a - b}} - b d \sqrt {\frac {a}{a - b} + \frac {b}{a - b}}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((zoo*x/cosh(c), Eq(a, 0) & Eq(b, 0) & Eq(d, 0)), (tanh(c/2 + d*x/2)/(b*d), Eq(a, b)), (-1/(b*d*tanh(
c/2 + d*x/2)), Eq(a, -b)), (x/(a + b*cosh(c)), Eq(d, 0)), (-log(-sqrt(a/(a - b) + b/(a - b)) + tanh(c/2 + d*x/
2))/(a*d*sqrt(a/(a - b) + b/(a - b)) - b*d*sqrt(a/(a - b) + b/(a - b))) + log(sqrt(a/(a - b) + b/(a - b)) + ta
nh(c/2 + d*x/2))/(a*d*sqrt(a/(a - b) + b/(a - b)) - b*d*sqrt(a/(a - b) + b/(a - b))), True))

________________________________________________________________________________________