3.12.86 \(\int \frac {-a^2 b+a (2 a+b) x-3 a x^2+x^3}{\sqrt {x (-a+x) (-b+x)} (-a^2+2 a x+(-1+b^2 d) x^2-2 b d x^3+d x^4)} \, dx\) [1186]

3.12.86.1 Optimal result
3.12.86.2 Mathematica [A] (verified)
3.12.86.3 Rubi [F]
3.12.86.4 Maple [C] (warning: unable to verify)
3.12.86.5 Fricas [C] (verification not implemented)
3.12.86.6 Sympy [F(-1)]
3.12.86.7 Maxima [F]
3.12.86.8 Giac [F]
3.12.86.9 Mupad [B] (verification not implemented)

3.12.86.1 Optimal result

Integrand size = 76, antiderivative size = 87 \[ \int \frac {-a^2 b+a (2 a+b) x-3 a x^2+x^3}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=\frac {\arctan \left (\frac {\sqrt [4]{d} \sqrt {a b x+(-a-b) x^2+x^3}}{a-x}\right )}{\sqrt [4]{d}}+\frac {\text {arctanh}\left (\frac {\sqrt [4]{d} \sqrt {a b x+(-a-b) x^2+x^3}}{a-x}\right )}{\sqrt [4]{d}} \]

output
arctan(d^(1/4)*(a*b*x+(-a-b)*x^2+x^3)^(1/2)/(a-x))/d^(1/4)+arctanh(d^(1/4) 
*(a*b*x+(-a-b)*x^2+x^3)^(1/2)/(a-x))/d^(1/4)
 
3.12.86.2 Mathematica [A] (verified)

Time = 11.55 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.77 \[ \int \frac {-a^2 b+a (2 a+b) x-3 a x^2+x^3}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=-\frac {-\arctan \left (\frac {-a+x}{\sqrt [4]{d} \sqrt {x (-a+x) (-b+x)}}\right )+\text {arctanh}\left (\frac {\sqrt [4]{d} x (-b+x)}{\sqrt {x (-a+x) (-b+x)}}\right )}{\sqrt [4]{d}} \]

input
Integrate[(-(a^2*b) + a*(2*a + b)*x - 3*a*x^2 + x^3)/(Sqrt[x*(-a + x)*(-b 
+ x)]*(-a^2 + 2*a*x + (-1 + b^2*d)*x^2 - 2*b*d*x^3 + d*x^4)),x]
 
output
-((-ArcTan[(-a + x)/(d^(1/4)*Sqrt[x*(-a + x)*(-b + x)])] + ArcTanh[(d^(1/4 
)*x*(-b + x))/Sqrt[x*(-a + x)*(-b + x)]])/d^(1/4))
 
3.12.86.3 Rubi [F]

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 {-a^2 b+a x (2 a+b)-3 a x^2+x^3}{\sqrt {x (x-a) (x-b)} \left (-a^2+2 a x+x^2 \left (b^2 d-1\right )-2 b d x^3+d x^4\right )} \, dx\)

\(\Big \downarrow \) 2467

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

\(\Big \downarrow \) 2035

\(\displaystyle \frac {2 \sqrt {x} \sqrt {-x (a+b)+a b+x^2} \int \frac {-x^3+3 a x^2-a (2 a+b) x+a^2 b}{\sqrt {x^2-(a+b) x+a b} \left (-d x^4+2 b d x^3+\left (1-b^2 d\right ) x^2-2 a x+a^2\right )}d\sqrt {x}}{\sqrt {x (a-x) (b-x)}}\)

\(\Big \downarrow \) 7292

\(\displaystyle \frac {2 \sqrt {x} \sqrt {-x (a+b)+a b+x^2} \int \frac {(a-x) \left (x^2-2 a x+a b\right )}{\sqrt {x^2-(a+b) x+a b} \left (-d x^4+2 b d x^3+\left (1-b^2 d\right ) x^2-2 a x+a^2\right )}d\sqrt {x}}{\sqrt {x (a-x) (b-x)}}\)

\(\Big \downarrow \) 7293

