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

________________________________________________________________________________________

Rubi [A]  time = 0.176173, antiderivative size = 121, normalized size of antiderivative = 1., 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 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])

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 12

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

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

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.408815, 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

________________________________________________________________________________________

Maple [A]  time = 0.036, size = 144, normalized size = 1.2 \begin{align*}{\frac{1}{e} \left ( -2\,{\frac{1}{a \left ( \tanh \left ( 1/2\,ex+d/2 \right ) \right ) ^{2}- \left ( \tanh \left ( 1/2\,ex+d/2 \right ) \right ) ^{2}b-a-b} \left ( -{\frac{ \left ( Ab-aB \right ) \tanh \left ( 1/2\,ex+d/2 \right ) }{{a}^{2}-{b}^{2}}}+{\frac{C}{a-b}} \right ) }+2\,{\frac{Aa-Bb}{ \left ( a+b \right ) \left ( a-b \right ) \sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}{\it Artanh} \left ({\frac{ \left ( a-b \right ) \tanh \left ( 1/2\,ex+d/2 \right ) }{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}} \right ) } \right ) } \end{align*}

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., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

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

________________________________________________________________________________________

Fricas [B]  time = 2.22388, size = 2384, normalized size = 19.7 \begin{align*} \text{result too large to display} \end{align*}

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

________________________________________________________________________________________

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

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

________________________________________________________________________________________

Giac [A]  time = 1.21669, size = 225, normalized size = 1.86 \begin{align*} \frac{2 \,{\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} e - b^{2} e\right )} \sqrt{-a^{2} + b^{2}}} - \frac{2 \,{\left (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}\right )}}{{\left (a^{2} b e - b^{3} e\right )}{\left (b e^{\left (2 \, x e + 2 \, d\right )} + 2 \, a e^{\left (x e + d\right )} + b\right )}} \end{align*}

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*e - b^2*e)*sqrt(-a^2 + b^2)) - 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*e - b^3*e)*(b*e^(2
*x*e + 2*d) + 2*a*e^(x*e + d) + b))