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

Optimal. Leaf size=72 $-\frac{b \sinh (x)}{a^2-b^2}+\frac{a \cosh (x)}{a^2-b^2}+\frac{a 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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0891185, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 16, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.312, Rules used = {3109, 2637, 2638, 3074, 206} $-\frac{b \sinh (x)}{a^2-b^2}+\frac{a \cosh (x)}{a^2-b^2}+\frac{a 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[(Cosh[x]*Sinh[x])/(a*Cosh[x] + b*Sinh[x]),x]

[Out]

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

Rule 3109

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

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

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{\cosh (x) \sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx &=\frac{a \int \sinh (x) \, dx}{a^2-b^2}-\frac{b \int \cosh (x) \, dx}{a^2-b^2}+\frac{(a b) \int \frac{1}{a \cosh (x)+b \sinh (x)} \, dx}{a^2-b^2}\\ &=\frac{a \cosh (x)}{a^2-b^2}-\frac{b \sinh (x)}{a^2-b^2}+\frac{(i a 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{a 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 \cosh (x)}{a^2-b^2}-\frac{b \sinh (x)}{a^2-b^2}\\ \end{align*}

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.033, size = 92, normalized size = 1.3 \begin{align*} 2\,{\frac{ab}{ \left ( a+b \right ) \left ( a-b \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 ) }-4\,{\frac{1}{ \left ( 4\,a+4\,b \right ) \left ( \tanh \left ( x/2 \right ) -1 \right ) }}+4\,{\frac{1}{ \left ( 4\,a-4\,b \right ) \left ( \tanh \left ( x/2 \right ) +1 \right ) }} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

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(cosh(x)*sinh(x)/(a*cosh(x)+b*sinh(x)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.94209, size = 1103, normalized size = 15.32 \begin{align*} \left [\frac{a^{3} + a^{2} b - a b^{2} - b^{3} +{\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right )^{2} + 2 \,{\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \sinh \left (x\right )^{2} + 2 \,{\left (a b \cosh \left (x\right ) + a b \sinh \left (x\right )\right )} \sqrt{-a^{2} + b^{2}} \log \left (\frac{{\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \,{\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a + b\right )} \sinh \left (x\right )^{2} + 2 \, \sqrt{-a^{2} + b^{2}}{\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} - a + b}{{\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \,{\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a + b\right )} \sinh \left (x\right )^{2} + a - b}\right )}{2 \,{\left ({\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) +{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (x\right )\right )}}, \frac{a^{3} + a^{2} b - a b^{2} - b^{3} +{\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right )^{2} + 2 \,{\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \sinh \left (x\right )^{2} - 4 \,{\left (a b \cosh \left (x\right ) + a b \sinh \left (x\right )\right )} \sqrt{a^{2} - b^{2}} \arctan \left (\frac{\sqrt{a^{2} - b^{2}}}{{\left (a + b\right )} \cosh \left (x\right ) +{\left (a + b\right )} \sinh \left (x\right )}\right )}{2 \,{\left ({\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) +{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (x\right )\right )}}\right ] \end{align*}

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

[In]

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

[Out]

[1/2*(a^3 + a^2*b - a*b^2 - b^3 + (a^3 - a^2*b - a*b^2 + b^3)*cosh(x)^2 + 2*(a^3 - a^2*b - a*b^2 + b^3)*cosh(x
)*sinh(x) + (a^3 - a^2*b - a*b^2 + b^3)*sinh(x)^2 + 2*(a*b*cosh(x) + a*b*sinh(x))*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)))/((a^4 - 2*a^2*b^2 + b^4)*cosh(x)
+ (a^4 - 2*a^2*b^2 + b^4)*sinh(x)), 1/2*(a^3 + a^2*b - a*b^2 - b^3 + (a^3 - a^2*b - a*b^2 + b^3)*cosh(x)^2 +
2*(a^3 - a^2*b - a*b^2 + b^3)*cosh(x)*sinh(x) + (a^3 - a^2*b - a*b^2 + b^3)*sinh(x)^2 - 4*(a*b*cosh(x) + a*b*s
inh(x))*sqrt(a^2 - b^2)*arctan(sqrt(a^2 - b^2)/((a + b)*cosh(x) + (a + b)*sinh(x))))/((a^4 - 2*a^2*b^2 + b^4)*
cosh(x) + (a^4 - 2*a^2*b^2 + b^4)*sinh(x))]

________________________________________________________________________________________

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(cosh(x)*sinh(x)/(a*cosh(x)+b*sinh(x)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.14099, size = 81, normalized size = 1.12 \begin{align*} \frac{2 \, a 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{e^{\left (-x\right )}}{2 \,{\left (a - b\right )}} + \frac{e^{x}}{2 \,{\left (a + b\right )}} \end{align*}

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

[In]

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

[Out]

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