3.334 \(\int \frac {x^2 (c+d x)^2}{a+b x^3} \, dx\)

Optimal. Leaf size=206 \[ \frac {\sqrt [3]{a} d \left (2 \sqrt [3]{b} c-\sqrt [3]{a} d\right ) \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2\right )}{6 b^{5/3}}-\frac {\sqrt [3]{a} d \left (2 \sqrt [3]{b} c-\sqrt [3]{a} d\right ) \log \left (\sqrt [3]{a}+\sqrt [3]{b} x\right )}{3 b^{5/3}}+\frac {\sqrt [3]{a} d \left (\sqrt [3]{a} d+2 \sqrt [3]{b} c\right ) \tan ^{-1}\left (\frac {\sqrt [3]{a}-2 \sqrt [3]{b} x}{\sqrt {3} \sqrt [3]{a}}\right )}{\sqrt {3} b^{5/3}}+\frac {c^2 \log \left (a+b x^3\right )}{3 b}+\frac {2 c d x}{b}+\frac {d^2 x^2}{2 b} \]

[Out]

2*c*d*x/b+1/2*d^2*x^2/b-1/3*a^(1/3)*d*(2*b^(1/3)*c-a^(1/3)*d)*ln(a^(1/3)+b^(1/3)*x)/b^(5/3)+1/6*a^(1/3)*d*(2*b
^(1/3)*c-a^(1/3)*d)*ln(a^(2/3)-a^(1/3)*b^(1/3)*x+b^(2/3)*x^2)/b^(5/3)+1/3*c^2*ln(b*x^3+a)/b+1/3*a^(1/3)*d*(2*b
^(1/3)*c+a^(1/3)*d)*arctan(1/3*(a^(1/3)-2*b^(1/3)*x)/a^(1/3)*3^(1/2))/b^(5/3)*3^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.27, antiderivative size = 206, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.450, Rules used = {1887, 1871, 1860, 31, 634, 617, 204, 628, 260} \[ \frac {\sqrt [3]{a} d \left (2 \sqrt [3]{b} c-\sqrt [3]{a} d\right ) \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2\right )}{6 b^{5/3}}-\frac {\sqrt [3]{a} d \left (2 \sqrt [3]{b} c-\sqrt [3]{a} d\right ) \log \left (\sqrt [3]{a}+\sqrt [3]{b} x\right )}{3 b^{5/3}}+\frac {\sqrt [3]{a} d \left (\sqrt [3]{a} d+2 \sqrt [3]{b} c\right ) \tan ^{-1}\left (\frac {\sqrt [3]{a}-2 \sqrt [3]{b} x}{\sqrt {3} \sqrt [3]{a}}\right )}{\sqrt {3} b^{5/3}}+\frac {c^2 \log \left (a+b x^3\right )}{3 b}+\frac {2 c d x}{b}+\frac {d^2 x^2}{2 b} \]

Antiderivative was successfully verified.

[In]

Int[(x^2*(c + d*x)^2)/(a + b*x^3),x]

[Out]

(2*c*d*x)/b + (d^2*x^2)/(2*b) + (a^(1/3)*d*(2*b^(1/3)*c + a^(1/3)*d)*ArcTan[(a^(1/3) - 2*b^(1/3)*x)/(Sqrt[3]*a
^(1/3))])/(Sqrt[3]*b^(5/3)) - (a^(1/3)*d*(2*b^(1/3)*c - a^(1/3)*d)*Log[a^(1/3) + b^(1/3)*x])/(3*b^(5/3)) + (a^
(1/3)*d*(2*b^(1/3)*c - a^(1/3)*d)*Log[a^(2/3) - a^(1/3)*b^(1/3)*x + b^(2/3)*x^2])/(6*b^(5/3)) + (c^2*Log[a + b
*x^3])/(3*b)

Rule 31

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

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 260

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

Rule 617

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 628

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 634

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]

Rule 1860

