3.67 \(\int e^{2 \text {sech}^{-1}(a x)} x^2 \, dx\)

Optimal. Leaf size=169 \[ \frac {(a x+1)^3 \left (\sqrt {\frac {1-a x}{a x+1}}+1\right )^4}{12 a^3}-\frac {\sqrt {\frac {1-a x}{a x+1}} (a x+1)^2 \left (\sqrt {\frac {1-a x}{a x+1}}+1\right )^3}{6 a^3}+\frac {(a x+1) \left (1-\sqrt {\frac {1-a x}{a x+1}}\right ) \left (\sqrt {\frac {1-a x}{a x+1}}+1\right )}{2 a^3}-\frac {2 \tan ^{-1}\left (\sqrt {\frac {1-a x}{a x+1}}\right )}{a^3} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.47, antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {6337, 821, 12, 729, 723, 203} \[ \frac {(a x+1)^3 \left (\sqrt {\frac {1-a x}{a x+1}}+1\right )^4}{12 a^3}-\frac {\sqrt {\frac {1-a x}{a x+1}} (a x+1)^2 \left (\sqrt {\frac {1-a x}{a x+1}}+1\right )^3}{6 a^3}+\frac {(a x+1) \left (1-\sqrt {\frac {1-a x}{a x+1}}\right ) \left (\sqrt {\frac {1-a x}{a x+1}}+1\right )}{2 a^3}-\frac {2 \tan ^{-1}\left (\sqrt {\frac {1-a x}{a x+1}}\right )}{a^3} \]

Antiderivative was successfully verified.

[In]

Int[E^(2*ArcSech[a*x])*x^2,x]

[Out]

((1 + a*x)*(1 - Sqrt[(1 - a*x)/(1 + a*x)])*(1 + Sqrt[(1 - a*x)/(1 + a*x)]))/(2*a^3) - (Sqrt[(1 - a*x)/(1 + a*x
)]*(1 + a*x)^2*(1 + Sqrt[(1 - a*x)/(1 + a*x)])^3)/(6*a^3) + ((1 + a*x)^3*(1 + Sqrt[(1 - a*x)/(1 + a*x)])^4)/(1
2*a^3) - (2*ArcTan[Sqrt[(1 - a*x)/(1 + a*x)]])/a^3

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 203

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

Rule 723

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((d + e*x)^(m - 1)*(a*e - c*d*x)*(a
 + c*x^2)^(p + 1))/(2*a*c*(p + 1)), x] + Dist[((2*p + 3)*(c*d^2 + a*e^2))/(2*a*c*(p + 1)), Int[(d + e*x)^(m -
2)*(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && EqQ[m + 2*p + 2, 0] && Lt
Q[p, -1]

Rule 729

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> -Simp[((d + e*x)^m*(2*c*x)*(a + c*x^2)^(
p + 1))/(4*a*c*(p + 1)), x] - Dist[(m*(2*c*d))/(4*a*c*(p + 1)), Int[(d + e*x)^(m - 1)*(a + c*x^2)^(p + 1), x],
 x] /; FreeQ[{a, c, d, e, m, p}, x] && NeQ[c*d^2 + a*e^2, 0] && EqQ[m + 2*p + 3, 0] && LtQ[p, -1]

Rule 821

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((d + e*x)^m*
(a + c*x^2)^(p + 1)*(a*g - c*f*x))/(2*a*c*(p + 1)), x] - Dist[1/(2*a*c*(p + 1)), Int[(d + e*x)^(m - 1)*(a + c*
x^2)^(p + 1)*Simp[a*e*g*m - c*d*f*(2*p + 3) - c*e*f*(m + 2*p + 3)*x, x], x], x] /; FreeQ[{a, c, d, e, f, g}, x
] && NeQ[c*d^2 + a*e^2, 0] && LtQ[p, -1] && GtQ[m, 0] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p])

Rule 6337

Int[E^(ArcSech[u_]*(n_.))*(x_)^(m_.), x_Symbol] :> Int[x^m*(1/u + Sqrt[(1 - u)/(1 + u)] + (1*Sqrt[(1 - u)/(1 +
 u)])/u)^n, x] /; FreeQ[m, x] && IntegerQ[n]

