Integrand size = 13, antiderivative size = 67 \[ \int \frac {\cosh ^4(x)}{a+a \text {sech}(x)} \, dx=\frac {15 x}{8 a}-\frac {4 \sinh (x)}{a}+\frac {15 \cosh (x) \sinh (x)}{8 a}+\frac {5 \cosh ^3(x) \sinh (x)}{4 a}-\frac {\cosh ^3(x) \sinh (x)}{a+a \text {sech}(x)}-\frac {4 \sinh ^3(x)}{3 a} \] Output:
15/8*x/a-4*sinh(x)/a+15/8*cosh(x)*sinh(x)/a+5/4*cosh(x)^3*sinh(x)/a-cosh(x )^3*sinh(x)/(a+a*sech(x))-4/3*sinh(x)^3/a
Time = 0.28 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.94 \[ \int \frac {\cosh ^4(x)}{a+a \text {sech}(x)} \, dx=\frac {\text {sech}\left (\frac {x}{2}\right ) \left (360 x \cosh \left (\frac {x}{2}\right )-360 \sinh \left (\frac {x}{2}\right )-120 \sinh \left (\frac {3 x}{2}\right )+40 \sinh \left (\frac {5 x}{2}\right )-5 \sinh \left (\frac {7 x}{2}\right )+3 \sinh \left (\frac {9 x}{2}\right )\right )}{192 a} \] Input:
Integrate[Cosh[x]^4/(a + a*Sech[x]),x]
Output:
(Sech[x/2]*(360*x*Cosh[x/2] - 360*Sinh[x/2] - 120*Sinh[(3*x)/2] + 40*Sinh[ (5*x)/2] - 5*Sinh[(7*x)/2] + 3*Sinh[(9*x)/2]))/(192*a)
Result contains complex when optimal does not.
Time = 0.52 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.13, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.923, Rules used = {3042, 4306, 25, 3042, 4274, 3042, 3113, 2009, 3115, 3042, 3115, 24}
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 ^4(x)}{a \text {sech}(x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\csc \left (\frac {\pi }{2}+i x\right )^4 \left (a+a \csc \left (\frac {\pi }{2}+i x\right )\right )}dx\) |
\(\Big \downarrow \) 4306 |
\(\displaystyle -\frac {\int -\cosh ^4(x) (5 a-4 a \text {sech}(x))dx}{a^2}-\frac {\sinh (x) \cosh ^3(x)}{a \text {sech}(x)+a}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \cosh ^4(x) (5 a-4 a \text {sech}(x))dx}{a^2}-\frac {\sinh (x) \cosh ^3(x)}{a \text {sech}(x)+a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\sinh (x) \cosh ^3(x)}{a \text {sech}(x)+a}+\frac {\int \frac {5 a-4 a \csc \left (i x+\frac {\pi }{2}\right )}{\csc \left (i x+\frac {\pi }{2}\right )^4}dx}{a^2}\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle \frac {5 a \int \cosh ^4(x)dx-4 a \int \cosh ^3(x)dx}{a^2}-\frac {\sinh (x) \cosh ^3(x)}{a \text {sech}(x)+a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\sinh (x) \cosh ^3(x)}{a \text {sech}(x)+a}+\frac {5 a \int \sin \left (i x+\frac {\pi }{2}\right )^4dx-4 a \int \sin \left (i x+\frac {\pi }{2}\right )^3dx}{a^2}\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle -\frac {\sinh (x) \cosh ^3(x)}{a \text {sech}(x)+a}+\frac {5 a \int \sin \left (i x+\frac {\pi }{2}\right )^4dx-4 i a \int \left (\sinh ^2(x)+1\right )d(-i \sinh (x))}{a^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\sinh (x) \cosh ^3(x)}{a \text {sech}(x)+a}+\frac {5 a \int \sin \left (i x+\frac {\pi }{2}\right )^4dx-4 i a \left (-\frac {1}{3} i \sinh ^3(x)-i \sinh (x)\right )}{a^2}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle -\frac {\sinh (x) \cosh ^3(x)}{a \text {sech}(x)+a}+\frac {5 a \left (\frac {3}{4} \int \cosh ^2(x)dx+\frac {1}{4} \sinh (x) \cosh ^3(x)\right )-4 i a \left (-\frac {1}{3} i \sinh ^3(x)-i \sinh (x)\right )}{a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\sinh (x) \cosh ^3(x)}{a \text {sech}(x)+a}+\frac {5 a \left (\frac {1}{4} \sinh (x) \cosh ^3(x)+\frac {3}{4} \int \sin \left (i x+\frac {\pi }{2}\right )^2dx\right )-4 i a \left (-\frac {1}{3} i \sinh ^3(x)-i \sinh (x)\right )}{a^2}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle -\frac {\sinh (x) \cosh ^3(x)}{a \text {sech}(x)+a}+\frac {5 a \left (\frac {3}{4} \left (\frac {\int 1dx}{2}+\frac {1}{2} \sinh (x) \cosh (x)\right )+\frac {1}{4} \sinh (x) \cosh ^3(x)\right )-4 i a \left (-\frac {1}{3} i \sinh ^3(x)-i \sinh (x)\right )}{a^2}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle -\frac {\sinh (x) \cosh ^3(x)}{a \text {sech}(x)+a}+\frac {5 a \left (\frac {1}{4} \sinh (x) \cosh ^3(x)+\frac {3}{4} \left (\frac {x}{2}+\frac {1}{2} \sinh (x) \cosh (x)\right )\right )-4 i a \left (-\frac {1}{3} i \sinh ^3(x)-i \sinh (x)\right )}{a^2}\) |
Input:
Int[Cosh[x]^4/(a + a*Sech[x]),x]
Output:
-((Cosh[x]^3*Sinh[x])/(a + a*Sech[x])) + ((-4*I)*a*((-I)*Sinh[x] - (I/3)*S inh[x]^3) + 5*a*((Cosh[x]^3*Sinh[x])/4 + (3*(x/2 + (Cosh[x]*Sinh[x])/2))/4 ))/a^2
Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]
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[(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.35 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.58
method | result | size |
parallelrisch | \(\frac {180 x +\tanh \left (\frac {x}{2}\right ) \left (-221+3 \cosh \left (4 x \right )-2 \cosh \left (3 x \right )+38 \cosh \left (2 x \right )-82 \cosh \left (x \right )\right )}{96 a}\) | \(39\) |
risch | \(\frac {3 \,{\mathrm e}^{5 x}-5 \,{\mathrm e}^{4 x}+40 \,{\mathrm e}^{3 x}-120 \,{\mathrm e}^{2 x}+552+120 \,{\mathrm e}^{-x}-40 \,{\mathrm e}^{-2 x}+5 \,{\mathrm e}^{-3 x}+360 x \,{\mathrm e}^{x}-168 \,{\mathrm e}^{x}-3 \,{\mathrm e}^{-4 x}+360 x}{192 \left (1+{\mathrm e}^{x}\right ) a}\) | \(74\) |
default | \(\frac {-\tanh \left (\frac {x}{2}\right )-\frac {1}{4 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{4}}+\frac {5}{6 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3}}-\frac {15}{8 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {25}{8 \left (\tanh \left (\frac {x}{2}\right )+1\right )}+\frac {15 \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{8}+\frac {1}{4 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{4}}+\frac {5}{6 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3}}+\frac {15}{8 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {25}{8 \left (\tanh \left (\frac {x}{2}\right )-1\right )}-\frac {15 \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{8}}{a}\) | \(110\) |
Input:
int(cosh(x)^4/(a+a*sech(x)),x,method=_RETURNVERBOSE)
Output:
1/96*(180*x+tanh(1/2*x)*(-221+3*cosh(4*x)-2*cosh(3*x)+38*cosh(2*x)-82*cosh (x)))/a
Leaf count of result is larger than twice the leaf count of optimal. 139 vs. \(2 (59) = 118\).
Time = 0.08 (sec) , antiderivative size = 139, normalized size of antiderivative = 2.07 \[ \int \frac {\cosh ^4(x)}{a+a \text {sech}(x)} \, dx=\frac {3 \, \cosh \left (x\right )^{5} + {\left (15 \, \cosh \left (x\right ) - 8\right )} \sinh \left (x\right )^{4} + 3 \, \sinh \left (x\right )^{5} - 8 \, \cosh \left (x\right )^{4} + {\left (30 \, \cosh \left (x\right )^{2} - 8 \, \cosh \left (x\right ) + 35\right )} \sinh \left (x\right )^{3} + 45 \, \cosh \left (x\right )^{3} + {\left (30 \, \cosh \left (x\right )^{3} - 48 \, \cosh \left (x\right )^{2} + 135 \, \cosh \left (x\right ) - 160\right )} \sinh \left (x\right )^{2} + 24 \, {\left (15 \, x - 2\right )} \cosh \left (x\right ) - 160 \, \cosh \left (x\right )^{2} + {\left (15 \, \cosh \left (x\right )^{4} - 8 \, \cosh \left (x\right )^{3} + 105 \, \cosh \left (x\right )^{2} + 360 \, x - 160 \, \cosh \left (x\right ) - 288\right )} \sinh \left (x\right ) + 360 \, x + 552}{192 \, {\left (a \cosh \left (x\right ) + a \sinh \left (x\right ) + a\right )}} \] Input:
integrate(cosh(x)^4/(a+a*sech(x)),x, algorithm="fricas")
Output:
1/192*(3*cosh(x)^5 + (15*cosh(x) - 8)*sinh(x)^4 + 3*sinh(x)^5 - 8*cosh(x)^ 4 + (30*cosh(x)^2 - 8*cosh(x) + 35)*sinh(x)^3 + 45*cosh(x)^3 + (30*cosh(x) ^3 - 48*cosh(x)^2 + 135*cosh(x) - 160)*sinh(x)^2 + 24*(15*x - 2)*cosh(x) - 160*cosh(x)^2 + (15*cosh(x)^4 - 8*cosh(x)^3 + 105*cosh(x)^2 + 360*x - 160 *cosh(x) - 288)*sinh(x) + 360*x + 552)/(a*cosh(x) + a*sinh(x) + a)
\[ \int \frac {\cosh ^4(x)}{a+a \text {sech}(x)} \, dx=\frac {\int \frac {\cosh ^{4}{\left (x \right )}}{\operatorname {sech}{\left (x \right )} + 1}\, dx}{a} \] Input:
integrate(cosh(x)**4/(a+a*sech(x)),x)
Output:
Integral(cosh(x)**4/(sech(x) + 1), x)/a
Time = 0.04 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.19 \[ \int \frac {\cosh ^4(x)}{a+a \text {sech}(x)} \, dx=\frac {15 \, x}{8 \, a} + \frac {168 \, e^{\left (-x\right )} - 48 \, e^{\left (-2 \, x\right )} + 8 \, e^{\left (-3 \, x\right )} - 3 \, e^{\left (-4 \, x\right )}}{192 \, a} - \frac {5 \, e^{\left (-x\right )} - 40 \, e^{\left (-2 \, x\right )} + 120 \, e^{\left (-3 \, x\right )} + 552 \, e^{\left (-4 \, x\right )} - 3}{192 \, {\left (a e^{\left (-4 \, x\right )} + a e^{\left (-5 \, x\right )}\right )}} \] Input:
integrate(cosh(x)^4/(a+a*sech(x)),x, algorithm="maxima")
Output:
15/8*x/a + 1/192*(168*e^(-x) - 48*e^(-2*x) + 8*e^(-3*x) - 3*e^(-4*x))/a - 1/192*(5*e^(-x) - 40*e^(-2*x) + 120*e^(-3*x) + 552*e^(-4*x) - 3)/(a*e^(-4* x) + a*e^(-5*x))
Time = 0.11 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.28 \[ \int \frac {\cosh ^4(x)}{a+a \text {sech}(x)} \, dx=\frac {15 \, x}{8 \, a} + \frac {{\left (552 \, e^{\left (4 \, x\right )} + 120 \, e^{\left (3 \, x\right )} - 40 \, e^{\left (2 \, x\right )} + 5 \, e^{x} - 3\right )} e^{\left (-4 \, x\right )}}{192 \, a {\left (e^{x} + 1\right )}} + \frac {3 \, a^{3} e^{\left (4 \, x\right )} - 8 \, a^{3} e^{\left (3 \, x\right )} + 48 \, a^{3} e^{\left (2 \, x\right )} - 168 \, a^{3} e^{x}}{192 \, a^{4}} \] Input:
integrate(cosh(x)^4/(a+a*sech(x)),x, algorithm="giac")
Output:
15/8*x/a + 1/192*(552*e^(4*x) + 120*e^(3*x) - 40*e^(2*x) + 5*e^x - 3)*e^(- 4*x)/(a*(e^x + 1)) + 1/192*(3*a^3*e^(4*x) - 8*a^3*e^(3*x) + 48*a^3*e^(2*x) - 168*a^3*e^x)/a^4
Time = 2.63 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.31 \[ \int \frac {\cosh ^4(x)}{a+a \text {sech}(x)} \, dx=\frac {7\,{\mathrm {e}}^{-x}}{8\,a}-\frac {{\mathrm {e}}^{-2\,x}}{4\,a}+\frac {{\mathrm {e}}^{2\,x}}{4\,a}+\frac {{\mathrm {e}}^{-3\,x}}{24\,a}-\frac {{\mathrm {e}}^{3\,x}}{24\,a}-\frac {{\mathrm {e}}^{-4\,x}}{64\,a}+\frac {{\mathrm {e}}^{4\,x}}{64\,a}+\frac {15\,x}{8\,a}+\frac {2}{a\,\left ({\mathrm {e}}^x+1\right )}-\frac {7\,{\mathrm {e}}^x}{8\,a} \] Input:
int(cosh(x)^4/(a + a/cosh(x)),x)
Output:
(7*exp(-x))/(8*a) - exp(-2*x)/(4*a) + exp(2*x)/(4*a) + exp(-3*x)/(24*a) - exp(3*x)/(24*a) - exp(-4*x)/(64*a) + exp(4*x)/(64*a) + (15*x)/(8*a) + 2/(a *(exp(x) + 1)) - (7*exp(x))/(8*a)
Time = 0.18 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.36 \[ \int \frac {\cosh ^4(x)}{a+a \text {sech}(x)} \, dx=\frac {3 e^{9 x}-5 e^{8 x}+40 e^{7 x}-120 e^{6 x}+360 e^{5 x} x -720 e^{5 x}+360 e^{4 x} x +120 e^{3 x}-40 e^{2 x}+5 e^{x}-3}{192 e^{4 x} a \left (e^{x}+1\right )} \] Input:
int(cosh(x)^4/(a+a*sech(x)),x)
Output:
(3*e**(9*x) - 5*e**(8*x) + 40*e**(7*x) - 120*e**(6*x) + 360*e**(5*x)*x - 7 20*e**(5*x) + 360*e**(4*x)*x + 120*e**(3*x) - 40*e**(2*x) + 5*e**x - 3)/(1 92*e**(4*x)*a*(e**x + 1))