Integrand size = 13, antiderivative size = 28 \[ \int \frac {\text {sech}^2(x)}{a+a \cosh (x)} \, dx=-\frac {\arctan (\sinh (x))}{a}+\frac {2 \tanh (x)}{a}-\frac {\tanh (x)}{a+a \cosh (x)} \] Output:
-arctan(sinh(x))/a+2*tanh(x)/a-tanh(x)/(a+a*cosh(x))
Time = 0.15 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.54 \[ \int \frac {\text {sech}^2(x)}{a+a \cosh (x)} \, dx=\frac {2 \cosh \left (\frac {x}{2}\right ) \left (\sinh \left (\frac {x}{2}\right )+\cosh \left (\frac {x}{2}\right ) \left (-2 \arctan \left (\tanh \left (\frac {x}{2}\right )\right )+\tanh (x)\right )\right )}{a (1+\cosh (x))} \] Input:
Integrate[Sech[x]^2/(a + a*Cosh[x]),x]
Output:
(2*Cosh[x/2]*(Sinh[x/2] + Cosh[x/2]*(-2*ArcTan[Tanh[x/2]] + Tanh[x])))/(a* (1 + Cosh[x]))
Time = 0.40 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.04, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.692, Rules used = {3042, 3247, 25, 3042, 3227, 3042, 4254, 24, 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 {\text {sech}^2(x)}{a \cosh (x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin \left (\frac {\pi }{2}+i x\right )^2 \left (a+a \sin \left (\frac {\pi }{2}+i x\right )\right )}dx\) |
\(\Big \downarrow \) 3247 |
\(\displaystyle -\frac {\int -\left ((2 a-a \cosh (x)) \text {sech}^2(x)\right )dx}{a^2}-\frac {\tanh (x)}{a \cosh (x)+a}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int (2 a-a \cosh (x)) \text {sech}^2(x)dx}{a^2}-\frac {\tanh (x)}{a \cosh (x)+a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\tanh (x)}{a \cosh (x)+a}+\frac {\int \frac {2 a-a \sin \left (i x+\frac {\pi }{2}\right )}{\sin \left (i x+\frac {\pi }{2}\right )^2}dx}{a^2}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {2 a \int \text {sech}^2(x)dx-a \int \text {sech}(x)dx}{a^2}-\frac {\tanh (x)}{a \cosh (x)+a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\tanh (x)}{a \cosh (x)+a}+\frac {2 a \int \csc \left (i x+\frac {\pi }{2}\right )^2dx-a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{a^2}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle -\frac {\tanh (x)}{a \cosh (x)+a}+\frac {2 i a \int 1d(-i \tanh (x))-a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{a^2}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle -\frac {\tanh (x)}{a \cosh (x)+a}+\frac {2 a \tanh (x)-a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{a^2}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {2 a \tanh (x)-a \arctan (\sinh (x))}{a^2}-\frac {\tanh (x)}{a \cosh (x)+a}\) |
Input:
Int[Sech[x]^2/(a + a*Cosh[x]),x]
Output:
-(Tanh[x]/(a + a*Cosh[x])) + (-(a*ArcTan[Sinh[x]]) + 2*a*Tanh[x])/a^2
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-b^2)*Cos[e + f*x]*((c + d*Sin[e + f*x])^( n + 1)/(a*f*(b*c - a*d)*(a + b*Sin[e + f*x]))), x] + Simp[d/(a*(b*c - a*d)) Int[(c + d*Sin[e + f*x])^n*(a*n - b*(n + 1)*Sin[e + f*x]), x], x] /; Fre eQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[ c^2 - d^2, 0] && LtQ[n, 0] && (IntegerQ[2*n] || EqQ[c, 0])
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.51 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.18
method | result | size |
default | \(\frac {\tanh \left (\frac {x}{2}\right )+\frac {2 \tanh \left (\frac {x}{2}\right )}{\tanh \left (\frac {x}{2}\right )^{2}+1}-2 \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a}\) | \(33\) |
parallelrisch | \(\frac {i \cosh \left (x \right ) \ln \left (\tanh \left (\frac {x}{2}\right )-i\right )-i \cosh \left (x \right ) \ln \left (\tanh \left (\frac {x}{2}\right )+i\right )+2 \tanh \left (\frac {x}{2}\right ) \cosh \left (x \right )+\tanh \left (\frac {x}{2}\right )}{\cosh \left (x \right ) a}\) | \(48\) |
risch | \(-\frac {2 \left ({\mathrm e}^{2 x}+{\mathrm e}^{x}+2\right )}{\left ({\mathrm e}^{2 x}+1\right ) a \left ({\mathrm e}^{x}+1\right )}+\frac {i \ln \left ({\mathrm e}^{x}-i\right )}{a}-\frac {i \ln \left ({\mathrm e}^{x}+i\right )}{a}\) | \(53\) |
Input:
int(sech(x)^2/(a+cosh(x)*a),x,method=_RETURNVERBOSE)
Output:
1/a*(tanh(1/2*x)+2*tanh(1/2*x)/(tanh(1/2*x)^2+1)-2*arctan(tanh(1/2*x)))
Leaf count of result is larger than twice the leaf count of optimal. 127 vs. \(2 (28) = 56\).
Time = 0.08 (sec) , antiderivative size = 127, normalized size of antiderivative = 4.54 \[ \int \frac {\text {sech}^2(x)}{a+a \cosh (x)} \, dx=-\frac {2 \, {\left ({\left (\cosh \left (x\right )^{3} + {\left (3 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{2} + \sinh \left (x\right )^{3} + \cosh \left (x\right )^{2} + {\left (3 \, \cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \cosh \left (x\right ) + 1\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) + \cosh \left (x\right )^{2} + {\left (2 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \sinh \left (x\right )^{2} + \cosh \left (x\right ) + 2\right )}}{a \cosh \left (x\right )^{3} + a \sinh \left (x\right )^{3} + a \cosh \left (x\right )^{2} + {\left (3 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right )^{2} + a \cosh \left (x\right ) + {\left (3 \, a \cosh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) + a} \] Input:
integrate(sech(x)^2/(a+a*cosh(x)),x, algorithm="fricas")
Output:
-2*((cosh(x)^3 + (3*cosh(x) + 1)*sinh(x)^2 + sinh(x)^3 + cosh(x)^2 + (3*co sh(x)^2 + 2*cosh(x) + 1)*sinh(x) + cosh(x) + 1)*arctan(cosh(x) + sinh(x)) + cosh(x)^2 + (2*cosh(x) + 1)*sinh(x) + sinh(x)^2 + cosh(x) + 2)/(a*cosh(x )^3 + a*sinh(x)^3 + a*cosh(x)^2 + (3*a*cosh(x) + a)*sinh(x)^2 + a*cosh(x) + (3*a*cosh(x)^2 + 2*a*cosh(x) + a)*sinh(x) + a)
\[ \int \frac {\text {sech}^2(x)}{a+a \cosh (x)} \, dx=\frac {\int \frac {\operatorname {sech}^{2}{\left (x \right )}}{\cosh {\left (x \right )} + 1}\, dx}{a} \] Input:
integrate(sech(x)**2/(a+a*cosh(x)),x)
Output:
Integral(sech(x)**2/(cosh(x) + 1), x)/a
Time = 0.13 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.61 \[ \int \frac {\text {sech}^2(x)}{a+a \cosh (x)} \, dx=\frac {2 \, {\left (e^{\left (-x\right )} + e^{\left (-2 \, x\right )} + 2\right )}}{a e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a e^{\left (-3 \, x\right )} + a} + \frac {2 \, \arctan \left (e^{\left (-x\right )}\right )}{a} \] Input:
integrate(sech(x)^2/(a+a*cosh(x)),x, algorithm="maxima")
Output:
2*(e^(-x) + e^(-2*x) + 2)/(a*e^(-x) + a*e^(-2*x) + a*e^(-3*x) + a) + 2*arc tan(e^(-x))/a
Time = 0.12 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.29 \[ \int \frac {\text {sech}^2(x)}{a+a \cosh (x)} \, dx=-\frac {2 \, \arctan \left (e^{x}\right )}{a} - \frac {2 \, {\left (e^{\left (2 \, x\right )} + e^{x} + 2\right )}}{a {\left (e^{\left (3 \, x\right )} + e^{\left (2 \, x\right )} + e^{x} + 1\right )}} \] Input:
integrate(sech(x)^2/(a+a*cosh(x)),x, algorithm="giac")
Output:
-2*arctan(e^x)/a - 2*(e^(2*x) + e^x + 2)/(a*(e^(3*x) + e^(2*x) + e^x + 1))
Time = 1.91 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.07 \[ \int \frac {\text {sech}^2(x)}{a+a \cosh (x)} \, dx=-\frac {\frac {2\,{\mathrm {e}}^{2\,x}}{a}+\frac {4}{a}+\frac {2\,{\mathrm {e}}^x}{a}}{{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{3\,x}+{\mathrm {e}}^x+1}-\frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\sqrt {a^2}}{a}\right )}{\sqrt {a^2}} \] Input:
int(1/(cosh(x)^2*(a + a*cosh(x))),x)
Output:
- ((2*exp(2*x))/a + 4/a + (2*exp(x))/a)/(exp(2*x) + exp(3*x) + exp(x) + 1) - (2*atan((exp(x)*(a^2)^(1/2))/a))/(a^2)^(1/2)
Time = 0.21 (sec) , antiderivative size = 66, normalized size of antiderivative = 2.36 \[ \int \frac {\text {sech}^2(x)}{a+a \cosh (x)} \, dx=\frac {-2 e^{3 x} \mathit {atan} \left (e^{x}\right )-2 e^{2 x} \mathit {atan} \left (e^{x}\right )-2 e^{x} \mathit {atan} \left (e^{x}\right )-2 \mathit {atan} \left (e^{x}\right )+2 e^{3 x}-2}{a \left (e^{3 x}+e^{2 x}+e^{x}+1\right )} \] Input:
int(sech(x)^2/(a+a*cosh(x)),x)
Output:
(2*( - e**(3*x)*atan(e**x) - e**(2*x)*atan(e**x) - e**x*atan(e**x) - atan( e**x) + e**(3*x) - 1))/(a*(e**(3*x) + e**(2*x) + e**x + 1))