Int[((A_) + (B_.)*(x_))/((a_) + (b_.)*(x_)^3), x_Symbol] :> With[{r = Numerator[Rt[a/b, 3]], s = Denominator[R
t[a/b, 3]]}, -Dist[(r*(B*r - A*s))/(3*a*s), Int[1/(r + s*x), x], x] + Dist[r/(3*a*s), Int[(r*(B*r + 2*A*s) + s
*(B*r - A*s)*x)/(r^2 - r*s*x + s^2*x^2), x], x]] /; FreeQ[{a, b, A, B}, x] && NeQ[a*B^3 - b*A^3, 0] && PosQ[a/
b]

Rule 1871

Int[(P2_)/((a_) + (b_.)*(x_)^3), x_Symbol] :> With[{A = Coeff[P2, x, 0], B = Coeff[P2, x, 1], C = Coeff[P2, x,
 2]}, Int[(A + B*x)/(a + b*x^3), x] + Dist[C, Int[x^2/(a + b*x^3), x], x] /; EqQ[a*B^3 - b*A^3, 0] ||  !Ration
alQ[a/b]] /; FreeQ[{a, b}, x] && PolyQ[P2, x, 2]

Rule 1887

Int[(Pq_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[ExpandIntegrand[Pq/(a + b*x^n), x], x] /; FreeQ[{a, b}, x
] && PolyQ[Pq, x] && IntegerQ[n]

Rubi steps

\begin {align*} \int \frac {x^2 (c+d x)^2}{a+b x^3} \, dx &=\int \left (\frac {2 c d}{b}+\frac {d^2 x}{b}-\frac {2 a c d+a d^2 x-b c^2 x^2}{b \left (a+b x^3\right )}\right ) \, dx\\ &=\frac {2 c d x}{b}+\frac {d^2 x^2}{2 b}-\frac {\int \frac {2 a c d+a d^2 x-b c^2 x^2}{a+b x^3} \, dx}{b}\\ &=\frac {2 c d x}{b}+\frac {d^2 x^2}{2 b}-\frac {\int \frac {2 a c d+a d^2 x}{a+b x^3} \, dx}{b}+c^2 \int \frac {x^2}{a+b x^3} \, dx\\ &=\frac {2 c d x}{b}+\frac {d^2 x^2}{2 b}+\frac {c^2 \log \left (a+b x^3\right )}{3 b}-\frac {\int \frac {\sqrt [3]{a} \left (4 a \sqrt [3]{b} c d+a^{4/3} d^2\right )+\sqrt [3]{b} \left (-2 a \sqrt [3]{b} c d+a^{4/3} d^2\right ) x}{a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2} \, dx}{3 a^{2/3} b^{4/3}}-\frac {\left (\sqrt [3]{a} d \left (2 c-\frac {\sqrt [3]{a} d}{\sqrt [3]{b}}\right )\right ) \int \frac {1}{\sqrt [3]{a}+\sqrt [3]{b} x} \, dx}{3 b}\\ &=\frac {2 c d x}{b}+\frac {d^2 x^2}{2 b}-\frac {\sqrt [3]{a} d \left (2 \sqrt [3]{b} c-\sqrt [3]{a} d\right ) \log \left (\sqrt [3]{a}+\sqrt [3]{b} x\right )}{3 b^{5/3}}+\frac {c^2 \log \left (a+b x^3\right )}{3 b}+\frac {\left (\sqrt [3]{a} d \left (2 \sqrt [3]{b} c-\sqrt [3]{a} d\right )\right ) \int \frac {-\sqrt [3]{a} \sqrt [3]{b}+2 b^{2/3} x}{a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2} \, dx}{6 b^{5/3}}-\frac {\left (a^{2/3} d \left (2 \sqrt [3]{b} c+\sqrt [3]{a} d\right )\right ) \int \frac {1}{a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2} \, dx}{2 b^{4/3}}\\ &=\frac {2 c d x}{b}+\frac {d^2 x^2}{2 b}-\frac {\sqrt [3]{a} d \left (2 \sqrt [3]{b} c-\sqrt [3]{a} d\right ) \log \left (\sqrt [3]{a}+\sqrt [3]{b} x\right )}{3 b^{5/3}}+\frac {\sqrt [3]{a} d \left (2 \sqrt [3]{b} c-\sqrt [3]{a} d\right ) \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2\right )}{6 b^{5/3}}+\frac {c^2 \log \left (a+b x^3\right )}{3 b}-\frac {\left (\sqrt [3]{a} d \left (2 \sqrt [3]{b} c+\sqrt [3]{a} d\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1-\frac {2 \sqrt [3]{b} x}{\sqrt [3]{a}}\right )}{b^{5/3}}\\ &=\frac {2 c d x}{b}+\frac {d^2 x^2}{2 b}+\frac {\sqrt [3]{a} d \left (2 \sqrt [3]{b} c+\sqrt [3]{a} d\right ) \tan ^{-1}\left (\frac {\sqrt [3]{a}-2 \sqrt [3]{b} x}{\sqrt {3} \sqrt [3]{a}}\right )}{\sqrt {3} b^{5/3}}-\frac {\sqrt [3]{a} d \left (2 \sqrt [3]{b} c-\sqrt [3]{a} d\right ) \log \left (\sqrt [3]{a}+\sqrt [3]{b} x\right )}{3 b^{5/3}}+\frac {\sqrt [3]{a} d \left (2 \sqrt [3]{b} c-\sqrt [3]{a} d\right ) \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2\right )}{6 b^{5/3}}+\frac {c^2 \log \left (a+b x^3\right )}{3 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 193, normalized size = 0.94 \[ \frac {-\sqrt [3]{a} d \left (\sqrt [3]{a} d-2 \sqrt [3]{b} c\right ) \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2\right )+2 b^{2/3} c^2 \log \left (a+b x^3\right )+2 \sqrt [3]{a} d \left (\sqrt [3]{a} d-2 \sqrt [3]{b} c\right ) \log \left (\sqrt [3]{a}+\sqrt [3]{b} x\right )+2 \sqrt {3} \sqrt [3]{a} d \left (\sqrt [3]{a} d+2 \sqrt [3]{b} c\right ) \tan ^{-1}\left (\frac {1-\frac {2 \sqrt [3]{b} x}{\sqrt [3]{a}}}{\sqrt {3}}\right )+12 b^{2/3} c d x+3 b^{2/3} d^2 x^2}{6 b^{5/3}} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(c + d*x)^2)/(a + b*x^3),x]

