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

Optimal. Leaf size=66 $-\frac{a}{\left (a^2-b^2\right ) (a \cosh (x)+b \sinh (x))}-\frac{b \tan ^{-1}\left (\frac{a \sinh (x)+b \cosh (x)}{\sqrt{a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}}$

[Out]

-((b*ArcTan[(b*Cosh[x] + a*Sinh[x])/Sqrt[a^2 - b^2]])/(a^2 - b^2)^(3/2)) - a/((a^2 - b^2)*(a*Cosh[x] + b*Sinh[
x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0626764, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 14, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.214, Rules used = {3154, 3074, 206} $-\frac{a}{\left (a^2-b^2\right ) (a \cosh (x)+b \sinh (x))}-\frac{b \tan ^{-1}\left (\frac{a \sinh (x)+b \cosh (x)}{\sqrt{a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-((b*ArcTan[(b*Cosh[x] + a*Sinh[x])/Sqrt[a^2 - b^2]])/(a^2 - b^2)^(3/2)) - a/((a^2 - b^2)*(a*Cosh[x] + b*Sinh[
x]))

Rule 3154

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

Rule 3074

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

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

Rubi steps

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

Mathematica [A]  time = 0.189291, size = 125, normalized size = 1.89 $-\frac{2 b^2 \sqrt{a+b} \sinh (x) \tan ^{-1}\left (\frac{a \tanh \left (\frac{x}{2}\right )+b}{\sqrt{a-b} \sqrt{a+b}}\right )+2 a b \sqrt{a+b} \cosh (x) \tan ^{-1}\left (\frac{a \tanh \left (\frac{x}{2}\right )+b}{\sqrt{a-b} \sqrt{a+b}}\right )+a \sqrt{a-b} (a+b)}{(a-b)^{3/2} (a+b)^2 (a \cosh (x)+b \sinh (x))}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.052, size = 99, normalized size = 1.5 \begin{align*} 4\,{\frac{-2\,\tanh \left ( x/2 \right ) b-2\,a}{ \left ( 4\,{a}^{2}-4\,{b}^{2} \right ) \left ( a+2\,\tanh \left ( x/2 \right ) b+a \left ( \tanh \left ( x/2 \right ) \right ) ^{2} \right ) }}-8\,{\frac{b}{ \left ( 4\,{a}^{2}-4\,{b}^{2} \right ) \sqrt{{a}^{2}-{b}^{2}}}\arctan \left ( 1/2\,{\frac{2\,a\tanh \left ( x/2 \right ) +2\,b}{\sqrt{{a}^{2}-{b}^{2}}}} \right ) } \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

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

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.9003, size = 1473, normalized size = 22.32 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

[(((a*b + b^2)*cosh(x)^2 + 2*(a*b + b^2)*cosh(x)*sinh(x) + (a*b + b^2)*sinh(x)^2 + a*b - b^2)*sqrt(-a^2 + b^2)
*log(((a + b)*cosh(x)^2 + 2*(a + b)*cosh(x)*sinh(x) + (a + b)*sinh(x)^2 - 2*sqrt(-a^2 + b^2)*(cosh(x) + sinh(x
)) - a + b)/((a + b)*cosh(x)^2 + 2*(a + b)*cosh(x)*sinh(x) + (a + b)*sinh(x)^2 + a - b)) - 2*(a^3 - a*b^2)*cos
h(x) - 2*(a^3 - a*b^2)*sinh(x))/(a^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4 - b^5 + (a^5 + a^4*b - 2*a^3*b^2
- 2*a^2*b^3 + a*b^4 + b^5)*cosh(x)^2 + 2*(a^5 + a^4*b - 2*a^3*b^2 - 2*a^2*b^3 + a*b^4 + b^5)*cosh(x)*sinh(x) +
(a^5 + a^4*b - 2*a^3*b^2 - 2*a^2*b^3 + a*b^4 + b^5)*sinh(x)^2), 2*(((a*b + b^2)*cosh(x)^2 + 2*(a*b + b^2)*cos
h(x)*sinh(x) + (a*b + b^2)*sinh(x)^2 + a*b - b^2)*sqrt(a^2 - b^2)*arctan(sqrt(a^2 - b^2)/((a + b)*cosh(x) + (a
+ b)*sinh(x))) - (a^3 - a*b^2)*cosh(x) - (a^3 - a*b^2)*sinh(x))/(a^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4
- b^5 + (a^5 + a^4*b - 2*a^3*b^2 - 2*a^2*b^3 + a*b^4 + b^5)*cosh(x)^2 + 2*(a^5 + a^4*b - 2*a^3*b^2 - 2*a^2*b^3
+ a*b^4 + b^5)*cosh(x)*sinh(x) + (a^5 + a^4*b - 2*a^3*b^2 - 2*a^2*b^3 + a*b^4 + b^5)*sinh(x)^2)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.1297, size = 97, normalized size = 1.47 \begin{align*} -\frac{2 \, b \arctan \left (\frac{a e^{x} + b e^{x}}{\sqrt{a^{2} - b^{2}}}\right )}{{\left (a^{2} - b^{2}\right )}^{\frac{3}{2}}} - \frac{2 \, a e^{x}}{{\left (a^{2} - b^{2}\right )}{\left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b\right )}} \end{align*}

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

[In]

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

[Out]

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