\(\int x (a+b \text {sech}(c+d \sqrt {x}))^2 \, dx\) [46]

Optimal result
Mathematica [A] (warning: unable to verify)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 18, antiderivative size = 319 \[ \int x \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )^2 \, dx=\frac {2 b^2 x^{3/2}}{d}+\frac {a^2 x^2}{2}+\frac {8 a b x^{3/2} \arctan \left (e^{c+d \sqrt {x}}\right )}{d}-\frac {6 b^2 x \log \left (1+e^{2 \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {12 i a b x \operatorname {PolyLog}\left (2,-i e^{c+d \sqrt {x}}\right )}{d^2}+\frac {12 i a b x \operatorname {PolyLog}\left (2,i e^{c+d \sqrt {x}}\right )}{d^2}-\frac {6 b^2 \sqrt {x} \operatorname {PolyLog}\left (2,-e^{2 \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {24 i a b \sqrt {x} \operatorname {PolyLog}\left (3,-i e^{c+d \sqrt {x}}\right )}{d^3}-\frac {24 i a b \sqrt {x} \operatorname {PolyLog}\left (3,i e^{c+d \sqrt {x}}\right )}{d^3}+\frac {3 b^2 \operatorname {PolyLog}\left (3,-e^{2 \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {24 i a b \operatorname {PolyLog}\left (4,-i e^{c+d \sqrt {x}}\right )}{d^4}+\frac {24 i a b \operatorname {PolyLog}\left (4,i e^{c+d \sqrt {x}}\right )}{d^4}+\frac {2 b^2 x^{3/2} \tanh \left (c+d \sqrt {x}\right )}{d} \] Output:

2*b^2*x^(3/2)/d+1/2*a^2*x^2+8*a*b*x^(3/2)*arctan(exp(c+d*x^(1/2)))/d-6*b^2 
*x*ln(1+exp(2*c+2*d*x^(1/2)))/d^2-12*I*a*b*x*polylog(2,-I*exp(c+d*x^(1/2)) 
)/d^2+12*I*a*b*x*polylog(2,I*exp(c+d*x^(1/2)))/d^2-6*b^2*x^(1/2)*polylog(2 
,-exp(2*c+2*d*x^(1/2)))/d^3+24*I*a*b*x^(1/2)*polylog(3,-I*exp(c+d*x^(1/2)) 
)/d^3-24*I*a*b*x^(1/2)*polylog(3,I*exp(c+d*x^(1/2)))/d^3+3*b^2*polylog(3,- 
exp(2*c+2*d*x^(1/2)))/d^4-24*I*a*b*polylog(4,-I*exp(c+d*x^(1/2)))/d^4+24*I 
*a*b*polylog(4,I*exp(c+d*x^(1/2)))/d^4+2*b^2*x^(3/2)*tanh(c+d*x^(1/2))/d
 

Mathematica [A] (warning: unable to verify)

Time = 3.61 (sec) , antiderivative size = 466, normalized size of antiderivative = 1.46 \[ \int x \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )^2 \, dx=\frac {\cosh \left (c+d \sqrt {x}\right ) \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )^2 \left (a^2 x^2 \cosh \left (c+d \sqrt {x}\right )+\frac {2 b \cosh \left (c+d \sqrt {x}\right ) \left (4 b e^{2 c} x^{3/2}+\frac {i \left (1+e^{2 c}\right ) \left (12 i b d^2 x \log \left (1-i e^{c+d \sqrt {x}}\right )+4 a d^3 x^{3/2} \log \left (1-i e^{c+d \sqrt {x}}\right )+12 i b d^2 x \log \left (1+i e^{c+d \sqrt {x}}\right )-4 a d^3 x^{3/2} \log \left (1+i e^{c+d \sqrt {x}}\right )-6 i b d^2 x \log \left (1+e^{2 \left (c+d \sqrt {x}\right )}\right )-12 \left (-i b d \sqrt {x}+a d^2 x\right ) \operatorname {PolyLog}\left (2,-i e^{c+d \sqrt {x}}\right )+12 \left (i b d \sqrt {x}+a d^2 x\right ) \operatorname {PolyLog}\left (2,i e^{c+d \sqrt {x}}\right )+24 a d \sqrt {x} \operatorname {PolyLog}\left (3,-i e^{c+d \sqrt {x}}\right )-24 a d \sqrt {x} \operatorname {PolyLog}\left (3,i e^{c+d \sqrt {x}}\right )-3 i b \operatorname {PolyLog}\left (3,-e^{2 \left (c+d \sqrt {x}\right )}\right )-24 a \operatorname {PolyLog}\left (4,-i e^{c+d \sqrt {x}}\right )+24 a \operatorname {PolyLog}\left (4,i e^{c+d \sqrt {x}}\right )\right )}{d^3}\right )}{d \left (1+e^{2 c}\right )}+\frac {4 b^2 x^{3/2} \text {sech}(c) \sinh \left (d \sqrt {x}\right )}{d}\right )}{2 \left (b+a \cosh \left (c+d \sqrt {x}\right )\right )^2} \] Input:

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

Output:

(Cosh[c + d*Sqrt[x]]*(a + b*Sech[c + d*Sqrt[x]])^2*(a^2*x^2*Cosh[c + d*Sqr 
t[x]] + (2*b*Cosh[c + d*Sqrt[x]]*(4*b*E^(2*c)*x^(3/2) + (I*(1 + E^(2*c))*( 
(12*I)*b*d^2*x*Log[1 - I*E^(c + d*Sqrt[x])] + 4*a*d^3*x^(3/2)*Log[1 - I*E^ 
(c + d*Sqrt[x])] + (12*I)*b*d^2*x*Log[1 + I*E^(c + d*Sqrt[x])] - 4*a*d^3*x 
^(3/2)*Log[1 + I*E^(c + d*Sqrt[x])] - (6*I)*b*d^2*x*Log[1 + E^(2*(c + d*Sq 
rt[x]))] - 12*((-I)*b*d*Sqrt[x] + a*d^2*x)*PolyLog[2, (-I)*E^(c + d*Sqrt[x 
])] + 12*(I*b*d*Sqrt[x] + a*d^2*x)*PolyLog[2, I*E^(c + d*Sqrt[x])] + 24*a* 
d*Sqrt[x]*PolyLog[3, (-I)*E^(c + d*Sqrt[x])] - 24*a*d*Sqrt[x]*PolyLog[3, I 
*E^(c + d*Sqrt[x])] - (3*I)*b*PolyLog[3, -E^(2*(c + d*Sqrt[x]))] - 24*a*Po 
lyLog[4, (-I)*E^(c + d*Sqrt[x])] + 24*a*PolyLog[4, I*E^(c + d*Sqrt[x])]))/ 
d^3))/(d*(1 + E^(2*c))) + (4*b^2*x^(3/2)*Sech[c]*Sinh[d*Sqrt[x]])/d))/(2*( 
b + a*Cosh[c + d*Sqrt[x]])^2)
 

Rubi [A] (verified)

Time = 1.08 (sec) , antiderivative size = 321, normalized size of antiderivative = 1.01, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {5959, 3042, 4678, 2009}

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 x \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )^2 \, dx\)

\(\Big \downarrow \) 5959

\(\displaystyle 2 \int x^{3/2} \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )^2d\sqrt {x}\)

\(\Big \downarrow \) 3042

\(\displaystyle 2 \int x^{3/2} \left (a+b \csc \left (i c+i d \sqrt {x}+\frac {\pi }{2}\right )\right )^2d\sqrt {x}\)

\(\Big \downarrow \) 4678

\(\displaystyle 2 \int \left (x^{3/2} a^2+2 b x^{3/2} \text {sech}\left (c+d \sqrt {x}\right ) a+b^2 x^{3/2} \text {sech}^2\left (c+d \sqrt {x}\right )\right )d\sqrt {x}\)

\(\Big \downarrow \) 2009

\(\displaystyle 2 \left (\frac {a^2 x^2}{4}+\frac {4 a b x^{3/2} \arctan \left (e^{c+d \sqrt {x}}\right )}{d}-\frac {12 i a b \operatorname {PolyLog}\left (4,-i e^{c+d \sqrt {x}}\right )}{d^4}+\frac {12 i a b \operatorname {PolyLog}\left (4,i e^{c+d \sqrt {x}}\right )}{d^4}+\frac {12 i a b \sqrt {x} \operatorname {PolyLog}\left (3,-i e^{c+d \sqrt {x}}\right )}{d^3}-\frac {12 i a b \sqrt {x} \operatorname {PolyLog}\left (3,i e^{c+d \sqrt {x}}\right )}{d^3}-\frac {6 i a b x \operatorname {PolyLog}\left (2,-i e^{c+d \sqrt {x}}\right )}{d^2}+\frac {6 i a b x \operatorname {PolyLog}\left (2,i e^{c+d \sqrt {x}}\right )}{d^2}+\frac {3 b^2 \operatorname {PolyLog}\left (3,-e^{2 \left (c+d \sqrt {x}\right )}\right )}{2 d^4}-\frac {3 b^2 \sqrt {x} \operatorname {PolyLog}\left (2,-e^{2 \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {3 b^2 x \log \left (e^{2 \left (c+d \sqrt {x}\right )}+1\right )}{d^2}+\frac {b^2 x^{3/2} \tanh \left (c+d \sqrt {x}\right )}{d}+\frac {b^2 x^{3/2}}{d}\right )\)

Input:

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

Output:

2*((b^2*x^(3/2))/d + (a^2*x^2)/4 + (4*a*b*x^(3/2)*ArcTan[E^(c + d*Sqrt[x]) 
])/d - (3*b^2*x*Log[1 + E^(2*(c + d*Sqrt[x]))])/d^2 - ((6*I)*a*b*x*PolyLog 
[2, (-I)*E^(c + d*Sqrt[x])])/d^2 + ((6*I)*a*b*x*PolyLog[2, I*E^(c + d*Sqrt 
[x])])/d^2 - (3*b^2*Sqrt[x]*PolyLog[2, -E^(2*(c + d*Sqrt[x]))])/d^3 + ((12 
*I)*a*b*Sqrt[x]*PolyLog[3, (-I)*E^(c + d*Sqrt[x])])/d^3 - ((12*I)*a*b*Sqrt 
[x]*PolyLog[3, I*E^(c + d*Sqrt[x])])/d^3 + (3*b^2*PolyLog[3, -E^(2*(c + d* 
Sqrt[x]))])/(2*d^4) - ((12*I)*a*b*PolyLog[4, (-I)*E^(c + d*Sqrt[x])])/d^4 
+ ((12*I)*a*b*PolyLog[4, I*E^(c + d*Sqrt[x])])/d^4 + (b^2*x^(3/2)*Tanh[c + 
 d*Sqrt[x]])/d)
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4678
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) 
, x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], 
 x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
 

rule 5959
Int[(x_)^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbo 
l] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*Sech[c + d*x] 
)^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[(m 
 + 1)/n], 0] && IntegerQ[p]
 
Maple [F]

\[\int x \left (a +b \,\operatorname {sech}\left (c +d \sqrt {x}\right )\right )^{2}d x\]

Input:

int(x*(a+b*sech(c+d*x^(1/2)))^2,x)
 

Output:

int(x*(a+b*sech(c+d*x^(1/2)))^2,x)
 

Fricas [F]

\[ \int x \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )^2 \, dx=\int { {\left (b \operatorname {sech}\left (d \sqrt {x} + c\right ) + a\right )}^{2} x \,d x } \] Input:

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

Output:

integral(b^2*x*sech(d*sqrt(x) + c)^2 + 2*a*b*x*sech(d*sqrt(x) + c) + a^2*x 
, x)
 

Sympy [F]

\[ \int x \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )^2 \, dx=\int x \left (a + b \operatorname {sech}{\left (c + d \sqrt {x} \right )}\right )^{2}\, dx \] Input:

integrate(x*(a+b*sech(c+d*x**(1/2)))**2,x)
 

Output:

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

Maxima [F]

\[ \int x \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )^2 \, dx=\int { {\left (b \operatorname {sech}\left (d \sqrt {x} + c\right ) + a\right )}^{2} x \,d x } \] Input:

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

Output:

1/2*(a^2*d*x^2*e^(2*d*sqrt(x) + 2*c) + a^2*d*x^2 - 8*b^2*x^(3/2))/(d*e^(2* 
d*sqrt(x) + 2*c) + d) + integrate(2*(2*a*b*d*x*e^(d*sqrt(x) + c) + 3*b^2*s 
qrt(x))/(d*e^(2*d*sqrt(x) + 2*c) + d), x)
 

Giac [F]

\[ \int x \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )^2 \, dx=\int { {\left (b \operatorname {sech}\left (d \sqrt {x} + c\right ) + a\right )}^{2} x \,d x } \] Input:

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

Output:

integrate((b*sech(d*sqrt(x) + c) + a)^2*x, x)
 

Mupad [F(-1)]

Timed out. \[ \int x \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )^2 \, dx=\int x\,{\left (a+\frac {b}{\mathrm {cosh}\left (c+d\,\sqrt {x}\right )}\right )}^2 \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int x \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )^2 \, dx=\frac {96 e^{2 \sqrt {x}\, d +2 c} \mathit {atan} \left (e^{\sqrt {x}\, d +c}\right ) a b +96 \mathit {atan} \left (e^{\sqrt {x}\, d +c}\right ) a b +96 e^{2 \sqrt {x}\, d +3 c} \left (\int \frac {e^{\sqrt {x}\, d}}{e^{4 \sqrt {x}\, d +4 c}+2 e^{2 \sqrt {x}\, d +2 c}+1}d x \right ) a b \,d^{2}+16 e^{2 \sqrt {x}\, d +3 c} \left (\int \frac {e^{\sqrt {x}\, d} x}{e^{4 \sqrt {x}\, d +4 c}+2 e^{2 \sqrt {x}\, d +2 c}+1}d x \right ) a b \,d^{4}+48 e^{2 \sqrt {x}\, d +3 c} \left (\int \frac {\sqrt {x}\, e^{\sqrt {x}\, d}}{e^{4 \sqrt {x}\, d +4 c}+2 e^{2 \sqrt {x}\, d +2 c}+1}d x \right ) a b \,d^{3}+12 \sqrt {x}\, e^{2 \sqrt {x}\, d +2 c} b^{2} d +12 e^{2 \sqrt {x}\, d +2 c} \left (\int \frac {\sqrt {x}}{e^{4 \sqrt {x}\, d +4 c}+2 e^{2 \sqrt {x}\, d +2 c}+1}d x \right ) b^{2} d^{3}+12 e^{2 \sqrt {x}\, d +2 c} \left (\int \frac {1}{e^{4 \sqrt {x}\, d +4 c}+2 e^{2 \sqrt {x}\, d +2 c}+1}d x \right ) b^{2} d^{2}-6 e^{2 \sqrt {x}\, d +2 c} \mathrm {log}\left (e^{2 \sqrt {x}\, d +2 c}+1\right ) b^{2}+e^{2 \sqrt {x}\, d +2 c} a^{2} d^{4} x^{2}-16 \sqrt {x}\, e^{\sqrt {x}\, d +c} a b \,d^{3} x -96 \sqrt {x}\, e^{\sqrt {x}\, d +c} a b d -48 e^{\sqrt {x}\, d +c} a b \,d^{2} x +96 e^{c} \left (\int \frac {e^{\sqrt {x}\, d}}{e^{4 \sqrt {x}\, d +4 c}+2 e^{2 \sqrt {x}\, d +2 c}+1}d x \right ) a b \,d^{2}+16 e^{c} \left (\int \frac {e^{\sqrt {x}\, d} x}{e^{4 \sqrt {x}\, d +4 c}+2 e^{2 \sqrt {x}\, d +2 c}+1}d x \right ) a b \,d^{4}+48 e^{c} \left (\int \frac {\sqrt {x}\, e^{\sqrt {x}\, d}}{e^{4 \sqrt {x}\, d +4 c}+2 e^{2 \sqrt {x}\, d +2 c}+1}d x \right ) a b \,d^{3}-8 \sqrt {x}\, b^{2} d^{3} x +12 \left (\int \frac {\sqrt {x}}{e^{4 \sqrt {x}\, d +4 c}+2 e^{2 \sqrt {x}\, d +2 c}+1}d x \right ) b^{2} d^{3}+12 \left (\int \frac {1}{e^{4 \sqrt {x}\, d +4 c}+2 e^{2 \sqrt {x}\, d +2 c}+1}d x \right ) b^{2} d^{2}-6 \,\mathrm {log}\left (e^{2 \sqrt {x}\, d +2 c}+1\right ) b^{2}+a^{2} d^{4} x^{2}-12 b^{2} d^{2} x}{2 d^{4} \left (e^{2 \sqrt {x}\, d +2 c}+1\right )} \] Input:

int(x*(a+b*sech(c+d*x^(1/2)))^2,x)
 

Output:

(96*e**(2*sqrt(x)*d + 2*c)*atan(e**(sqrt(x)*d + c))*a*b + 96*atan(e**(sqrt 
(x)*d + c))*a*b + 96*e**(2*sqrt(x)*d + 3*c)*int(e**(sqrt(x)*d)/(e**(4*sqrt 
(x)*d + 4*c) + 2*e**(2*sqrt(x)*d + 2*c) + 1),x)*a*b*d**2 + 16*e**(2*sqrt(x 
)*d + 3*c)*int((e**(sqrt(x)*d)*x)/(e**(4*sqrt(x)*d + 4*c) + 2*e**(2*sqrt(x 
)*d + 2*c) + 1),x)*a*b*d**4 + 48*e**(2*sqrt(x)*d + 3*c)*int((sqrt(x)*e**(s 
qrt(x)*d))/(e**(4*sqrt(x)*d + 4*c) + 2*e**(2*sqrt(x)*d + 2*c) + 1),x)*a*b* 
d**3 + 12*sqrt(x)*e**(2*sqrt(x)*d + 2*c)*b**2*d + 12*e**(2*sqrt(x)*d + 2*c 
)*int(sqrt(x)/(e**(4*sqrt(x)*d + 4*c) + 2*e**(2*sqrt(x)*d + 2*c) + 1),x)*b 
**2*d**3 + 12*e**(2*sqrt(x)*d + 2*c)*int(1/(e**(4*sqrt(x)*d + 4*c) + 2*e** 
(2*sqrt(x)*d + 2*c) + 1),x)*b**2*d**2 - 6*e**(2*sqrt(x)*d + 2*c)*log(e**(2 
*sqrt(x)*d + 2*c) + 1)*b**2 + e**(2*sqrt(x)*d + 2*c)*a**2*d**4*x**2 - 16*s 
qrt(x)*e**(sqrt(x)*d + c)*a*b*d**3*x - 96*sqrt(x)*e**(sqrt(x)*d + c)*a*b*d 
 - 48*e**(sqrt(x)*d + c)*a*b*d**2*x + 96*e**c*int(e**(sqrt(x)*d)/(e**(4*sq 
rt(x)*d + 4*c) + 2*e**(2*sqrt(x)*d + 2*c) + 1),x)*a*b*d**2 + 16*e**c*int(( 
e**(sqrt(x)*d)*x)/(e**(4*sqrt(x)*d + 4*c) + 2*e**(2*sqrt(x)*d + 2*c) + 1), 
x)*a*b*d**4 + 48*e**c*int((sqrt(x)*e**(sqrt(x)*d))/(e**(4*sqrt(x)*d + 4*c) 
 + 2*e**(2*sqrt(x)*d + 2*c) + 1),x)*a*b*d**3 - 8*sqrt(x)*b**2*d**3*x + 12* 
int(sqrt(x)/(e**(4*sqrt(x)*d + 4*c) + 2*e**(2*sqrt(x)*d + 2*c) + 1),x)*b** 
2*d**3 + 12*int(1/(e**(4*sqrt(x)*d + 4*c) + 2*e**(2*sqrt(x)*d + 2*c) + 1), 
x)*b**2*d**2 - 6*log(e**(2*sqrt(x)*d + 2*c) + 1)*b**2 + a**2*d**4*x**2 ...