[Out]

(12*b^(2/3)*c*d*x + 3*b^(2/3)*d^2*x^2 + 2*Sqrt[3]*a^(1/3)*d*(2*b^(1/3)*c + a^(1/3)*d)*ArcTan[(1 - (2*b^(1/3)*x
)/a^(1/3))/Sqrt[3]] + 2*a^(1/3)*d*(-2*b^(1/3)*c + a^(1/3)*d)*Log[a^(1/3) + b^(1/3)*x] - a^(1/3)*d*(-2*b^(1/3)*
c + a^(1/3)*d)*Log[a^(2/3) - a^(1/3)*b^(1/3)*x + b^(2/3)*x^2] + 2*b^(2/3)*c^2*Log[a + b*x^3])/(6*b^(5/3))

________________________________________________________________________________________

fricas [C]  time = 2.99, size = 4545, normalized size = 22.06 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d*x+c)^2/(b*x^3+a),x, algorithm="fricas")

[Out]

1/12*(6*d^2*x^2 + 24*c*d*x - 2*(2*(1/2)^(2/3)*(c^4/b^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^3 + a*d^3)*a*d^3/b^5 - 3*(b*c^4 + 2*a*c*d^3)*c^2/b^4 + (b^2*c^6 - 2*a*b*c^3*d^3 + a^2*d^
6)/b^5)^(1/3)*(I*sqrt(3) + 1) - 2*c^2/b)*b^3 - 6*b^2*c^2)*sqrt(-((2*(1/2)^(2/3)*(c^4/b^2 - (b*c^4 + 2*a*c*d^3)
/b^3)*(-I*sqrt(3) + 1)/(2*c^6/b^3 + (8*b*c^3 + a*d^3)*a*d^3/b^5 - 3*(b*c^4 + 2*a*c*d^3)*c^2/b^4 + (b^2*c^6 - 2
*a*b*c^3*d^3 + a^2*d^6)/b^5)^(1/3) + (1/2)^(1/3)*(2*c^6/b^3 + (8*b*c^3 + a*d^3)*a*d^3/b^5 - 3*(b*c^4 + 2*a*c*d
^3)*c^2/b^4 + (b^2*c^6 - 2*a*b*c^3*d^3 + a^2*d^6)/b^5)^(1/3)*(I*sqrt(3) + 1) - 2*c^2/b)^2*b^3 + 4*(2*(1/2)^(2/
3)*(c^4/b^2 - (b*c^4 + 2*a*c*d^3)/b^3)*(-I*sqrt(3) + 1)/(2*c^6/b^3 + (8*b*c^3 + a*d^3)*a*d^3/b^5 - 3*(b*c^4 +
2*a*c*d^3)*c^2/b^4 + (b^2*c^6 - 2*a*b*c^3*d^3 + a^2*d^6)/b^5)^(1/3) + (1/2)^(1/3)*(2*c^6/b^3 + (8*b*c^3 + a*d^
3)*a*d^3/b^5 - 3*(b*c^4 + 2*a*c*d^3)*c^2/b^4 + (b^2*c^6 - 2*a*b*c^3*d^3 + a^2*d^6)/b^5)^(1/3)*(I*sqrt(3) + 1)
- 2*c^2/b)*b^2*c^2 + 4*b*c^4 + 32*a*c*d^3)/b^3)))/b