\(\displaystyle \frac {2 \sqrt {x} \sqrt {-x (a+b)+a b+x^2} \int \left (\frac {x^3}{\sqrt {x^2-(a+b) x+a b} \left (d x^4-2 b d x^3-\left (1-b^2 d\right ) x^2+2 a x-a^2\right )}+\frac {3 a x^2}{\sqrt {x^2-(a+b) x+a b} \left (-d x^4+2 b d x^3+\left (1-b^2 d\right ) x^2-2 a x+a^2\right )}+\frac {2 a^2 \left (\frac {b}{2 a}+1\right ) x}{\sqrt {x^2-(a+b) x+a b} \left (d x^4-2 b d x^3-\left (1-b^2 d\right ) x^2+2 a x-a^2\right )}+\frac {a^2 b}{\sqrt {x^2-(a+b) x+a b} \left (-d x^4+2 b d x^3+\left (1-b^2 d\right ) x^2-2 a x+a^2\right )}\right )d\sqrt {x}}{\sqrt {x (a-x) (b-x)}}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 \sqrt {x} \sqrt {-x (a+b)+a b+x^2} \left (a^2 b \int \frac {1}{\sqrt {x^2-(a+b) x+a b} \left (-d x^4+2 b d x^3+\left (1-b^2 d\right ) x^2-2 a x+a^2\right )}d\sqrt {x}+3 a \int \frac {x^2}{\sqrt {x^2-(a+b) x+a b} \left (-d x^4+2 b d x^3+\left (1-b^2 d\right ) x^2-2 a x+a^2\right )}d\sqrt {x}+a (2 a+b) \int \frac {x}{\sqrt {x^2-(a+b) x+a b} \left (d x^4-2 b d x^3-\left (1-b^2 d\right ) x^2+2 a x-a^2\right )}d\sqrt {x}+\int \frac {x^3}{\sqrt {x^2-(a+b) x+a b} \left (d x^4-2 b d x^3-\left (1-b^2 d\right ) x^2+2 a x-a^2\right )}d\sqrt {x}\right )}{\sqrt {x (a-x) (b-x)}}\)

input
Int[(-(a^2*b) + a*(2*a + b)*x - 3*a*x^2 + x^3)/(Sqrt[x*(-a + x)*(-b + x)]* 
(-a^2 + 2*a*x + (-1 + b^2*d)*x^2 - 2*b*d*x^3 + d*x^4)),x]
 
output
$Aborted
 

3.12.86.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2035
Int[(Fx_)*(x_)^(m_), x_Symbol] :> With[{k = Denominator[m]}, Simp[k   Subst 
[Int[x^(k*(m + 1) - 1)*SubstPower[Fx, x, k], x], x, x^(1/k)], x]] /; Fracti 
onQ[m] && AlgebraicFunctionQ[Fx, x]
 

rule 2467
Int[(Fx_.)*(Px_)^(p_), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Simp[Px^F 
racPart[p]/(x^(r*FracPart[p])*ExpandToSum[Px/x^r, x]^FracPart[p])   Int[x^( 
p*r)*ExpandToSum[Px/x^r, x]^p*Fx, x], x] /; IGtQ[r, 0]] /; FreeQ[p, x] && P 
olyQ[Px, x] &&  !IntegerQ[p] &&  !MonomialQ[Px, x] &&  !PolyQ[Fx, x]
 

rule 7292
Int[u_, x_Symbol] :> With[{v = NormalizeIntegrand[u, x]}, Int[v, x] /; v =! 
= u]
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
3.12.86.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.83 (sec) , antiderivative size = 246, normalized size of antiderivative = 2.83

