3.819 \(\int e^{\tanh ^{-1}(a+b x)} x^2 \, dx\)

Optimal. Leaf size=130 \[ -\frac {\left (2 a^2-2 a+1\right ) \sqrt {-a-b x+1} \sqrt {a+b x+1}}{2 b^3}+\frac {\left (2 a^2-2 a+1\right ) \sin ^{-1}(a+b x)}{2 b^3}-\frac {(1-4 a) \sqrt {-a-b x+1} (a+b x+1)^{3/2}}{6 b^3}-\frac {x \sqrt {-a-b x+1} (a+b x+1)^{3/2}}{3 b^2} \]

[Out]

1/2*(2*a^2-2*a+1)*arcsin(b*x+a)/b^3-1/6*(1-4*a)*(b*x+a+1)^(3/2)*(-b*x-a+1)^(1/2)/b^3-1/3*x*(b*x+a+1)^(3/2)*(-b
*x-a+1)^(1/2)/b^2-1/2*(2*a^2-2*a+1)*(-b*x-a+1)^(1/2)*(b*x+a+1)^(1/2)/b^3

________________________________________________________________________________________

Rubi [A]  time = 0.17, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.583, Rules used = {6163, 90, 80, 50, 53, 619, 216} \[ -\frac {\left (2 a^2-2 a+1\right ) \sqrt {-a-b x+1} \sqrt {a+b x+1}}{2 b^3}+\frac {\left (2 a^2-2 a+1\right ) \sin ^{-1}(a+b x)}{2 b^3}-\frac {x \sqrt {-a-b x+1} (a+b x+1)^{3/2}}{3 b^2}-\frac {(1-4 a) \sqrt {-a-b x+1} (a+b x+1)^{3/2}}{6 b^3} \]

Antiderivative was successfully verified.

[In]

Int[E^ArcTanh[a + b*x]*x^2,x]

[Out]

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

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 53

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

Rule 80

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(c + d*x)
^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 2)), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rule 90

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

Rule 216

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

Rule 619

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*((-4*c)/(b^2 - 4*a*c))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rule 6163

Int[E^(ArcTanh[(c_.)*((a_) + (b_.)*(x_))]*(n_.))*((d_.) + (e_.)*(x_))^(m_.), x_Symbol] :> Int[((d + e*x)^m*(1
+ a*c + b*c*x)^(n/2))/(1 - a*c - b*c*x)^(n/2), x] /; FreeQ[{a, b, c, d, e, m, n}, x]

Rubi steps

