3.1023 \(\int \frac {(a+b \coth (x)) \text {csch}^2(x)}{c+d \coth (x)} \, dx\)

Optimal. Leaf size=28 \[ \frac {(b c-a d) \log (c+d \coth (x))}{d^2}-\frac {b \coth (x)}{d} \]

[Out]

-b*coth(x)/d+(-a*d+b*c)*ln(c+d*coth(x))/d^2

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {4344, 43} \[ \frac {(b c-a d) \log (c+d \coth (x))}{d^2}-\frac {b \coth (x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Coth[x])*Csch[x]^2)/(c + d*Coth[x]),x]

[Out]

-((b*Coth[x])/d) + ((b*c - a*d)*Log[c + d*Coth[x]])/d^2

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 4344

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^2, x_Symbol] :> With[{d = FreeFactors[Cot[c*(a + b*x)], x]}, -Dist[d
/(b*c), Subst[Int[SubstFor[1, Cot[c*(a + b*x)]/d, u, x], x], x, Cot[c*(a + b*x)]/d], x] /; FunctionOfQ[Cot[c*(
a + b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && NonsumQ[u] && (EqQ[F, Csc] || EqQ[F, csc])

Rubi steps

\begin {align*} \int \frac {(a+b \coth (x)) \text {csch}^2(x)}{c+d \coth (x)} \, dx &=-\operatorname {Subst}\left (\int \frac {a+b x}{c+d x} \, dx,x,\coth (x)\right )\\ &=-\operatorname {Subst}\left (\int \left (\frac {b}{d}+\frac {-b c+a d}{d (c+d x)}\right ) \, dx,x,\coth (x)\right )\\ &=-\frac {b \coth (x)}{d}+\frac {(b c-a d) \log (c+d \coth (x))}{d^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.35, size = 56, normalized size = 2.00 \[ \frac {\sinh (x) (a+b \coth (x)) (-(b c-a d) (\log (\sinh (x))-\log (c \sinh (x)+d \cosh (x)))-b d \coth (x))}{d^2 (a \sinh (x)+b \cosh (x))} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Coth[x])*Csch[x]^2)/(c + d*Coth[x]),x]

[Out]

((a + b*Coth[x])*(-(b*d*Coth[x]) - (b*c - a*d)*(Log[Sinh[x]] - Log[d*Cosh[x] + c*Sinh[x]]))*Sinh[x])/(d^2*(b*C
osh[x] + a*Sinh[x]))

________________________________________________________________________________________

fricas [B]  time = 0.48, size = 174, normalized size = 6.21 \[ -\frac {2 \, b d - {\left ({\left (b c - a d\right )} \cosh \relax (x)^{2} + 2 \, {\left (b c - a d\right )} \cosh \relax (x) \sinh \relax (x) + {\left (b c - a d\right )} \sinh \relax (x)^{2} - b c + a d\right )} \log \left (\frac {2 \, {\left (d \cosh \relax (x) + c \sinh \relax (x)\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) + {\left ({\left (b c - a d\right )} \cosh \relax (x)^{2} + 2 \, {\left (b c - a d\right )} \cosh \relax (x) \sinh \relax (x) + {\left (b c - a d\right )} \sinh \relax (x)^{2} - b c + a d\right )} \log \left (\frac {2 \, \sinh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right )}{d^{2} \cosh \relax (x)^{2} + 2 \, d^{2} \cosh \relax (x) \sinh \relax (x) + d^{2} \sinh \relax (x)^{2} - d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*coth(x))*csch(x)^2/(c+d*coth(x)),x, algorithm="fricas")

[Out]

-(2*b*d - ((b*c - a*d)*cosh(x)^2 + 2*(b*c - a*d)*cosh(x)*sinh(x) + (b*c - a*d)*sinh(x)^2 - b*c + a*d)*log(2*(d
*cosh(x) + c*sinh(x))/(cosh(x) - sinh(x))) + ((b*c - a*d)*cosh(x)^2 + 2*(b*c - a*d)*cosh(x)*sinh(x) + (b*c - a
*d)*sinh(x)^2 - b*c + a*d)*log(2*sinh(x)/(cosh(x) - sinh(x))))/(d^2*cosh(x)^2 + 2*d^2*cosh(x)*sinh(x) + d^2*si
nh(x)^2 - d^2)

________________________________________________________________________________________

giac [B]  time = 0.12, size = 113, normalized size = 4.04 \[ \frac {{\left (b c^{2} - a c d + b c d - a d^{2}\right )} \log \left ({\left | c e^{\left (2 \, x\right )} + d e^{\left (2 \, x\right )} - c + d \right |}\right )}{c d^{2} + d^{3}} - \frac {{\left (b c - a d\right )} \log \left ({\left | e^{\left (2 \, x\right )} - 1 \right |}\right )}{d^{2}} + \frac {b c e^{\left (2 \, x\right )} - a d e^{\left (2 \, x\right )} - b c + a d - 2 \, b d}{d^{2} {\left (e^{\left (2 \, x\right )} - 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*coth(x))*csch(x)^2/(c+d*coth(x)),x, algorithm="giac")

[Out]

(b*c^2 - a*c*d + b*c*d - a*d^2)*log(abs(c*e^(2*x) + d*e^(2*x) - c + d))/(c*d^2 + d^3) - (b*c - a*d)*log(abs(e^
(2*x) - 1))/d^2 + (b*c*e^(2*x) - a*d*e^(2*x) - b*c + a*d - 2*b*d)/(d^2*(e^(2*x) - 1))

________________________________________________________________________________________

maple [B]  time = 0.18, size = 94, normalized size = 3.36 \[ -\frac {b \tanh \left (\frac {x}{2}\right )}{2 d}-\frac {\ln \left (\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) d +2 c \tanh \left (\frac {x}{2}\right )+d \right ) a}{d}+\frac {\ln \left (\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) d +2 c \tanh \left (\frac {x}{2}\right )+d \right ) c b}{d^{2}}-\frac {b}{2 d \tanh \left (\frac {x}{2}\right )}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right ) a}{d}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right ) c b}{d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*coth(x))*csch(x)^2/(c+d*coth(x)),x)

[Out]

-1/2*b/d*tanh(1/2*x)-1/d*ln(tanh(1/2*x)^2*d+2*c*tanh(1/2*x)+d)*a+1/d^2*ln(tanh(1/2*x)^2*d+2*c*tanh(1/2*x)+d)*c
*b-1/2*b/d/tanh(1/2*x)+1/d*ln(tanh(1/2*x))*a-1/d^2*ln(tanh(1/2*x))*c*b

________________________________________________________________________________________

maxima [B]  time = 0.32, size = 77, normalized size = 2.75 \[ b {\left (\frac {c \log \left (-{\left (c - d\right )} e^{\left (-2 \, x\right )} + c + d\right )}{d^{2}} - \frac {c \log \left (e^{\left (-x\right )} + 1\right )}{d^{2}} - \frac {c \log \left (e^{\left (-x\right )} - 1\right )}{d^{2}} + \frac {2}{d e^{\left (-2 \, x\right )} - d}\right )} - \frac {a \log \left (d \coth \relax (x) + c\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*coth(x))*csch(x)^2/(c+d*coth(x)),x, algorithm="maxima")

[Out]

b*(c*log(-(c - d)*e^(-2*x) + c + d)/d^2 - c*log(e^(-x) + 1)/d^2 - c*log(e^(-x) - 1)/d^2 + 2/(d*e^(-2*x) - d))
- a*log(d*coth(x) + c)/d

________________________________________________________________________________________

mupad [B]  time = 2.16, size = 297, normalized size = 10.61 \[ \frac {2\,\mathrm {atan}\left ({\mathrm {e}}^{2\,x}\,\left (\frac {4\,\left (a\,d\,\sqrt {-d^4}-b\,c\,\sqrt {-d^4}\right )}{d^2\,\sqrt {{\left (a\,d-b\,c\right )}^2}\,\left (c+d\right )\,\left (c-d\right )\,\sqrt {-d^4}}-\frac {4\,c^2\,\sqrt {a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2}}{d^4\,\left (c+d\right )\,\left (c-d\right )\,\left (a\,d-b\,c\right )}\right )\,\left (\frac {d^2\,\sqrt {-d^4}}{4}+\frac {c\,d\,\sqrt {-d^4}}{4}\right )-\frac {4\,c\,\left (d^2\,\sqrt {a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2}-c\,d\,\sqrt {a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2}\right )\,\left (\frac {d^2\,\sqrt {-d^4}}{4}+\frac {c\,d\,\sqrt {-d^4}}{4}\right )}{d^5\,\left (c+d\right )\,\left (c-d\right )\,\left (a\,d-b\,c\right )}\right )\,\sqrt {a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2}}{\sqrt {-d^4}}-\frac {2\,b}{d\,\left ({\mathrm {e}}^{2\,x}-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*coth(x))/(sinh(x)^2*(c + d*coth(x))),x)

[Out]

(2*atan(exp(2*x)*((4*(a*d*(-d^4)^(1/2) - b*c*(-d^4)^(1/2)))/(d^2*((a*d - b*c)^2)^(1/2)*(c + d)*(c - d)*(-d^4)^
(1/2)) - (4*c^2*(a^2*d^2 + b^2*c^2 - 2*a*b*c*d)^(1/2))/(d^4*(c + d)*(c - d)*(a*d - b*c)))*((d^2*(-d^4)^(1/2))/
4 + (c*d*(-d^4)^(1/2))/4) - (4*c*(d^2*(a^2*d^2 + b^2*c^2 - 2*a*b*c*d)^(1/2) - c*d*(a^2*d^2 + b^2*c^2 - 2*a*b*c
*d)^(1/2))*((d^2*(-d^4)^(1/2))/4 + (c*d*(-d^4)^(1/2))/4))/(d^5*(c + d)*(c - d)*(a*d - b*c)))*(a^2*d^2 + b^2*c^
2 - 2*a*b*c*d)^(1/2))/(-d^4)^(1/2) - (2*b)/(d*(exp(2*x) - 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b \coth {\relax (x )}\right ) \operatorname {csch}^{2}{\relax (x )}}{c + d \coth {\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*coth(x))*csch(x)**2/(c+d*coth(x)),x)

[Out]

Integral((a + b*coth(x))*csch(x)**2/(c + d*coth(x)), x)

________________________________________________________________________________________