method result size
default \(b \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\operatorname {RootOf}\left (d \,\textit {\_Z}^{4}-2 d b \,\textit {\_Z}^{3}+\left (d \,b^{2}-1\right ) \textit {\_Z}^{2}+2 \textit {\_Z} a -a^{2}\right )}{\sum }\frac {\left (-\underline {\hspace {1.25 ex}}\alpha ^{3}+3 \underline {\hspace {1.25 ex}}\alpha ^{2} a -2 \underline {\hspace {1.25 ex}}\alpha \,a^{2}-a b \underline {\hspace {1.25 ex}}\alpha +a^{2} b \right ) \left (d \,\underline {\hspace {1.25 ex}}\alpha ^{3}-\underline {\hspace {1.25 ex}}\alpha ^{2} b d -\underline {\hspace {1.25 ex}}\alpha +2 a -b \right ) \sqrt {-\frac {-b +x}{b}}\, \sqrt {\frac {-a +x}{-a +b}}\, \sqrt {\frac {x}{b}}\, \operatorname {EllipticPi}\left (\sqrt {-\frac {-b +x}{b}}, -\frac {\left (d \,\underline {\hspace {1.25 ex}}\alpha ^{3}-\underline {\hspace {1.25 ex}}\alpha ^{2} b d -\underline {\hspace {1.25 ex}}\alpha +2 a -b \right ) b}{a^{2}-2 a b +b^{2}}, \sqrt {\frac {b}{-a +b}}\right )}{\left (-2 d \,\underline {\hspace {1.25 ex}}\alpha ^{3}+3 \underline {\hspace {1.25 ex}}\alpha ^{2} b d -\underline {\hspace {1.25 ex}}\alpha \,b^{2} d +\underline {\hspace {1.25 ex}}\alpha -a \right ) \left (a^{2}-2 a b +b^{2}\right ) \sqrt {x \left (a b -a x -b x +x^{2}\right )}}\right )\) \(246\)
elliptic \(b \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\operatorname {RootOf}\left (d \,\textit {\_Z}^{4}-2 d b \,\textit {\_Z}^{3}+\left (d \,b^{2}-1\right ) \textit {\_Z}^{2}+2 \textit {\_Z} a -a^{2}\right )}{\sum }\frac {\left (-\underline {\hspace {1.25 ex}}\alpha ^{3}+3 \underline {\hspace {1.25 ex}}\alpha ^{2} a -2 \underline {\hspace {1.25 ex}}\alpha \,a^{2}-a b \underline {\hspace {1.25 ex}}\alpha +a^{2} b \right ) \left (d \,\underline {\hspace {1.25 ex}}\alpha ^{3}-\underline {\hspace {1.25 ex}}\alpha ^{2} b d -\underline {\hspace {1.25 ex}}\alpha +2 a -b \right ) \sqrt {-\frac {-b +x}{b}}\, \sqrt {\frac {-a +x}{-a +b}}\, \sqrt {\frac {x}{b}}\, \operatorname {EllipticPi}\left (\sqrt {-\frac {-b +x}{b}}, -\frac {\left (d \,\underline {\hspace {1.25 ex}}\alpha ^{3}-\underline {\hspace {1.25 ex}}\alpha ^{2} b d -\underline {\hspace {1.25 ex}}\alpha +2 a -b \right ) b}{a^{2}-2 a b +b^{2}}, \sqrt {\frac {b}{-a +b}}\right )}{\left (-2 d \,\underline {\hspace {1.25 ex}}\alpha ^{3}+3 \underline {\hspace {1.25 ex}}\alpha ^{2} b d -\underline {\hspace {1.25 ex}}\alpha \,b^{2} d +\underline {\hspace {1.25 ex}}\alpha -a \right ) \left (a^{2}-2 a b +b^{2}\right ) \sqrt {x \left (a b -a x -b x +x^{2}\right )}}\right )\) \(246\)

input
int((-a^2*b+a*(2*a+b)*x-3*a*x^2+x^3)/(x*(-a+x)*(-b+x))^(1/2)/(-a^2+2*a*x+( 
b^2*d-1)*x^2-2*b*d*x^3+d*x^4),x,method=_RETURNVERBOSE)
 
output
b*sum((-_alpha^3+3*_alpha^2*a-2*_alpha*a^2-_alpha*a*b+a^2*b)/(-2*_alpha^3* 
d+3*_alpha^2*b*d-_alpha*b^2*d+_alpha-a)*(_alpha^3*d-_alpha^2*b*d-_alpha+2* 
a-b)/(a^2-2*a*b+b^2)*(-(-b+x)/b)^(1/2)*((-a+x)/(-a+b))^(1/2)*(x/b)^(1/2)/( 
x*(a*b-a*x-b*x+x^2))^(1/2)*EllipticPi((-(-b+x)/b)^(1/2),-(_alpha^3*d-_alph 
a^2*b*d-_alpha+2*a-b)*b/(a^2-2*a*b+b^2),(b/(-a+b))^(1/2)),_alpha=RootOf(d* 
_Z^4-2*d*b*_Z^3+(b^2*d-1)*_Z^2+2*_Z*a-a^2))
 
