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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.153965, antiderivative size = 86, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.194, Rules used = {4377, 2735, 2659, 205, 2668, 31} \[ \frac{2 (A b-a B) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{1}{2} (d+e x)\right )}{\sqrt{a+b}}\right )}{b e \sqrt{a-b} \sqrt{a+b}}+\frac{C \log (a+b \cosh (d+e x))}{b e}+\frac{B x}{b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 2735

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

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 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{A+B \cosh (d+e x)+C \sinh (d+e x)}{a+b \cosh (d+e x)} \, dx &=C \int \frac{\sinh (d+e x)}{a+b \cosh (d+e x)} \, dx+\int \frac{A+B \cosh (d+e x)}{a+b \cosh (d+e x)} \, dx\\ &=\frac{B x}{b}-\frac{(-A b+a B) \int \frac{1}{a+b \cosh (d+e x)} \, dx}{b}+\frac{C \operatorname{Subst}\left (\int \frac{1}{a+x} \, dx,x,b \cosh (d+e x)\right )}{b e}\\ &=\frac{B x}{b}+\frac{C \log (a+b \cosh (d+e x))}{b e}-\frac{(2 i (A b-a 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 )}{b e}\\ &=\frac{B x}{b}+\frac{2 (A b-a B) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{1}{2} (d+e x)\right )}{\sqrt{a+b}}\right )}{\sqrt{a-b} b \sqrt{a+b} e}+\frac{C \log (a+b \cosh (d+e x))}{b e}\\ \end{align*}

Mathematica [A]  time = 0.234088, size = 81, normalized size = 0.94 \[ \frac{\frac{2 (a B-A b) \tan ^{-1}\left (\frac{(a-b) \tanh \left (\frac{1}{2} (d+e x)\right )}{\sqrt{b^2-a^2}}\right )}{\sqrt{b^2-a^2}}+C \log (a+b \cosh (d+e x))+B (d+e x)}{b e} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.036, size = 276, normalized size = 3.2 \begin{align*}{\frac{aC}{eb \left ( a-b \right ) }\ln \left ( a \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) \right ) ^{2}- \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) \right ) ^{2}b-a-b \right ) }-{\frac{C}{e \left ( a-b \right ) }\ln \left ( a \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) \right ) ^{2}- \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) \right ) ^{2}b-a-b \right ) }+2\,{\frac{A}{e\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 ) }-2\,{\frac{aB}{eb\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 ) }+{\frac{B}{eb}\ln \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) +1 \right ) }-{\frac{C}{eb}\ln \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) +1 \right ) }-{\frac{B}{eb}\ln \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) -1 \right ) }-{\frac{C}{eb}\ln \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) -1 \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)),x)

[Out]

1/e/b/(a-b)*ln(a*tanh(1/2*e*x+1/2*d)^2-tanh(1/2*e*x+1/2*d)^2*b-a-b)*a*C-1/e/(a-b)*ln(a*tanh(1/2*e*x+1/2*d)^2-t
anh(1/2*e*x+1/2*d)^2*b-a-b)*C+2/e/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tanh(1/2*e*x+1/2*d)/((a+b)*(a-b))^(1/2))*A
-2/e/b/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tanh(1/2*e*x+1/2*d)/((a+b)*(a-b))^(1/2))*a*B+1/e/b*ln(tanh(1/2*e*x+1/
2*d)+1)*B-1/e/b*ln(tanh(1/2*e*x+1/2*d)+1)*C-1/e/b*ln(tanh(1/2*e*x+1/2*d)-1)*B-1/e/b*ln(tanh(1/2*e*x+1/2*d)-1)*
C

________________________________________________________________________________________

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)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.0403, size = 948, normalized size = 11.02 \begin{align*} \left [\frac{{\left ({\left (B - C\right )} a^{2} -{\left (B - C\right )} b^{2}\right )} e x -{\left (B a - A b\right )} \sqrt{a^{2} - b^{2}} \log \left (\frac{b^{2} \cosh \left (e x + d\right )^{2} + b^{2} \sinh \left (e x + d\right )^{2} + 2 \, a b \cosh \left (e x + d\right ) + 2 \, a^{2} - b^{2} + 2 \,{\left (b^{2} \cosh \left (e x + d\right ) + a b\right )} \sinh \left (e x + d\right ) - 2 \, \sqrt{a^{2} - b^{2}}{\left (b \cosh \left (e x + d\right ) + b \sinh \left (e x + d\right ) + a\right )}}{b \cosh \left (e x + d\right )^{2} + b \sinh \left (e x + d\right )^{2} + 2 \, a \cosh \left (e x + d\right ) + 2 \,{\left (b \cosh \left (e x + d\right ) + a\right )} \sinh \left (e x + d\right ) + b}\right ) +{\left (C a^{2} - C b^{2}\right )} \log \left (\frac{2 \,{\left (b \cosh \left (e x + d\right ) + a\right )}}{\cosh \left (e x + d\right ) - \sinh \left (e x + d\right )}\right )}{{\left (a^{2} b - b^{3}\right )} e}, \frac{{\left ({\left (B - C\right )} a^{2} -{\left (B - C\right )} b^{2}\right )} e x + 2 \,{\left (B a - A b\right )} \sqrt{-a^{2} + b^{2}} \arctan \left (-\frac{\sqrt{-a^{2} + b^{2}}{\left (b \cosh \left (e x + d\right ) + b \sinh \left (e x + d\right ) + a\right )}}{a^{2} - b^{2}}\right ) +{\left (C a^{2} - C b^{2}\right )} \log \left (\frac{2 \,{\left (b \cosh \left (e x + d\right ) + a\right )}}{\cosh \left (e x + d\right ) - \sinh \left (e x + d\right )}\right )}{{\left (a^{2} b - b^{3}\right )} e}\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)),x, algorithm="fricas")

[Out]

[(((B - C)*a^2 - (B - C)*b^2)*e*x - (B*a - A*b)*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)) + (C*a^2 - C*b^2)*log(2*(b*cosh(e*x + d) + a)/(cosh(e*x + d) - sinh(e*x + d))))/((a
^2*b - b^3)*e), (((B - C)*a^2 - (B - C)*b^2)*e*x + 2*(B*a - A*b)*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)) + (C*a^2 - C*b^2)*log(2*(b*cosh(e*x + d) + a)/(cosh(e*x + d)
 - sinh(e*x + d))))/((a^2*b - b^3)*e)]

________________________________________________________________________________________

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)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.22631, size = 135, normalized size = 1.57 \begin{align*} \frac{{\left (x e + d\right )}{\left (B - C\right )} e^{\left (-1\right )}}{b} + \frac{C e^{\left (-1\right )} \log \left (b e^{\left (2 \, x e + 2 \, d\right )} + 2 \, a e^{\left (x e + d\right )} + b\right )}{b} - \frac{2 \,{\left (B a - A b\right )} \arctan \left (\frac{b e^{\left (x e + d\right )} + a}{\sqrt{-a^{2} + b^{2}}}\right ) e^{\left (-1\right )}}{\sqrt{-a^{2} + b^{2}} b} \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)),x, algorithm="giac")

[Out]

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