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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.168539, antiderivative size = 81, 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 = {4376, 2735, 2660, 618, 204, 2668, 31} \[ -\frac{2 (A c-a C) \tanh ^{-1}\left (\frac{c-a \tanh \left (\frac{1}{2} (d+e x)\right )}{\sqrt{a^2+c^2}}\right )}{c e \sqrt{a^2+c^2}}+\frac{B \log (a+c \sinh (d+e x))}{c e}+\frac{C x}{c} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 4376

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

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 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*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 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 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 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+c \sinh (d+e x)} \, dx &=B \int \frac{\cosh (d+e x)}{a+c \sinh (d+e x)} \, dx+\int \frac{A+C \sinh (d+e x)}{a+c \sinh (d+e x)} \, dx\\ &=\frac{C x}{c}-\frac{(i (i A c-i a C)) \int \frac{1}{a+c \sinh (d+e x)} \, dx}{c}+\frac{B \operatorname{Subst}\left (\int \frac{1}{a+x} \, dx,x,c \sinh (d+e x)\right )}{c e}\\ &=\frac{C x}{c}+\frac{B \log (a+c \sinh (d+e x))}{c e}-\frac{(2 i (A c-a C)) \operatorname{Subst}\left (\int \frac{1}{a-2 i c x+a x^2} \, dx,x,\tan \left (\frac{1}{2} (i d+i e x)\right )\right )}{c e}\\ &=\frac{C x}{c}+\frac{B \log (a+c \sinh (d+e x))}{c e}+\frac{(4 i (A c-a C)) \operatorname{Subst}\left (\int \frac{1}{-4 \left (a^2+c^2\right )-x^2} \, dx,x,-2 i c+2 a \tan \left (\frac{1}{2} (i d+i e x)\right )\right )}{c e}\\ &=\frac{C x}{c}-\frac{2 (A c-a C) \tanh ^{-1}\left (\frac{c-a \tanh \left (\frac{1}{2} (d+e x)\right )}{\sqrt{a^2+c^2}}\right )}{c \sqrt{a^2+c^2} e}+\frac{B \log (a+c \sinh (d+e x))}{c e}\\ \end{align*}

Mathematica [A]  time = 0.283816, size = 85, normalized size = 1.05 \[ \frac{\frac{2 (A c-a C) \tan ^{-1}\left (\frac{c-a \tanh \left (\frac{1}{2} (d+e x)\right )}{\sqrt{-a^2-c^2}}\right )}{\sqrt{-a^2-c^2}}+B \log (a+c \sinh (d+e x))+C (d+e x)}{c e} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.056, size = 213, normalized size = 2.6 \begin{align*}{\frac{B}{ec}\ln \left ( a \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) \right ) ^{2}-2\,c\tanh \left ( 1/2\,ex+d/2 \right ) -a \right ) }+2\,{\frac{A}{e\sqrt{{a}^{2}+{c}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,a\tanh \left ( 1/2\,ex+d/2 \right ) -2\,c}{\sqrt{{a}^{2}+{c}^{2}}}} \right ) }-2\,{\frac{Ca}{ec\sqrt{{a}^{2}+{c}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,a\tanh \left ( 1/2\,ex+d/2 \right ) -2\,c}{\sqrt{{a}^{2}+{c}^{2}}}} \right ) }-{\frac{B}{ec}\ln \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) +1 \right ) }+{\frac{C}{ec}\ln \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) +1 \right ) }-{\frac{B}{ec}\ln \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) -1 \right ) }-{\frac{C}{ec}\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+c*sinh(e*x+d)),x)

[Out]

1/e/c*B*ln(a*tanh(1/2*e*x+1/2*d)^2-2*c*tanh(1/2*e*x+1/2*d)-a)+2/e/(a^2+c^2)^(1/2)*arctanh(1/2*(2*a*tanh(1/2*e*
x+1/2*d)-2*c)/(a^2+c^2)^(1/2))*A-2/e/c/(a^2+c^2)^(1/2)*arctanh(1/2*(2*a*tanh(1/2*e*x+1/2*d)-2*c)/(a^2+c^2)^(1/
2))*C*a-1/e/c*ln(tanh(1/2*e*x+1/2*d)+1)*B+1/e/c*ln(tanh(1/2*e*x+1/2*d)+1)*C-1/e/c*ln(tanh(1/2*e*x+1/2*d)-1)*B-
1/e/c*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+c*sinh(e*x+d)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

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

[Out]

-(((B - C)*a^2 + (B - C)*c^2)*e*x + (C*a - A*c)*sqrt(a^2 + c^2)*log((c^2*cosh(e*x + d)^2 + c^2*sinh(e*x + d)^2
 + 2*a*c*cosh(e*x + d) + 2*a^2 + c^2 + 2*(c^2*cosh(e*x + d) + a*c)*sinh(e*x + d) - 2*sqrt(a^2 + c^2)*(c*cosh(e
*x + d) + c*sinh(e*x + d) + a))/(c*cosh(e*x + d)^2 + c*sinh(e*x + d)^2 + 2*a*cosh(e*x + d) + 2*(c*cosh(e*x + d
) + a)*sinh(e*x + d) - c)) - (B*a^2 + B*c^2)*log(2*(c*sinh(e*x + d) + a)/(cosh(e*x + d) - sinh(e*x + d))))/((a
^2*c + c^3)*e)

________________________________________________________________________________________