3.12.86.5 Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.96 (sec) , antiderivative size = 605, normalized size of antiderivative = 6.95 \[ \int \frac {-a^2 b+a (2 a+b) x-3 a x^2+x^3}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=-\frac {\log \left (\frac {2 \, b d x^{3} - d x^{4} - {\left (b^{2} d + 1\right )} x^{2} - a^{2} + 2 \, a x + 2 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left (\frac {b d x - d x^{2}}{d^{\frac {1}{4}}} + \frac {a d - d x}{d^{\frac {3}{4}}}\right )} - \frac {2 \, {\left (a b d x - {\left (a + b\right )} d x^{2} + d x^{3}\right )}}{\sqrt {d}}}{2 \, b d x^{3} - d x^{4} - {\left (b^{2} d - 1\right )} x^{2} + a^{2} - 2 \, a x}\right )}{4 \, d^{\frac {1}{4}}} + \frac {\log \left (\frac {2 \, b d x^{3} - d x^{4} - {\left (b^{2} d + 1\right )} x^{2} - a^{2} + 2 \, a x - 2 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left (\frac {b d x - d x^{2}}{d^{\frac {1}{4}}} + \frac {a d - d x}{d^{\frac {3}{4}}}\right )} - \frac {2 \, {\left (a b d x - {\left (a + b\right )} d x^{2} + d x^{3}\right )}}{\sqrt {d}}}{2 \, b d x^{3} - d x^{4} - {\left (b^{2} d - 1\right )} x^{2} + a^{2} - 2 \, a x}\right )}{4 \, d^{\frac {1}{4}}} - \frac {i \, \log \left (\frac {2 \, b d x^{3} - d x^{4} - {\left (b^{2} d + 1\right )} x^{2} - a^{2} + 2 \, a x + 2 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left (\frac {i \, b d x - i \, d x^{2}}{d^{\frac {1}{4}}} + \frac {-i \, a d + i \, d x}{d^{\frac {3}{4}}}\right )} + \frac {2 \, {\left (a b d x - {\left (a + b\right )} d x^{2} + d x^{3}\right )}}{\sqrt {d}}}{2 \, b d x^{3} - d x^{4} - {\left (b^{2} d - 1\right )} x^{2} + a^{2} - 2 \, a x}\right )}{4 \, d^{\frac {1}{4}}} + \frac {i \, \log \left (\frac {2 \, b d x^{3} - d x^{4} - {\left (b^{2} d + 1\right )} x^{2} - a^{2} + 2 \, a x + 2 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left (\frac {-i \, b d x + i \, d x^{2}}{d^{\frac {1}{4}}} + \frac {i \, a d - i \, d x}{d^{\frac {3}{4}}}\right )} + \frac {2 \, {\left (a b d x - {\left (a + b\right )} d x^{2} + d x^{3}\right )}}{\sqrt {d}}}{2 \, b d x^{3} - d x^{4} - {\left (b^{2} d - 1\right )} x^{2} + a^{2} - 2 \, a x}\right )}{4 \, d^{\frac {1}{4}}} \]

input
integrate((-a^2*b+a*(2*a+b)*x-3*a*x^2+x^3)/(x*(-a+x)*(-b+x))^(1/2)/(-a^2+2 
*a*x+(b^2*d-1)*x^2-2*b*d*x^3+d*x^4),x, algorithm="fricas")
 
output
-1/4*log((2*b*d*x^3 - d*x^4 - (b^2*d + 1)*x^2 - a^2 + 2*a*x + 2*sqrt(a*b*x 
 - (a + b)*x^2 + x^3)*((b*d*x - d*x^2)/d^(1/4) + (a*d - d*x)/d^(3/4)) - 2* 
(a*b*d*x - (a + b)*d*x^2 + d*x^3)/sqrt(d))/(2*b*d*x^3 - d*x^4 - (b^2*d - 1 
)*x^2 + a^2 - 2*a*x))/d^(1/4) + 1/4*log((2*b*d*x^3 - d*x^4 - (b^2*d + 1)*x 
^2 - a^2 + 2*a*x - 2*sqrt(a*b*x - (a + b)*x^2 + x^3)*((b*d*x - d*x^2)/d^(1 
/4) + (a*d - d*x)/d^(3/4)) - 2*(a*b*d*x - (a + b)*d*x^2 + d*x^3)/sqrt(d))/ 
(2*b*d*x^3 - d*x^4 - (b^2*d - 1)*x^2 + a^2 - 2*a*x))/d^(1/4) - 1/4*I*log(( 
2*b*d*x^3 - d*x^4 - (b^2*d + 1)*x^2 - a^2 + 2*a*x + 2*sqrt(a*b*x - (a + b) 
*x^2 + x^3)*((I*b*d*x - I*d*x^2)/d^(1/4) + (-I*a*d + I*d*x)/d^(3/4)) + 2*( 
a*b*d*x - (a + b)*d*x^2 + d*x^3)/sqrt(d))/(2*b*d*x^3 - d*x^4 - (b^2*d - 1) 
*x^2 + a^2 - 2*a*x))/d^(1/4) + 1/4*I*log((2*b*d*x^3 - d*x^4 - (b^2*d + 1)* 
x^2 - a^2 + 2*a*x + 2*sqrt(a*b*x - (a + b)*x^2 + x^3)*((-I*b*d*x + I*d*x^2 
)/d^(1/4) + (I*a*d - I*d*x)/d^(3/4)) + 2*(a*b*d*x - (a + b)*d*x^2 + d*x^3) 
/sqrt(d))/(2*b*d*x^3 - d*x^4 - (b^2*d - 1)*x^2 + a^2 - 2*a*x))/d^(1/4)
 