________________________________________________________________________________________

giac [A]  time = 0.44, size = 208, normalized size = 1.01 \[ \frac {c^{2} \log \left ({\left | b x^{3} + a \right |}\right )}{3 \, b} - \frac {\sqrt {3} {\left (2 \, \left (-a b^{2}\right )^{\frac {1}{3}} b c d - \left (-a b^{2}\right )^{\frac {2}{3}} d^{2}\right )} \arctan \left (\frac {\sqrt {3} {\left (2 \, x + \left (-\frac {a}{b}\right )^{\frac {1}{3}}\right )}}{3 \, \left (-\frac {a}{b}\right )^{\frac {1}{3}}}\right )}{3 \, b^{3}} + \frac {b d^{2} x^{2} + 4 \, b c d x}{2 \, b^{2}} - \frac {{\left (2 \, \left (-a b^{2}\right )^{\frac {1}{3}} b c d + \left (-a b^{2}\right )^{\frac {2}{3}} d^{2}\right )} \log \left (x^{2} + x \left (-\frac {a}{b}\right )^{\frac {1}{3}} + \left (-\frac {a}{b}\right )^{\frac {2}{3}}\right )}{6 \, b^{3}} + \frac {{\left (a b^{4} d^{2} \left (-\frac {a}{b}\right )^{\frac {1}{3}} + 2 \, a b^{4} c d\right )} \left (-\frac {a}{b}\right )^{\frac {1}{3}} \log \left ({\left | x - \left (-\frac {a}{b}\right )^{\frac {1}{3}} \right |}\right )}{3 \, a b^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d*x+c)^2/(b*x^3+a),x, algorithm="giac")

[Out]