\begin {align*} \int e^{\tanh ^{-1}(a+b x)} x^2 \, dx &=\int \frac {x^2 \sqrt {1+a+b x}}{\sqrt {1-a-b x}} \, dx\\ &=-\frac {x \sqrt {1-a-b x} (1+a+b x)^{3/2}}{3 b^2}-\frac {\int \frac {\sqrt {1+a+b x} \left (-1+a^2-(1-4 a) b x\right )}{\sqrt {1-a-b x}} \, dx}{3 b^2}\\ &=-\frac {(1-4 a) \sqrt {1-a-b x} (1+a+b x)^{3/2}}{6 b^3}-\frac {x \sqrt {1-a-b x} (1+a+b x)^{3/2}}{3 b^2}+\frac {\left (1-2 a+2 a^2\right ) \int \frac {\sqrt {1+a+b x}}{\sqrt {1-a-b x}} \, dx}{2 b^2}\\ &=-\frac {\left (1-2 a+2 a^2\right ) \sqrt {1-a-b x} \sqrt {1+a+b x}}{2 b^3}-\frac {(1-4 a) \sqrt {1-a-b x} (1+a+b x)^{3/2}}{6 b^3}-\frac {x \sqrt {1-a-b x} (1+a+b x)^{3/2}}{3 b^2}+\frac {\left (1-2 a+2 a^2\right ) \int \frac {1}{\sqrt {1-a-b x} \sqrt {1+a+b x}} \, dx}{2 b^2}\\ &=-\frac {\left (1-2 a+2 a^2\right ) \sqrt {1-a-b x} \sqrt {1+a+b x}}{2 b^3}-\frac {(1-4 a) \sqrt {1-a-b x} (1+a+b x)^{3/2}}{6 b^3}-\frac {x \sqrt {1-a-b x} (1+a+b x)^{3/2}}{3 b^2}+\frac {\left (1-2 a+2 a^2\right ) \int \frac {1}{\sqrt {(1-a) (1+a)-2 a b x-b^2 x^2}} \, dx}{2 b^2}\\ &=-\frac {\left (1-2 a+2 a^2\right ) \sqrt {1-a-b x} \sqrt {1+a+b x}}{2 b^3}-\frac {(1-4 a) \sqrt {1-a-b x} (1+a+b x)^{3/2}}{6 b^3}-\frac {x \sqrt {1-a-b x} (1+a+b x)^{3/2}}{3 b^2}-\frac {\left (1-2 a+2 a^2\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{4 b^2}}} \, dx,x,-2 a b-2 b^2 x\right )}{4 b^4}\\ &=-\frac {\left (1-2 a+2 a^2\right ) \sqrt {1-a-b x} \sqrt {1+a+b x}}{2 b^3}-\frac {(1-4 a) \sqrt {1-a-b x} (1+a+b x)^{3/2}}{6 b^3}-\frac {x \sqrt {1-a-b x} (1+a+b x)^{3/2}}{3 b^2}+\frac {\left (1-2 a+2 a^2\right ) \sin ^{-1}(a+b x)}{2 b^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.18, size = 159, normalized size = 1.22 \[ \frac {-\sqrt {b} \sqrt {-a^2-2 a b x-b^2 x^2+1} \left (2 a^2-a (2 b x+9)+2 b^2 x^2+3 b x+4\right )+6 \left (2 a^2+1\right ) \sqrt {-b} \sinh ^{-1}\left (\frac {\sqrt {-b} \sqrt {-a-b x+1}}{\sqrt {2} \sqrt {b}}\right )+12 a \sqrt {-b} \sinh ^{-1}\left (\frac {\sqrt {b} \sqrt {-a-b x+1}}{\sqrt {2} \sqrt {-b}}\right )}{6 b^{7/2}} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[E^ArcTanh[a + b*x]*x^2,x]

[Out]

(-(Sqrt[b]*Sqrt[1 - a^2 - 2*a*b*x - b^2*x^2]*(4 + 2*a^2 + 3*b*x + 2*b^2*x^2 - a*(9 + 2*b*x))) + 6*(1 + 2*a^2)*
Sqrt[-b]*ArcSinh[(Sqrt[-b]*Sqrt[1 - a - b*x])/(Sqrt[2]*Sqrt[b])] + 12*a*Sqrt[-b]*ArcSinh[(Sqrt[b]*Sqrt[1 - a -
 b*x])/(Sqrt[2]*Sqrt[-b])])/(6*b^(7/2))

________________________________________________________________________________________

fricas [A]  time = 1.16, size = 116, normalized size = 0.89 \[ -\frac {3 \, {\left (2 \, a^{2} - 2 \, a + 1\right )} \arctan \left (\frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left (b x + a\right )}}{b^{2} x^{2} + 2 \, a b x + a^{2} - 1}\right ) + {\left (2 \, b^{2} x^{2} - {\left (2 \, a - 3\right )} b x + 2 \, a^{2} - 9 \, a + 4\right )} \sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1}}{6 \, b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.21, size = 97, normalized size = 0.75 \[ -\frac {1}{6} \, \sqrt {-{\left (b x + a\right )}^{2} + 1} {\left (x {\left (\frac {2 \, x}{b} - \frac {2 \, a b^{3} - 3 \, b^{3}}{b^{5}}\right )} + \frac {2 \, a^{2} b^{2} - 9 \, a b^{2} + 4 \, b^{2}}{b^{5}}\right )} - \frac {{\left (2 \, a^{2} - 2 \, a + 1\right )} \arcsin \left (-b x - a\right ) \mathrm {sgn}\relax (b)}{2 \, b^{2} {\left | b \right |}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/6*sqrt(-(b*x + a)^2 + 1)*(x*(2*x/b - (2*a*b^3 - 3*b^3)/b^5) + (2*a^2*b^2 - 9*a*b^2 + 4*b^2)/b^5) - 1/2*(2*a
^2 - 2*a + 1)*arcsin(-b*x - a)*sgn(b)/(b^2*abs(b))

________________________________________________________________________________________

maple [B]  time = 0.04, size = 315, normalized size = 2.42 \[ -\frac {x^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}{3 b}+\frac {a x \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}{3 b^{2}}-\frac {a^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}{3 b^{3}}-\frac {a \arctan \left (\frac {\sqrt {b^{2}}\, \left (x +\frac {a}{b}\right )}{\sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}\right )}{b^{2} \sqrt {b^{2}}}-\frac {2 \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}{3 b^{3}}-\frac {x \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}{2 b^{2}}+\frac {3 a \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}{2 b^{3}}+\frac {a^{2} \arctan \left (\frac {\sqrt {b^{2}}\, \left (x +\frac {a}{b}\right )}{\sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}\right )}{b^{2} \sqrt {b^{2}}}+\frac {\arctan \left (\frac {\sqrt {b^{2}}\, \left (x +\frac {a}{b}\right )}{\sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}\right )}{2 b^{2} \sqrt {b^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 355, normalized size = 2.73 \[ -\frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} x^{2}}{3 \, b} - \frac {3 \, {\left (a + 1\right )} a^{2} \arcsin \left (-\frac {b^{2} x + a b}{\sqrt {a^{2} b^{2} - {\left (a^{2} - 1\right )} b^{2}}}\right )}{2 \, b^{3}} + \frac {5 \, a^{3} \arcsin \left (-\frac {b^{2} x + a b}{\sqrt {a^{2} b^{2} - {\left (a^{2} - 1\right )} b^{2}}}\right )}{2 \, b^{3}} - \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left (a + 1\right )} x}{2 \, b^{2}} + \frac {5 \, \sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a x}{6 \, b^{2}} + \frac {{\left (a^{2} - 1\right )} {\left (a + 1\right )} \arcsin \left (-\frac {b^{2} x + a b}{\sqrt {a^{2} b^{2} - {\left (a^{2} - 1\right )} b^{2}}}\right )}{2 \, b^{3}} - \frac {3 \, {\left (a^{2} - 1\right )} a \arcsin \left (-\frac {b^{2} x + a b}{\sqrt {a^{2} b^{2} - {\left (a^{2} - 1\right )} b^{2}}}\right )}{2 \, b^{3}} + \frac {3 \, \sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left (a + 1\right )} a}{2 \, b^{3}} - \frac {5 \, \sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a^{2}}{2 \, b^{3}} + \frac {2 \, \sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left (a^{2} - 1\right )}}{3 \, b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*sqrt(-b^2*x^2 - 2*a*b*x - a^2 + 1)*x^2/b - 3/2*(a + 1)*a^2*arcsin(-(b^2*x + a*b)/sqrt(a^2*b^2 - (a^2 - 1)
*b^2))/b^3 + 5/2*a^3*arcsin(-(b^2*x + a*b)/sqrt(a^2*b^2 - (a^2 - 1)*b^2))/b^3 - 1/2*sqrt(-b^2*x^2 - 2*a*b*x -
a^2 + 1)*(a + 1)*x/b^2 + 5/6*sqrt(-b^2*x^2 - 2*a*b*x - a^2 + 1)*a*x/b^2 + 1/2*(a^2 - 1)*(a + 1)*arcsin(-(b^2*x
 + a*b)/sqrt(a^2*b^2 - (a^2 - 1)*b^2))/b^3 - 3/2*(a^2 - 1)*a*arcsin(-(b^2*x + a*b)/sqrt(a^2*b^2 - (a^2 - 1)*b^
2))/b^3 + 3/2*sqrt(-b^2*x^2 - 2*a*b*x - a^2 + 1)*(a + 1)*a/b^3 - 5/2*sqrt(-b^2*x^2 - 2*a*b*x - a^2 + 1)*a^2/b^
3 + 2/3*sqrt(-b^2*x^2 - 2*a*b*x - a^2 + 1)*(a^2 - 1)/b^3

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(x**2*(a + b*x + 1)/sqrt(-(a + b*x - 1)*(a + b*x + 1)), x)

________________________________________________________________________________________