3.8.4 \(\int \frac {\cosh (x)}{(a \cosh (x)+b \sinh (x))^3} \, dx\) [704]

Optimal. Leaf size=19 \[ -\frac {\coth ^2(x)}{2 b (b+a \coth (x))^2} \]

[Out]

-1/2*coth(x)^2/b/(b+a*coth(x))^2

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 19, normalized size of antiderivative = 1.00, 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 = {3167, 37} \begin {gather*} -\frac {\coth ^2(x)}{2 b (a \coth (x)+b)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-1/2*Coth[x]^2/(b*(b + a*Coth[x])^2)

Rule 37

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

Rule 3167

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> Dist[-d^(-1), Subst[Int[x^m*((b + a*x)^n/(1 + x^2)^((m + n + 2)/2)), x], x, Cot[c + d*x]], x] /; FreeQ[
{a, b, c, d}, x] && IntegerQ[n] && IntegerQ[(m + n)/2] && NeQ[n, -1] &&  !(GtQ[n, 0] && GtQ[m, 1])

Rubi steps

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

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(40\) vs. \(2(19)=38\).
time = 0.04, size = 40, normalized size = 2.11 \begin {gather*} \frac {b \cosh (2 x)+a \sinh (2 x)}{2 (a-b) (a+b) (a \cosh (x)+b \sinh (x))^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(54\) vs. \(2(17)=34\).
time = 1.38, size = 55, normalized size = 2.89

method result size
risch \(-\frac {2 \left ({\mathrm e}^{2 x} a +b \,{\mathrm e}^{2 x}+a \right )}{\left ({\mathrm e}^{2 x} a +b \,{\mathrm e}^{2 x}+a -b \right )^{2} \left (a +b \right )^{2}}\) \(41\)
default \(-\frac {2 \left (-\frac {\tanh ^{3}\left (\frac {x}{2}\right )}{a}-\frac {b \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )}{a^{2}}-\frac {\tanh \left (\frac {x}{2}\right )}{a}\right )}{\left (a +2 b \tanh \left (\frac {x}{2}\right )+a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )\right )^{2}}\) \(55\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(x)/(a*cosh(x)+b*sinh(x))^3,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 167 vs. \(2 (17) = 34\).
time = 0.28, size = 167, normalized size = 8.79 \begin {gather*} \frac {2 \, {\left (a - b\right )} e^{\left (-2 \, x\right )}}{a^{4} - 2 \, a^{2} b^{2} + b^{4} + 2 \, {\left (a^{4} - 2 \, a^{3} b + 2 \, a b^{3} - b^{4}\right )} e^{\left (-2 \, x\right )} + {\left (a^{4} - 4 \, a^{3} b + 6 \, a^{2} b^{2} - 4 \, a b^{3} + b^{4}\right )} e^{\left (-4 \, x\right )}} + \frac {2 \, a}{a^{4} - 2 \, a^{2} b^{2} + b^{4} + 2 \, {\left (a^{4} - 2 \, a^{3} b + 2 \, a b^{3} - b^{4}\right )} e^{\left (-2 \, x\right )} + {\left (a^{4} - 4 \, a^{3} b + 6 \, a^{2} b^{2} - 4 \, a b^{3} + b^{4}\right )} e^{\left (-4 \, x\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*(a - b)*e^(-2*x)/(a^4 - 2*a^2*b^2 + b^4 + 2*(a^4 - 2*a^3*b + 2*a*b^3 - b^4)*e^(-2*x) + (a^4 - 4*a^3*b + 6*a^
2*b^2 - 4*a*b^3 + b^4)*e^(-4*x)) + 2*a/(a^4 - 2*a^2*b^2 + b^4 + 2*(a^4 - 2*a^3*b + 2*a*b^3 - b^4)*e^(-2*x) + (
a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*e^(-4*x))

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 216 vs. \(2 (17) = 34\).
time = 0.39, size = 216, normalized size = 11.37 \begin {gather*} -\frac {2 \, {\left ({\left (2 \, a + b\right )} \cosh \left (x\right ) + b \sinh \left (x\right )\right )}}{{\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} \cosh \left (x\right )^{3} + 3 \, {\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{2} + {\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} \sinh \left (x\right )^{3} + {\left (3 \, a^{4} + 4 \, a^{3} b - 2 \, a^{2} b^{2} - 4 \, a b^{3} - b^{4}\right )} \cosh \left (x\right ) + {\left (a^{4} + 4 \, a^{3} b + 2 \, a^{2} b^{2} - 4 \, a b^{3} - 3 \, b^{4} + 3 \, {\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*((2*a + b)*cosh(x) + b*sinh(x))/((a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4)*cosh(x)^3 + 3*(a^4 + 4*a^3*b +
 6*a^2*b^2 + 4*a*b^3 + b^4)*cosh(x)*sinh(x)^2 + (a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4)*sinh(x)^3 + (3*a^4
 + 4*a^3*b - 2*a^2*b^2 - 4*a*b^3 - b^4)*cosh(x) + (a^4 + 4*a^3*b + 2*a^2*b^2 - 4*a*b^3 - 3*b^4 + 3*(a^4 + 4*a^
3*b + 6*a^2*b^2 + 4*a*b^3 + b^4)*cosh(x)^2)*sinh(x))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 48 vs. \(2 (17) = 34\).
time = 0.42, size = 48, normalized size = 2.53 \begin {gather*} -\frac {2 \, {\left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a\right )}}{{\left (a^{2} + 2 \, a b + b^{2}\right )} {\left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b\right )}^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 1.52, size = 42, normalized size = 2.21 \begin {gather*} -\frac {2\,a+{\mathrm {e}}^{2\,x}\,\left (2\,a+2\,b\right )}{{\left (a+b\right )}^2\,{\left (a-b+a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(2*a + exp(2*x)*(2*a + 2*b))/((a + b)^2*(a - b + a*exp(2*x) + b*exp(2*x))^2)

________________________________________________________________________________________