Rubi steps

\begin {align*} \int e^{2 \text {sech}^{-1}(a x)} x^2 \, dx &=\int x^2 \left (\frac {1}{a x}+\sqrt {\frac {1-a x}{1+a x}}+\frac {\sqrt {\frac {1-a x}{1+a x}}}{a x}\right )^2 \, dx\\ &=-\frac {4 \operatorname {Subst}\left (\int \frac {x (1+x)^4}{\left (1+x^2\right )^4} \, dx,x,\sqrt {\frac {1-a x}{1+a x}}\right )}{a^3}\\ &=\frac {(1+a x)^3 \left (1+\sqrt {\frac {1-a x}{1+a x}}\right )^4}{12 a^3}-\frac {2 \operatorname {Subst}\left (\int \frac {4 (1+x)^3}{\left (1+x^2\right )^3} \, dx,x,\sqrt {\frac {1-a x}{1+a x}}\right )}{3 a^3}\\ &=\frac {(1+a x)^3 \left (1+\sqrt {\frac {1-a x}{1+a x}}\right )^4}{12 a^3}-\frac {8 \operatorname {Subst}\left (\int \frac {(1+x)^3}{\left (1+x^2\right )^3} \, dx,x,\sqrt {\frac {1-a x}{1+a x}}\right )}{3 a^3}\\ &=-\frac {\sqrt {\frac {1-a x}{1+a x}} (1+a x)^2 \left (1+\sqrt {\frac {1-a x}{1+a x}}\right )^3}{6 a^3}+\frac {(1+a x)^3 \left (1+\sqrt {\frac {1-a x}{1+a x}}\right )^4}{12 a^3}-\frac {2 \operatorname {Subst}\left (\int \frac {(1+x)^2}{\left (1+x^2\right )^2} \, dx,x,\sqrt {\frac {1-a x}{1+a x}}\right )}{a^3}\\ &=\frac {(1+a x) \left (1-\sqrt {\frac {1-a x}{1+a x}}\right ) \left (1+\sqrt {\frac {1-a x}{1+a x}}\right )}{2 a^3}-\frac {\sqrt {\frac {1-a x}{1+a x}} (1+a x)^2 \left (1+\sqrt {\frac {1-a x}{1+a x}}\right )^3}{6 a^3}+\frac {(1+a x)^3 \left (1+\sqrt {\frac {1-a x}{1+a x}}\right )^4}{12 a^3}-\frac {2 \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\frac {1-a x}{1+a x}}\right )}{a^3}\\ &=\frac {(1+a x) \left (1-\sqrt {\frac {1-a x}{1+a x}}\right ) \left (1+\sqrt {\frac {1-a x}{1+a x}}\right )}{2 a^3}-\frac {\sqrt {\frac {1-a x}{1+a x}} (1+a x)^2 \left (1+\sqrt {\frac {1-a x}{1+a x}}\right )^3}{6 a^3}+\frac {(1+a x)^3 \left (1+\sqrt {\frac {1-a x}{1+a x}}\right )^4}{12 a^3}-\frac {2 \tan ^{-1}\left (\sqrt {\frac {1-a x}{1+a x}}\right )}{a^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.08, size = 86, normalized size = 0.51 \[ \frac {i \log \left (2 \sqrt {\frac {1-a x}{a x+1}} (a x+1)-2 i a x\right )}{a^3}+\sqrt {\frac {1-a x}{a x+1}} \left (\frac {x}{a^2}+\frac {x^2}{a}\right )+\frac {2 x}{a^2}-\frac {x^3}{3} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[E^(2*ArcSech[a*x])*x^2,x]

[Out]

(2*x)/a^2 - x^3/3 + Sqrt[(1 - a*x)/(1 + a*x)]*(x/a^2 + x^2/a) + (I*Log[(-2*I)*a*x + 2*Sqrt[(1 - a*x)/(1 + a*x)
]*(1 + a*x)])/a^3

________________________________________________________________________________________

fricas [A]  time = 1.53, size = 87, normalized size = 0.51 \[ -\frac {a^{3} x^{3} - 3 \, a^{2} x^{2} \sqrt {\frac {a x + 1}{a x}} \sqrt {-\frac {a x - 1}{a x}} - 6 \, a x + 3 \, \arctan \left (\sqrt {\frac {a x + 1}{a x}} \sqrt {-\frac {a x - 1}{a x}}\right )}{3 \, a^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1/a/x+(1/a/x-1)^(1/2)*(1+1/a/x)^(1/2))^2*x^2,x, algorithm="fricas")

[Out]

-1/3*(a^3*x^3 - 3*a^2*x^2*sqrt((a*x + 1)/(a*x))*sqrt(-(a*x - 1)/(a*x)) - 6*a*x + 3*arctan(sqrt((a*x + 1)/(a*x)
)*sqrt(-(a*x - 1)/(a*x))))/a^3

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1/a/x+(1/a/x-1)^(1/2)*(1+1/a/x)^(1/2))^2*x^2,x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,x):;OUTPUT:Warn
ing, choosing root of [1,0,%%%{-4,[1,1]%%%},0,%%%{4,[4,4]%%%}] at parameters values [86,-97]Warning, choosing
root of [1,0,%%%{4,[1,1]%%%},0,%%%{4,[4,4]%%%}] at parameters values [-82,7]Warning, integration of abs or sig
n assumes constant sign by intervals (correct if the argument is real):Check [abs(t_nostep)]Warning, choosing
root of [1,0,%%%{-4,[1,1]%%%},0,%%%{4,[4,4]%%%}] at parameters values [-27,26]Warning, choosing root of [1,0,%
%%{4,[1,1]%%%},0,%%%{4,[4,4]%%%}] at parameters values [-89,63]Warning, choosing root of [1,0,%%%{-4,[1,1]%%%}
,0,%%%{4,[4,4]%%%}] at parameters values [-49,-86]Warning, choosing root of [1,0,%%%{4,[1,1]%%%},0,%%%{4,[4,4]
%%%}] at parameters values [-64,-30]Warning, choosing root of [1,0,%%%{-4,[1,1]%%%},0,%%%{4,[4,4]%%%}] at para
meters values [70,22]Warning, choosing root of [1,0,%%%{4,[1,1]%%%},0,%%%{4,[4,4]%%%}] at parameters values [4
2,56]Warning, choosing root of [1,0,%%%{-4,[1,1]%%%},0,%%%{4,[4,4]%%%}] at parameters values [-9,-13]Warning,
choosing root of [1,0,%%%{4,[1,1]%%%},0,%%%{4,[4,4]%%%}] at parameters values [46,24]Warning, choosing root of
 [1,0,%%%{-4,[1,1]%%%},0,%%%{4,[4,4]%%%}] at parameters values [49,-6]Unable to divide, perhaps due to roundin
