3.728 \(\int \frac {A+B \cosh (x)}{(b \cosh (x)+c \sinh (x))^2} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3155, 3074, 206} \[ \frac {A b \sinh (x)+A c \cosh (x)+B c}{\left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))}+\frac {b B \tan ^{-1}\left (\frac {b \sinh (x)+c \cosh (x)}{\sqrt {b^2-c^2}}\right )}{\left (b^2-c^2\right )^{3/2}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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

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 3155

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.30, size = 151, normalized size = 1.94 \[ \frac {\sinh (x) \left (A (b-c)^{3/2} (b+c)^2+2 b^2 B c \sqrt {b+c} \tan ^{-1}\left (\frac {b \tanh \left (\frac {x}{2}\right )+c}{\sqrt {b-c} \sqrt {b+c}}\right )\right )+2 b^3 B \sqrt {b+c} \cosh (x) \tan ^{-1}\left (\frac {b \tanh \left (\frac {x}{2}\right )+c}{\sqrt {b-c} \sqrt {b+c}}\right )+b B c \sqrt {b-c} (b+c)}{b (b-c)^{3/2} (b+c)^2 (b \cosh (x)+c \sinh (x))} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.53, size = 680, normalized size = 8.72 \[ \left [-\frac {2 \, A b^{3} - 2 \, A b^{2} c - 2 \, A b c^{2} + 2 \, A c^{3} - {\left (B b^{2} - B b c + {\left (B b^{2} + B b c\right )} \cosh \relax (x)^{2} + 2 \, {\left (B b^{2} + B b c\right )} \cosh \relax (x) \sinh \relax (x) + {\left (B b^{2} + B b c\right )} \sinh \relax (x)^{2}\right )} \sqrt {-b^{2} + c^{2}} \log \left (\frac {{\left (b + c\right )} \cosh \relax (x)^{2} + 2 \, {\left (b + c\right )} \cosh \relax (x) \sinh \relax (x) + {\left (b + c\right )} \sinh \relax (x)^{2} + 2 \, \sqrt {-b^{2} + c^{2}} {\left (\cosh \relax (x) + \sinh \relax (x)\right )} - b + c}{{\left (b + c\right )} \cosh \relax (x)^{2} + 2 \, {\left (b + c\right )} \cosh \relax (x) \sinh \relax (x) + {\left (b + c\right )} \sinh \relax (x)^{2} + b - c}\right ) - 2 \, {\left (B b^{2} c - B c^{3}\right )} \cosh \relax (x) - 2 \, {\left (B b^{2} c - B c^{3}\right )} \sinh \relax (x)}{b^{5} - b^{4} c - 2 \, b^{3} c^{2} + 2 \, b^{2} c^{3} + b c^{4} - c^{5} + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \cosh \relax (x)^{2} + 2 \, {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \cosh \relax (x) \sinh \relax (x) + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \sinh \relax (x)^{2}}, -\frac {2 \, {\left (A b^{3} - A b^{2} c - A b c^{2} + A c^{3} + {\left (B b^{2} - B b c + {\left (B b^{2} + B b c\right )} \cosh \relax (x)^{2} + 2 \, {\left (B b^{2} + B b c\right )} \cosh \relax (x) \sinh \relax (x) + {\left (B b^{2} + B b c\right )} \sinh \relax (x)^{2}\right )} \sqrt {b^{2} - c^{2}} \arctan \left (\frac {\sqrt {b^{2} - c^{2}}}{{\left (b + c\right )} \cosh \relax (x) + {\left (b + c\right )} \sinh \relax (x)}\right ) - {\left (B b^{2} c - B c^{3}\right )} \cosh \relax (x) - {\left (B b^{2} c - B c^{3}\right )} \sinh \relax (x)\right )}}{b^{5} - b^{4} c - 2 \, b^{3} c^{2} + 2 \, b^{2} c^{3} + b c^{4} - c^{5} + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \cosh \relax (x)^{2} + 2 \, {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \cosh \relax (x) \sinh \relax (x) + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \sinh \relax (x)^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.13, size = 83, normalized size = 1.06 \[ \frac {2 \, B b \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 {2 \, {\left (B c e^{x} - A b + A c\right )}}{{\left (b^{2} - c^{2}\right )} {\left (b e^{\left (2 \, x\right )} + c e^{\left (2 \, x\right )} + b - c\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.28, size = 116, normalized size = 1.49 \[ -\frac {2 \left (-\frac {\left (A \,b^{2}-A \,c^{2}+B \,c^{2}\right ) \tanh \left (\frac {x}{2}\right )}{b \left (b^{2}-c^{2}\right )}-\frac {B c}{b^{2}-c^{2}}\right )}{\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b +2 c \tanh \left (\frac {x}{2}\right )+b}+\frac {2 b B \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b +2 c}{2 \sqrt {b^{2}-c^{2}}}\right )}{\left (b^{2}-c^{2}\right )^{\frac {3}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cosh(x))/(b*cosh(x)+c*sinh(x))^2,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 details)Is 4*c^2-4*b^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 1.79, size = 168, normalized size = 2.15 \[ \frac {B\,b\,\ln \left (\frac {2\,B\,b}{{\left (b+c\right )}^{5/2}\,\sqrt {c-b}}+\frac {2\,B\,b\,{\mathrm {e}}^x}{-b^3-b^2\,c+b\,c^2+c^3}\right )}{{\left (b+c\right )}^{3/2}\,{\left (c-b\right )}^{3/2}}-\frac {B\,b\,\ln \left (\frac {2\,B\,b\,{\mathrm {e}}^x}{-b^3-b^2\,c+b\,c^2+c^3}-\frac {2\,B\,b}{{\left (b+c\right )}^{5/2}\,\sqrt {c-b}}\right )}{{\left (b+c\right )}^{3/2}\,{\left (c-b\right )}^{3/2}}-\frac {\frac {2\,A}{b+c}-\frac {2\,B\,c\,{\mathrm {e}}^x}{\left (b+c\right )\,\left (b-c\right )}}{b-c+{\mathrm {e}}^{2\,x}\,\left (b+c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(B*b*log((2*B*b)/((b + c)^(5/2)*(c - b)^(1/2)) + (2*B*b*exp(x))/(b*c^2 - b^2*c - b^3 + c^3)))/((b + c)^(3/2)*(
c - b)^(3/2)) - (B*b*log((2*B*b*exp(x))/(b*c^2 - b^2*c - b^3 + c^3) - (2*B*b)/((b + c)^(5/2)*(c - b)^(1/2))))/
((b + c)^(3/2)*(c - b)^(3/2)) - ((2*A)/(b + c) - (2*B*c*exp(x))/((b + c)*(b - c)))/(b - c + exp(2*x)*(b + c))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cosh(x))/(b*cosh(x)+c*sinh(x))**2,x)

[Out]

Timed out

________________________________________________________________________________________