3.12.86.6 Sympy [F(-1)]

Timed out. \[ \int \frac {-a^2 b+a (2 a+b) x-3 a x^2+x^3}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=\text {Timed out} \]

input
integrate((-a**2*b+a*(2*a+b)*x-3*a*x**2+x**3)/(x*(-a+x)*(-b+x))**(1/2)/(-a 
**2+2*a*x+(b**2*d-1)*x**2-2*b*d*x**3+d*x**4),x)
 
output
Timed out
 
3.12.86.7 Maxima [F]

\[ \int \frac {-a^2 b+a (2 a+b) x-3 a x^2+x^3}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=\int { \frac {a^{2} b - {\left (2 \, a + b\right )} a x + 3 \, a x^{2} - x^{3}}{{\left (2 \, b d x^{3} - d x^{4} - {\left (b^{2} d - 1\right )} x^{2} + a^{2} - 2 \, a x\right )} \sqrt {{\left (a - x\right )} {\left (b - x\right )} x}} \,d x } \]

input
integrate((-a^2*b+a*(2*a+b)*x-3*a*x^2+x^3)/(x*(-a+x)*(-b+x))^(1/2)/(-a^2+2 
*a*x+(b^2*d-1)*x^2-2*b*d*x^3+d*x^4),x, algorithm="maxima")
 
output
integrate((a^2*b - (2*a + b)*a*x + 3*a*x^2 - x^3)/((2*b*d*x^3 - d*x^4 - (b 
^2*d - 1)*x^2 + a^2 - 2*a*x)*sqrt((a - x)*(b - x)*x)), x)
 
3.12.86.8 Giac [F]

\[ \int \frac {-a^2 b+a (2 a+b) x-3 a x^2+x^3}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=\int { \frac {a^{2} b - {\left (2 \, a + b\right )} a x + 3 \, a x^{2} - x^{3}}{{\left (2 \, b d x^{3} - d x^{4} - {\left (b^{2} d - 1\right )} x^{2} + a^{2} - 2 \, a x\right )} \sqrt {{\left (a - x\right )} {\left (b - x\right )} x}} \,d x } \]

input
integrate((-a^2*b+a*(2*a+b)*x-3*a*x^2+x^3)/(x*(-a+x)*(-b+x))^(1/2)/(-a^2+2 
*a*x+(b^2*d-1)*x^2-2*b*d*x^3+d*x^4),x, algorithm="giac")
 
output
integrate((a^2*b - (2*a + b)*a*x + 3*a*x^2 - x^3)/((2*b*d*x^3 - d*x^4 - (b 
^2*d - 1)*x^2 + a^2 - 2*a*x)*sqrt((a - x)*(b - x)*x)), x)
 
3.12.86.9 Mupad [B] (verification not implemented)

Time = 12.76 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.55 \[ \int \frac {-a^2 b+a (2 a+b) x-3 a x^2+x^3}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=\frac {\ln \left (\frac {a-x+2\,d^{1/4}\,\sqrt {x\,\left (a-x\right )\,\left (b-x\right )}-\sqrt {d}\,x^2+b\,\sqrt {d}\,x}{a-x+\sqrt {d}\,x^2-b\,\sqrt {d}\,x}\right )}{2\,d^{1/4}}+\frac {\ln \left (\frac {x-a-\sqrt {d}\,x^2+b\,\sqrt {d}\,x+d^{1/4}\,\sqrt {x\,\left (a-x\right )\,\left (b-x\right )}\,2{}\mathrm {i}}{a-x-\sqrt {d}\,x^2+b\,\sqrt {d}\,x}\right )\,1{}\mathrm {i}}{2\,d^{1/4}} \]

input
int(-(a^2*b + 3*a*x^2 - x^3 - a*x*(2*a + b))/((x*(a - x)*(b - x))^(1/2)*(x 
^2*(b^2*d - 1) + 2*a*x + d*x^4 - a^2 - 2*b*d*x^3)),x)
 
output
log((a - x + 2*d^(1/4)*(x*(a - x)*(b - x))^(1/2) - d^(1/2)*x^2 + b*d^(1/2) 
*x)/(a - x + d^(1/2)*x^2 - b*d^(1/2)*x))/(2*d^(1/4)) + (log((x - a + d^(1/ 
4)*(x*(a - x)*(b - x))^(1/2)*2i - d^(1/2)*x^2 + b*d^(1/2)*x)/(a - x - d^(1 
/2)*x^2 + b*d^(1/2)*x))*1i)/(2*d^(1/4))