\(\int \frac {1}{a+b \sinh (c+d x)} \, dx\) [101]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 44 \[ \int \frac {1}{a+b \sinh (c+d x)} \, dx=-\frac {2 \text {arctanh}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} d} \]

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2739, 632, 210} \[ \int \frac {1}{a+b \sinh (c+d x)} \, dx=-\frac {2 \text {arctanh}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{d \sqrt {a^2+b^2}} \]

[In]

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

[Out]

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

Rule 210

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

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 2739

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[2*(e/d), Subst[Int[1/(a + 2*b*e*x + a*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*} \text {integral}& = -\frac {(2 i) \text {Subst}\left (\int \frac {1}{a-2 i b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{d} \\ & = \frac {(4 i) \text {Subst}\left (\int \frac {1}{-4 \left (a^2+b^2\right )-x^2} \, dx,x,-2 i b+2 a \tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{d} \\ & = -\frac {2 \text {arctanh}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.18 \[ \int \frac {1}{a+b \sinh (c+d x)} \, dx=\frac {2 \arctan \left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2} d} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.78 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.98

method result size
derivativedivides \(\frac {2 \,\operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{d \sqrt {a^{2}+b^{2}}}\) \(43\)
default \(\frac {2 \,\operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{d \sqrt {a^{2}+b^{2}}}\) \(43\)
risch \(\frac {\ln \left ({\mathrm e}^{d x +c}+\frac {a \sqrt {a^{2}+b^{2}}-a^{2}-b^{2}}{\sqrt {a^{2}+b^{2}}\, b}\right )}{\sqrt {a^{2}+b^{2}}\, d}-\frac {\ln \left ({\mathrm e}^{d x +c}+\frac {a \sqrt {a^{2}+b^{2}}+a^{2}+b^{2}}{\sqrt {a^{2}+b^{2}}\, b}\right )}{\sqrt {a^{2}+b^{2}}\, d}\) \(111\)

[In]

int(1/(a+b*sinh(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 162 vs. \(2 (41) = 82\).

Time = 0.28 (sec) , antiderivative size = 162, normalized size of antiderivative = 3.68 \[ \int \frac {1}{a+b \sinh (c+d x)} \, dx=\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} \]

[In]

integrate(1/(a+b*sinh(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)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 3.95 (sec) , antiderivative size = 155, normalized size of antiderivative = 3.52 \[ \int \frac {1}{a+b \sinh (c+d x)} \, dx=\begin {cases} \frac {\tilde {\infty } x}{\sinh {\left (c \right )}} & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac {\log {\left (\tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} \right )}}{b d} & \text {for}\: a = 0 \\\frac {x}{a + b \sinh {\left (c \right )}} & \text {for}\: d = 0 \\\frac {2 i}{b d \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} - i b d} & \text {for}\: a = - i b \\- \frac {2 i}{b d \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} + i b d} & \text {for}\: a = i b \\- \frac {\log {\left (\tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} - \frac {b}{a} - \frac {\sqrt {a^{2} + b^{2}}}{a} \right )}}{d \sqrt {a^{2} + b^{2}}} + \frac {\log {\left (\tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} - \frac {b}{a} + \frac {\sqrt {a^{2} + b^{2}}}{a} \right )}}{d \sqrt {a^{2} + b^{2}}} & \text {otherwise} \end {cases} \]

[In]

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

[Out]

Piecewise((zoo*x/sinh(c), Eq(a, 0) & Eq(b, 0) & Eq(d, 0)), (log(tanh(c/2 + d*x/2))/(b*d), Eq(a, 0)), (x/(a + b
*sinh(c)), Eq(d, 0)), (2*I/(b*d*tanh(c/2 + d*x/2) - I*b*d), Eq(a, -I*b)), (-2*I/(b*d*tanh(c/2 + d*x/2) + I*b*d
), Eq(a, I*b)), (-log(tanh(c/2 + d*x/2) - b/a - sqrt(a**2 + b**2)/a)/(d*sqrt(a**2 + b**2)) + log(tanh(c/2 + d*
x/2) - b/a + sqrt(a**2 + b**2)/a)/(d*sqrt(a**2 + b**2)), True))

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.52 \[ \int \frac {1}{a+b \sinh (c+d x)} \, dx=\frac {\log \left (\frac {b e^{\left (-d x - c\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-d x - c\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} d} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.52 \[ \int \frac {1}{a+b \sinh (c+d x)} \, dx=\frac {\log \left (\frac {{\left | 2 \, b e^{\left (d x + c\right )} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{\left (d x + c\right )} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} d} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 1.51 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.25 \[ \int \frac {1}{a+b \sinh (c+d x)} \, dx=\frac {2\,\mathrm {atan}\left (\frac {a\,d+b\,d\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c}{\sqrt {-a^2\,d^2-b^2\,d^2}}\right )}{\sqrt {-a^2\,d^2-b^2\,d^2}} \]

[In]

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

[Out]

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