3.29.68 \(\int \frac {a b-(a+b) x+x^2}{((-a+x) (-b+x)^2)^{2/3} (-b^2+a^2 d+2 (b-a d) x+(-1+d) x^2)} \, dx\) [2868]

3.29.68.1 Optimal result
3.29.68.2 Mathematica [A] (verified)
3.29.68.3 Rubi [A] (verified)
3.29.68.4 Maple [F]
3.29.68.5 Fricas [A] (verification not implemented)
3.29.68.6 Sympy [F(-1)]
3.29.68.7 Maxima [F]
3.29.68.8 Giac [F]
3.29.68.9 Mupad [F(-1)]

3.29.68.1 Optimal result

Integrand size = 60, antiderivative size = 305 \[ \int \frac {a b-(a+b) x+x^2}{\left ((-a+x) (-b+x)^2\right )^{2/3} \left (-b^2+a^2 d+2 (b-a d) x+(-1+d) x^2\right )} \, dx=\frac {\sqrt {3} \arctan \left (\frac {\sqrt {3} a \sqrt [3]{d}-\sqrt {3} \sqrt [3]{d} x}{a \sqrt [3]{d}-\sqrt [3]{d} x-2 \sqrt [3]{-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^3}}\right )}{2 (a-b) d^{2/3}}+\frac {\log \left (a \sqrt [3]{d}-\sqrt [3]{d} x+\sqrt [3]{-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^3}\right )}{2 (a-b) d^{2/3}}-\frac {\log \left (a^2 d^{2/3}-2 a d^{2/3} x+d^{2/3} x^2+\left (-a \sqrt [3]{d}+\sqrt [3]{d} x\right ) \sqrt [3]{-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^3}+\left (-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^3\right )^{2/3}\right )}{4 (a-b) d^{2/3}} \]

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

Time = 0.80 (sec) , antiderivative size = 267, normalized size of antiderivative = 0.88 \[ \int \frac {a b-(a+b) x+x^2}{\left ((-a+x) (-b+x)^2\right )^{2/3} \left (-b^2+a^2 d+2 (b-a d) x+(-1+d) x^2\right )} \, dx=\frac {(b-x)^{4/3} (-a+x)^{2/3} \left (-2 \sqrt {3} \arctan \left (\frac {\sqrt {3} \sqrt [3]{d} (-a+x)^{2/3}}{2 (b-x)^{2/3}+\sqrt [3]{d} (-a+x)^{2/3}}\right )-2 \log \left (\sqrt [3]{b-x}-\sqrt [6]{d} \sqrt [3]{-a+x}\right )-2 \log \left (\sqrt [3]{b-x}+\sqrt [6]{d} \sqrt [3]{-a+x}\right )+\log \left ((b-x)^{2/3}-\sqrt [6]{d} \sqrt [3]{b-x} \sqrt [3]{-a+x}+\sqrt [3]{d} (-a+x)^{2/3}\right )+\log \left ((b-x)^{2/3}+\sqrt [6]{d} \sqrt [3]{b-x} \sqrt [3]{-a+x}+\sqrt [3]{d} (-a+x)^{2/3}\right )\right )}{4 (-a+b) d^{2/3} \left ((b-x)^2 (-a+x)\right )^{2/3}} \]

input
Integrate[(a*b - (a + b)*x + x^2)/(((-a + x)*(-b + x)^2)^(2/3)*(-b^2 + a^2 
*d + 2*(b - a*d)*x + (-1 + d)*x^2)),x]
 
output
((b - x)^(4/3)*(-a + x)^(2/3)*(-2*Sqrt[3]*ArcTan[(Sqrt[3]*d^(1/3)*(-a + x) 
^(2/3))/(2*(b - x)^(2/3) + d^(1/3)*(-a + x)^(2/3))] - 2*Log[(b - x)^(1/3) 
- d^(1/6)*(-a + x)^(1/3)] - 2*Log[(b - x)^(1/3) + d^(1/6)*(-a + x)^(1/3)] 
+ Log[(b - x)^(2/3) - d^(1/6)*(b - x)^(1/3)*(-a + x)^(1/3) + d^(1/3)*(-a + 
 x)^(2/3)] + Log[(b - x)^(2/3) + d^(1/6)*(b - x)^(1/3)*(-a + x)^(1/3) + d^ 
(1/3)*(-a + x)^(2/3)]))/(4*(-a + b)*d^(2/3)*((b - x)^2*(-a + x))^(2/3))
 
3.29.68.3 Rubi [A] (verified)

Time = 1.02 (sec) , antiderivative size = 335, normalized size of antiderivative = 1.10, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {7270, 25, 2004, 1205, 2009}

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

\(\Big \downarrow \) 7270

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 2004

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

