3.705 $$\int \frac{\cosh ^3(x)}{(a \cosh (x)+b \sinh (x))^3} \, dx$$

Optimal. Leaf size=104 $\frac{a x \left (a^2+3 b^2\right )}{\left (a^2-b^2\right )^3}+\frac{2 a b}{\left (a^2-b^2\right )^2 (a+b \tanh (x))}+\frac{b}{2 \left (a^2-b^2\right ) (a+b \tanh (x))^2}-\frac{b \left (3 a^2+b^2\right ) \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^3}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.200515, antiderivative size = 104, 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 = {3086, 3483, 3529, 3531, 3530} $\frac{a x \left (a^2+3 b^2\right )}{\left (a^2-b^2\right )^3}+\frac{2 a b}{\left (a^2-b^2\right )^2 (a+b \tanh (x))}+\frac{b}{2 \left (a^2-b^2\right ) (a+b \tanh (x))^2}-\frac{b \left (3 a^2+b^2\right ) \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 3086

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

Rule 3483

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

Rule 3529

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((
b*c - a*d)*(a + b*Tan[e + f*x])^(m + 1))/(f*(m + 1)*(a^2 + b^2)), x] + Dist[1/(a^2 + b^2), Int[(a + b*Tan[e +
f*x])^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c
- a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1]

Rule 3531

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((a*c +
b*d)*x)/(a^2 + b^2), x] + Dist[(b*c - a*d)/(a^2 + b^2), Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x]
/; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[a*c + b*d, 0]

Rule 3530

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c*Log[Re
moveContent[a*Cos[e + f*x] + b*Sin[e + f*x], x]])/(b*f), x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d,
0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]

Rubi steps

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

Mathematica [A]  time = 0.85633, size = 119, normalized size = 1.14 $\frac{a x \left (a^2+3 b^2\right )}{(a-b)^3 (a+b)^3}+\frac{\left (-3 a^2 b-b^3\right ) \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^3}-\frac{b^3}{2 (a-b)^2 (a+b)^2 (a \cosh (x)+b \sinh (x))^2}-\frac{3 b^2 \sinh (x)}{(a-b)^2 (a+b)^2 (a \cosh (x)+b \sinh (x))}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.085, size = 494, normalized size = 4.8 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

1/(a-b)^3*ln(tanh(1/2*x)+1)-6*b^2/(a-b)^3/(a+b)^3/(a+2*tanh(1/2*x)*b+a*tanh(1/2*x)^2)^2*a^3*tanh(1/2*x)^3+8*b^
4/(a-b)^3/(a+b)^3/(a+2*tanh(1/2*x)*b+a*tanh(1/2*x)^2)^2*a*tanh(1/2*x)^3-2*b^6/(a-b)^3/(a+b)^3/(a+2*tanh(1/2*x)
*b+a*tanh(1/2*x)^2)^2/a*tanh(1/2*x)^3-10*b^3/(a-b)^3/(a+b)^3/(a+2*tanh(1/2*x)*b+a*tanh(1/2*x)^2)^2*a^2*tanh(1/
2*x)^2+12*b^5/(a-b)^3/(a+b)^3/(a+2*tanh(1/2*x)*b+a*tanh(1/2*x)^2)^2*tanh(1/2*x)^2-2*b^7/(a-b)^3/(a+b)^3/(a+2*t
anh(1/2*x)*b+a*tanh(1/2*x)^2)^2/a^2*tanh(1/2*x)^2-6*b^2/(a-b)^3/(a+b)^3/(a+2*tanh(1/2*x)*b+a*tanh(1/2*x)^2)^2*
a^3*tanh(1/2*x)+8*b^4/(a-b)^3/(a+b)^3/(a+2*tanh(1/2*x)*b+a*tanh(1/2*x)^2)^2*a*tanh(1/2*x)-2*b^6/(a-b)^3/(a+b)^
3/(a+2*tanh(1/2*x)*b+a*tanh(1/2*x)^2)^2/a*tanh(1/2*x)-3*b/(a-b)^3/(a+b)^3*ln(a+2*tanh(1/2*x)*b+a*tanh(1/2*x)^2
)*a^2-b^3/(a-b)^3/(a+b)^3*ln(a+2*tanh(1/2*x)*b+a*tanh(1/2*x)^2)-1/(a+b)^3*ln(tanh(1/2*x)-1)

________________________________________________________________________________________

