3.87 \(\int (a+b \text {sech}(c+d x))^4 \, dx\)

Optimal. Leaf size=107 \[ a^4 x+\frac {b^2 \left (17 a^2+2 b^2\right ) \tanh (c+d x)}{3 d}+\frac {2 a b \left (2 a^2+b^2\right ) \tan ^{-1}(\sinh (c+d x))}{d}+\frac {4 a b^3 \tanh (c+d x) \text {sech}(c+d x)}{3 d}+\frac {b^2 \tanh (c+d x) (a+b \text {sech}(c+d x))^2}{3 d} \]

[Out]

a^4*x+2*a*b*(2*a^2+b^2)*arctan(sinh(d*x+c))/d+1/3*b^2*(17*a^2+2*b^2)*tanh(d*x+c)/d+4/3*a*b^3*sech(d*x+c)*tanh(
d*x+c)/d+1/3*b^2*(a+b*sech(d*x+c))^2*tanh(d*x+c)/d

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {3782, 4048, 3770, 3767, 8} \[ \frac {b^2 \left (17 a^2+2 b^2\right ) \tanh (c+d x)}{3 d}+\frac {2 a b \left (2 a^2+b^2\right ) \tan ^{-1}(\sinh (c+d x))}{d}+a^4 x+\frac {4 a b^3 \tanh (c+d x) \text {sech}(c+d x)}{3 d}+\frac {b^2 \tanh (c+d x) (a+b \text {sech}(c+d x))^2}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sech[c + d*x])^4,x]

[Out]

