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

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

Optimal result

Integrand size = 18, antiderivative size = 555 \[ \int \frac {x^3}{\left (a+b \text {sech}\left (c+d x^2\right )\right )^2} \, dx=\frac {x^4}{4 a^2}+\frac {b^3 x^2 \log \left (1+\frac {a e^{c+d x^2}}{b-\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}-\frac {b x^2 \log \left (1+\frac {a e^{c+d x^2}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}-\frac {b^3 x^2 \log \left (1+\frac {a e^{c+d x^2}}{b+\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}+\frac {b x^2 \log \left (1+\frac {a e^{c+d x^2}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}-\frac {b^2 \log \left (b+a \cosh \left (c+d x^2\right )\right )}{2 a^2 \left (a^2-b^2\right ) d^2}+\frac {b^3 \operatorname {PolyLog}\left (2,-\frac {a e^{c+d x^2}}{b-\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d^2}-\frac {b \operatorname {PolyLog}\left (2,-\frac {a e^{c+d x^2}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}-\frac {b^3 \operatorname {PolyLog}\left (2,-\frac {a e^{c+d x^2}}{b+\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d^2}+\frac {b \operatorname {PolyLog}\left (2,-\frac {a e^{c+d x^2}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {b^2 x^2 \sinh \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \cosh \left (c+d x^2\right )\right )} \] Output:

1/4*x^4/a^2+1/2*b^3*x^2*ln(1+a*exp(d*x^2+c)/(b-(-a^2+b^2)^(1/2)))/a^2/(-a^ 
2+b^2)^(3/2)/d-b*x^2*ln(1+a*exp(d*x^2+c)/(b-(-a^2+b^2)^(1/2)))/a^2/(-a^2+b 
^2)^(1/2)/d-1/2*b^3*x^2*ln(1+a*exp(d*x^2+c)/(b+(-a^2+b^2)^(1/2)))/a^2/(-a^ 
2+b^2)^(3/2)/d+b*x^2*ln(1+a*exp(d*x^2+c)/(b+(-a^2+b^2)^(1/2)))/a^2/(-a^2+b 
^2)^(1/2)/d-1/2*b^2*ln(b+a*cosh(d*x^2+c))/a^2/(a^2-b^2)/d^2+1/2*b^3*polylo 
g(2,-a*exp(d*x^2+c)/(b-(-a^2+b^2)^(1/2)))/a^2/(-a^2+b^2)^(3/2)/d^2-b*polyl 
og(2,-a*exp(d*x^2+c)/(b-(-a^2+b^2)^(1/2)))/a^2/(-a^2+b^2)^(1/2)/d^2-1/2*b^ 
3*polylog(2,-a*exp(d*x^2+c)/(b+(-a^2+b^2)^(1/2)))/a^2/(-a^2+b^2)^(3/2)/d^2 
+b*polylog(2,-a*exp(d*x^2+c)/(b+(-a^2+b^2)^(1/2)))/a^2/(-a^2+b^2)^(1/2)/d^ 
2+1/2*b^2*x^2*sinh(d*x^2+c)/a/(a^2-b^2)/d/(b+a*cosh(d*x^2+c))
 

Mathematica [A] (warning: unable to verify)

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

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

Output:

((b + a*Cosh[c + d*x^2])*Sech[c + d*x^2]^2*((-c + d*x^2)*(c + d*x^2)*(b + 
a*Cosh[c + d*x^2]) - (2*b*(a^2 - b^2)*(b + a*Cosh[c + d*x^2])*(b*Sqrt[-(a^ 
2 - b^2)^2]*(c + d*x^2) + 4*a^2*Sqrt[-a^2 + b^2]*c*ArcTan[(b + a*E^(c + d* 
x^2))/Sqrt[a^2 - b^2]] - 2*b^2*Sqrt[-a^2 + b^2]*c*ArcTan[(b + a*E^(c + d*x 
^2))/Sqrt[a^2 - b^2]] - 2*a^2*Sqrt[a^2 - b^2]*(c + d*x^2)*Log[1 + (a*E^(c 
+ d*x^2))/(b - Sqrt[-a^2 + b^2])] + b^2*Sqrt[a^2 - b^2]*(c + d*x^2)*Log[1 
+ (a*E^(c + d*x^2))/(b - Sqrt[-a^2 + b^2])] + 2*a^2*Sqrt[a^2 - b^2]*(c + d 
*x^2)*Log[1 + (a*E^(c + d*x^2))/(b + Sqrt[-a^2 + b^2])] - b^2*Sqrt[a^2 - b 
^2]*(c + d*x^2)*Log[1 + (a*E^(c + d*x^2))/(b + Sqrt[-a^2 + b^2])] - b*Sqrt 
[-(a^2 - b^2)^2]*Log[a + 2*b*E^(c + d*x^2) + a*E^(2*(c + d*x^2))] + Sqrt[a 
^2 - b^2]*(-2*a^2 + b^2)*PolyLog[2, (a*E^(c + d*x^2))/(-b + Sqrt[-a^2 + b^ 
2])] + Sqrt[a^2 - b^2]*(2*a^2 - b^2)*PolyLog[2, -((a*E^(c + d*x^2))/(b + S 
qrt[-a^2 + b^2]))]))/(-(a^2 - b^2)^2)^(3/2) + (2*a*b^2*d*x^2*Sinh[c + d*x^ 
2])/((a - b)*(a + b))))/(4*a^2*d^2*(a + b*Sech[c + d*x^2])^2)
 

Rubi [A] (verified)

Time = 1.36 (sec) , antiderivative size = 546, normalized size of antiderivative = 0.98, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {5959, 3042, 4679, 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 \frac {x^3}{\left (a+b \text {sech}\left (c+d x^2\right )\right )^2} \, dx\)

\(\Big \downarrow \) 5959

\(\displaystyle \frac {1}{2} \int \frac {x^2}{\left (a+b \text {sech}\left (d x^2+c\right )\right )^2}dx^2\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4679

\(\displaystyle \frac {1}{2} \int \left (-\frac {2 b x^2}{a^2 \left (b+a \cosh \left (d x^2+c\right )\right )}+\frac {x^2}{a^2}+\frac {b^2 x^2}{a^2 \left (b+a \cosh \left (d x^2+c\right )\right )^2}\right )dx^2\)

\(\Big \downarrow \) 2009

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

Input:

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

Output:

(x^4/(2*a^2) + (b^3*x^2*Log[1 + (a*E^(c + d*x^2))/(b - Sqrt[-a^2 + b^2])]) 
/(a^2*(-a^2 + b^2)^(3/2)*d) - (2*b*x^2*Log[1 + (a*E^(c + d*x^2))/(b - Sqrt 
[-a^2 + b^2])])/(a^2*Sqrt[-a^2 + b^2]*d) - (b^3*x^2*Log[1 + (a*E^(c + d*x^ 
2))/(b + Sqrt[-a^2 + b^2])])/(a^2*(-a^2 + b^2)^(3/2)*d) + (2*b*x^2*Log[1 + 
 (a*E^(c + d*x^2))/(b + Sqrt[-a^2 + b^2])])/(a^2*Sqrt[-a^2 + b^2]*d) - (b^ 
2*Log[b + a*Cosh[c + d*x^2]])/(a^2*(a^2 - b^2)*d^2) + (b^3*PolyLog[2, -((a 
*E^(c + d*x^2))/(b - Sqrt[-a^2 + b^2]))])/(a^2*(-a^2 + b^2)^(3/2)*d^2) - ( 
2*b*PolyLog[2, -((a*E^(c + d*x^2))/(b - Sqrt[-a^2 + b^2]))])/(a^2*Sqrt[-a^ 
2 + b^2]*d^2) - (b^3*PolyLog[2, -((a*E^(c + d*x^2))/(b + Sqrt[-a^2 + b^2]) 
)])/(a^2*(-a^2 + b^2)^(3/2)*d^2) + (2*b*PolyLog[2, -((a*E^(c + d*x^2))/(b 
+ Sqrt[-a^2 + b^2]))])/(a^2*Sqrt[-a^2 + b^2]*d^2) + (b^2*x^2*Sinh[c + d*x^ 
2])/(a*(a^2 - b^2)*d*(b + a*Cosh[c + d*x^2])))/2
 

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 4679
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) 
, x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, 1/(Sin[e + f*x]^n/(b + a*Si 
n[e + f*x])^n), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && ILtQ[n, 0] && IGt 
Q[m, 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 \frac {x^{3}}{{\left (a +b \,\operatorname {sech}\left (d \,x^{2}+c \right )\right )}^{2}}d x\]

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2473 vs. \(2 (497) = 994\).

Time = 0.14 (sec) , antiderivative size = 2473, normalized size of antiderivative = 4.46 \[ \int \frac {x^3}{\left (a+b \text {sech}\left (c+d x^2\right )\right )^2} \, dx=\text {Too large to display} \] Input:

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

Output:

1/4*((a^5 - 2*a^3*b^2 + a*b^4)*d^2*x^4 + ((a^5 - 2*a^3*b^2 + a*b^4)*d^2*x^ 
4 + 4*(a^3*b^2 - a*b^4)*d*x^2 + 4*(a^3*b^2 - a*b^4)*c)*cosh(d*x^2 + c)^2 + 
 ((a^5 - 2*a^3*b^2 + a*b^4)*d^2*x^4 + 4*(a^3*b^2 - a*b^4)*d*x^2 + 4*(a^3*b 
^2 - a*b^4)*c)*sinh(d*x^2 + c)^2 + 2*(2*a^4*b - a^2*b^3 + (2*a^4*b - a^2*b 
^3)*cosh(d*x^2 + c)^2 + (2*a^4*b - a^2*b^3)*sinh(d*x^2 + c)^2 + 2*(2*a^3*b 
^2 - a*b^4)*cosh(d*x^2 + c) + 2*(2*a^3*b^2 - a*b^4 + (2*a^4*b - a^2*b^3)*c 
osh(d*x^2 + c))*sinh(d*x^2 + c))*sqrt(-(a^2 - b^2)/a^2)*dilog(-(b*cosh(d*x 
^2 + c) + b*sinh(d*x^2 + c) + (a*cosh(d*x^2 + c) + a*sinh(d*x^2 + c))*sqrt 
(-(a^2 - b^2)/a^2) + a)/a + 1) - 2*(2*a^4*b - a^2*b^3 + (2*a^4*b - a^2*b^3 
)*cosh(d*x^2 + c)^2 + (2*a^4*b - a^2*b^3)*sinh(d*x^2 + c)^2 + 2*(2*a^3*b^2 
 - a*b^4)*cosh(d*x^2 + c) + 2*(2*a^3*b^2 - a*b^4 + (2*a^4*b - a^2*b^3)*cos 
h(d*x^2 + c))*sinh(d*x^2 + c))*sqrt(-(a^2 - b^2)/a^2)*dilog(-(b*cosh(d*x^2 
 + c) + b*sinh(d*x^2 + c) - (a*cosh(d*x^2 + c) + a*sinh(d*x^2 + c))*sqrt(- 
(a^2 - b^2)/a^2) + a)/a + 1) + 2*((2*a^4*b - a^2*b^3)*d*x^2 + ((2*a^4*b - 
a^2*b^3)*d*x^2 + (2*a^4*b - a^2*b^3)*c)*cosh(d*x^2 + c)^2 + ((2*a^4*b - a^ 
2*b^3)*d*x^2 + (2*a^4*b - a^2*b^3)*c)*sinh(d*x^2 + c)^2 + (2*a^4*b - a^2*b 
^3)*c + 2*((2*a^3*b^2 - a*b^4)*d*x^2 + (2*a^3*b^2 - a*b^4)*c)*cosh(d*x^2 + 
 c) + 2*((2*a^3*b^2 - a*b^4)*d*x^2 + (2*a^3*b^2 - a*b^4)*c + ((2*a^4*b - a 
^2*b^3)*d*x^2 + (2*a^4*b - a^2*b^3)*c)*cosh(d*x^2 + c))*sinh(d*x^2 + c))*s 
qrt(-(a^2 - b^2)/a^2)*log((b*cosh(d*x^2 + c) + b*sinh(d*x^2 + c) + (a*c...
 

Sympy [F]

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

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

Output:

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

Maxima [F(-2)]

Exception generated. \[ \int \frac {x^3}{\left (a+b \text {sech}\left (c+d x^2\right )\right )^2} \, dx=\text {Exception raised: ValueError} \] Input:

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(a-b>0)', see `assume?` for more 
details)Is
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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