Optimal. Leaf size=107 \[ \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} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.123799, antiderivative size = 107, normalized size of antiderivative = 1., 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]
[Out]
Rule 3782
Rule 4048
Rule 3770
Rule 3767
Rule 8
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.237227, size = 78, normalized size = 0.73 \[ \frac{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 )+3 a^4 d x-b^4 \tanh ^3(c+d x)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.033, size = 121, normalized size = 1.1 \begin{align*}{a}^{4}x+{\frac{{a}^{4}c}{d}}+8\,{\frac{{a}^{3}b\arctan \left ({{\rm e}^{dx+c}} \right ) }{d}}+6\,{\frac{{a}^{2}{b}^{2}\tanh \left ( dx+c \right ) }{d}}+2\,{\frac{a{b}^{3}{\rm sech} \left (dx+c\right )\tanh \left ( dx+c \right ) }{d}}+4\,{\frac{a{b}^{3}\arctan \left ({{\rm e}^{dx+c}} \right ) }{d}}+{\frac{2\,{b}^{4}\tanh \left ( dx+c \right ) }{3\,d}}+{\frac{{b}^{4}\tanh \left ( dx+c \right ) \left ({\rm sech} \left (dx+c\right ) \right ) ^{2}}{3\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.81674, size = 285, normalized size = 2.66 \begin{align*} 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 )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.48824, size = 2547, normalized size = 23.8 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \operatorname{sech}{\left (c + d x \right )}\right )^{4}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16533, size = 194, normalized size = 1.81 \begin{align*} \frac{{\left (d x + c\right )} a^{4}}{d} + \frac{4 \,{\left (2 \, a^{3} b + a b^{3}\right )} \arctan \left (e^{\left (d x + c\right )}\right )}{d} + \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 )}}{3 \, d{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]