a^4*x + (2*a*b*(2*a^2 + b^2)*ArcTan[Sinh[c + d*x]])/d + (b^2*(17*a^2 + 2*b^2)*Tanh[c + d*x])/(3*d) + (4*a*b^3*
Sech[c + d*x]*Tanh[c + d*x])/(3*d) + (b^2*(a + b*Sech[c + d*x])^2*Tanh[c + d*x])/(3*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3782

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> -Simp[(b^2*Cot[c + d*x]*(a + b*Csc[c + d*x])^(n
- 2))/(d*(n - 1)), x] + Dist[1/(n - 1), Int[(a + b*Csc[c + d*x])^(n - 3)*Simp[a^3*(n - 1) + (b*(b^2*(n - 2) +
3*a^2*(n - 1)))*Csc[c + d*x] + (a*b^2*(3*n - 4))*Csc[c + d*x]^2, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a
^2 - b^2, 0] && GtQ[n, 2] && IntegerQ[2*n]

Rule 4048

Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) +
 (a_)), x_Symbol] :> -Simp[(b*C*Csc[e + f*x]*Cot[e + f*x])/(2*f), x] + Dist[1/2, Int[Simp[2*A*a + (2*B*a + b*(
2*A + C))*Csc[e + f*x] + 2*(a*C + B*b)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x]

Rubi steps

\begin {align*} \int (a+b \text {sech}(c+d x))^4 \, dx &=\frac {b^2 (a+b \text {sech}(c+d x))^2 \tanh (c+d x)}{3 d}+\frac {1}{3} \int (a+b \text {sech}(c+d x)) \left (3 a^3+b \left (9 a^2+2 b^2\right ) \text {sech}(c+d x)+8 a b^2 \text {sech}^2(c+d x)\right ) \, dx\\ &=\frac {4 a b^3 \text {sech}(c+d x) \tanh (c+d x)}{3 d}+\frac {b^2 (a+b \text {sech}(c+d x))^2 \tanh (c+d x)}{3 d}+\frac {1}{6} \int \left (6 a^4+12 a b \left (2 a^2+b^2\right ) \text {sech}(c+d x)+2 b^2 \left (17 a^2+2 b^2\right ) \text {sech}^2(c+d x)\right ) \, dx\\ &=a^4 x+\frac {4 a b^3 \text {sech}(c+d x) \tanh (c+d x)}{3 d}+\frac {b^2 (a+b \text {sech}(c+d x))^2 \tanh (c+d x)}{3 d}+\left (2 a b \left (2 a^2+b^2\right )\right ) \int \text {sech}(c+d x) \, dx+\frac {1}{3} \left (b^2 \left (17 a^2+2 b^2\right )\right ) \int \text {sech}^2(c+d x) \, dx\\ &=a^4 x+\frac {2 a b \left (2 a^2+b^2\right ) \tan ^{-1}(\sinh (c+d x))}{d}+\frac {4 a b^3 \text {sech}(c+d x) \tanh (c+d x)}{3 d}+\frac {b^2 (a+b \text {sech}(c+d x))^2 \tanh (c+d x)}{3 d}+\frac {\left (i b^2 \left (17 a^2+2 b^2\right )\right ) \operatorname {Subst}(\int 1 \, dx,x,-i \tanh (c+d x))}{3 d}\\ &=a^4 x+\frac {2 a b \left (2 a^2+b^2\right ) \tan ^{-1}(\sinh (c+d x))}{d}+\frac {b^2 \left (17 a^2+2 b^2\right ) \tanh (c+d x)}{3 d}+\frac {4 a b^3 \text {sech}(c+d x) \tanh (c+d x)}{3 d}+\frac {b^2 (a+b \text {sech}(c+d x))^2 \tanh (c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.25, size = 78, normalized size = 0.73 \[ \frac {3 a^4 d x+6 a b \left (2 a^2+b^2\right ) \tan ^{-1}(\sinh (c+d x))+3 b^2 \tanh (c+d x) \left (6 a^2+2 a b \text {sech}(c+d x)+b^2\right )-b^4 \tanh ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sech[c + d*x])^4,x]

[Out]

(3*a^4*d*x + 6*a*b*(2*a^2 + b^2)*ArcTan[Sinh[c + d*x]] + 3*b^2*(6*a^2 + b^2 + 2*a*b*Sech[c + d*x])*Tanh[c + d*
x] - b^4*Tanh[c + d*x]^3)/(3*d)

________________________________________________________________________________________

fricas [B]  time = 0.41, size = 1028, normalized size = 9.61 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sech(d*x+c))^4,x, algorithm="fricas")

[Out]

1/3*(3*a^4*d*x*cosh(d*x + c)^6 + 3*a^4*d*x*sinh(d*x + c)^6 + 12*a*b^3*cosh(d*x + c)^5 + 3*a^4*d*x + 6*(3*a^4*d
*x*cosh(d*x + c) + 2*a*b^3)*sinh(d*x + c)^5 - 12*a*b^3*cosh(d*x + c) + 9*(a^4*d*x - 4*a^2*b^2)*cosh(d*x + c)^4
 + 3*(15*a^4*d*x*cosh(d*x + c)^2 + 3*a^4*d*x + 20*a*b^3*cosh(d*x + c) - 12*a^2*b^2)*sinh(d*x + c)^4 - 36*a^2*b
^2 - 4*b^4 + 12*(5*a^4*d*x*cosh(d*x + c)^3 + 10*a*b^3*cosh(d*x + c)^2 + 3*(a^4*d*x - 4*a^2*b^2)*cosh(d*x + c))
*sinh(d*x + c)^3 + 3*(3*a^4*d*x - 24*a^2*b^2 - 4*b^4)*cosh(d*x + c)^2 + 3*(15*a^4*d*x*cosh(d*x + c)^4 + 40*a*b
^3*cosh(d*x + c)^3 + 3*a^4*d*x - 24*a^2*b^2 - 4*b^4 + 18*(a^4*d*x - 4*a^2*b^2)*cosh(d*x + c)^2)*sinh(d*x + c)^
2 + 12*((2*a^3*b + a*b^3)*cosh(d*x + c)^6 + 6*(2*a^3*b + a*b^3)*cosh(d*x + c)*sinh(d*x + c)^5 + (2*a^3*b + a*b
^3)*sinh(d*x + c)^6 + 3*(2*a^3*b + a*b^3)*cosh(d*x + c)^4 + 3*(2*a^3*b + a*b^3 + 5*(2*a^3*b + a*b^3)*cosh(d*x
+ c)^2)*sinh(d*x + c)^4 + 2*a^3*b + a*b^3 + 4*(5*(2*a^3*b + a*b^3)*cosh(d*x + c)^3 + 3*(2*a^3*b + a*b^3)*cosh(
d*x + c))*sinh(d*x + c)^3 + 3*(2*a^3*b + a*b^3)*cosh(d*x + c)^2 + 3*(5*(2*a^3*b + a*b^3)*cosh(d*x + c)^4 + 2*a
^3*b + a*b^3 + 6*(2*a^3*b + a*b^3)*cosh(d*x + c)^2)*sinh(d*x + c)^2 + 6*((2*a^3*b + a*b^3)*cosh(d*x + c)^5 + 2
*(2*a^3*b + a*b^3)*cosh(d*x + c)^3 + (2*a^3*b + a*b^3)*cosh(d*x + c))*sinh(d*x + c))*arctan(cosh(d*x + c) + si
nh(d*x + c)) + 6*(3*a^4*d*x*cosh(d*x + c)^5 + 10*a*b^3*cosh(d*x + c)^4 - 2*a*b^3 + 6*(a^4*d*x - 4*a^2*b^2)*cos
h(d*x + c)^3 + (3*a^4*d*x - 24*a^2*b^2 - 4*b^4)*cosh(d*x + c))*sinh(d*x + c))/(d*cosh(d*x + c)^6 + 6*d*cosh(d*
x + c)*sinh(d*x + c)^5 + d*sinh(d*x + c)^6 + 3*d*cosh(d*x + c)^4 + 3*(5*d*cosh(d*x + c)^2 + d)*sinh(d*x + c)^4
 + 4*(5*d*cosh(d*x + c)^3 + 3*d*cosh(d*x + c))*sinh(d*x + c)^3 + 3*d*cosh(d*x + c)^2 + 3*(5*d*cosh(d*x + c)^4
+ 6*d*cosh(d*x + c)^2 + d)*sinh(d*x + c)^2 + 6*(d*cosh(d*x + c)^5 + 2*d*cosh(d*x + c)^3 + d*cosh(d*x + c))*sin
h(d*x + c) + d)

________________________________________________________________________________________

giac [A]  time = 0.13, size = 141, normalized size = 1.32 \[ \frac {3 \, {\left (d x + c\right )} a^{4} + 12 \, {\left (2 \, a^{3} b + a b^{3}\right )} \arctan \left (e^{\left (d x + c\right )}\right ) + \frac {4 \, {\left (3 \, a b^{3} e^{\left (5 \, d x + 5 \, c\right )} - 9 \, a^{2} b^{2} e^{\left (4 \, d x + 4 \, c\right )} - 18 \, a^{2} b^{2} e^{\left (2 \, d x + 2 \, c\right )} - 3 \, b^{4} e^{\left (2 \, d x + 2 \, c\right )} - 3 \, a b^{3} e^{\left (d x + c\right )} - 9 \, a^{2} b^{2} - b^{4}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{3}}}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sech(d*x+c))^4,x, algorithm="giac")

[Out]

1/3*(3*(d*x + c)*a^4 + 12*(2*a^3*b + a*b^3)*arctan(e^(d*x + c)) + 4*(3*a*b^3*e^(5*d*x + 5*c) - 9*a^2*b^2*e^(4*
d*x + 4*c) - 18*a^2*b^2*e^(2*d*x + 2*c) - 3*b^4*e^(2*d*x + 2*c) - 3*a*b^3*e^(d*x + c) - 9*a^2*b^2 - b^4)/(e^(2
*d*x + 2*c) + 1)^3)/d

________________________________________________________________________________________

maple [A]  time = 0.43, size = 121, normalized size = 1.13 \[ a^{4} x +\frac {a^{4} c}{d}+\frac {8 a^{3} b \arctan \left ({\mathrm e}^{d x +c}\right )}{d}+\frac {6 a^{2} b^{2} \tanh \left (d x +c \right )}{d}+\frac {2 a \,b^{3} \mathrm {sech}\left (d x +c \right ) \tanh \left (d x +c \right )}{d}+\frac {4 a \,b^{3} \arctan \left ({\mathrm e}^{d x +c}\right )}{d}+\frac {2 b^{4} \tanh \left (d x +c \right )}{3 d}+\frac {b^{4} \tanh \left (d x +c \right ) \mathrm {sech}\left (d x +c \right )^{2}}{3 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sech(d*x+c))^4,x)

[Out]

a^4*x+1/d*a^4*c+8/d*a^3*b*arctan(exp(d*x+c))+6/d*a^2*b^2*tanh(d*x+c)+2*a*b^3*sech(d*x+c)*tanh(d*x+c)/d+4/d*a*b
^3*arctan(exp(d*x+c))+2/3/d*b^4*tanh(d*x+c)+1/3/d*b^4*tanh(d*x+c)*sech(d*x+c)^2

________________________________________________________________________________________

maxima [B]  time = 0.92, size = 211, normalized size = 1.97 \[ a^{4} x - 4 \, a b^{3} {\left (\frac {\arctan \left (e^{\left (-d x - c\right )}\right )}{d} - \frac {e^{\left (-d x - c\right )} - e^{\left (-3 \, d x - 3 \, c\right )}}{d {\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + 1\right )}}\right )} + \frac {4}{3} \, b^{4} {\left (\frac {3 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}} + \frac {1}{d {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}}\right )} + \frac {4 \, a^{3} b \arctan \left (\sinh \left (d x + c\right )\right )}{d} + \frac {12 \, a^{2} b^{2}}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sech(d*x+c))^4,x, algorithm="maxima")

