Integrand size = 20, antiderivative size = 55 \[ \int \frac {a+b x+c x^2}{1-x^3} \, dx=\frac {(a-b) \arctan \left (\frac {1+2 x}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {1}{3} (a+b+c) \log (1-x)+\frac {1}{6} (a+b-2 c) \log \left (1+x+x^2\right ) \] Output:
1/3*(a-b)*arctan(1/3*(1+2*x)*3^(1/2))*3^(1/2)-1/3*(a+b+c)*ln(1-x)+1/6*(a+b -2*c)*ln(x^2+x+1)
Time = 0.03 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.13 \[ \int \frac {a+b x+c x^2}{1-x^3} \, dx=\frac {1}{6} \left (2 \sqrt {3} (a-b) \arctan \left (\frac {1+2 x}{\sqrt {3}}\right )-2 (a+b) \log (1-x)+(a+b) \log \left (1+x+x^2\right )-2 c \log \left (1-x^3\right )\right ) \] Input:
Integrate[(a + b*x + c*x^2)/(1 - x^3),x]
Output:
(2*Sqrt[3]*(a - b)*ArcTan[(1 + 2*x)/Sqrt[3]] - 2*(a + b)*Log[1 - x] + (a + b)*Log[1 + x + x^2] - 2*c*Log[1 - x^3])/6
Time = 0.41 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.09, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {2414, 16, 1142, 1083, 217, 1103}
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+b x+c x^2}{1-x^3} \, dx\) |
\(\Big \downarrow \) 2414 |
\(\displaystyle \frac {1}{3} \int \frac {2 a-b-c+(a+b-2 c) x}{x^2+x+1}dx+\frac {1}{3} (a+b+c) \int \frac {1}{1-x}dx\) |
\(\Big \downarrow \) 16 |
\(\displaystyle \frac {1}{3} \int \frac {2 a-b-c+(a+b-2 c) x}{x^2+x+1}dx-\frac {1}{3} \log (1-x) (a+b+c)\) |
\(\Big \downarrow \) 1142 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} (a+b-2 c) \int \frac {2 x+1}{x^2+x+1}dx+\frac {3}{2} (a-b) \int \frac {1}{x^2+x+1}dx\right )-\frac {1}{3} \log (1-x) (a+b+c)\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} (a+b-2 c) \int \frac {2 x+1}{x^2+x+1}dx-3 (a-b) \int \frac {1}{-(2 x+1)^2-3}d(2 x+1)\right )-\frac {1}{3} \log (1-x) (a+b+c)\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} (a+b-2 c) \int \frac {2 x+1}{x^2+x+1}dx+\sqrt {3} (a-b) \arctan \left (\frac {2 x+1}{\sqrt {3}}\right )\right )-\frac {1}{3} \log (1-x) (a+b+c)\) |
\(\Big \downarrow \) 1103 |
\(\displaystyle \frac {1}{3} \left (\sqrt {3} (a-b) \arctan \left (\frac {2 x+1}{\sqrt {3}}\right )+\frac {1}{2} \log \left (x^2+x+1\right ) (a+b-2 c)\right )-\frac {1}{3} \log (1-x) (a+b+c)\) |
Input:
Int[(a + b*x + c*x^2)/(1 - x^3),x]
Output:
-1/3*((a + b + c)*Log[1 - x]) + (Sqrt[3]*(a - b)*ArcTan[(1 + 2*x)/Sqrt[3]] + ((a + b - 2*c)*Log[1 + x + x^2])/2)/3
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[(2*c*d - b*e)/(2*c) Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
Int[(P2_)/((a_) + (b_.)*(x_)^3), x_Symbol] :> With[{A = Coeff[P2, x, 0], B = Coeff[P2, x, 1], C = Coeff[P2, x, 2], q = (-a/b)^(1/3)}, Simp[q*((A + B*q + C*q^2)/(3*a)) Int[1/(q - x), x], x] + Simp[q/(3*a) Int[(q*(2*A - B*q - C*q^2) + (A + B*q - 2*C*q^2)*x)/(q^2 + q*x + x^2), x], x] /; NeQ[a*B^3 - b*A^3, 0] && NeQ[A + B*q + C*q^2, 0]] /; FreeQ[{a, b}, x] && PolyQ[P2, x, 2] && LtQ[a/b, 0]
Time = 0.13 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00
method | result | size |
default | \(\frac {\left (a +b -2 c \right ) \ln \left (x^{2}+x +1\right )}{6}+\frac {2 \left (\frac {3 a}{2}-\frac {3 b}{2}\right ) \arctan \left (\frac {\left (1+2 x \right ) \sqrt {3}}{3}\right ) \sqrt {3}}{9}+\left (-\frac {c}{3}-\frac {b}{3}-\frac {a}{3}\right ) \ln \left (x -1\right )\) | \(55\) |
meijerg | \(-\frac {c \ln \left (-x^{3}+1\right )}{3}-\frac {b \,x^{2} \left (\ln \left (1-\left (x^{3}\right )^{\frac {1}{3}}\right )-\frac {\ln \left (1+\left (x^{3}\right )^{\frac {1}{3}}+\left (x^{3}\right )^{\frac {2}{3}}\right )}{2}+\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (x^{3}\right )^{\frac {1}{3}}}{2+\left (x^{3}\right )^{\frac {1}{3}}}\right )\right )}{3 \left (x^{3}\right )^{\frac {2}{3}}}-\frac {a x \left (\ln \left (1-\left (x^{3}\right )^{\frac {1}{3}}\right )-\frac {\ln \left (1+\left (x^{3}\right )^{\frac {1}{3}}+\left (x^{3}\right )^{\frac {2}{3}}\right )}{2}-\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (x^{3}\right )^{\frac {1}{3}}}{2+\left (x^{3}\right )^{\frac {1}{3}}}\right )\right )}{3 \left (x^{3}\right )^{\frac {1}{3}}}\) | \(138\) |
risch | \(-\frac {\ln \left (x -1\right ) a}{3}-\frac {\ln \left (x -1\right ) c}{3}+\frac {a \ln \left (4 a^{2} x^{2}+4 a b \,x^{2}+4 b^{2} x^{2}+4 a^{2} x +4 a b x +4 b^{2} x +4 a^{2}+4 a b +4 b^{2}\right )}{6}+\frac {b \ln \left (4 a^{2} x^{2}+4 a b \,x^{2}+4 b^{2} x^{2}+4 a^{2} x +4 a b x +4 b^{2} x +4 a^{2}+4 a b +4 b^{2}\right )}{6}-\frac {c \ln \left (4 a^{2} x^{2}+4 a b \,x^{2}+4 b^{2} x^{2}+4 a^{2} x +4 a b x +4 b^{2} x +4 a^{2}+4 a b +4 b^{2}\right )}{3}+\frac {\sqrt {3}\, a \arctan \left (\frac {2 a^{2} \sqrt {3}\, x}{3 \left (a^{2}+a b +b^{2}\right )}+\frac {\sqrt {3}\, a^{2}}{3 a^{2}+3 a b +3 b^{2}}+\frac {\sqrt {3}\, a b}{3 a^{2}+3 a b +3 b^{2}}+\frac {2 \sqrt {3}\, a b x}{3 \left (a^{2}+a b +b^{2}\right )}+\frac {2 \sqrt {3}\, b^{2} x}{3 \left (a^{2}+a b +b^{2}\right )}+\frac {\sqrt {3}\, b^{2}}{3 a^{2}+3 a b +3 b^{2}}\right )}{3}-\frac {\ln \left (x -1\right ) b}{3}+\frac {\sqrt {3}\, a \arctan \left (\frac {2 \sqrt {3}\, b}{3 a}+\frac {\sqrt {3}}{3}\right )}{3}-\frac {\sqrt {3}\, b \arctan \left (\frac {2 a^{2} \sqrt {3}\, x}{3 \left (a^{2}+a b +b^{2}\right )}+\frac {\sqrt {3}\, a^{2}}{3 a^{2}+3 a b +3 b^{2}}+\frac {\sqrt {3}\, a b}{3 a^{2}+3 a b +3 b^{2}}+\frac {2 \sqrt {3}\, a b x}{3 \left (a^{2}+a b +b^{2}\right )}+\frac {2 \sqrt {3}\, b^{2} x}{3 \left (a^{2}+a b +b^{2}\right )}+\frac {\sqrt {3}\, b^{2}}{3 a^{2}+3 a b +3 b^{2}}\right )}{3}-\frac {\sqrt {3}\, b \arctan \left (\frac {2 \sqrt {3}\, b}{3 a}+\frac {\sqrt {3}}{3}\right )}{3}\) | \(502\) |
Input:
int((c*x^2+b*x+a)/(-x^3+1),x,method=_RETURNVERBOSE)
Output:
1/6*(a+b-2*c)*ln(x^2+x+1)+2/9*(3/2*a-3/2*b)*arctan(1/3*(1+2*x)*3^(1/2))*3^ (1/2)+(-1/3*c-1/3*b-1/3*a)*ln(x-1)
Time = 0.11 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.85 \[ \int \frac {a+b x+c x^2}{1-x^3} \, dx=\frac {1}{3} \, \sqrt {3} {\left (a - b\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \frac {1}{6} \, {\left (a + b - 2 \, c\right )} \log \left (x^{2} + x + 1\right ) - \frac {1}{3} \, {\left (a + b + c\right )} \log \left (x - 1\right ) \] Input:
integrate((c*x^2+b*x+a)/(-x^3+1),x, algorithm="fricas")
Output:
1/3*sqrt(3)*(a - b)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/6*(a + b - 2*c)*log( x^2 + x + 1) - 1/3*(a + b + c)*log(x - 1)
Result contains complex when optimal does not.
Time = 0.64 (sec) , antiderivative size = 323, normalized size of antiderivative = 5.87 \[ \int \frac {a+b x+c x^2}{1-x^3} \, dx=- \frac {\left (a + b + c\right ) \log {\left (x + \frac {a^{2} c - a^{2} \left (a + b + c\right ) - 2 a b^{2} + b c^{2} - 2 b c \left (a + b + c\right ) + b \left (a + b + c\right )^{2}}{a^{3} - b^{3}} \right )}}{3} - \left (- \frac {a}{6} - \frac {b}{6} + \frac {c}{3} - \frac {\sqrt {3} i \left (a - b\right )}{6}\right ) \log {\left (x + \frac {a^{2} c - 3 a^{2} \left (- \frac {a}{6} - \frac {b}{6} + \frac {c}{3} - \frac {\sqrt {3} i \left (a - b\right )}{6}\right ) - 2 a b^{2} + b c^{2} - 6 b c \left (- \frac {a}{6} - \frac {b}{6} + \frac {c}{3} - \frac {\sqrt {3} i \left (a - b\right )}{6}\right ) + 9 b \left (- \frac {a}{6} - \frac {b}{6} + \frac {c}{3} - \frac {\sqrt {3} i \left (a - b\right )}{6}\right )^{2}}{a^{3} - b^{3}} \right )} - \left (- \frac {a}{6} - \frac {b}{6} + \frac {c}{3} + \frac {\sqrt {3} i \left (a - b\right )}{6}\right ) \log {\left (x + \frac {a^{2} c - 3 a^{2} \left (- \frac {a}{6} - \frac {b}{6} + \frac {c}{3} + \frac {\sqrt {3} i \left (a - b\right )}{6}\right ) - 2 a b^{2} + b c^{2} - 6 b c \left (- \frac {a}{6} - \frac {b}{6} + \frac {c}{3} + \frac {\sqrt {3} i \left (a - b\right )}{6}\right ) + 9 b \left (- \frac {a}{6} - \frac {b}{6} + \frac {c}{3} + \frac {\sqrt {3} i \left (a - b\right )}{6}\right )^{2}}{a^{3} - b^{3}} \right )} \] Input:
integrate((c*x**2+b*x+a)/(-x**3+1),x)
Output:
-(a + b + c)*log(x + (a**2*c - a**2*(a + b + c) - 2*a*b**2 + b*c**2 - 2*b* c*(a + b + c) + b*(a + b + c)**2)/(a**3 - b**3))/3 - (-a/6 - b/6 + c/3 - s qrt(3)*I*(a - b)/6)*log(x + (a**2*c - 3*a**2*(-a/6 - b/6 + c/3 - sqrt(3)*I *(a - b)/6) - 2*a*b**2 + b*c**2 - 6*b*c*(-a/6 - b/6 + c/3 - sqrt(3)*I*(a - b)/6) + 9*b*(-a/6 - b/6 + c/3 - sqrt(3)*I*(a - b)/6)**2)/(a**3 - b**3)) - (-a/6 - b/6 + c/3 + sqrt(3)*I*(a - b)/6)*log(x + (a**2*c - 3*a**2*(-a/6 - b/6 + c/3 + sqrt(3)*I*(a - b)/6) - 2*a*b**2 + b*c**2 - 6*b*c*(-a/6 - b/6 + c/3 + sqrt(3)*I*(a - b)/6) + 9*b*(-a/6 - b/6 + c/3 + sqrt(3)*I*(a - b)/6 )**2)/(a**3 - b**3))
Time = 0.11 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.85 \[ \int \frac {a+b x+c x^2}{1-x^3} \, dx=\frac {1}{3} \, \sqrt {3} {\left (a - b\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \frac {1}{6} \, {\left (a + b - 2 \, c\right )} \log \left (x^{2} + x + 1\right ) - \frac {1}{3} \, {\left (a + b + c\right )} \log \left (x - 1\right ) \] Input:
integrate((c*x^2+b*x+a)/(-x^3+1),x, algorithm="maxima")
Output:
1/3*sqrt(3)*(a - b)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/6*(a + b - 2*c)*log( x^2 + x + 1) - 1/3*(a + b + c)*log(x - 1)
Time = 0.12 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.95 \[ \int \frac {a+b x+c x^2}{1-x^3} \, dx=\frac {1}{3} \, {\left (\sqrt {3} a - \sqrt {3} b\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \frac {1}{6} \, {\left (a + b - 2 \, c\right )} \log \left (x^{2} + x + 1\right ) - \frac {1}{3} \, {\left (a + b + c\right )} \log \left ({\left | x - 1 \right |}\right ) \] Input:
integrate((c*x^2+b*x+a)/(-x^3+1),x, algorithm="giac")
Output:
1/3*(sqrt(3)*a - sqrt(3)*b)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/6*(a + b - 2 *c)*log(x^2 + x + 1) - 1/3*(a + b + c)*log(abs(x - 1))
Time = 5.63 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.58 \[ \int \frac {a+b x+c x^2}{1-x^3} \, dx=\ln \left (x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {a}{6}+\frac {b}{6}-\frac {c}{3}-\frac {\sqrt {3}\,a\,1{}\mathrm {i}}{6}+\frac {\sqrt {3}\,b\,1{}\mathrm {i}}{6}\right )+\ln \left (x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {a}{6}+\frac {b}{6}-\frac {c}{3}+\frac {\sqrt {3}\,a\,1{}\mathrm {i}}{6}-\frac {\sqrt {3}\,b\,1{}\mathrm {i}}{6}\right )-\ln \left (x-1\right )\,\left (\frac {a}{3}+\frac {b}{3}+\frac {c}{3}\right ) \] Input:
int(-(a + b*x + c*x^2)/(x^3 - 1),x)
Output:
log(x - (3^(1/2)*1i)/2 + 1/2)*(a/6 + b/6 - c/3 - (3^(1/2)*a*1i)/6 + (3^(1/ 2)*b*1i)/6) + log(x + (3^(1/2)*1i)/2 + 1/2)*(a/6 + b/6 - c/3 + (3^(1/2)*a* 1i)/6 - (3^(1/2)*b*1i)/6) - log(x - 1)*(a/3 + b/3 + c/3)
Time = 0.15 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.53 \[ \int \frac {a+b x+c x^2}{1-x^3} \, dx=\frac {\sqrt {3}\, \mathit {atan} \left (\frac {2 x +1}{\sqrt {3}}\right ) a}{3}-\frac {\sqrt {3}\, \mathit {atan} \left (\frac {2 x +1}{\sqrt {3}}\right ) b}{3}+\frac {\mathrm {log}\left (x^{2}+x +1\right ) a}{6}+\frac {\mathrm {log}\left (x^{2}+x +1\right ) b}{6}-\frac {\mathrm {log}\left (x^{2}+x +1\right ) c}{3}-\frac {\mathrm {log}\left (x -1\right ) a}{3}-\frac {\mathrm {log}\left (x -1\right ) b}{3}-\frac {\mathrm {log}\left (x -1\right ) c}{3} \] Input:
int((c*x^2+b*x+a)/(-x^3+1),x)
Output:
(2*sqrt(3)*atan((2*x + 1)/sqrt(3))*a - 2*sqrt(3)*atan((2*x + 1)/sqrt(3))*b + log(x**2 + x + 1)*a + log(x**2 + x + 1)*b - 2*log(x**2 + x + 1)*c - 2*l og(x - 1)*a - 2*log(x - 1)*b - 2*log(x - 1)*c)/6