3.9.70 \(\int \frac {e^{\tanh ^{-1}(a+b x)} x^2}{1-a^2-2 a b x-b^2 x^2} \, dx\) [870]

Optimal. Leaf size=78 \[ \frac {(1-a)^2 \sqrt {1+a+b x}}{b^3 \sqrt {1-a-b x}}+\frac {\sqrt {1-a-b x} \sqrt {1+a+b x}}{b^3}-\frac {(1-2 a) \text {ArcSin}(a+b x)}{b^3} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {6299, 91, 81, 55, 633, 222} \begin {gather*} -\frac {(1-2 a) \text {ArcSin}(a+b x)}{b^3}+\frac {(1-a)^2 \sqrt {a+b x+1}}{b^3 \sqrt {-a-b x+1}}+\frac {\sqrt {-a-b x+1} \sqrt {a+b x+1}}{b^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^ArcTanh[a + b*x]*x^2)/(1 - a^2 - 2*a*b*x - b^2*x^2),x]

[Out]

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

Rule 55

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 81

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 91

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

Rule 222

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 633

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 6299

Int[E^(ArcTanh[(a_) + (b_.)*(x_)]*(n_.))*(u_.)*((c_) + (d_.)*(x_) + (e_.)*(x_)^2)^(p_.), x_Symbol] :> Dist[(c/
(1 - a^2))^p, Int[u*(1 - a - b*x)^(p - n/2)*(1 + a + b*x)^(p + n/2), x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]
 && EqQ[b*d - 2*a*e, 0] && EqQ[b^2*c + e*(1 - a^2), 0] && (IntegerQ[p] || GtQ[c/(1 - a^2), 0])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.18, size = 64, normalized size = 0.82 \begin {gather*} -\frac {\frac {\left (2-3 a+a^2-b x\right ) \sqrt {1-a^2-2 a b x-b^2 x^2}}{-1+a+b x}-(-1+2 a) \text {ArcSin}(a+b x)}{b^3} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(E^ArcTanh[a + b*x]*x^2)/(1 - a^2 - 2*a*b*x - b^2*x^2),x]

[Out]

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

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(483\) vs. \(2(70)=140\).
time = 0.08, size = 484, normalized size = 6.21

method result size
risch \(-\frac {b^{2} x^{2}+2 a b x +a^{2}-1}{b^{3} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}+\frac {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 ) a}{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 )}{b^{2} \sqrt {b^{2}}}-\frac {\sqrt {-\left (x +\frac {-1+a}{b}\right )^{2} b^{2}-2 b \left (x +\frac {-1+a}{b}\right )}\, a^{2}}{b^{4} \left (x -\frac {1}{b}+\frac {a}{b}\right )}+\frac {2 \sqrt {-\left (x +\frac {-1+a}{b}\right )^{2} b^{2}-2 b \left (x +\frac {-1+a}{b}\right )}\, a}{b^{4} \left (x -\frac {1}{b}+\frac {a}{b}\right )}-\frac {\sqrt {-\left (x +\frac {-1+a}{b}\right )^{2} b^{2}-2 b \left (x +\frac {-1+a}{b}\right )}}{b^{4} \left (x -\frac {1}{b}+\frac {a}{b}\right )}\) \(293\)
default \(b \left (-\frac {x^{2}}{b^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {3 a \left (\frac {x}{b^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {a \left (\frac {1}{b^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {2 a \left (-2 b^{2} x -2 b a \right )}{b \left (-4 b^{2} \left (-a^{2}+1\right )-4 b^{2} a^{2}\right ) \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}\right )}{b}-\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 )}{b^{2} \sqrt {b^{2}}}\right )}{b}+\frac {2 \left (-a^{2}+1\right ) \left (\frac {1}{b^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {2 a \left (-2 b^{2} x -2 b a \right )}{b \left (-4 b^{2} \left (-a^{2}+1\right )-4 b^{2} a^{2}\right ) \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}\right )}{b^{2}}\right )+\left (1+a \right ) \left (\frac {x}{b^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {a \left (\frac {1}{b^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {2 a \left (-2 b^{2} x -2 b a \right )}{b \left (-4 b^{2} \left (-a^{2}+1\right )-4 b^{2} a^{2}\right ) \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}\right )}{b}-\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 )}{b^{2} \sqrt {b^{2}}}\right )\) \(484\)

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/(-b^2*x^2-2*a*b*x-a^2+1),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 329 vs. \(2 (67) = 134\).
time = 0.52, size = 329, normalized size = 4.22 \begin {gather*} -\frac {{\left (\frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a^{2}}{b^{5} x + a b^{4} - b^{4}} - \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a b}{b^{6} x + a b^{5} + b^{5}} - \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a b}{b^{6} x + a b^{5} - b^{5}} + \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a}{b^{5} x + a b^{4} + b^{4}} - \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a}{b^{5} x + a b^{4} - b^{4}} + \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1}}{b^{5} x + a b^{4} - b^{4}} - \frac {2 \, a \arcsin \left (b x + a\right )}{b^{4}} + \frac {\arcsin \left (b x + a\right )}{b^{4}} - \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1}}{b^{4}}\right )} b^{2}}{\sqrt {a^{2} b^{2} - {\left (a^{2} - 1\right )} b^{2}}} \end {gather*}

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/(-b^2*x^2-2*a*b*x-a^2+1),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 120, normalized size = 1.54 \begin {gather*} -\frac {{\left ({\left (2 \, a - 1\right )} b x + 2 \, a^{2} - 3 \, 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 ) + \sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left (a^{2} - b x - 3 \, a + 2\right )}}{b^{4} x + {\left (a - 1\right )} b^{3}} \end {gather*}

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/(-b^2*x^2-2*a*b*x-a^2+1),x, algorithm="fricas")

[Out]

-(((2*a - 1)*b*x + 2*a^2 - 3*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)) + sqrt(-b^2*x^2 - 2*a*b*x - a^2 + 1)*(a^2 - b*x - 3*a + 2))/(b^4*x + (a - 1)*b^3)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \frac {x^{2}}{a \sqrt {- a^{2} - 2 a b x - b^{2} x^{2} + 1} + b x \sqrt {- a^{2} - 2 a b x - b^{2} x^{2} + 1} - \sqrt {- a^{2} - 2 a b x - b^{2} x^{2} + 1}}\, dx \end {gather*}

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/(-b**2*x**2-2*a*b*x-a**2+1),x)

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.44, size = 112, normalized size = 1.44 \begin {gather*} -\frac {{\left (2 \, a - 1\right )} \arcsin \left (-b x - a\right ) \mathrm {sgn}\left (b\right )}{b^{2} {\left | b \right |}} + \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1}}{b^{3}} + \frac {2 \, {\left (a^{2} - 2 \, a + 1\right )}}{b^{2} {\left (\frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left | b \right |} + b}{b^{2} x + a b} - 1\right )} {\left | b \right |}} \end {gather*}

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/(-b^2*x^2-2*a*b*x-a^2+1),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

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

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)*(a^2 + b^2*x^2 + 2*a*b*x - 1)),x)

[Out]

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

________________________________________________________________________________________