3.207 \(\int \frac {A+B \cosh (d+e x)+C \sinh (d+e x)}{(a+b \cosh (d+e x))^2} \, dx\)

Optimal. Leaf size=121 \[ -\frac {(A b-a B) \sinh (d+e x)}{e \left (a^2-b^2\right ) (a+b \cosh (d+e x))}+\frac {2 (a A-b B) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (d+e x)\right )}{\sqrt {a+b}}\right )}{e (a-b)^{3/2} (a+b)^{3/2}}-\frac {C}{b e (a+b \cosh (d+e x))} \]

[Out]

2*(A*a-B*b)*arctanh((a-b)^(1/2)*tanh(1/2*e*x+1/2*d)/(a+b)^(1/2))/(a-b)^(3/2)/(a+b)^(3/2)/e-C/b/e/(a+b*cosh(e*x
+d))-(A*b-B*a)*sinh(e*x+d)/(a^2-b^2)/e/(a+b*cosh(e*x+d))

________________________________________________________________________________________

Rubi [A]  time = 0.18, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {4377, 2754, 12, 2659, 205, 2668, 32} \[ -\frac {(A b-a B) \sinh (d+e x)}{e \left (a^2-b^2\right ) (a+b \cosh (d+e x))}+\frac {2 (a A-b B) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (d+e x)\right )}{\sqrt {a+b}}\right )}{e (a-b)^{3/2} (a+b)^{3/2}}-\frac {C}{b e (a+b \cosh (d+e x))} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*Cosh[d + e*x] + C*Sinh[d + e*x])/(a + b*Cosh[d + e*x])^2,x]

[Out]