g error%%%{-1,[2,2,0,0]%%%}+%%%{2,[1,1,1,1]%%%}+%%%{2,[0,0,0,0]%%%} / %%%{1,[0,2,0,0]%%%} Error: Bad Argument
Value

________________________________________________________________________________________

maple [C]  time = 0.06, size = 97, normalized size = 0.57 \[ -\frac {x^{3}}{3}+\frac {2 x}{a^{2}}+\frac {\sqrt {-\frac {a x -1}{a x}}\, x \sqrt {\frac {a x +1}{a x}}\, \left (x \sqrt {-a^{2} x^{2}+1}\, \mathrm {csgn}\relax (a ) a +\arctan \left (\frac {\mathrm {csgn}\relax (a ) a x}{\sqrt {-a^{2} x^{2}+1}}\right )\right ) \mathrm {csgn}\relax (a )}{a^{2} \sqrt {-a^{2} x^{2}+1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1/a/x+(1/a/x-1)^(1/2)*(1+1/a/x)^(1/2))^2*x^2,x)

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {2 \, x}{a^{2}} + \frac {2 \, {\left (\frac {1}{2} \, \sqrt {-a^{2} x^{2} + 1} x + \frac {\arcsin \left (a x\right )}{2 \, a}\right )}}{a^{2}} - \int x^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1/a/x+(1/a/x-1)^(1/2)*(1+1/a/x)^(1/2))^2*x^2,x, algorithm="maxima")