\(\Big \downarrow \) 1205

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {(x-a)^{2/3} (x-b)^{4/3} \left (-\frac {\sqrt {3} \arctan \left (\frac {1}{\sqrt {3}}-\frac {2 \sqrt [3]{x-b}}{\sqrt {3} \sqrt [6]{d} \sqrt [3]{x-a}}\right )}{2 d^{2/3} (a-b)}-\frac {\sqrt {3} \arctan \left (\frac {2 \sqrt [3]{x-b}}{\sqrt {3} \sqrt [6]{d} \sqrt [3]{x-a}}+\frac {1}{\sqrt {3}}\right )}{2 d^{2/3} (a-b)}+\frac {\log \left (2 \left (\sqrt {d}+1\right ) \left (b-a \sqrt {d}\right )-2 (1-d) x\right )}{4 d^{2/3} (a-b)}+\frac {\log \left (2 (1-d) x-2 \left (1-\sqrt {d}\right ) \left (a \sqrt {d}+b\right )\right )}{4 d^{2/3} (a-b)}-\frac {3 \log \left (-\sqrt [3]{x-a}-\frac {\sqrt [3]{x-b}}{\sqrt [6]{d}}\right )}{4 d^{2/3} (a-b)}-\frac {3 \log \left (\frac {\sqrt [3]{x-b}}{\sqrt [6]{d}}-\sqrt [3]{x-a}\right )}{4 d^{2/3} (a-b)}\right )}{\left (-\left ((a-x) (b-x)^2\right )\right )^{2/3}}\)

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

3.29.68.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 1205
Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_))/((a_.) + (b_.)*(x 
_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^ 
n, 1/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n}, x] && 
 !IntegerQ[m] &&  !IntegerQ[n]
 

rule 2004
Int[(u_)*((d_) + (e_.)*(x_))^(q_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.) 
, x_Symbol] :> Int[u*(d + e*x)^(p + q)*(a/d + (c/e)*x)^p, x] /; FreeQ[{a, b 
, c, d, e, q}, x] && EqQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p]
 

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

rule 7270
Int[(u_.)*((a_.)*(v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> Simp[a^IntPart[p 
]*((a*v^m*w^n)^FracPart[p]/(v^(m*FracPart[p])*w^(n*FracPart[p])))   Int[u*v 
^(m*p)*w^(n*p), x], x] /; FreeQ[{a, m, n, p}, x] &&  !IntegerQ[p] &&  !Free 
Q[v, x] &&  !FreeQ[w, x]
 
3.29.68.4 Maple [F]

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

input
int((a*b-(a+b)*x+x^2)/((-a+x)*(-b+x)^2)^(2/3)/(-b^2+a^2*d+2*(-a*d+b)*x+(-1 
+d)*x^2),x)
 
output
int((a*b-(a+b)*x+x^2)/((-a+x)*(-b+x)^2)^(2/3)/(-b^2+a^2*d+2*(-a*d+b)*x+(-1 
+d)*x^2),x)
 
3.29.68.5 Fricas [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 331, normalized size of antiderivative = 1.09 \[ \int \frac {a b-(a+b) x+x^2}{\left ((-a+x) (-b+x)^2\right )^{2/3} \left (-b^2+a^2 d+2 (b-a d) x+(-1+d) x^2\right )} \, dx=\frac {2 \, \sqrt {3} d \sqrt {-\left (-d^{2}\right )^{\frac {1}{3}}} \arctan \left (\frac {\sqrt {3} {\left (2 \, {\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {2}{3}} d - {\left (b^{2} - 2 \, b x + x^{2}\right )} \left (-d^{2}\right )^{\frac {1}{3}}\right )} \sqrt {-\left (-d^{2}\right )^{\frac {1}{3}}}}{3 \, {\left (b^{2} d - 2 \, b d x + d x^{2}\right )}}\right ) - \left (-d^{2}\right )^{\frac {2}{3}} \log \left (-\frac {{\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {2}{3}} \left (-d^{2}\right )^{\frac {1}{3}} d - {\left (b^{2} - 2 \, b x + x^{2}\right )} \left (-d^{2}\right )^{\frac {2}{3}} + {\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {1}{3}} {\left (a d^{2} - d^{2} x\right )}}{b^{2} - 2 \, b x + x^{2}}\right ) + 2 \, \left (-d^{2}\right )^{\frac {2}{3}} \log \left (\frac {{\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {2}{3}} d + {\left (b^{2} - 2 \, b x + x^{2}\right )} \left (-d^{2}\right )^{\frac {1}{3}}}{b^{2} - 2 \, b x + x^{2}}\right )}{4 \, {\left (a - b\right )} d^{2}} \]

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

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

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

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

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

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

input
integrate((a*b-(a+b)*x+x^2)/((-a+x)*(-b+x)^2)^(2/3)/(-b^2+a^2*d+2*(-a*d+b) 
*x+(-1+d)*x^2),x, algorithm="giac")
 
output
integrate((a*b - (a + b)*x + x^2)/((-(a - x)*(b - x)^2)^(2/3)*(a^2*d + (d 
- 1)*x^2 - b^2 - 2*(a*d - b)*x)), x)
 
3.29.68.9 Mupad [F(-1)]

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

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