Maxima [B]  time = 1.34003, size = 394, normalized size = 3.79 \begin{align*} -\frac{{\left (3 \, a^{2} b + b^{3}\right )} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} - a - b\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} - \frac{2 \,{\left (3 \, a^{2} b^{2} + 3 \, a b^{3} +{\left (3 \, a^{2} b^{2} - 2 \, a b^{3} - b^{4}\right )} e^{\left (-2 \, x\right )}\right )}}{a^{7} + a^{6} b - 3 \, a^{5} b^{2} - 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} + 3 \, a^{2} b^{5} - a b^{6} - b^{7} + 2 \,{\left (a^{7} - a^{6} b - 3 \, a^{5} b^{2} + 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} - 3 \, a^{2} b^{5} - a b^{6} + b^{7}\right )} e^{\left (-2 \, x\right )} +{\left (a^{7} - 3 \, a^{6} b + a^{5} b^{2} + 5 \, a^{4} b^{3} - 5 \, a^{3} b^{4} - a^{2} b^{5} + 3 \, a b^{6} - b^{7}\right )} e^{\left (-4 \, x\right )}} + \frac{x}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.00484, size = 2853, normalized size = 27.43 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

((a^5 + 5*a^4*b + 10*a^3*b^2 + 10*a^2*b^3 + 5*a*b^4 + b^5)*x*cosh(x)^4 + 4*(a^5 + 5*a^4*b + 10*a^3*b^2 + 10*a^
2*b^3 + 5*a*b^4 + b^5)*x*cosh(x)*sinh(x)^3 + (a^5 + 5*a^4*b + 10*a^3*b^2 + 10*a^2*b^3 + 5*a*b^4 + b^5)*x*sinh(
x)^4 + 6*a^3*b^2 - 12*a^2*b^3 + 6*a*b^4 + 2*(3*a^3*b^2 - a^2*b^3 - 3*a*b^4 + b^5 + (a^5 + 3*a^4*b + 2*a^3*b^2
- 2*a^2*b^3 - 3*a*b^4 - b^5)*x)*cosh(x)^2 + 2*(3*a^3*b^2 - a^2*b^3 - 3*a*b^4 + b^5 + 3*(a^5 + 5*a^4*b + 10*a^3
*b^2 + 10*a^2*b^3 + 5*a*b^4 + b^5)*x*cosh(x)^2 + (a^5 + 3*a^4*b + 2*a^3*b^2 - 2*a^2*b^3 - 3*a*b^4 - b^5)*x)*si
nh(x)^2 + (a^5 + a^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b^2 - 6*a^5*b^3 + 6*a^3*b^5 + 2*a^2*b^6 - 2*a*b^7 - b^8)*sinh(x)^4 + 2*(a^8 - 4*a^6*b^2 + 6*a^4*
b^4 - 4*a^2*b^6 + b^8)*cosh(x)^2 + 2*(a^8 - 4*a^6*b^2 + 6*a^4*b^4 - 4*a^2*b^6 + b^8 + 3*(a^8 + 2*a^7*b - 2*a^6
*b^2 - 6*a^5*b^3 + 6*a^3*b^5 + 2*a^2*b^6 - 2*a*b^7 - b^8)*cosh(x)^2)*sinh(x)^2 + 4*((a^8 + 2*a^7*b - 2*a^6*b^2
- 6*a^5*b^3 + 6*a^3*b^5 + 2*a^2*b^6 - 2*a*b^7 - b^8)*cosh(x)^3 + (a^8 - 4*a^6*b^2 + 6*a^4*b^4 - 4*a^2*b^6 + b
^8)*cosh(x))*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)**3/(a*cosh(x)+b*sinh(x))**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.17902, size = 339, normalized size = 3.26 \begin{align*} -\frac{{\left (3 \, a^{2} b + b^{3}\right )} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b \right |}\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} + \frac{x}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} + \frac{9 \, a^{3} b e^{\left (4 \, x\right )} + 9 \, a^{2} b^{2} e^{\left (4 \, x\right )} + 3 \, a b^{3} e^{\left (4 \, x\right )} + 3 \, b^{4} e^{\left (4 \, x\right )} + 18 \, a^{3} b e^{\left (2 \, x\right )} - 6 \, a^{2} b^{2} e^{\left (2 \, x\right )} - 10 \, a b^{3} e^{\left (2 \, x\right )} - 2 \, b^{4} e^{\left (2 \, x\right )} + 9 \, a^{3} b - 15 \, a^{2} b^{2} + 3 \, a b^{3} + 3 \, b^{4}}{2 \,{\left (a^{5} - a^{4} b - 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} + a b^{4} - b^{5}\right )}{\left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b\right )}^{2}} \end{align*}

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

[In]

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

[Out]

-(3*a^2*b + b^3)*log(abs(a*e^(2*x) + b*e^(2*x) + a - b))/(a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6) + x/(a^3 - 3*a^2*
b + 3*a*b^2 - b^3) + 1/2*(9*a^3*b*e^(4*x) + 9*a^2*b^2*e^(4*x) + 3*a*b^3*e^(4*x) + 3*b^4*e^(4*x) + 18*a^3*b*e^(
2*x) - 6*a^2*b^2*e^(2*x) - 10*a*b^3*e^(2*x) - 2*b^4*e^(2*x) + 9*a^3*b - 15*a^2*b^2 + 3*a*b^3 + 3*b^4)/((a^5 -
a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4 - b^5)*(a*e^(2*x) + b*e^(2*x) + a - b)^2)