\(\int (a \text {sech}^2(x))^{3/2} \, dx\) [33]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 10, antiderivative size = 46 \[ \int \left (a \text {sech}^2(x)\right )^{3/2} \, dx=\frac {1}{2} a^{3/2} \arctan \left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a \text {sech}^2(x)}}\right )+\frac {1}{2} a \sqrt {a \text {sech}^2(x)} \tanh (x) \]

[Out]

1/2*a^(3/2)*arctan(a^(1/2)*tanh(x)/(a*sech(x)^2)^(1/2))+1/2*a*(a*sech(x)^2)^(1/2)*tanh(x)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {4207, 201, 223, 209} \[ \int \left (a \text {sech}^2(x)\right )^{3/2} \, dx=\frac {1}{2} a^{3/2} \arctan \left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a \text {sech}^2(x)}}\right )+\frac {1}{2} a \tanh (x) \sqrt {a \text {sech}^2(x)} \]

[In]

Int[(a*Sech[x]^2)^(3/2),x]

[Out]

(a^(3/2)*ArcTan[(Sqrt[a]*Tanh[x])/Sqrt[a*Sech[x]^2]])/2 + (a*Sqrt[a*Sech[x]^2]*Tanh[x])/2

Rule 201

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^p/(n*p + 1)), x] + Dist[a*n*(p/(n*p + 1)),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 4207

Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[b*(ff/
f), Subst[Int[(b + b*ff^2*x^2)^(p - 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p
]

Rubi steps \begin{align*} \text {integral}& = a \text {Subst}\left (\int \sqrt {a-a x^2} \, dx,x,\tanh (x)\right ) \\ & = \frac {1}{2} a \sqrt {a \text {sech}^2(x)} \tanh (x)+\frac {1}{2} a^2 \text {Subst}\left (\int \frac {1}{\sqrt {a-a x^2}} \, dx,x,\tanh (x)\right ) \\ & = \frac {1}{2} a \sqrt {a \text {sech}^2(x)} \tanh (x)+\frac {1}{2} a^2 \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,\frac {\tanh (x)}{\sqrt {a \text {sech}^2(x)}}\right ) \\ & = \frac {1}{2} a^{3/2} \arctan \left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a \text {sech}^2(x)}}\right )+\frac {1}{2} a \sqrt {a \text {sech}^2(x)} \tanh (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.52 \[ \int \left (a \text {sech}^2(x)\right )^{3/2} \, dx=\frac {1}{2} a \sqrt {a \text {sech}^2(x)} (\arctan (\sinh (x)) \cosh (x)+\tanh (x)) \]

[In]

Integrate[(a*Sech[x]^2)^(3/2),x]

[Out]

(a*Sqrt[a*Sech[x]^2]*(ArcTan[Sinh[x]]*Cosh[x] + Tanh[x]))/2

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 0.14 (sec) , antiderivative size = 106, normalized size of antiderivative = 2.30

method result size
risch \(\frac {a \sqrt {\frac {{\mathrm e}^{2 x} a}{\left (1+{\mathrm e}^{2 x}\right )^{2}}}\, \left ({\mathrm e}^{2 x}-1\right )}{1+{\mathrm e}^{2 x}}+\frac {i a \,{\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right ) \sqrt {\frac {{\mathrm e}^{2 x} a}{\left (1+{\mathrm e}^{2 x}\right )^{2}}}\, \ln \left ({\mathrm e}^{x}+i\right )}{2}-\frac {i a \,{\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right ) \sqrt {\frac {{\mathrm e}^{2 x} a}{\left (1+{\mathrm e}^{2 x}\right )^{2}}}\, \ln \left ({\mathrm e}^{x}-i\right )}{2}\) \(106\)

[In]

int((sech(x)^2*a)^(3/2),x,method=_RETURNVERBOSE)

[Out]

a/(1+exp(2*x))*(exp(2*x)*a/(1+exp(2*x))^2)^(1/2)*(exp(2*x)-1)+1/2*I*a*exp(-x)*(1+exp(2*x))*(exp(2*x)*a/(1+exp(
2*x))^2)^(1/2)*ln(exp(x)+I)-1/2*I*a*exp(-x)*(1+exp(2*x))*(exp(2*x)*a/(1+exp(2*x))^2)^(1/2)*ln(exp(x)-I)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 310 vs. \(2 (34) = 68\).

Time = 0.27 (sec) , antiderivative size = 310, normalized size of antiderivative = 6.74 \[ \int \left (a \text {sech}^2(x)\right )^{3/2} \, dx=\frac {{\left (a \cosh \left (x\right )^{3} + {\left (a e^{\left (2 \, x\right )} + a\right )} \sinh \left (x\right )^{3} + 3 \, {\left (a \cosh \left (x\right ) e^{\left (2 \, x\right )} + a \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + {\left (a \cosh \left (x\right )^{4} + {\left (a e^{\left (2 \, x\right )} + a\right )} \sinh \left (x\right )^{4} + 4 \, {\left (a \cosh \left (x\right ) e^{\left (2 \, x\right )} + a \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + 2 \, a \cosh \left (x\right )^{2} + 2 \, {\left (3 \, a \cosh \left (x\right )^{2} + {\left (3 \, a \cosh \left (x\right )^{2} + a\right )} e^{\left (2 \, x\right )} + a\right )} \sinh \left (x\right )^{2} + {\left (a \cosh \left (x\right )^{4} + 2 \, a \cosh \left (x\right )^{2} + a\right )} e^{\left (2 \, x\right )} + 4 \, {\left (a \cosh \left (x\right )^{3} + a \cosh \left (x\right ) + {\left (a \cosh \left (x\right )^{3} + a \cosh \left (x\right )\right )} e^{\left (2 \, x\right )}\right )} \sinh \left (x\right ) + a\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) - a \cosh \left (x\right ) + {\left (a \cosh \left (x\right )^{3} - a \cosh \left (x\right )\right )} e^{\left (2 \, x\right )} + {\left (3 \, a \cosh \left (x\right )^{2} + {\left (3 \, a \cosh \left (x\right )^{2} - a\right )} e^{\left (2 \, x\right )} - a\right )} \sinh \left (x\right )\right )} \sqrt {\frac {a}{e^{\left (4 \, x\right )} + 2 \, e^{\left (2 \, x\right )} + 1}} e^{x}}{4 \, \cosh \left (x\right ) e^{x} \sinh \left (x\right )^{3} + e^{x} \sinh \left (x\right )^{4} + 2 \, {\left (3 \, \cosh \left (x\right )^{2} + 1\right )} e^{x} \sinh \left (x\right )^{2} + 4 \, {\left (\cosh \left (x\right )^{3} + \cosh \left (x\right )\right )} e^{x} \sinh \left (x\right ) + {\left (\cosh \left (x\right )^{4} + 2 \, \cosh \left (x\right )^{2} + 1\right )} e^{x}} \]

[In]

integrate((a*sech(x)^2)^(3/2),x, algorithm="fricas")

[Out]

(a*cosh(x)^3 + (a*e^(2*x) + a)*sinh(x)^3 + 3*(a*cosh(x)*e^(2*x) + a*cosh(x))*sinh(x)^2 + (a*cosh(x)^4 + (a*e^(
2*x) + a)*sinh(x)^4 + 4*(a*cosh(x)*e^(2*x) + a*cosh(x))*sinh(x)^3 + 2*a*cosh(x)^2 + 2*(3*a*cosh(x)^2 + (3*a*co
sh(x)^2 + a)*e^(2*x) + a)*sinh(x)^2 + (a*cosh(x)^4 + 2*a*cosh(x)^2 + a)*e^(2*x) + 4*(a*cosh(x)^3 + a*cosh(x) +
 (a*cosh(x)^3 + a*cosh(x))*e^(2*x))*sinh(x) + a)*arctan(cosh(x) + sinh(x)) - a*cosh(x) + (a*cosh(x)^3 - a*cosh
(x))*e^(2*x) + (3*a*cosh(x)^2 + (3*a*cosh(x)^2 - a)*e^(2*x) - a)*sinh(x))*sqrt(a/(e^(4*x) + 2*e^(2*x) + 1))*e^
x/(4*cosh(x)*e^x*sinh(x)^3 + e^x*sinh(x)^4 + 2*(3*cosh(x)^2 + 1)*e^x*sinh(x)^2 + 4*(cosh(x)^3 + cosh(x))*e^x*s
inh(x) + (cosh(x)^4 + 2*cosh(x)^2 + 1)*e^x)

Sympy [F]

\[ \int \left (a \text {sech}^2(x)\right )^{3/2} \, dx=\int \left (a \operatorname {sech}^{2}{\left (x \right )}\right )^{\frac {3}{2}}\, dx \]

[In]

integrate((a*sech(x)**2)**(3/2),x)

[Out]

Integral((a*sech(x)**2)**(3/2), x)

Maxima [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.85 \[ \int \left (a \text {sech}^2(x)\right )^{3/2} \, dx=a^{\frac {3}{2}} \arctan \left (e^{x}\right ) + \frac {a^{\frac {3}{2}} e^{\left (3 \, x\right )} - a^{\frac {3}{2}} e^{x}}{e^{\left (4 \, x\right )} + 2 \, e^{\left (2 \, x\right )} + 1} \]

[In]

integrate((a*sech(x)^2)^(3/2),x, algorithm="maxima")

[Out]

a^(3/2)*arctan(e^x) + (a^(3/2)*e^(3*x) - a^(3/2)*e^x)/(e^(4*x) + 2*e^(2*x) + 1)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.04 \[ \int \left (a \text {sech}^2(x)\right )^{3/2} \, dx=\frac {1}{4} \, {\left (\pi - \frac {4 \, {\left (e^{\left (-x\right )} - e^{x}\right )}}{{\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4} + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, x\right )} - 1\right )} e^{\left (-x\right )}\right )\right )} a^{\frac {3}{2}} \]

[In]

integrate((a*sech(x)^2)^(3/2),x, algorithm="giac")

[Out]

1/4*(pi - 4*(e^(-x) - e^x)/((e^(-x) - e^x)^2 + 4) + 2*arctan(1/2*(e^(2*x) - 1)*e^(-x)))*a^(3/2)

Mupad [F(-1)]

Timed out. \[ \int \left (a \text {sech}^2(x)\right )^{3/2} \, dx=\int {\left (\frac {a}{{\mathrm {cosh}\left (x\right )}^2}\right )}^{3/2} \,d x \]

[In]

int((a/cosh(x)^2)^(3/2),x)

[Out]

int((a/cosh(x)^2)^(3/2), x)