3.8.29 \(\int \frac {A+B \cosh (x)}{(b \cosh (x)+c \sinh (x))^3} \, dx\) [729]

Optimal. Leaf size=120 \[ \frac {A \text {ArcTan}\left (\frac {c \cosh (x)+b \sinh (x)}{\sqrt {b^2-c^2}}\right )}{2 \left (b^2-c^2\right )^{3/2}}+\frac {B c+A c \cosh (x)+A b \sinh (x)}{2 \left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))^2}+\frac {b B c \cosh (x)+b^2 B \sinh (x)}{\left (b^2-c^2\right )^2 (b \cosh (x)+c \sinh (x))} \]

[Out]

1/2*A*arctan((c*cosh(x)+b*sinh(x))/(b^2-c^2)^(1/2))/(b^2-c^2)^(3/2)+1/2*(B*c+A*c*cosh(x)+A*b*sinh(x))/(b^2-c^2
)/(b*cosh(x)+c*sinh(x))^2+(b*B*c*cosh(x)+b^2*B*sinh(x))/(b^2-c^2)^2/(b*cosh(x)+c*sinh(x))

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 120, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3237, 3232, 3153, 212} \begin {gather*} \frac {A \text {ArcTan}\left (\frac {b \sinh (x)+c \cosh (x)}{\sqrt {b^2-c^2}}\right )}{2 \left (b^2-c^2\right )^{3/2}}+\frac {A b \sinh (x)+A c \cosh (x)+B c}{2 \left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))^2}+\frac {b^2 B \sinh (x)+b B c \cosh (x)}{\left (b^2-c^2\right )^2 (b \cosh (x)+c \sinh (x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*Cosh[x])/(b*Cosh[x] + c*Sinh[x])^3,x]

[Out]

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

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3153

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 3232

Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_)]*(
b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)])^2, x_Symbol] :> Simp[(c*B - b*C - (a*C - c*A)*Cos[d + e*x] + (a*B - b*A)
*Sin[d + e*x])/(e*(a^2 - b^2 - c^2)*(a + b*Cos[d + e*x] + c*Sin[d + e*x])), x] + Dist[(a*A - b*B - 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, B, C}, x] && NeQ[
a^2 - b^2 - c^2, 0] && NeQ[a*A - b*B - c*C, 0]

Rule 3237

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.72, size = 134, normalized size = 1.12 \begin {gather*} \frac {1}{2} \left (\frac {2 A \text {ArcTan}\left (\frac {c+b \tanh \left (\frac {x}{2}\right )}{\sqrt {b-c} \sqrt {b+c}}\right )}{(b-c)^{3/2} (b+c)^{3/2}}+\frac {A c+2 b B \sinh (x)}{b (b-c) (b+c) (b \cosh (x)+c \sinh (x))}+\frac {b B c+A \left (b^2-c^2\right ) \sinh (x)}{b (b-c) (b+c) (b \cosh (x)+c \sinh (x))^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Cosh[x])/(b*Cosh[x] + c*Sinh[x])^3,x]

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 1.42, size = 214, normalized size = 1.78

