Optimal. Leaf size=58 \[ \frac {1}{2} a \left (a^2+3 b^2\right ) \tan ^{-1}(\sinh (x))-\frac {1}{2} a b^2 \sinh (x)-\frac {1}{2} \text {sech}^2(x) (b-a \sinh (x)) (a+b \sinh (x))^2+b^3 \log (\cosh (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.636, Rules used = {4391, 2668, 739, 774, 635, 204, 260} \[ \frac {1}{2} a \left (a^2+3 b^2\right ) \tan ^{-1}(\sinh (x))-\frac {1}{2} a b^2 \sinh (x)-\frac {1}{2} \text {sech}^2(x) (b-a \sinh (x)) (a+b \sinh (x))^2+b^3 \log (\cosh (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 260
Rule 635
Rule 739
Rule 774
Rule 2668
Rule 4391
Rubi steps
\begin {align*} \int (a \text {sech}(x)+b \tanh (x))^3 \, dx &=\int \text {sech}^3(x) (a+b \sinh (x))^3 \, dx\\ &=b^3 \operatorname {Subst}\left (\int \frac {(a+x)^3}{\left (-b^2-x^2\right )^2} \, dx,x,b \sinh (x)\right )\\ &=-\frac {1}{2} \text {sech}^2(x) (b-a \sinh (x)) (a+b \sinh (x))^2+\frac {1}{2} b \operatorname {Subst}\left (\int \frac {(a+x) \left (-a^2-2 b^2+a x\right )}{-b^2-x^2} \, dx,x,b \sinh (x)\right )\\ &=-\frac {1}{2} a b^2 \sinh (x)-\frac {1}{2} \text {sech}^2(x) (b-a \sinh (x)) (a+b \sinh (x))^2-\frac {1}{2} b \operatorname {Subst}\left (\int \frac {a b^2-a \left (-a^2-2 b^2\right )+2 b^2 x}{-b^2-x^2} \, dx,x,b \sinh (x)\right )\\ &=-\frac {1}{2} a b^2 \sinh (x)-\frac {1}{2} \text {sech}^2(x) (b-a \sinh (x)) (a+b \sinh (x))^2-b^3 \operatorname {Subst}\left (\int \frac {x}{-b^2-x^2} \, dx,x,b \sinh (x)\right )-\frac {1}{2} \left (a b \left (a^2+3 b^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-b^2-x^2} \, dx,x,b \sinh (x)\right )\\ &=\frac {1}{2} a \left (a^2+3 b^2\right ) \tan ^{-1}(\sinh (x))+b^3 \log (\cosh (x))-\frac {1}{2} a b^2 \sinh (x)-\frac {1}{2} \text {sech}^2(x) (b-a \sinh (x)) (a+b \sinh (x))^2\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 1.99, size = 194, normalized size = 3.34 \[ \frac {1}{4} \left (\frac {b \left (\left (a^3+3 a b^2-2 \left (-b^2\right )^{3/2}\right ) \log \left (\sqrt {-b^2}-b \sinh (x)\right )-\left (a^3+3 a b^2+2 \left (-b^2\right )^{3/2}\right ) \log \left (\sqrt {-b^2}+b \sinh (x)\right )\right )}{\sqrt {-b^2}}+\frac {2 a^4 b \text {sech}^2(x)}{a^2+b^2}+\frac {a \tanh (x) \text {sech}(x) \left (2 a^4-4 a^2 b^2+b^4 \cosh (2 x)-7 b^4\right )}{a^2+b^2}-\frac {2 b \tanh ^2(x) \left (-4 a^4-2 a^2 b^2+a b^3 \sinh (x)+b^4\right )}{a^2+b^2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.41, size = 502, normalized size = 8.66 \[ -\frac {b^{3} x \cosh \relax (x)^{4} + b^{3} x \sinh \relax (x)^{4} + b^{3} x - {\left (a^{3} - 3 \, a b^{2}\right )} \cosh \relax (x)^{3} + {\left (4 \, b^{3} x \cosh \relax (x) - a^{3} + 3 \, a b^{2}\right )} \sinh \relax (x)^{3} + 2 \, {\left (b^{3} x + 3 \, a^{2} b - b^{3}\right )} \cosh \relax (x)^{2} + {\left (6 \, b^{3} x \cosh \relax (x)^{2} + 2 \, b^{3} x + 6 \, a^{2} b - 2 \, b^{3} - 3 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cosh \relax (x)\right )} \sinh \relax (x)^{2} - {\left ({\left (a^{3} + 3 \, a b^{2}\right )} \cosh \relax (x)^{4} + 4 \, {\left (a^{3} + 3 \, a b^{2}\right )} \cosh \relax (x) \sinh \relax (x)^{3} + {\left (a^{3} + 3 \, a b^{2}\right )} \sinh \relax (x)^{4} + a^{3} + 3 \, a b^{2} + 2 \, {\left (a^{3} + 3 \, a b^{2}\right )} \cosh \relax (x)^{2} + 2 \, {\left (a^{3} + 3 \, a b^{2} + 3 \, {\left (a^{3} + 3 \, a b^{2}\right )} \cosh \relax (x)^{2}\right )} \sinh \relax (x)^{2} + 4 \, {\left ({\left (a^{3} + 3 \, a b^{2}\right )} \cosh \relax (x)^{3} + {\left (a^{3} + 3 \, a b^{2}\right )} \cosh \relax (x)\right )} \sinh \relax (x)\right )} \arctan \left (\cosh \relax (x) + \sinh \relax (x)\right ) + {\left (a^{3} - 3 \, a b^{2}\right )} \cosh \relax (x) - {\left (b^{3} \cosh \relax (x)^{4} + 4 \, b^{3} \cosh \relax (x) \sinh \relax (x)^{3} + b^{3} \sinh \relax (x)^{4} + 2 \, b^{3} \cosh \relax (x)^{2} + b^{3} + 2 \, {\left (3 \, b^{3} \cosh \relax (x)^{2} + b^{3}\right )} \sinh \relax (x)^{2} + 4 \, {\left (b^{3} \cosh \relax (x)^{3} + b^{3} \cosh \relax (x)\right )} \sinh \relax (x)\right )} \log \left (\frac {2 \, \cosh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right ) + {\left (4 \, b^{3} x \cosh \relax (x)^{3} + a^{3} - 3 \, a b^{2} - 3 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cosh \relax (x)^{2} + 4 \, {\left (b^{3} x + 3 \, a^{2} b - b^{3}\right )} \cosh \relax (x)\right )} \sinh \relax (x)}{\cosh \relax (x)^{4} + 4 \, \cosh \relax (x) \sinh \relax (x)^{3} + \sinh \relax (x)^{4} + 2 \, {\left (3 \, \cosh \relax (x)^{2} + 1\right )} \sinh \relax (x)^{2} + 2 \, \cosh \relax (x)^{2} + 4 \, {\left (\cosh \relax (x)^{3} + \cosh \relax (x)\right )} \sinh \relax (x) + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.12, size = 117, normalized size = 2.02 \[ \frac {1}{2} \, b^{3} \log \left ({\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4\right ) + \frac {1}{4} \, {\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, x\right )} - 1\right )} e^{\left (-x\right )}\right )\right )} {\left (a^{3} + 3 \, a b^{2}\right )} - \frac {b^{3} {\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 2 \, a^{3} {\left (e^{\left (-x\right )} - e^{x}\right )} - 6 \, a b^{2} {\left (e^{\left (-x\right )} - e^{x}\right )} + 12 \, a^{2} b}{2 \, {\left ({\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.37, size = 75, normalized size = 1.29 \[ \frac {a^{3} \mathrm {sech}\relax (x ) \tanh \relax (x )}{2}+a^{3} \arctan \left ({\mathrm e}^{x}\right )-\frac {3 a^{2} b}{2 \cosh \relax (x )^{2}}-\frac {3 a \,b^{2} \sinh \relax (x )}{\cosh \relax (x )^{2}}+\frac {3 a \,b^{2} \mathrm {sech}\relax (x ) \tanh \relax (x )}{2}+3 a \,b^{2} \arctan \left ({\mathrm e}^{x}\right )+b^{3} \ln \left (\cosh \relax (x )\right )-\frac {b^{3} \left (\tanh ^{2}\relax (x )\right )}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.56, size = 120, normalized size = 2.07 \[ \frac {3}{2} \, a^{2} b \tanh \relax (x)^{2} + b^{3} {\left (x + \frac {2 \, e^{\left (-2 \, x\right )}}{2 \, e^{\left (-2 \, x\right )} + e^{\left (-4 \, x\right )} + 1} + \log \left (e^{\left (-2 \, x\right )} + 1\right )\right )} - 3 \, a b^{2} {\left (\frac {e^{\left (-x\right )} - e^{\left (-3 \, x\right )}}{2 \, e^{\left (-2 \, x\right )} + e^{\left (-4 \, x\right )} + 1} + \arctan \left (e^{\left (-x\right )}\right )\right )} + a^{3} {\left (\frac {e^{\left (-x\right )} - e^{\left (-3 \, x\right )}}{2 \, e^{\left (-2 \, x\right )} + e^{\left (-4 \, x\right )} + 1} - \arctan \left (e^{\left (-x\right )}\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.61, size = 233, normalized size = 4.02 \[ \mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\left (a^3+3\,a\,b^2\right )}{\sqrt {a^6+6\,a^4\,b^2+9\,a^2\,b^4}}\right )\,\sqrt {a^6+6\,a^4\,b^2+9\,a^2\,b^4}+\frac {{\mathrm {e}}^x\,\left (6\,a\,b^2-2\,a^3\right )+6\,a^2\,b-2\,b^3}{2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1}+b^3\,\ln \left (\left (a^3\,{\mathrm {e}}^x-2\,\sqrt {-\frac {a^6}{4}-\frac {3\,a^4\,b^2}{2}-\frac {9\,a^2\,b^4}{4}}+3\,a\,b^2\,{\mathrm {e}}^x\right )\,\left (2\,\sqrt {-\frac {a^6}{4}-\frac {3\,a^4\,b^2}{2}-\frac {9\,a^2\,b^4}{4}}+a^3\,{\mathrm {e}}^x+3\,a\,b^2\,{\mathrm {e}}^x\right )\right )-b^3\,x-\frac {{\mathrm {e}}^x\,\left (3\,a\,b^2-a^3\right )+6\,a^2\,b-2\,b^3}{{\mathrm {e}}^{2\,x}+1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a \operatorname {sech}{\relax (x )} + b \tanh {\relax (x )}\right )^{3}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________