3.2.18 \(\int \frac {1}{a^3+x^3} \, dx\) [118]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.667, Rules used = {206, 31, 648, 631, 210, 642} \begin {gather*} -\frac {\text {ArcTan}\left (\frac {a-2 x}{\sqrt {3} a}\right )}{\sqrt {3} a^2}-\frac {\log \left (a^2-a x+x^2\right )}{6 a^2}+\frac {\log (a+x)}{3 a^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a^3 + x^3)^(-1),x]

[Out]

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

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 206

Int[((a_) + (b_.)*(x_)^3)^(-1), x_Symbol] :> Dist[1/(3*Rt[a, 3]^2), Int[1/(Rt[a, 3] + Rt[b, 3]*x), x], x] + Di
st[1/(3*Rt[a, 3]^2), Int[(2*Rt[a, 3] - Rt[b, 3]*x)/(Rt[a, 3]^2 - Rt[a, 3]*Rt[b, 3]*x + Rt[b, 3]^2*x^2), x], x]
 /; FreeQ[{a, b}, x]

Rule 210

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])

Rule 631

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[a*(c/b^2)]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + 2*c*(x/b)], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[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]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rubi steps

\begin {align*} \int \frac {1}{a^3+x^3} \, dx &=\frac {\int \frac {1}{a+x} \, dx}{3 a^2}+\frac {\int \frac {2 a-x}{a^2-a x+x^2} \, dx}{3 a^2}\\ &=\frac {\log (a+x)}{3 a^2}-\frac {\int \frac {-a+2 x}{a^2-a x+x^2} \, dx}{6 a^2}+\frac {\int \frac {1}{a^2-a x+x^2} \, dx}{2 a}\\ &=\frac {\log (a+x)}{3 a^2}-\frac {\log \left (a^2-a x+x^2\right )}{6 a^2}+\frac {\text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1-\frac {2 x}{a}\right )}{a^2}\\ &=-\frac {\tan ^{-1}\left (\frac {a-2 x}{\sqrt {3} a}\right )}{\sqrt {3} a^2}+\frac {\log (a+x)}{3 a^2}-\frac {\log \left (a^2-a x+x^2\right )}{6 a^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 52, normalized size = 0.93 \begin {gather*} \frac {2 \sqrt {3} \tan ^{-1}\left (\frac {-a+2 x}{\sqrt {3} a}\right )+2 \log (a+x)-\log \left (a^2-a x+x^2\right )}{6 a^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a^3 + x^3)^(-1),x]

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 51, normalized size = 0.91

method result size
risch \(\frac {\ln \left (a +x \right )}{3 a^{2}}+\frac {\left (\munderset {\textit {\_R} =\RootOf \left (a^{4} \textit {\_Z}^{2}+a^{2} \textit {\_Z} +1\right )}{\sum }\textit {\_R} \ln \left (\textit {\_R} \,a^{3}+x \right )\right )}{3}\) \(41\)
default \(\frac {-\frac {\ln \left (a^{2}-a x +x^{2}\right )}{2}+\sqrt {3}\, \arctan \left (\frac {\left (2 x -a \right ) \sqrt {3}}{3 a}\right )}{3 a^{2}}+\frac {\ln \left (a +x \right )}{3 a^{2}}\) \(51\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a^3+x^3),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 2.24, size = 49, normalized size = 0.88 \begin {gather*} \frac {\sqrt {3} \arctan \left (-\frac {\sqrt {3} {\left (a - 2 \, x\right )}}{3 \, a}\right )}{3 \, a^{2}} - \frac {\log \left (a^{2} - a x + x^{2}\right )}{6 \, a^{2}} + \frac {\log \left (a + x\right )}{3 \, a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a^3+x^3),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 45, normalized size = 0.80 \begin {gather*} \frac {2 \, \sqrt {3} \arctan \left (-\frac {\sqrt {3} {\left (a - 2 \, x\right )}}{3 \, a}\right ) - \log \left (a^{2} - a x + x^{2}\right ) + 2 \, \log \left (a + x\right )}{6 \, a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a^3+x^3),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 0.05, size = 73, normalized size = 1.30 \begin {gather*} \frac {\frac {\log {\left (a + x \right )}}{3} + \left (- \frac {1}{6} - \frac {\sqrt {3} i}{6}\right ) \log {\left (3 a \left (- \frac {1}{6} - \frac {\sqrt {3} i}{6}\right ) + x \right )} + \left (- \frac {1}{6} + \frac {\sqrt {3} i}{6}\right ) \log {\left (3 a \left (- \frac {1}{6} + \frac {\sqrt {3} i}{6}\right ) + x \right )}}{a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a**3+x**3),x)

[Out]

(log(a + x)/3 + (-1/6 - sqrt(3)*I/6)*log(3*a*(-1/6 - sqrt(3)*I/6) + x) + (-1/6 + sqrt(3)*I/6)*log(3*a*(-1/6 +
sqrt(3)*I/6) + x))/a**2

________________________________________________________________________________________

Giac [A]
time = 0.92, size = 50, normalized size = 0.89 \begin {gather*} \frac {\sqrt {3} \arctan \left (-\frac {\sqrt {3} {\left (a - 2 \, x\right )}}{3 \, a}\right )}{3 \, a^{2}} - \frac {\log \left (a^{2} - a x + x^{2}\right )}{6 \, a^{2}} + \frac {\log \left ({\left | a + x \right |}\right )}{3 \, a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a^3+x^3),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.44, size = 64, normalized size = 1.14 \begin {gather*} \frac {\ln \left (a+x\right )}{3\,a^2}+\frac {\ln \left (x+\frac {a\,\left (-1+\sqrt {3}\,1{}\mathrm {i}\right )}{2}\right )\,\left (-1+\sqrt {3}\,1{}\mathrm {i}\right )}{6\,a^2}-\frac {\ln \left (x-\frac {a\,\left (1+\sqrt {3}\,1{}\mathrm {i}\right )}{2}\right )\,\left (1+\sqrt {3}\,1{}\mathrm {i}\right )}{6\,a^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a^3 + x^3),x)

[Out]

log(a + x)/(3*a^2) + (log(x + (a*(3^(1/2)*1i - 1))/2)*(3^(1/2)*1i - 1))/(6*a^2) - (log(x - (a*(3^(1/2)*1i + 1)
)/2)*(3^(1/2)*1i + 1))/(6*a^2)

________________________________________________________________________________________