### 3.688 $$\int \frac{\sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx$$

Optimal. Leaf size=39 $\frac{a \log (a \cosh (x)+b \sinh (x))}{a^2-b^2}-\frac{b x}{a^2-b^2}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0667874, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 14, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.143, Rules used = {3097, 3133} $\frac{a \log (a \cosh (x)+b \sinh (x))}{a^2-b^2}-\frac{b x}{a^2-b^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 3097

Int[sin[(c_.) + (d_.)*(x_)]/(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp
[(b*x)/(a^2 + b^2), x] - Dist[a/(a^2 + b^2), Int[(b*Cos[c + d*x] - a*Sin[c + d*x])/(a*Cos[c + d*x] + b*Sin[c +
d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]

Rule 3133

Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_)]*(
b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[((b*B + c*C)*x)/(b^2 + c^2), x] + Simp[((c*B - b*C)*L
og[a + b*Cos[d + e*x] + c*Sin[d + e*x]])/(e*(b^2 + c^2)), x] /; FreeQ[{a, b, c, d, e, A, B, C}, x] && NeQ[b^2
+ c^2, 0] && EqQ[A*(b^2 + c^2) - a*(b*B + c*C), 0]

Rubi steps

\begin{align*} \int \frac{\sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx &=-\frac{b x}{a^2-b^2}+\frac{(i a) \int \frac{-i b \cosh (x)-i a \sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx}{a^2-b^2}\\ &=-\frac{b x}{a^2-b^2}+\frac{a \log (a \cosh (x)+b \sinh (x))}{a^2-b^2}\\ \end{align*}

Mathematica [A]  time = 0.0609465, size = 29, normalized size = 0.74 $\frac{a \log (a \cosh (x)+b \sinh (x))-b x}{a^2-b^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.037, size = 70, normalized size = 1.8 \begin{align*} -4\,{\frac{\ln \left ( \tanh \left ( x/2 \right ) +1 \right ) }{4\,a-4\,b}}+{\frac{a}{ \left ( a+b \right ) \left ( a-b \right ) }\ln \left ( a+2\,\tanh \left ( x/2 \right ) b+a \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2} \right ) }-4\,{\frac{\ln \left ( \tanh \left ( x/2 \right ) -1 \right ) }{4\,a+4\,b}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4/(4*a-4*b)*ln(tanh(1/2*x)+1)+a/(a+b)/(a-b)*ln(a+2*tanh(1/2*x)*b+a*tanh(1/2*x)^2)-4/(4*a+4*b)*ln(tanh(1/2*x)-
1)

________________________________________________________________________________________

Maxima [A]  time = 1.18268, size = 54, normalized size = 1.38 \begin{align*} \frac{a \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} - a - b\right )}{a^{2} - b^{2}} + \frac{x}{a + b} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.77595, size = 109, normalized size = 2.79 \begin{align*} -\frac{{\left (a + b\right )} x - a \log \left (\frac{2 \,{\left (a \cosh \left (x\right ) + b \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a^{2} - b^{2}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.723252, size = 146, normalized size = 3.74 \begin{align*} \begin{cases} \tilde{\infty } x & \text{for}\: a = 0 \wedge b = 0 \\\frac{\log{\left (\cosh{\left (x \right )} \right )}}{a} & \text{for}\: b = 0 \\- \frac{x \sinh{\left (x \right )}}{- 2 b \sinh{\left (x \right )} + 2 b \cosh{\left (x \right )}} + \frac{x \cosh{\left (x \right )}}{- 2 b \sinh{\left (x \right )} + 2 b \cosh{\left (x \right )}} - \frac{\cosh{\left (x \right )}}{- 2 b \sinh{\left (x \right )} + 2 b \cosh{\left (x \right )}} & \text{for}\: a = - b \\\frac{x \sinh{\left (x \right )}}{2 b \sinh{\left (x \right )} + 2 b \cosh{\left (x \right )}} + \frac{x \cosh{\left (x \right )}}{2 b \sinh{\left (x \right )} + 2 b \cosh{\left (x \right )}} + \frac{\cosh{\left (x \right )}}{2 b \sinh{\left (x \right )} + 2 b \cosh{\left (x \right )}} & \text{for}\: a = b \\\frac{a \log{\left (\frac{a \cosh{\left (x \right )}}{b} + \sinh{\left (x \right )} \right )}}{a^{2} - b^{2}} - \frac{b x}{a^{2} - b^{2}} & \text{otherwise} \end{cases} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((zoo*x, Eq(a, 0) & Eq(b, 0)), (log(cosh(x))/a, Eq(b, 0)), (-x*sinh(x)/(-2*b*sinh(x) + 2*b*cosh(x)) +
x*cosh(x)/(-2*b*sinh(x) + 2*b*cosh(x)) - cosh(x)/(-2*b*sinh(x) + 2*b*cosh(x)), Eq(a, -b)), (x*sinh(x)/(2*b*si
nh(x) + 2*b*cosh(x)) + x*cosh(x)/(2*b*sinh(x) + 2*b*cosh(x)) + cosh(x)/(2*b*sinh(x) + 2*b*cosh(x)), Eq(a, b)),
(a*log(a*cosh(x)/b + sinh(x))/(a**2 - b**2) - b*x/(a**2 - b**2), True))

________________________________________________________________________________________

Giac [A]  time = 1.14103, size = 58, normalized size = 1.49 \begin{align*} \frac{a \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b \right |}\right )}{a^{2} - b^{2}} - \frac{x}{a - b} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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