[Out]

2*x/a^2 + 2*integrate(sqrt(a*x + 1)*sqrt(-a*x + 1), x)/a^2 - integrate(x^2, x)

________________________________________________________________________________________

mupad [B]  time = 8.96, size = 420, normalized size = 2.49 \[ \frac {\frac {1{}\mathrm {i}}{16\,a^3}+\frac {{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^2\,1{}\mathrm {i}}{8\,a^3\,{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^2}-\frac {{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^4\,15{}\mathrm {i}}{16\,a^3\,{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^4}}{\frac {{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^2}+\frac {2\,{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^4}{{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^4}+\frac {{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^6}{{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^6}}-\frac {x^3\,\left (\frac {a^2}{3}-\frac {2}{x^2}\right )}{a^2}+\frac {\left (\ln \left (\frac {{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^2}+1\right )-\ln \left (\frac {\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}}{\sqrt {\frac {1}{a\,x}+1}-1}\right )\right )\,2{}\mathrm {i}}{a^3}+\frac {\ln \left (\frac {\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}}{\sqrt {\frac {1}{a\,x}+1}-1}\right )\,1{}\mathrm {i}}{a^3}-\frac {\ln \left (\frac {2\,a\,\sqrt {\frac {a+\frac {1}{x}}{a}}-\frac {2}{x}+a\,\sqrt {-\frac {a-\frac {1}{x}}{a}}\,2{}\mathrm {i}}{2\,a+\frac {1}{x}-2\,a\,\sqrt {\frac {a+\frac {1}{x}}{a}}}\right )\,1{}\mathrm {i}}{a^3}+\frac {{\left (\sqrt {\frac {1}{a\,x}-1}-\mathrm {i}\right )}^2\,1{}\mathrm {i}}{16\,a^3\,{\left (\sqrt {\frac {1}{a\,x}+1}-1\right )}^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*((1/(a*x) - 1)^(1/2)*(1/(a*x) + 1)^(1/2) + 1/(a*x))^2,x)

[Out]

((log(((1/(a*x) - 1)^(1/2) - 1i)^2/((1/(a*x) + 1)^(1/2) - 1)^2 + 1) - log(((1/(a*x) - 1)^(1/2) - 1i)/((1/(a*x)
 + 1)^(1/2) - 1)))*2i)/a^3 + (log(((1/(a*x) - 1)^(1/2) - 1i)/((1/(a*x) + 1)^(1/2) - 1))*1i)/a^3 + (1i/(16*a^3)
 + (((1/(a*x) - 1)^(1/2) - 1i)^2*1i)/(8*a^3*((1/(a*x) + 1)^(1/2) - 1)^2) - (((1/(a*x) - 1)^(1/2) - 1i)^4*15i)/
(16*a^3*((1/(a*x) + 1)^(1/2) - 1)^4))/(((1/(a*x) - 1)^(1/2) - 1i)^2/((1/(a*x) + 1)^(1/2) - 1)^2 + (2*((1/(a*x)
 - 1)^(1/2) - 1i)^4)/((1/(a*x) + 1)^(1/2) - 1)^4 + ((1/(a*x) - 1)^(1/2) - 1i)^6/((1/(a*x) + 1)^(1/2) - 1)^6) -
 (log((a*(-(a - 1/x)/a)^(1/2)*2i - 2/x + 2*a*((a + 1/x)/a)^(1/2))/(2*a + 1/x - 2*a*((a + 1/x)/a)^(1/2)))*1i)/a
^3 + (((1/(a*x) - 1)^(1/2) - 1i)^2*1i)/(16*a^3*((1/(a*x) + 1)^(1/2) - 1)^2) - (x^3*(a^2/3 - 2/x^2))/a^2

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1/a/x+(1/a/x-1)**(1/2)*(1+1/a/x)**(1/2))**2*x**2,x)

[Out]

Timed out

________________________________________________________________________________________