Integrand size = 13, antiderivative size = 41 \[ \int \frac {\cosh ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {3 x}{2 a}-\frac {2 \sinh (x)}{a}+\frac {3 \cosh (x) \sinh (x)}{2 a}-\frac {\cosh (x) \sinh (x)}{a+a \text {sech}(x)} \] Output:
3/2*x/a-2*sinh(x)/a+3/2*cosh(x)*sinh(x)/a-cosh(x)*sinh(x)/(a+a*sech(x))
Time = 0.03 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.10 \[ \int \frac {\cosh ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {\text {sech}\left (\frac {x}{2}\right ) \left (12 x \cosh \left (\frac {x}{2}\right )-12 \sinh \left (\frac {x}{2}\right )-3 \sinh \left (\frac {3 x}{2}\right )+\sinh \left (\frac {5 x}{2}\right )\right )}{8 a} \] Input:
Integrate[Cosh[x]^2/(a + a*Sech[x]),x]
Output:
(Sech[x/2]*(12*x*Cosh[x/2] - 12*Sinh[x/2] - 3*Sinh[(3*x)/2] + Sinh[(5*x)/2 ]))/(8*a)
Time = 0.42 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.02, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.692, Rules used = {3042, 4306, 25, 3042, 4274, 3042, 3115, 24, 3117}
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 {\cosh ^2(x)}{a \text {sech}(x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\csc \left (\frac {\pi }{2}+i x\right )^2 \left (a+a \csc \left (\frac {\pi }{2}+i x\right )\right )}dx\) |
\(\Big \downarrow \) 4306 |
\(\displaystyle -\frac {\int -\cosh ^2(x) (3 a-2 a \text {sech}(x))dx}{a^2}-\frac {\sinh (x) \cosh (x)}{a \text {sech}(x)+a}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \cosh ^2(x) (3 a-2 a \text {sech}(x))dx}{a^2}-\frac {\sinh (x) \cosh (x)}{a \text {sech}(x)+a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\sinh (x) \cosh (x)}{a \text {sech}(x)+a}+\frac {\int \frac {3 a-2 a \csc \left (i x+\frac {\pi }{2}\right )}{\csc \left (i x+\frac {\pi }{2}\right )^2}dx}{a^2}\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle \frac {3 a \int \cosh ^2(x)dx-2 a \int \cosh (x)dx}{a^2}-\frac {\sinh (x) \cosh (x)}{a \text {sech}(x)+a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\sinh (x) \cosh (x)}{a \text {sech}(x)+a}+\frac {3 a \int \sin \left (i x+\frac {\pi }{2}\right )^2dx-2 a \int \sin \left (i x+\frac {\pi }{2}\right )dx}{a^2}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle -\frac {\sinh (x) \cosh (x)}{a \text {sech}(x)+a}+\frac {3 a \left (\frac {\int 1dx}{2}+\frac {1}{2} \sinh (x) \cosh (x)\right )-2 a \int \sin \left (i x+\frac {\pi }{2}\right )dx}{a^2}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle -\frac {\sinh (x) \cosh (x)}{a \text {sech}(x)+a}+\frac {3 a \left (\frac {x}{2}+\frac {1}{2} \sinh (x) \cosh (x)\right )-2 a \int \sin \left (i x+\frac {\pi }{2}\right )dx}{a^2}\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle \frac {3 a \left (\frac {x}{2}+\frac {1}{2} \sinh (x) \cosh (x)\right )-2 a \sinh (x)}{a^2}-\frac {\sinh (x) \cosh (x)}{a \text {sech}(x)+a}\) |
Input:
Int[Cosh[x]^2/(a + a*Sech[x]),x]
Output:
-((Cosh[x]*Sinh[x])/(a + a*Sech[x])) + (-2*a*Sinh[x] + 3*a*(x/2 + (Cosh[x] *Sinh[x])/2))/a^2
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)/(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_)), x_Symbol] :> Simp[Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*(a + b*Csc[e + f*x]))), x] - Simp[1/a^2 Int[(d*Csc[e + f*x])^n*(a*(n - 1) - b*n*Csc[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && LtQ[n, 0 ]
Time = 0.17 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.59
method | result | size |
parallelrisch | \(\frac {6 x +\sinh \left (2 x \right )-4 \sinh \left (x \right )-4 \tanh \left (\frac {x}{2}\right )}{4 a}\) | \(24\) |
risch | \(\frac {{\mathrm e}^{3 x}-3 \,{\mathrm e}^{2 x}+20+3 \,{\mathrm e}^{-x}+12 x \,{\mathrm e}^{x}-4 \,{\mathrm e}^{x}-{\mathrm e}^{-2 x}+12 x}{8 \left (1+{\mathrm e}^{x}\right ) a}\) | \(48\) |
default | \(\frac {-\tanh \left (\frac {x}{2}\right )+\frac {1}{2 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {3}{2 \left (\tanh \left (\frac {x}{2}\right )-1\right )}-\frac {3 \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2}-\frac {1}{2 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {3}{2 \left (\tanh \left (\frac {x}{2}\right )+1\right )}+\frac {3 \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2}}{a}\) | \(70\) |
Input:
int(cosh(x)^2/(a+a*sech(x)),x,method=_RETURNVERBOSE)
Output:
1/4*(6*x+sinh(2*x)-4*sinh(x)-4*tanh(1/2*x))/a
Time = 0.09 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.71 \[ \int \frac {\cosh ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {\cosh \left (x\right )^{3} + {\left (3 \, \cosh \left (x\right ) - 4\right )} \sinh \left (x\right )^{2} + \sinh \left (x\right )^{3} + {\left (12 \, x - 1\right )} \cosh \left (x\right ) - 4 \, \cosh \left (x\right )^{2} + {\left (3 \, \cosh \left (x\right )^{2} + 12 \, x - 4 \, \cosh \left (x\right ) - 7\right )} \sinh \left (x\right ) + 12 \, x + 20}{8 \, {\left (a \cosh \left (x\right ) + a \sinh \left (x\right ) + a\right )}} \] Input:
integrate(cosh(x)^2/(a+a*sech(x)),x, algorithm="fricas")
Output:
1/8*(cosh(x)^3 + (3*cosh(x) - 4)*sinh(x)^2 + sinh(x)^3 + (12*x - 1)*cosh(x ) - 4*cosh(x)^2 + (3*cosh(x)^2 + 12*x - 4*cosh(x) - 7)*sinh(x) + 12*x + 20 )/(a*cosh(x) + a*sinh(x) + a)
\[ \int \frac {\cosh ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {\int \frac {\cosh ^{2}{\left (x \right )}}{\operatorname {sech}{\left (x \right )} + 1}\, dx}{a} \] Input:
integrate(cosh(x)**2/(a+a*sech(x)),x)
Output:
Integral(cosh(x)**2/(sech(x) + 1), x)/a
Time = 0.03 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.37 \[ \int \frac {\cosh ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {3 \, x}{2 \, a} + \frac {4 \, e^{\left (-x\right )} - e^{\left (-2 \, x\right )}}{8 \, a} - \frac {3 \, e^{\left (-x\right )} + 20 \, e^{\left (-2 \, x\right )} - 1}{8 \, {\left (a e^{\left (-2 \, x\right )} + a e^{\left (-3 \, x\right )}\right )}} \] Input:
integrate(cosh(x)^2/(a+a*sech(x)),x, algorithm="maxima")
Output:
3/2*x/a + 1/8*(4*e^(-x) - e^(-2*x))/a - 1/8*(3*e^(-x) + 20*e^(-2*x) - 1)/( a*e^(-2*x) + a*e^(-3*x))
Time = 0.11 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.24 \[ \int \frac {\cosh ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {3 \, x}{2 \, a} + \frac {{\left (20 \, e^{\left (2 \, x\right )} + 3 \, e^{x} - 1\right )} e^{\left (-2 \, x\right )}}{8 \, a {\left (e^{x} + 1\right )}} + \frac {a e^{\left (2 \, x\right )} - 4 \, a e^{x}}{8 \, a^{2}} \] Input:
integrate(cosh(x)^2/(a+a*sech(x)),x, algorithm="giac")
Output:
3/2*x/a + 1/8*(20*e^(2*x) + 3*e^x - 1)*e^(-2*x)/(a*(e^x + 1)) + 1/8*(a*e^( 2*x) - 4*a*e^x)/a^2
Time = 2.21 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.27 \[ \int \frac {\cosh ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {{\mathrm {e}}^{-x}}{2\,a}-\frac {{\mathrm {e}}^{-2\,x}}{8\,a}+\frac {{\mathrm {e}}^{2\,x}}{8\,a}+\frac {3\,x}{2\,a}+\frac {2}{a\,\left ({\mathrm {e}}^x+1\right )}-\frac {{\mathrm {e}}^x}{2\,a} \] Input:
int(cosh(x)^2/(a + a/cosh(x)),x)
Output:
exp(-x)/(2*a) - exp(-2*x)/(8*a) + exp(2*x)/(8*a) + (3*x)/(2*a) + 2/(a*(exp (x) + 1)) - exp(x)/(2*a)
Time = 0.21 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.49 \[ \int \frac {\cosh ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {e^{5 x}-3 e^{4 x}+12 e^{3 x} x -24 e^{3 x}+12 e^{2 x} x +3 e^{x}-1}{8 e^{2 x} a \left (e^{x}+1\right )} \] Input:
int(cosh(x)^2/(a+a*sech(x)),x)
Output:
(e**(5*x) - 3*e**(4*x) + 12*e**(3*x)*x - 24*e**(3*x) + 12*e**(2*x)*x + 3*e **x - 1)/(8*e**(2*x)*a*(e**x + 1))