method result size
risch \(\frac {A \,b^{2} {\mathrm e}^{3 x}+2 A b c \,{\mathrm e}^{3 x}+A \,c^{2} {\mathrm e}^{3 x}-2 B \,b^{2} {\mathrm e}^{2 x}+2 B \,c^{2} {\mathrm e}^{2 x}-A \,b^{2} {\mathrm e}^{x}+A \,c^{2} {\mathrm e}^{x}-2 B \,b^{2}+2 b B c}{\left (b -c \right ) \left (b \,{\mathrm e}^{2 x}+{\mathrm e}^{2 x} c +b -c \right )^{2} \left (b^{2}+2 b c +c^{2}\right )}-\frac {A \ln \left ({\mathrm e}^{x}-\frac {b -c}{\sqrt {-b^{2}+c^{2}}}\right )}{2 \sqrt {-b^{2}+c^{2}}\, \left (b +c \right ) \left (b -c \right )}+\frac {A \ln \left ({\mathrm e}^{x}+\frac {b -c}{\sqrt {-b^{2}+c^{2}}}\right )}{2 \sqrt {-b^{2}+c^{2}}\, \left (b +c \right ) \left (b -c \right )}\) \(211\)
default \(\frac {-\frac {\left (A \,b^{2}-2 A \,c^{2}-2 B \,b^{2}+2 B \,c^{2}\right ) \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{\left (b^{2}-c^{2}\right ) b}+\frac {c \left (A \,b^{2}+2 A \,c^{2}+2 B \,b^{2}-2 B \,c^{2}\right ) \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )}{\left (b^{2}-c^{2}\right ) b^{2}}+\frac {\left (A \,b^{2}+2 A \,c^{2}+2 B \,b^{2}-2 B \,c^{2}\right ) \tanh \left (\frac {x}{2}\right )}{\left (b^{2}-c^{2}\right ) b}+\frac {2 A c}{2 b^{2}-2 c^{2}}}{\left (b \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 c \tanh \left (\frac {x}{2}\right )+b \right )^{2}}+\frac {A \arctan \left (\frac {2 b \tanh \left (\frac {x}{2}\right )+2 c}{2 \sqrt {b^{2}-c^{2}}}\right )}{\left (b^{2}-c^{2}\right )^{\frac {3}{2}}}\) \(214\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*(-1/2*(A*b^2-2*A*c^2-2*B*b^2+2*B*c^2)/(b^2-c^2)/b*tanh(1/2*x)^3+1/2*c*(A*b^2+2*A*c^2+2*B*b^2-2*B*c^2)/(b^2-c
^2)/b^2*tanh(1/2*x)^2+1/2*(A*b^2+2*A*c^2+2*B*b^2-2*B*c^2)/(b^2-c^2)/b*tanh(1/2*x)+1/2*A*c/(b^2-c^2))/(b*tanh(1
/2*x)^2+2*c*tanh(1/2*x)+b)^2+A/(b^2-c^2)^(3/2)*arctan(1/2*(2*b*tanh(1/2*x)+2*c)/(b^2-c^2)^(1/2))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*c^2-4*b^2>0)', see `assume?`
 for more de

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 898 vs. \(2 (112) = 224\).
time = 0.42, size = 1855, normalized size = 15.46 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[-1/2*(4*B*b^3 - 8*B*b^2*c + 4*B*b*c^2 - 2*(A*b^3 + A*b^2*c - A*b*c^2 - A*c^3)*cosh(x)^3 - 2*(A*b^3 + A*b^2*c
- A*b*c^2 - A*c^3)*sinh(x)^3 + 4*(B*b^3 - B*b^2*c - B*b*c^2 + B*c^3)*cosh(x)^2 + 2*(2*B*b^3 - 2*B*b^2*c - 2*B*
b*c^2 + 2*B*c^3 - 3*(A*b^3 + A*b^2*c - A*b*c^2 - A*c^3)*cosh(x))*sinh(x)^2 - ((A*b^2 + 2*A*b*c + A*c^2)*cosh(x
)^4 + 4*(A*b^2 + 2*A*b*c + A*c^2)*cosh(x)*sinh(x)^3 + (A*b^2 + 2*A*b*c + A*c^2)*sinh(x)^4 + A*b^2 - 2*A*b*c +
A*c^2 + 2*(A*b^2 - A*c^2)*cosh(x)^2 + 2*(A*b^2 - A*c^2 + 3*(A*b^2 + 2*A*b*c + A*c^2)*cosh(x)^2)*sinh(x)^2 + 4*
((A*b^2 + 2*A*b*c + A*c^2)*cosh(x)^3 + (A*b^2 - A*c^2)*cosh(x))*sinh(x))*sqrt(-b^2 + c^2)*log(((b + c)*cosh(x)
^2 + 2*(b + c)*cosh(x)*sinh(x) + (b + c)*sinh(x)^2 + 2*sqrt(-b^2 + c^2)*(cosh(x) + sinh(x)) - b + c)/((b + c)*
cosh(x)^2 + 2*(b + c)*cosh(x)*sinh(x) + (b + c)*sinh(x)^2 + b - c)) + 2*(A*b^3 - A*b^2*c - A*b*c^2 + A*c^3)*co
sh(x) + 2*(A*b^3 - A*b^2*c - A*b*c^2 + A*c^3 - 3*(A*b^3 + A*b^2*c - A*b*c^2 - A*c^3)*cosh(x)^2 + 4*(B*b^3 - B*
b^2*c - B*b*c^2 + B*c^3)*cosh(x))*sinh(x))/(b^6 - 2*b^5*c - b^4*c^2 + 4*b^3*c^3 - b^2*c^4 - 2*b*c^5 + c^6 + (b
^6 + 2*b^5*c - b^4*c^2 - 4*b^3*c^3 - b^2*c^4 + 2*b*c^5 + c^6)*cosh(x)^4 + 4*(b^6 + 2*b^5*c - b^4*c^2 - 4*b^3*c
^3 - b^2*c^4 + 2*b*c^5 + c^6)*cosh(x)*sinh(x)^3 + (b^6 + 2*b^5*c - b^4*c^2 - 4*b^3*c^3 - b^2*c^4 + 2*b*c^5 + c
^6)*sinh(x)^4 + 2*(b^6 - 3*b^4*c^2 + 3*b^2*c^4 - c^6)*cosh(x)^2 + 2*(b^6 - 3*b^4*c^2 + 3*b^2*c^4 - c^6 + 3*(b^
6 + 2*b^5*c - b^4*c^2 - 4*b^3*c^3 - b^2*c^4 + 2*b*c^5 + c^6)*cosh(x)^2)*sinh(x)^2 + 4*((b^6 + 2*b^5*c - b^4*c^
2 - 4*b^3*c^3 - b^2*c^4 + 2*b*c^5 + c^6)*cosh(x)^3 + (b^6 - 3*b^4*c^2 + 3*b^2*c^4 - c^6)*cosh(x))*sinh(x)), -(
2*B*b^3 - 4*B*b^2*c + 2*B*b*c^2 - (A*b^3 + A*b^2*c - A*b*c^2 - A*c^3)*cosh(x)^3 - (A*b^3 + A*b^2*c - A*b*c^2 -
 A*c^3)*sinh(x)^3 + 2*(B*b^3 - B*b^2*c - B*b*c^2 + B*c^3)*cosh(x)^2 + (2*B*b^3 - 2*B*b^2*c - 2*B*b*c^2 + 2*B*c
^3 - 3*(A*b^3 + A*b^2*c - A*b*c^2 - A*c^3)*cosh(x))*sinh(x)^2 + ((A*b^2 + 2*A*b*c + A*c^2)*cosh(x)^4 + 4*(A*b^
2 + 2*A*b*c + A*c^2)*cosh(x)*sinh(x)^3 + (A*b^2 + 2*A*b*c + A*c^2)*sinh(x)^4 + A*b^2 - 2*A*b*c + A*c^2 + 2*(A*
b^2 - A*c^2)*cosh(x)^2 + 2*(A*b^2 - A*c^2 + 3*(A*b^2 + 2*A*b*c + A*c^2)*cosh(x)^2)*sinh(x)^2 + 4*((A*b^2 + 2*A
*b*c + A*c^2)*cosh(x)^3 + (A*b^2 - A*c^2)*cosh(x))*sinh(x))*sqrt(b^2 - c^2)*arctan(sqrt(b^2 - c^2)/((b + c)*co
sh(x) + (b + c)*sinh(x))) + (A*b^3 - A*b^2*c - A*b*c^2 + A*c^3)*cosh(x) + (A*b^3 - A*b^2*c - A*b*c^2 + A*c^3 -
 3*(A*b^3 + A*b^2*c - A*b*c^2 - A*c^3)*cosh(x)^2 + 4*(B*b^3 - B*b^2*c - B*b*c^2 + B*c^3)*cosh(x))*sinh(x))/(b^
6 - 2*b^5*c - b^4*c^2 + 4*b^3*c^3 - b^2*c^4 - 2*b*c^5 + c^6 + (b^6 + 2*b^5*c - b^4*c^2 - 4*b^3*c^3 - b^2*c^4 +
 2*b*c^5 + c^6)*cosh(x)^4 + 4*(b^6 + 2*b^5*c - b^4*c^2 - 4*b^3*c^3 - b^2*c^4 + 2*b*c^5 + c^6)*cosh(x)*sinh(x)^
3 + (b^6 + 2*b^5*c - b^4*c^2 - 4*b^3*c^3 - b^2*c^4 + 2*b*c^5 + c^6)*sinh(x)^4 + 2*(b^6 - 3*b^4*c^2 + 3*b^2*c^4
 - c^6)*cosh(x)^2 + 2*(b^6 - 3*b^4*c^2 + 3*b^2*c^4 - c^6 + 3*(b^6 + 2*b^5*c - b^4*c^2 - 4*b^3*c^3 - b^2*c^4 +
2*b*c^5 + c^6)*cosh(x)^2)*sinh(x)^2 + 4*((b^6 + 2*b^5*c - b^4*c^2 - 4*b^3*c^3 - b^2*c^4 + 2*b*c^5 + c^6)*cosh(
x)^3 + (b^6 - 3*b^4*c^2 + 3*b^2*c^4 - c^6)*cosh(x))*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((A+B*cosh(x))/(b*cosh(x)+c*sinh(x))**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 152, normalized size = 1.27 \begin {gather*} \frac {A \arctan \left (\frac {b e^{x} + c e^{x}}{\sqrt {b^{2} - c^{2}}}\right )}{{\left (b^{2} - c^{2}\right )}^{\frac {3}{2}}} + \frac {A b^{2} e^{\left (3 \, x\right )} + 2 \, A b c e^{\left (3 \, x\right )} + A c^{2} e^{\left (3 \, x\right )} - 2 \, B b^{2} e^{\left (2 \, x\right )} + 2 \, B c^{2} e^{\left (2 \, x\right )} - A b^{2} e^{x} + A c^{2} e^{x} - 2 \, B b^{2} + 2 \, B b c}{{\left (b^{3} + b^{2} c - b c^{2} - c^{3}\right )} {\left (b e^{\left (2 \, x\right )} + c e^{\left (2 \, x\right )} + b - c\right )}^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

A*arctan((b*e^x + c*e^x)/sqrt(b^2 - c^2))/(b^2 - c^2)^(3/2) + (A*b^2*e^(3*x) + 2*A*b*c*e^(3*x) + A*c^2*e^(3*x)
 - 2*B*b^2*e^(2*x) + 2*B*c^2*e^(2*x) - A*b^2*e^x + A*c^2*e^x - 2*B*b^2 + 2*B*b*c)/((b^3 + b^2*c - b*c^2 - c^3)
*(b*e^(2*x) + c*e^(2*x) + b - c)^2)

________________________________________________________________________________________

Mupad [B]
time = 1.67, size = 216, normalized size = 1.80 \begin {gather*} \frac {\mathrm {atan}\left (\frac {A\,{\mathrm {e}}^x\,\sqrt {b^6-3\,b^4\,c^2+3\,b^2\,c^4-c^6}}{b^3\,\sqrt {A^2}+c^3\,\sqrt {A^2}-b\,c^2\,\sqrt {A^2}-b^2\,c\,\sqrt {A^2}}\right )\,\sqrt {A^2}}{\sqrt {b^6-3\,b^4\,c^2+3\,b^2\,c^4-c^6}}-\frac {\frac {B}{{\left (b+c\right )}^2}-\frac {A\,{\mathrm {e}}^x}{\left (b+c\right )\,\left (b-c\right )}}{b-c+{\mathrm {e}}^{2\,x}\,\left (b+c\right )}-\frac {\frac {B}{b+c}+\frac {2\,A\,{\mathrm {e}}^x}{b+c}+\frac {B\,{\mathrm {e}}^{2\,x}}{b+c}}{{\mathrm {e}}^{4\,x}\,{\left (b+c\right )}^2+{\left (b-c\right )}^2+2\,{\mathrm {e}}^{2\,x}\,\left (b+c\right )\,\left (b-c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*cosh(x))/(b*cosh(x) + c*sinh(x))^3,x)

[Out]

(atan((A*exp(x)*(b^6 - c^6 + 3*b^2*c^4 - 3*b^4*c^2)^(1/2))/(b^3*(A^2)^(1/2) + c^3*(A^2)^(1/2) - b*c^2*(A^2)^(1
/2) - b^2*c*(A^2)^(1/2)))*(A^2)^(1/2))/(b^6 - c^6 + 3*b^2*c^4 - 3*b^4*c^2)^(1/2) - (B/(b + c)^2 - (A*exp(x))/(
(b + c)*(b - c)))/(b - c + exp(2*x)*(b + c)) - (B/(b + c) + (2*A*exp(x))/(b + c) + (B*exp(2*x))/(b + c))/(exp(
4*x)*(b + c)^2 + (b - c)^2 + 2*exp(2*x)*(b + c)*(b - c))

________________________________________________________________________________________