1/3*c^2*log(abs(b*x^3 + a))/b - 1/3*sqrt(3)*(2*(-a*b^2)^(1/3)*b*c*d - (-a*b^2)^(2/3)*d^2)*arctan(1/3*sqrt(3)*(
2*x + (-a/b)^(1/3))/(-a/b)^(1/3))/b^3 + 1/2*(b*d^2*x^2 + 4*b*c*d*x)/b^2 - 1/6*(2*(-a*b^2)^(1/3)*b*c*d + (-a*b^
2)^(2/3)*d^2)*log(x^2 + x*(-a/b)^(1/3) + (-a/b)^(2/3))/b^3 + 1/3*(a*b^4*d^2*(-a/b)^(1/3) + 2*a*b^4*c*d)*(-a/b)
^(1/3)*log(abs(x - (-a/b)^(1/3)))/(a*b^5)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 236, normalized size = 1.15 \[ \frac {d^{2} x^{2}}{2 b}-\frac {2 \sqrt {3}\, a c d \arctan \left (\frac {\sqrt {3}\, \left (\frac {2 x}{\left (\frac {a}{b}\right )^{\frac {1}{3}}}-1\right )}{3}\right )}{3 \left (\frac {a}{b}\right )^{\frac {2}{3}} b^{2}}-\frac {2 a c d \ln \left (x +\left (\frac {a}{b}\right )^{\frac {1}{3}}\right )}{3 \left (\frac {a}{b}\right )^{\frac {2}{3}} b^{2}}+\frac {a c d \ln \left (x^{2}-\left (\frac {a}{b}\right )^{\frac {1}{3}} x +\left (\frac {a}{b}\right )^{\frac {2}{3}}\right )}{3 \left (\frac {a}{b}\right )^{\frac {2}{3}} b^{2}}-\frac {\sqrt {3}\, a \,d^{2} \arctan \left (\frac {\sqrt {3}\, \left (\frac {2 x}{\left (\frac {a}{b}\right )^{\frac {1}{3}}}-1\right )}{3}\right )}{3 \left (\frac {a}{b}\right )^{\frac {1}{3}} b^{2}}+\frac {a \,d^{2} \ln \left (x +\left (\frac {a}{b}\right )^{\frac {1}{3}}\right )}{3 \left (\frac {a}{b}\right )^{\frac {1}{3}} b^{2}}-\frac {a \,d^{2} \ln \left (x^{2}-\left (\frac {a}{b}\right )^{\frac {1}{3}} x +\left (\frac {a}{b}\right )^{\frac {2}{3}}\right )}{6 \left (\frac {a}{b}\right )^{\frac {1}{3}} b^{2}}+\frac {c^{2} \ln \left (b \,x^{3}+a \right )}{3 b}+\frac {2 c d x}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(d*x+c)^2/(b*x^3+a),x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.65, size = 199, normalized size = 0.97 \[ -\frac {\sqrt {3} {\left (a d^{2} \left (\frac {a}{b}\right )^{\frac {2}{3}} + 2 \, a c d \left (\frac {a}{b}\right )^{\frac {1}{3}}\right )} \arctan \left (\frac {\sqrt {3} {\left (2 \, x - \left (\frac {a}{b}\right )^{\frac {1}{3}}\right )}}{3 \, \left (\frac {a}{b}\right )^{\frac {1}{3}}}\right )}{3 \, a b} + \frac {d^{2} x^{2} + 4 \, c d x}{2 \, b} + \frac {{\left (2 \, b c^{2} \left (\frac {a}{b}\right )^{\frac {2}{3}} - a d^{2} \left (\frac {a}{b}\right )^{\frac {1}{3}} + 2 \, a c d\right )} \log \left (x^{2} - x \left (\frac {a}{b}\right )^{\frac {1}{3}} + \left (\frac {a}{b}\right )^{\frac {2}{3}}\right )}{6 \, b^{2} \left (\frac {a}{b}\right )^{\frac {2}{3}}} + \frac {{\left (b c^{2} \left (\frac {a}{b}\right )^{\frac {2}{3}} + a d^{2} \left (\frac {a}{b}\right )^{\frac {1}{3}} - 2 \, a c d\right )} \log \left (x + \left (\frac {a}{b}\right )^{\frac {1}{3}}\right )}{3 \, b^{2} \left (\frac {a}{b}\right )^{\frac {2}{3}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d*x+c)^2/(b*x^3+a),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.23, size = 357, normalized size = 1.73 \[ \left (\sum _{k=1}^3\ln \left (\frac {a\,\left (b\,c^4+{\mathrm {root}\left (27\,b^5\,z^3-27\,b^4\,c^2\,z^2+18\,a\,b^2\,c\,d^3\,z+9\,b^3\,c^4\,z+2\,a\,b\,c^3\,d^3-b^2\,c^6-a^2\,d^6,z,k\right )}^2\,b^3\,9-\mathrm {root}\left (27\,b^5\,z^3-27\,b^4\,c^2\,z^2+18\,a\,b^2\,c\,d^3\,z+9\,b^3\,c^4\,z+2\,a\,b\,c^3\,d^3-b^2\,c^6-a^2\,d^6,z,k\right )\,b^2\,c^2\,6+2\,a\,c\,d^3+a\,d^4\,x+2\,b\,c^3\,d\,x-\mathrm {root}\left (27\,b^5\,z^3-27\,b^4\,c^2\,z^2+18\,a\,b^2\,c\,d^3\,z+9\,b^3\,c^4\,z+2\,a\,b\,c^3\,d^3-b^2\,c^6-a^2\,d^6,z,k\right )\,b^2\,c\,d\,x\,6\right )}{b}\right )\,\mathrm {root}\left (27\,b^5\,z^3-27\,b^4\,c^2\,z^2+18\,a\,b^2\,c\,d^3\,z+9\,b^3\,c^4\,z+2\,a\,b\,c^3\,d^3-b^2\,c^6-a^2\,d^6,z,k\right )\right )+\frac {d^2\,x^2}{2\,b}+\frac {2\,c\,d\,x}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2*(c + d*x)^2)/(a + b*x^3),x)

[Out]

symsum(log((a*(b*c^4 + 9*root(27*b^5*z^3 - 27*b^4*c^2*z^2 + 18*a*b^2*c*d^3*z + 9*b^3*c^4*z + 2*a*b*c^3*d^3 - b
^2*c^6 - a^2*d^6, z, k)^2*b^3 - 6*root(27*b^5*z^3 - 27*b^4*c^2*z^2 + 18*a*b^2*c*d^3*z + 9*b^3*c^4*z + 2*a*b*c^
3*d^3 - b^2*c^6 - a^2*d^6, z, k)*b^2*c^2 + 2*a*c*d^3 + a*d^4*x + 2*b*c^3*d*x - 6*root(27*b^5*z^3 - 27*b^4*c^2*
z^2 + 18*a*b^2*c*d^3*z + 9*b^3*c^4*z + 2*a*b*c^3*d^3 - b^2*c^6 - a^2*d^6, z, k)*b^2*c*d*x))/b)*root(27*b^5*z^3
 - 27*b^4*c^2*z^2 + 18*a*b^2*c*d^3*z + 9*b^3*c^4*z + 2*a*b*c^3*d^3 - b^2*c^6 - a^2*d^6, z, k), k, 1, 3) + (d^2
*x^2)/(2*b) + (2*c*d*x)/b

________________________________________________________________________________________

sympy [A]  time = 1.24, size = 138, normalized size = 0.67 \[ \operatorname {RootSum} {\left (27 t^{3} b^{5} - 27 t^{2} b^{4} c^{2} + t \left (18 a b^{2} c d^{3} + 9 b^{3} c^{4}\right ) - a^{2} d^{6} + 2 a b c^{3} d^{3} - b^{2} c^{6}, \left (t \mapsto t \log {\left (x + \frac {9 t^{2} b^{3} - 18 t b^{2} c^{2} + 4 a c d^{3} + 5 b c^{4}}{a d^{4} + 8 b c^{3} d} \right )} \right )\right )} + \frac {2 c d x}{b} + \frac {d^{2} x^{2}}{2 b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(d*x+c)**2/(b*x**3+a),x)

[Out]

RootSum(27*_t**3*b**5 - 27*_t**2*b**4*c**2 + _t*(18*a*b**2*c*d**3 + 9*b**3*c**4) - a**2*d**6 + 2*a*b*c**3*d**3
 - b**2*c**6, Lambda(_t, _t*log(x + (9*_t**2*b**3 - 18*_t*b**2*c**2 + 4*a*c*d**3 + 5*b*c**4)/(a*d**4 + 8*b*c**
3*d)))) + 2*c*d*x/b + d**2*x**2/(2*b)

________________________________________________________________________________________