(2*(a*A - b*B)*ArcTanh[(Sqrt[a - b]*Tanh[(d + e*x)/2])/Sqrt[a + b]])/((a - b)^(3/2)*(a + b)^(3/2)*e) - C/(b*e*
(a + b*Cosh[d + e*x])) - ((A*b - a*B)*Sinh[d + e*x])/((a^2 - b^2)*e*(a + b*Cosh[d + e*x]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2659

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 2668

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 2754

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[((
b*c - a*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(f*(m + 1)*(a^2 - b^2)), x] + Dist[1/((m + 1)*(a^2 - b^2
)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[(a*c - b*d)*(m + 1) - (b*c - a*d)*(m + 2)*Sin[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] && IntegerQ[2*m]

Rule 4377

Int[(u_)*((v_) + (d_.)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^(n_.)), x_Symbol] :> With[{e = FreeFactors[Cos[c*(a +
b*x)], x]}, Int[ActivateTrig[u*v], x] + Dist[d, Int[ActivateTrig[u]*Sin[c*(a + b*x)]^n, x], x] /; FunctionOfQ[
Cos[c*(a + b*x)]/e, u, x]] /; FreeQ[{a, b, c, d}, x] &&  !FreeQ[v, x] && IntegerQ[(n - 1)/2] && NonsumQ[u] &&
(EqQ[F, Sin] || EqQ[F, sin])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.45, size = 115, normalized size = 0.95 \[ \frac {\frac {C \left (b^2-a^2\right )-b (A b-a B) \sinh (d+e x)}{b (a-b) (a+b) (a+b \cosh (d+e x))}+\frac {2 (a A-b B) \tan ^{-1}\left (\frac {(a-b) \tanh \left (\frac {1}{2} (d+e x)\right )}{\sqrt {b^2-a^2}}\right )}{\left (b^2-a^2\right )^{3/2}}}{e} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Cosh[d + e*x] + C*Sinh[d + e*x])/(a + b*Cosh[d + e*x])^2,x]

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.75, size = 1044, normalized size = 8.63 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cosh(e*x+d)+C*sinh(e*x+d))/(a+b*cosh(e*x+d))^2,x, algorithm="fricas")

[Out]

[-(2*B*a^3*b - 2*A*a^2*b^2 - 2*B*a*b^3 + 2*A*b^4 - (A*a*b^2 - B*b^3 + (A*a*b^2 - B*b^3)*cosh(e*x + d)^2 + (A*a
*b^2 - B*b^3)*sinh(e*x + d)^2 + 2*(A*a^2*b - B*a*b^2)*cosh(e*x + d) + 2*(A*a^2*b - B*a*b^2 + (A*a*b^2 - B*b^3)
*cosh(e*x + d))*sinh(e*x + d))*sqrt(a^2 - b^2)*log((b^2*cosh(e*x + d)^2 + b^2*sinh(e*x + d)^2 + 2*a*b*cosh(e*x
 + d) + 2*a^2 - b^2 + 2*(b^2*cosh(e*x + d) + a*b)*sinh(e*x + d) - 2*sqrt(a^2 - b^2)*(b*cosh(e*x + d) + b*sinh(
e*x + d) + a))/(b*cosh(e*x + d)^2 + b*sinh(e*x + d)^2 + 2*a*cosh(e*x + d) + 2*(b*cosh(e*x + d) + a)*sinh(e*x +
 d) + b)) + 2*((B + C)*a^4 - A*a^3*b - (B + 2*C)*a^2*b^2 + A*a*b^3 + C*b^4)*cosh(e*x + d) + 2*((B + C)*a^4 - A
*a^3*b - (B + 2*C)*a^2*b^2 + A*a*b^3 + C*b^4)*sinh(e*x + d))/((a^4*b^2 - 2*a^2*b^4 + b^6)*e*cosh(e*x + d)^2 +
(a^4*b^2 - 2*a^2*b^4 + b^6)*e*sinh(e*x + d)^2 + 2*(a^5*b - 2*a^3*b^3 + a*b^5)*e*cosh(e*x + d) + (a^4*b^2 - 2*a
^2*b^4 + b^6)*e + 2*((a^4*b^2 - 2*a^2*b^4 + b^6)*e*cosh(e*x + d) + (a^5*b - 2*a^3*b^3 + a*b^5)*e)*sinh(e*x + d
)), -2*(B*a^3*b - A*a^2*b^2 - B*a*b^3 + A*b^4 + (A*a*b^2 - B*b^3 + (A*a*b^2 - B*b^3)*cosh(e*x + d)^2 + (A*a*b^
2 - B*b^3)*sinh(e*x + d)^2 + 2*(A*a^2*b - B*a*b^2)*cosh(e*x + d) + 2*(A*a^2*b - B*a*b^2 + (A*a*b^2 - B*b^3)*co
sh(e*x + d))*sinh(e*x + d))*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cosh(e*x + d) + b*sinh(e*x + d) + a)/
(a^2 - b^2)) + ((B + C)*a^4 - A*a^3*b - (B + 2*C)*a^2*b^2 + A*a*b^3 + C*b^4)*cosh(e*x + d) + ((B + C)*a^4 - A*
a^3*b - (B + 2*C)*a^2*b^2 + A*a*b^3 + C*b^4)*sinh(e*x + d))/((a^4*b^2 - 2*a^2*b^4 + b^6)*e*cosh(e*x + d)^2 + (
a^4*b^2 - 2*a^2*b^4 + b^6)*e*sinh(e*x + d)^2 + 2*(a^5*b - 2*a^3*b^3 + a*b^5)*e*cosh(e*x + d) + (a^4*b^2 - 2*a^
2*b^4 + b^6)*e + 2*((a^4*b^2 - 2*a^2*b^4 + b^6)*e*cosh(e*x + d) + (a^5*b - 2*a^3*b^3 + a*b^5)*e)*sinh(e*x + d)
)]

________________________________________________________________________________________

giac [A]  time = 0.18, size = 161, normalized size = 1.33 \[ 2 \, {\left (\frac {{\left (A a - B b\right )} \arctan \left (\frac {b e^{\left (x e + d\right )} + a}{\sqrt {-a^{2} + b^{2}}}\right )}{{\left (a^{2} - b^{2}\right )} \sqrt {-a^{2} + b^{2}}} - \frac {B a^{2} e^{\left (x e + d\right )} + C a^{2} e^{\left (x e + d\right )} - A a b e^{\left (x e + d\right )} - C b^{2} e^{\left (x e + d\right )} + B a b - A b^{2}}{{\left (a^{2} b - b^{3}\right )} {\left (b e^{\left (2 \, x e + 2 \, d\right )} + 2 \, a e^{\left (x e + d\right )} + b\right )}}\right )} e^{\left (-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cosh(e*x+d)+C*sinh(e*x+d))/(a+b*cosh(e*x+d))^2,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.17, size = 144, normalized size = 1.19 \[ \frac {-\frac {2 \left (-\frac {\left (A b -a B \right ) \tanh \left (\frac {e x}{2}+\frac {d}{2}\right )}{a^{2}-b^{2}}+\frac {C}{a -b}\right )}{a \left (\tanh ^{2}\left (\frac {e x}{2}+\frac {d}{2}\right )\right )-\left (\tanh ^{2}\left (\frac {e x}{2}+\frac {d}{2}\right )\right ) b -a -b}+\frac {2 \left (A a -B b \right ) \arctanh \left (\frac {\left (a -b \right ) \tanh \left (\frac {e x}{2}+\frac {d}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a +b \right ) \left (a -b \right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}}{e} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*cosh(e*x+d)+C*sinh(e*x+d))/(a+b*cosh(e*x+d))^2,x)

[Out]

1/e*(-2*(-(A*b-B*a)/(a^2-b^2)*tanh(1/2*e*x+1/2*d)+C/(a-b))/(a*tanh(1/2*e*x+1/2*d)^2-tanh(1/2*e*x+1/2*d)^2*b-a-
b)+2*(A*a-B*b)/(a+b)/(a-b)/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tanh(1/2*e*x+1/2*d)/((a+b)*(a-b))^(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(e*x+d)+C*sinh(e*x+d))/(a+b*cosh(e*x+d))^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*a^2-4*b^2>0)', see `assume?`
 for more details)Is 4*a^2-4*b^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 1.59, size = 301, normalized size = 2.49 \[ \frac {\frac {2\,\left (A\,b^3-B\,a\,b^2\right )}{b\,e\,\left (a^2\,b-b^3\right )}+\frac {2\,{\mathrm {e}}^{d+e\,x}\,\left (C\,b^4-B\,a^2\,b^2-C\,a^2\,b^2+A\,a\,b^3\right )}{b^2\,e\,\left (a^2\,b-b^3\right )}}{b+2\,a\,{\mathrm {e}}^{d+e\,x}+b\,{\mathrm {e}}^{2\,d+2\,e\,x}}+\frac {\ln \left (-\frac {2\,{\mathrm {e}}^{d+e\,x}\,\left (A\,a-B\,b\right )}{b\,\left (a^2-b^2\right )}-\frac {2\,\left (A\,a-B\,b\right )\,\left (b+a\,{\mathrm {e}}^{d+e\,x}\right )}{b\,{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}}\right )\,\left (A\,a-B\,b\right )}{e\,{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}}-\frac {\ln \left (\frac {2\,\left (A\,a-B\,b\right )\,\left (b+a\,{\mathrm {e}}^{d+e\,x}\right )}{b\,{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}}-\frac {2\,{\mathrm {e}}^{d+e\,x}\,\left (A\,a-B\,b\right )}{b\,\left (a^2-b^2\right )}\right )\,\left (A\,a-B\,b\right )}{e\,{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*cosh(d + e*x) + C*sinh(d + e*x))/(a + b*cosh(d + e*x))^2,x)

[Out]

((2*(A*b^3 - B*a*b^2))/(b*e*(a^2*b - b^3)) + (2*exp(d + e*x)*(C*b^4 - B*a^2*b^2 - C*a^2*b^2 + A*a*b^3))/(b^2*e
*(a^2*b - b^3)))/(b + 2*a*exp(d + e*x) + b*exp(2*d + 2*e*x)) + (log(- (2*exp(d + e*x)*(A*a - B*b))/(b*(a^2 - b
^2)) - (2*(A*a - B*b)*(b + a*exp(d + e*x)))/(b*(a + b)^(3/2)*(a - b)^(3/2)))*(A*a - B*b))/(e*(a + b)^(3/2)*(a
- b)^(3/2)) - (log((2*(A*a - B*b)*(b + a*exp(d + e*x)))/(b*(a + b)^(3/2)*(a - b)^(3/2)) - (2*exp(d + e*x)*(A*a
 - B*b))/(b*(a^2 - b^2)))*(A*a - B*b))/(e*(a + b)^(3/2)*(a - b)^(3/2))

________________________________________________________________________________________

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

[Out]

Timed out

________________________________________________________________________________________