Integrand size = 11, antiderivative size = 33 \[ \int \frac {\coth (x)}{a+a \cosh (x)} \, dx=-\frac {\text {arctanh}(\cosh (x))}{2 a}-\frac {\coth (x) \text {csch}(x)}{2 a}+\frac {\text {csch}^2(x)}{2 a} \] Output:
-1/2*arctanh(cosh(x))/a-1/2*coth(x)*csch(x)/a+1/2*csch(x)^2/a
Time = 0.03 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.27 \[ \int \frac {\coth (x)}{a+a \cosh (x)} \, dx=-\frac {1+2 \cosh ^2\left (\frac {x}{2}\right ) \left (\log \left (\cosh \left (\frac {x}{2}\right )\right )-\log \left (\sinh \left (\frac {x}{2}\right )\right )\right )}{2 a (1+\cosh (x))} \] Input:
Integrate[Coth[x]/(a + a*Cosh[x]),x]
Output:
-1/2*(1 + 2*Cosh[x/2]^2*(Log[Cosh[x/2]] - Log[Sinh[x/2]]))/(a*(1 + Cosh[x] ))
Result contains complex when optimal does not.
Time = 0.38 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.27, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.182, Rules used = {3042, 26, 3185, 26, 3042, 26, 3086, 15, 3091, 26, 3042, 26, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\coth (x)}{a \cosh (x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {i \tan \left (-\frac {\pi }{2}+i x\right )}{a-a \sin \left (-\frac {\pi }{2}+i x\right )}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \int \frac {\tan \left (i x-\frac {\pi }{2}\right )}{a-a \sin \left (i x-\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3185 |
\(\displaystyle -i \left (\frac {\int i \coth ^2(x) \text {csch}(x)dx}{a}+\frac {\int -i \coth (x) \text {csch}^2(x)dx}{a}\right )\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \left (\frac {i \int \coth ^2(x) \text {csch}(x)dx}{a}-\frac {i \int \coth (x) \text {csch}^2(x)dx}{a}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -i \left (\frac {i \int -i \sec \left (i x-\frac {\pi }{2}\right ) \tan \left (i x-\frac {\pi }{2}\right )^2dx}{a}-\frac {i \int i \sec \left (i x-\frac {\pi }{2}\right )^2 \tan \left (i x-\frac {\pi }{2}\right )dx}{a}\right )\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \left (\frac {\int \sec \left (i x-\frac {\pi }{2}\right )^2 \tan \left (i x-\frac {\pi }{2}\right )dx}{a}+\frac {\int \sec \left (i x-\frac {\pi }{2}\right ) \tan \left (i x-\frac {\pi }{2}\right )^2dx}{a}\right )\) |
\(\Big \downarrow \) 3086 |
\(\displaystyle -i \left (\frac {\int \sec \left (i x-\frac {\pi }{2}\right ) \tan \left (i x-\frac {\pi }{2}\right )^2dx}{a}-\frac {i \int -i \text {csch}(x)d(-i \text {csch}(x))}{a}\right )\) |
\(\Big \downarrow \) 15 |
\(\displaystyle -i \left (\frac {\int \sec \left (i x-\frac {\pi }{2}\right ) \tan \left (i x-\frac {\pi }{2}\right )^2dx}{a}+\frac {i \text {csch}^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 3091 |
\(\displaystyle -i \left (\frac {-\frac {1}{2} \int -i \text {csch}(x)dx-\frac {1}{2} i \coth (x) \text {csch}(x)}{a}+\frac {i \text {csch}^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \left (\frac {\frac {1}{2} i \int \text {csch}(x)dx-\frac {1}{2} i \coth (x) \text {csch}(x)}{a}+\frac {i \text {csch}^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -i \left (\frac {\frac {1}{2} i \int i \csc (i x)dx-\frac {1}{2} i \coth (x) \text {csch}(x)}{a}+\frac {i \text {csch}^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \left (\frac {-\frac {1}{2} \int \csc (i x)dx-\frac {1}{2} i \coth (x) \text {csch}(x)}{a}+\frac {i \text {csch}^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle -i \left (\frac {-\frac {1}{2} i \text {arctanh}(\cosh (x))-\frac {1}{2} i \coth (x) \text {csch}(x)}{a}+\frac {i \text {csch}^2(x)}{2 a}\right )\) |
Input:
Int[Coth[x]/(a + a*Cosh[x]),x]
Output:
(-I)*(((I/2)*Csch[x]^2)/a + ((-1/2*I)*ArcTanh[Cosh[x]] - (I/2)*Coth[x]*Csc h[x])/a)
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( n_.), x_Symbol] :> Simp[a/f Subst[Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2 ), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2 ] && !(IntegerQ[m/2] && LtQ[0, m, n + 1])
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( n_), x_Symbol] :> Simp[b*(a*Sec[e + f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Simp[b^2*((n - 1)/(m + n - 1)) Int[(a*Sec[e + f*x])^m*( b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] & & NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]
Int[((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*( x_)]), x_Symbol] :> Simp[1/a Int[Sec[e + f*x]^2*(g*Tan[e + f*x])^p, x], x ] - Simp[1/(b*g) Int[Sec[e + f*x]*(g*Tan[e + f*x])^(p + 1), x], x] /; Fre eQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[p, -1]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.27 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.61
method | result | size |
default | \(\frac {\frac {\tanh \left (\frac {x}{2}\right )^{2}}{2}+\ln \left (\tanh \left (\frac {x}{2}\right )\right )}{2 a}\) | \(20\) |
risch | \(-\frac {{\mathrm e}^{x}}{\left ({\mathrm e}^{x}+1\right )^{2} a}+\frac {\ln \left ({\mathrm e}^{x}-1\right )}{2 a}-\frac {\ln \left ({\mathrm e}^{x}+1\right )}{2 a}\) | \(35\) |
Input:
int(coth(x)/(a+cosh(x)*a),x,method=_RETURNVERBOSE)
Output:
1/2/a*(1/2*tanh(1/2*x)^2+ln(tanh(1/2*x)))
Leaf count of result is larger than twice the leaf count of optimal. 103 vs. \(2 (27) = 54\).
Time = 0.08 (sec) , antiderivative size = 103, normalized size of antiderivative = 3.12 \[ \int \frac {\coth (x)}{a+a \cosh (x)} \, dx=-\frac {{\left (\cosh \left (x\right )^{2} + 2 \, {\left (\cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) + 1\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) - {\left (\cosh \left (x\right )^{2} + 2 \, {\left (\cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) + 1\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right ) + 2 \, \cosh \left (x\right ) + 2 \, \sinh \left (x\right )}{2 \, {\left (a \cosh \left (x\right )^{2} + a \sinh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + 2 \, {\left (a \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) + a\right )}} \] Input:
integrate(coth(x)/(a+a*cosh(x)),x, algorithm="fricas")
Output:
-1/2*((cosh(x)^2 + 2*(cosh(x) + 1)*sinh(x) + sinh(x)^2 + 2*cosh(x) + 1)*lo g(cosh(x) + sinh(x) + 1) - (cosh(x)^2 + 2*(cosh(x) + 1)*sinh(x) + sinh(x)^ 2 + 2*cosh(x) + 1)*log(cosh(x) + sinh(x) - 1) + 2*cosh(x) + 2*sinh(x))/(a* cosh(x)^2 + a*sinh(x)^2 + 2*a*cosh(x) + 2*(a*cosh(x) + a)*sinh(x) + a)
\[ \int \frac {\coth (x)}{a+a \cosh (x)} \, dx=\frac {\int \frac {\coth {\left (x \right )}}{\cosh {\left (x \right )} + 1}\, dx}{a} \] Input:
integrate(coth(x)/(a+a*cosh(x)),x)
Output:
Integral(coth(x)/(cosh(x) + 1), x)/a
Time = 0.03 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.45 \[ \int \frac {\coth (x)}{a+a \cosh (x)} \, dx=-\frac {e^{\left (-x\right )}}{2 \, a e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a} - \frac {\log \left (e^{\left (-x\right )} + 1\right )}{2 \, a} + \frac {\log \left (e^{\left (-x\right )} - 1\right )}{2 \, a} \] Input:
integrate(coth(x)/(a+a*cosh(x)),x, algorithm="maxima")
Output:
-e^(-x)/(2*a*e^(-x) + a*e^(-2*x) + a) - 1/2*log(e^(-x) + 1)/a + 1/2*log(e^ (-x) - 1)/a
Time = 0.11 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.58 \[ \int \frac {\coth (x)}{a+a \cosh (x)} \, dx=-\frac {\log \left (e^{\left (-x\right )} + e^{x} + 2\right )}{4 \, a} + \frac {\log \left (e^{\left (-x\right )} + e^{x} - 2\right )}{4 \, a} + \frac {e^{\left (-x\right )} + e^{x} - 2}{4 \, a {\left (e^{\left (-x\right )} + e^{x} + 2\right )}} \] Input:
integrate(coth(x)/(a+a*cosh(x)),x, algorithm="giac")
Output:
-1/4*log(e^(-x) + e^x + 2)/a + 1/4*log(e^(-x) + e^x - 2)/a + 1/4*(e^(-x) + e^x - 2)/(a*(e^(-x) + e^x + 2))
Time = 1.88 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.55 \[ \int \frac {\coth (x)}{a+a \cosh (x)} \, dx=\frac {1}{a\,\left ({\mathrm {e}}^{2\,x}+2\,{\mathrm {e}}^x+1\right )}-\frac {1}{a\,\left ({\mathrm {e}}^x+1\right )}-\frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\sqrt {-a^2}}{a}\right )}{\sqrt {-a^2}} \] Input:
int(coth(x)/(a + a*cosh(x)),x)
Output:
1/(a*(exp(2*x) + 2*exp(x) + 1)) - 1/(a*(exp(x) + 1)) - atan((exp(x)*(-a^2) ^(1/2))/a)/(-a^2)^(1/2)
Time = 0.23 (sec) , antiderivative size = 87, normalized size of antiderivative = 2.64 \[ \int \frac {\coth (x)}{a+a \cosh (x)} \, dx=\frac {e^{2 x} \mathrm {log}\left (e^{x}-1\right )-e^{2 x} \mathrm {log}\left (e^{x}+1\right )+e^{2 x}+2 e^{x} \mathrm {log}\left (e^{x}-1\right )-2 e^{x} \mathrm {log}\left (e^{x}+1\right )+\mathrm {log}\left (e^{x}-1\right )-\mathrm {log}\left (e^{x}+1\right )+1}{2 a \left (e^{2 x}+2 e^{x}+1\right )} \] Input:
int(coth(x)/(a+a*cosh(x)),x)
Output:
(e**(2*x)*log(e**x - 1) - e**(2*x)*log(e**x + 1) + e**(2*x) + 2*e**x*log(e **x - 1) - 2*e**x*log(e**x + 1) + log(e**x - 1) - log(e**x + 1) + 1)/(2*a* (e**(2*x) + 2*e**x + 1))