[Out]

a^4*x - 4*a*b^3*(arctan(e^(-d*x - c))/d - (e^(-d*x - c) - e^(-3*d*x - 3*c))/(d*(2*e^(-2*d*x - 2*c) + e^(-4*d*x
 - 4*c) + 1))) + 4/3*b^4*(3*e^(-2*d*x - 2*c)/(d*(3*e^(-2*d*x - 2*c) + 3*e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c) +
1)) + 1/(d*(3*e^(-2*d*x - 2*c) + 3*e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c) + 1))) + 4*a^3*b*arctan(sinh(d*x + c))/
d + 12*a^2*b^2/(d*(e^(-2*d*x - 2*c) + 1))

________________________________________________________________________________________

mupad [B]  time = 1.41, size = 233, normalized size = 2.18 \[ a^4\,x-\frac {\frac {12\,a^2\,b^2}{d}-\frac {4\,a\,b^3\,{\mathrm {e}}^{c+d\,x}}{d}}{{\mathrm {e}}^{2\,c+2\,d\,x}+1}-\frac {\frac {4\,b^4}{d}+\frac {8\,a\,b^3\,{\mathrm {e}}^{c+d\,x}}{d}}{2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1}+\frac {8\,b^4}{3\,d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )}+\frac {4\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\left (a\,b^3\,\sqrt {d^2}+2\,a^3\,b\,\sqrt {d^2}\right )}{d\,\sqrt {4\,a^6\,b^2+4\,a^4\,b^4+a^2\,b^6}}\right )\,\sqrt {4\,a^6\,b^2+4\,a^4\,b^4+a^2\,b^6}}{\sqrt {d^2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cosh(c + d*x))^4,x)

[Out]

a^4*x - ((12*a^2*b^2)/d - (4*a*b^3*exp(c + d*x))/d)/(exp(2*c + 2*d*x) + 1) - ((4*b^4)/d + (8*a*b^3*exp(c + d*x
))/d)/(2*exp(2*c + 2*d*x) + exp(4*c + 4*d*x) + 1) + (8*b^4)/(3*d*(3*exp(2*c + 2*d*x) + 3*exp(4*c + 4*d*x) + ex
p(6*c + 6*d*x) + 1)) + (4*atan((exp(d*x)*exp(c)*(a*b^3*(d^2)^(1/2) + 2*a^3*b*(d^2)^(1/2)))/(d*(a^2*b^6 + 4*a^4
*b^4 + 4*a^6*b^2)^(1/2)))*(a^2*b^6 + 4*a^4*b^4 + 4*a^6*b^2)^(1/2))/(d^2)^(1/2)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sech(d*x+c))**4,x)

[Out]

Integral((a + b*sech(c + d*x))**4, x)

________________________________________________________________________________________