3.79 \(\int \frac{a+x}{(-a+x) \sqrt{a^2 x-\left (1+a^2\right ) x^2+x^3}} \, dx\)

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

[Out]

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

_______________________________________________________________________________________

Rubi [A]  time = 1.47925, antiderivative size = 87, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 34, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118 \[ -\frac{2 \sqrt{x} \sqrt{-\left (a^2+1\right ) x+a^2+x^2} \tan ^{-1}\left (\frac{(1-a) \sqrt{x}}{\sqrt{-\left (a^2+1\right ) x+a^2+x^2}}\right )}{(1-a) \sqrt{-\left (a^2+1\right ) x^2+a^2 x+x^3}} \]

Antiderivative was successfully verified.

[In]  Int[(a + x)/((-a + x)*Sqrt[a^2*x - (1 + a^2)*x^2 + x^3]),x]

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+x)/(-a+x)/(a**2*x-(a**2+1)*x**2+x**3)**(1/2),x)

[Out]

Timed out

_______________________________________________________________________________________

Mathematica [C]  time = 0.553469, size = 159, normalized size = 1.83 \[ -\frac{2 i \left (a^2-x\right )^{3/2} \sqrt{\frac{x-1}{x-a^2}} \sqrt{\frac{x}{x-a^2}} \left ((a+1) F\left (i \sinh ^{-1}\left (\frac{\sqrt{-a^2}}{\sqrt{a^2-x}}\right )|1-\frac{1}{a^2}\right )-2 \Pi \left (\frac{a-1}{a};i \sinh ^{-1}\left (\frac{\sqrt{-a^2}}{\sqrt{a^2-x}}\right )|1-\frac{1}{a^2}\right )\right )}{(a-1) \sqrt{-a^2} \sqrt{(x-1) x \left (x-a^2\right )}} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + x)/((-a + x)*Sqrt[a^2*x - (1 + a^2)*x^2 + x^3]),x]

[Out]

((-2*I)*(a^2 - x)^(3/2)*Sqrt[(-1 + x)/(-a^2 + x)]*Sqrt[x/(-a^2 + x)]*((1 + a)*El
lipticF[I*ArcSinh[Sqrt[-a^2]/Sqrt[a^2 - x]], 1 - a^(-2)] - 2*EllipticPi[(-1 + a)
/a, I*ArcSinh[Sqrt[-a^2]/Sqrt[a^2 - x]], 1 - a^(-2)]))/((-1 + a)*Sqrt[-a^2]*Sqrt
[(-1 + x)*x*(-a^2 + x)])

_______________________________________________________________________________________

Maple [C]  time = 0.053, size = 206, normalized size = 2.4 \[ -2\,{\frac{{a}^{2}}{\sqrt{-{a}^{2}{x}^{2}+{a}^{2}x+{x}^{3}-{x}^{2}}}\sqrt{-{\frac{-{a}^{2}+x}{{a}^{2}}}}\sqrt{{\frac{-1+x}{{a}^{2}-1}}}\sqrt{{\frac{x}{{a}^{2}}}}{\it EllipticF} \left ( \sqrt{-{\frac{-{a}^{2}+x}{{a}^{2}}}},\sqrt{{\frac{{a}^{2}}{{a}^{2}-1}}} \right ) }-4\,{\frac{{a}^{3}}{\sqrt{-{a}^{2}{x}^{2}+{a}^{2}x+{x}^{3}-{x}^{2}} \left ({a}^{2}-a \right ) }\sqrt{-{\frac{-{a}^{2}+x}{{a}^{2}}}}\sqrt{{\frac{-1+x}{{a}^{2}-1}}}\sqrt{{\frac{x}{{a}^{2}}}}{\it EllipticPi} \left ( \sqrt{-{\frac{-{a}^{2}+x}{{a}^{2}}}},{\frac{{a}^{2}}{{a}^{2}-a}},\sqrt{{\frac{{a}^{2}}{{a}^{2}-1}}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+x)/(-a+x)/(a^2*x-(a^2+1)*x^2+x^3)^(1/2),x)

[Out]

-2*a^2*(-(-a^2+x)/a^2)^(1/2)*((-1+x)/(a^2-1))^(1/2)*(x/a^2)^(1/2)/(-a^2*x^2+a^2*
x+x^3-x^2)^(1/2)*EllipticF((-(-a^2+x)/a^2)^(1/2),(a^2/(a^2-1))^(1/2))-4*a^3*(-(-
a^2+x)/a^2)^(1/2)*((-1+x)/(a^2-1))^(1/2)*(x/a^2)^(1/2)/(-a^2*x^2+a^2*x+x^3-x^2)^
(1/2)/(a^2-a)*EllipticPi((-(-a^2+x)/a^2)^(1/2),a^2/(a^2-a),(a^2/(a^2-1))^(1/2))

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(-(a + x)/(sqrt(a^2*x - (a^2 + 1)*x^2 + x^3)*(a - x)),x, algorithm="maxima")

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.265928, size = 72, normalized size = 0.83 \[ \frac{\arctan \left (\frac{a^{2} - 2 \,{\left (a^{2} - a + 1\right )} x + x^{2}}{2 \, \sqrt{a^{2} x -{\left (a^{2} + 1\right )} x^{2} + x^{3}}{\left (a - 1\right )}}\right )}{a - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(-(a + x)/(sqrt(a^2*x - (a^2 + 1)*x^2 + x^3)*(a - x)),x, algorithm="fricas")

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+x)/(-a+x)/(a**2*x-(a**2+1)*x**2+x**3)**(1/2),x)

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int -\frac{a + x}{\sqrt{a^{2} x -{\left (a^{2} + 1\right )} x^{2} + x^{3}}{\left (a - x\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(-(a + x)/(sqrt(a^2*x - (a^2 + 1)*x^2 + x^3)*(a - x)),x, algorithm="giac")

[Out]

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