Sympy [A]  time = 130.497, size = 1358, normalized size = 16.77 \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+c*sinh(e*x+d)),x)

[Out]

Piecewise((zoo*x*(A + B*cosh(d) + C*sinh(d))/sinh(d), Eq(a, 0) & Eq(c, 0) & Eq(e, 0)), ((A*log(tanh(d/2 + e*x/
2))/e + B*x - 2*B*log(tanh(d/2 + e*x/2) + 1)/e + B*log(tanh(d/2 + e*x/2))/e + C*x)/c, Eq(a, 0)), (-2*A*tanh(d/
2 + e*x/2)/(-c*e*tanh(d/2 + e*x/2) + I*c*e) - B*e*x*tanh(d/2 + e*x/2)/(-c*e*tanh(d/2 + e*x/2) + I*c*e) + I*B*e
*x/(-c*e*tanh(d/2 + e*x/2) + I*c*e) + 2*B*log(tanh(d/2 + e*x/2) + 1)*tanh(d/2 + e*x/2)/(-c*e*tanh(d/2 + e*x/2)
 + I*c*e) - 2*I*B*log(tanh(d/2 + e*x/2) + 1)/(-c*e*tanh(d/2 + e*x/2) + I*c*e) - 2*B*log(tanh(d/2 + e*x/2) - I)
*tanh(d/2 + e*x/2)/(-c*e*tanh(d/2 + e*x/2) + I*c*e) + 2*I*B*log(tanh(d/2 + e*x/2) - I)/(-c*e*tanh(d/2 + e*x/2)
 + I*c*e) - C*e*x*tanh(d/2 + e*x/2)/(-c*e*tanh(d/2 + e*x/2) + I*c*e) + I*C*e*x/(-c*e*tanh(d/2 + e*x/2) + I*c*e
) - 2*I*C*tanh(d/2 + e*x/2)/(-c*e*tanh(d/2 + e*x/2) + I*c*e), Eq(a, -I*c)), (2*A*tanh(d/2 + e*x/2)/(c*e*tanh(d
/2 + e*x/2) + I*c*e) + B*e*x*tanh(d/2 + e*x/2)/(c*e*tanh(d/2 + e*x/2) + I*c*e) + I*B*e*x/(c*e*tanh(d/2 + e*x/2
) + I*c*e) - 2*B*log(tanh(d/2 + e*x/2) + 1)*tanh(d/2 + e*x/2)/(c*e*tanh(d/2 + e*x/2) + I*c*e) - 2*I*B*log(tanh
(d/2 + e*x/2) + 1)/(c*e*tanh(d/2 + e*x/2) + I*c*e) + 2*B*log(tanh(d/2 + e*x/2) + I)*tanh(d/2 + e*x/2)/(c*e*tan
h(d/2 + e*x/2) + I*c*e) + 2*I*B*log(tanh(d/2 + e*x/2) + I)/(c*e*tanh(d/2 + e*x/2) + I*c*e) + C*e*x*tanh(d/2 +
e*x/2)/(c*e*tanh(d/2 + e*x/2) + I*c*e) + I*C*e*x/(c*e*tanh(d/2 + e*x/2) + I*c*e) - 2*I*C*tanh(d/2 + e*x/2)/(c*
e*tanh(d/2 + e*x/2) + I*c*e), Eq(a, I*c)), ((A*x + B*sinh(d + e*x)/e + C*cosh(d + e*x)/e)/a, Eq(c, 0)), (x*(A
+ B*cosh(d) + C*sinh(d))/(a + c*sinh(d)), Eq(e, 0)), (-A*c*sqrt(a**2 + c**2)*log(tanh(d/2 + e*x/2) - c/a - sqr
t(a**2 + c**2)/a)/(a**2*c*e + c**3*e) + A*c*sqrt(a**2 + c**2)*log(tanh(d/2 + e*x/2) - c/a + sqrt(a**2 + c**2)/
a)/(a**2*c*e + c**3*e) + B*a**2*e*x/(a**2*c*e + c**3*e) - 2*B*a**2*log(tanh(d/2 + e*x/2) + 1)/(a**2*c*e + c**3
*e) + B*a**2*log(tanh(d/2 + e*x/2) - c/a - sqrt(a**2 + c**2)/a)/(a**2*c*e + c**3*e) + B*a**2*log(tanh(d/2 + e*
x/2) - c/a + sqrt(a**2 + c**2)/a)/(a**2*c*e + c**3*e) + B*c**2*e*x/(a**2*c*e + c**3*e) - 2*B*c**2*log(tanh(d/2
 + e*x/2) + 1)/(a**2*c*e + c**3*e) + B*c**2*log(tanh(d/2 + e*x/2) - c/a - sqrt(a**2 + c**2)/a)/(a**2*c*e + c**
3*e) + B*c**2*log(tanh(d/2 + e*x/2) - c/a + sqrt(a**2 + c**2)/a)/(a**2*c*e + c**3*e) + C*a**2*e*x/(a**2*c*e +
c**3*e) + C*a*sqrt(a**2 + c**2)*log(tanh(d/2 + e*x/2) - c/a - sqrt(a**2 + c**2)/a)/(a**2*c*e + c**3*e) - C*a*s
qrt(a**2 + c**2)*log(tanh(d/2 + e*x/2) - c/a + sqrt(a**2 + c**2)/a)/(a**2*c*e + c**3*e) + C*c**2*e*x/(a**2*c*e
 + c**3*e), True))

________________________________________________________________________________________

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

[Out]

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