3.566 \(\int \frac {b+c+\cosh (x)}{a+b \sinh (x)} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {4401, 2660, 618, 206, 2668, 31} \[ \frac {\log (a+b \sinh (x))}{b}-\frac {2 (b+c) \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 31

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

Rule 206

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

Rule 618

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 2660

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]

Rule 2668

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 4401

Int[u_, x_Symbol] :> With[{v = ExpandTrig[u, x]}, Int[v, x] /; SumQ[v]] /;  !InertTrigFreeQ[u]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 60, normalized size = 1.15 \[ \frac {2 (b+c) \tan ^{-1}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2}}+\frac {\log (a+b \sinh (x))}{b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.43, size = 167, normalized size = 3.21 \[ \frac {\sqrt {a^{2} + b^{2}} {\left (b^{2} + b c\right )} \log \left (\frac {b^{2} \cosh \relax (x)^{2} + b^{2} \sinh \relax (x)^{2} + 2 \, a b \cosh \relax (x) + 2 \, a^{2} + b^{2} + 2 \, {\left (b^{2} \cosh \relax (x) + a b\right )} \sinh \relax (x) - 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cosh \relax (x) + b \sinh \relax (x) + a\right )}}{b \cosh \relax (x)^{2} + b \sinh \relax (x)^{2} + 2 \, a \cosh \relax (x) + 2 \, {\left (b \cosh \relax (x) + a\right )} \sinh \relax (x) - b}\right ) - {\left (a^{2} + b^{2}\right )} x + {\left (a^{2} + b^{2}\right )} \log \left (\frac {2 \, {\left (b \sinh \relax (x) + a\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right )}{a^{2} b + b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(sqrt(a^2 + b^2)*(b^2 + b*c)*log((b^2*cosh(x)^2 + b^2*sinh(x)^2 + 2*a*b*cosh(x) + 2*a^2 + b^2 + 2*(b^2*cosh(x)
 + a*b)*sinh(x) - 2*sqrt(a^2 + b^2)*(b*cosh(x) + b*sinh(x) + a))/(b*cosh(x)^2 + b*sinh(x)^2 + 2*a*cosh(x) + 2*
(b*cosh(x) + a)*sinh(x) - b)) - (a^2 + b^2)*x + (a^2 + b^2)*log(2*(b*sinh(x) + a)/(cosh(x) - sinh(x))))/(a^2*b
 + b^3)

________________________________________________________________________________________

giac [A]  time = 0.14, size = 87, normalized size = 1.67 \[ \frac {{\left (b + c\right )} \log \left (\frac {{\left | 2 \, b e^{x} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{x} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}}} - \frac {x}{b} + \frac {\log \left ({\left | b e^{\left (2 \, x\right )} + 2 \, a e^{x} - b \right |}\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.14, size = 120, normalized size = 2.31 \[ -\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{b}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{b}+\frac {\ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-2 \tanh \left (\frac {x}{2}\right ) b -a \right )}{b}+\frac {2 b \arctanh \left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}+\frac {2 \arctanh \left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right ) c}{\sqrt {a^{2}+b^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.53, size = 122, normalized size = 2.35 \[ \frac {b \log \left (\frac {b e^{\left (-x\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-x\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}}} + \frac {c \log \left (\frac {b e^{\left (-x\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-x\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}}} + \frac {\log \left (b \sinh \relax (x) + a\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.83, size = 178, normalized size = 3.42 \[ \frac {\ln \left (a^2\,{\mathrm {e}}^x-b\,\sqrt {a^2+b^2}+b^2\,{\mathrm {e}}^x+a\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}\right )\,\left (b^2\,\sqrt {a^2+b^2}+a^2+b^2+b\,c\,\sqrt {a^2+b^2}\right )}{a^2\,b+b^3}-\frac {\ln \left (b\,\sqrt {a^2+b^2}+a^2\,{\mathrm {e}}^x+b^2\,{\mathrm {e}}^x-a\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}\right )\,\left (b^2\,\sqrt {a^2+b^2}-a^2-b^2+b\,c\,\sqrt {a^2+b^2}\right )}{a^2\,b+b^3}-\frac {x}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(log(a^2*exp(x) - b*(a^2 + b^2)^(1/2) + b^2*exp(x) + a*exp(x)*(a^2 + b^2)^(1/2))*(b^2*(a^2 + b^2)^(1/2) + a^2
+ b^2 + b*c*(a^2 + b^2)^(1/2)))/(a^2*b + b^3) - (log(b*(a^2 + b^2)^(1/2) + a^2*exp(x) + b^2*exp(x) - a*exp(x)*
(a^2 + b^2)^(1/2))*(b^2*(a^2 + b^2)^(1/2) - a^2 - b^2 + b*c*(a^2 + b^2)^(1/2)))/(a^2*b + b^3) - x/b

________________________________________________________________________________________

sympy [A]  time = 88.92, size = 843, normalized size = 16.21 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((zoo*(c*log(tanh(x/2)) + x - 2*log(tanh(x/2) + 1) + log(tanh(x/2))), Eq(a, 0) & Eq(b, 0)), ((b*log(t
anh(x/2)) + c*log(tanh(x/2)) + x - 2*log(tanh(x/2) + 1) + log(tanh(x/2)))/b, Eq(a, 0)), (b*x*tanh(x/2)/(b**2*t
anh(x/2) - I*b*sqrt(b**2)) + 2*I*b*sqrt(b**2)/(b**2*tanh(x/2) - I*b*sqrt(b**2)) + 2*b*log(-I*b/sqrt(b**2) + ta
nh(x/2))*tanh(x/2)/(b**2*tanh(x/2) - I*b*sqrt(b**2)) - 2*b*log(tanh(x/2) + 1)*tanh(x/2)/(b**2*tanh(x/2) - I*b*
sqrt(b**2)) + 2*I*c*sqrt(b**2)/(b**2*tanh(x/2) - I*b*sqrt(b**2)) - I*x*sqrt(b**2)/(b**2*tanh(x/2) - I*b*sqrt(b
**2)) - 2*I*sqrt(b**2)*log(-I*b/sqrt(b**2) + tanh(x/2))/(b**2*tanh(x/2) - I*b*sqrt(b**2)) + 2*I*sqrt(b**2)*log
(tanh(x/2) + 1)/(b**2*tanh(x/2) - I*b*sqrt(b**2)), Eq(a, -sqrt(-b**2))), (b*x*tanh(x/2)/(b**2*tanh(x/2) + I*b*
sqrt(b**2)) - 2*I*b*sqrt(b**2)/(b**2*tanh(x/2) + I*b*sqrt(b**2)) + 2*b*log(I*b/sqrt(b**2) + tanh(x/2))*tanh(x/
2)/(b**2*tanh(x/2) + I*b*sqrt(b**2)) - 2*b*log(tanh(x/2) + 1)*tanh(x/2)/(b**2*tanh(x/2) + I*b*sqrt(b**2)) - 2*
I*c*sqrt(b**2)/(b**2*tanh(x/2) + I*b*sqrt(b**2)) + I*x*sqrt(b**2)/(b**2*tanh(x/2) + I*b*sqrt(b**2)) + 2*I*sqrt
(b**2)*log(I*b/sqrt(b**2) + tanh(x/2))/(b**2*tanh(x/2) + I*b*sqrt(b**2)) - 2*I*sqrt(b**2)*log(tanh(x/2) + 1)/(
b**2*tanh(x/2) + I*b*sqrt(b**2)), Eq(a, sqrt(-b**2))), ((c*x + sinh(x))/a, Eq(b, 0)), (-b*log(tanh(x/2) - b/a
- sqrt(a**2 + b**2)/a)/sqrt(a**2 + b**2) + b*log(tanh(x/2) - b/a + sqrt(a**2 + b**2)/a)/sqrt(a**2 + b**2) - c*
log(tanh(x/2) - b/a - sqrt(a**2 + b**2)/a)/sqrt(a**2 + b**2) + c*log(tanh(x/2) - b/a + sqrt(a**2 + b**2)/a)/sq
rt(a**2 + b**2) + x/b - 2*log(tanh(x/2) + 1)/b + log(tanh(x/2) - b/a - sqrt(a**2 + b**2)/a)/b + log(tanh(x/2)
- b/a + sqrt(a**2 + b**2)/a)/b, True))

________________________________________________________________________________________