\(\int \frac {(-2 q+p x^3) \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6} (c x^4+b x^2 (q+p x^3)+a (q+p x^3)^2)}{x^9} \, dx\) [2548]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 71, antiderivative size = 214 \[ \int \frac {\left (-2 q+p x^3\right ) \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6} \left (c x^4+b x^2 \left (q+p x^3\right )+a \left (q+p x^3\right )^2\right )}{x^9} \, dx=\frac {\sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6} \left (3 a q^3+4 b q^2 x^2+9 a p q^2 x^3+6 c q x^4-3 a p q^2 x^4+8 b p q x^5-8 b p q x^6+9 a p^2 q x^6+6 c p x^7-3 a p^2 q x^7+4 b p^2 x^8+3 a p^3 x^9\right )}{12 x^8}+\left (2 c p q+a p^2 q^2\right ) \log (x)+\frac {1}{2} \left (-2 c p q-a p^2 q^2\right ) \log \left (q+p x^3+\sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}\right ) \]

[Out]

1/12*(p^2*x^6-2*p*q*x^4+2*p*q*x^3+q^2)^(1/2)*(3*a*p^3*x^9-3*a*p^2*q*x^7+4*b*p^2*x^8+9*a*p^2*q*x^6-8*b*p*q*x^6+
6*c*p*x^7-3*a*p*q^2*x^4+8*b*p*q*x^5+9*a*p*q^2*x^3+6*c*q*x^4+4*b*q^2*x^2+3*a*q^3)/x^8+(a*p^2*q^2+2*c*p*q)*ln(x)
+1/2*(-a*p^2*q^2-2*c*p*q)*ln(q+p*x^3+(p^2*x^6-2*p*q*x^4+2*p*q*x^3+q^2)^(1/2))

Rubi [F]

\[ \int \frac {\left (-2 q+p x^3\right ) \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6} \left (c x^4+b x^2 \left (q+p x^3\right )+a \left (q+p x^3\right )^2\right )}{x^9} \, dx=\int \frac {\left (-2 q+p x^3\right ) \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6} \left (c x^4+b x^2 \left (q+p x^3\right )+a \left (q+p x^3\right )^2\right )}{x^9} \, dx \]

[In]

Int[((-2*q + p*x^3)*Sqrt[q^2 + 2*p*q*x^3 - 2*p*q*x^4 + p^2*x^6]*(c*x^4 + b*x^2*(q + p*x^3) + a*(q + p*x^3)^2))
/x^9,x]

[Out]

a*p^3*Defer[Int][Sqrt[q^2 + 2*p*q*x^3 - 2*p*q*x^4 + p^2*x^6], x] - 2*a*q^3*Defer[Int][Sqrt[q^2 + 2*p*q*x^3 - 2
*p*q*x^4 + p^2*x^6]/x^9, x] - 2*b*q^2*Defer[Int][Sqrt[q^2 + 2*p*q*x^3 - 2*p*q*x^4 + p^2*x^6]/x^7, x] - 3*a*p*q
^2*Defer[Int][Sqrt[q^2 + 2*p*q*x^3 - 2*p*q*x^4 + p^2*x^6]/x^6, x] - 2*c*q*Defer[Int][Sqrt[q^2 + 2*p*q*x^3 - 2*
p*q*x^4 + p^2*x^6]/x^5, x] - b*p*q*Defer[Int][Sqrt[q^2 + 2*p*q*x^3 - 2*p*q*x^4 + p^2*x^6]/x^4, x] + c*p*Defer[
Int][Sqrt[q^2 + 2*p*q*x^3 - 2*p*q*x^4 + p^2*x^6]/x^2, x] + b*p^2*Defer[Int][Sqrt[q^2 + 2*p*q*x^3 - 2*p*q*x^4 +
 p^2*x^6]/x, x]

Rubi steps \begin{align*} \text {integral}& = \int \left (a p^3 \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}-\frac {2 a q^3 \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x^9}-\frac {2 b q^2 \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x^7}-\frac {3 a p q^2 \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x^6}-\frac {2 c q \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x^5}-\frac {b p q \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x^4}+\frac {c p \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x^2}+\frac {b p^2 \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x}\right ) \, dx \\ & = (c p) \int \frac {\sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x^2} \, dx+\left (b p^2\right ) \int \frac {\sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x} \, dx+\left (a p^3\right ) \int \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6} \, dx-(2 c q) \int \frac {\sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x^5} \, dx-(b p q) \int \frac {\sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x^4} \, dx-\left (2 b q^2\right ) \int \frac {\sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x^7} \, dx-\left (3 a p q^2\right ) \int \frac {\sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x^6} \, dx-\left (2 a q^3\right ) \int \frac {\sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6}}{x^9} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.60 (sec) , antiderivative size = 172, normalized size of antiderivative = 0.80 \[ \int \frac {\left (-2 q+p x^3\right ) \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6} \left (c x^4+b x^2 \left (q+p x^3\right )+a \left (q+p x^3\right )^2\right )}{x^9} \, dx=\frac {\sqrt {q^2-2 p q (-1+x) x^3+p^2 x^6} \left (6 c x^4 \left (q+p x^3\right )+4 b x^2 \left (q^2-2 p q (-1+x) x^3+p^2 x^6\right )+3 a \left (q^3-p q^2 (-3+x) x^3-p^2 q (-3+x) x^6+p^3 x^9\right )\right )}{12 x^8}+p q (2 c+a p q) \log (x)-\frac {1}{2} p q (2 c+a p q) \log \left (q+p x^3+\sqrt {q^2-2 p q (-1+x) x^3+p^2 x^6}\right ) \]

[In]

Integrate[((-2*q + p*x^3)*Sqrt[q^2 + 2*p*q*x^3 - 2*p*q*x^4 + p^2*x^6]*(c*x^4 + b*x^2*(q + p*x^3) + a*(q + p*x^
3)^2))/x^9,x]

[Out]

(Sqrt[q^2 - 2*p*q*(-1 + x)*x^3 + p^2*x^6]*(6*c*x^4*(q + p*x^3) + 4*b*x^2*(q^2 - 2*p*q*(-1 + x)*x^3 + p^2*x^6)
+ 3*a*(q^3 - p*q^2*(-3 + x)*x^3 - p^2*q*(-3 + x)*x^6 + p^3*x^9)))/(12*x^8) + p*q*(2*c + a*p*q)*Log[x] - (p*q*(
2*c + a*p*q)*Log[q + p*x^3 + Sqrt[q^2 - 2*p*q*(-1 + x)*x^3 + p^2*x^6]])/2

Maple [A] (verified)

Time = 0.48 (sec) , antiderivative size = 189, normalized size of antiderivative = 0.88

method result size
pseudoelliptic \(\frac {\left (3 a \,p^{3} x^{9}+4 b \,p^{2} x^{8}+\left (-3 q a \,p^{2}+6 p c \right ) x^{7}+9 p \left (a p -\frac {8 b}{9}\right ) q \,x^{6}+8 b p q \,x^{5}+\left (-3 q^{2} a p +6 c q \right ) x^{4}+9 a p \,q^{2} x^{3}+4 b \,q^{2} x^{2}+3 a \,q^{3}\right ) \sqrt {\frac {p^{2} x^{6}-2 p q \,x^{3} \left (-1+x \right )+q^{2}}{x^{2}}}-6 p q \,x^{7} \left (a p q +2 c \right ) \ln \left (\frac {p \,x^{3}+\sqrt {\frac {p^{2} x^{6}-2 p q \,x^{3} \left (-1+x \right )+q^{2}}{x^{2}}}\, x +q}{x^{2}}\right )}{12 x^{7}}\) \(189\)

[In]

int((p*x^3-2*q)*(p^2*x^6-2*p*q*x^4+2*p*q*x^3+q^2)^(1/2)*(c*x^4+b*x^2*(p*x^3+q)+a*(p*x^3+q)^2)/x^9,x,method=_RE
TURNVERBOSE)

[Out]

1/12*((3*a*p^3*x^9+4*b*p^2*x^8+(-3*a*p^2*q+6*c*p)*x^7+9*p*(a*p-8/9*b)*q*x^6+8*b*p*q*x^5+(-3*a*p*q^2+6*c*q)*x^4
+9*a*p*q^2*x^3+4*b*q^2*x^2+3*a*q^3)*((p^2*x^6-2*p*q*x^3*(-1+x)+q^2)/x^2)^(1/2)-6*p*q*x^7*(a*p*q+2*c)*ln((p*x^3
+((p^2*x^6-2*p*q*x^3*(-1+x)+q^2)/x^2)^(1/2)*x+q)/x^2))/x^7

Fricas [A] (verification not implemented)

none

Time = 79.84 (sec) , antiderivative size = 194, normalized size of antiderivative = 0.91 \[ \int \frac {\left (-2 q+p x^3\right ) \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6} \left (c x^4+b x^2 \left (q+p x^3\right )+a \left (q+p x^3\right )^2\right )}{x^9} \, dx=-\frac {6 \, {\left (a p^{2} q^{2} + 2 \, c p q\right )} x^{8} \log \left (-\frac {p x^{3} + q + \sqrt {p^{2} x^{6} - 2 \, p q x^{4} + 2 \, p q x^{3} + q^{2}}}{x^{2}}\right ) - {\left (3 \, a p^{3} x^{9} + 4 \, b p^{2} x^{8} + 8 \, b p q x^{5} + {\left (9 \, a p^{2} - 8 \, b p\right )} q x^{6} - 3 \, {\left (a p^{2} q - 2 \, c p\right )} x^{7} + 9 \, a p q^{2} x^{3} + 4 \, b q^{2} x^{2} - 3 \, {\left (a p q^{2} - 2 \, c q\right )} x^{4} + 3 \, a q^{3}\right )} \sqrt {p^{2} x^{6} - 2 \, p q x^{4} + 2 \, p q x^{3} + q^{2}}}{12 \, x^{8}} \]

[In]

integrate((p*x^3-2*q)*(p^2*x^6-2*p*q*x^4+2*p*q*x^3+q^2)^(1/2)*(c*x^4+b*x^2*(p*x^3+q)+a*(p*x^3+q)^2)/x^9,x, alg
orithm="fricas")

[Out]

-1/12*(6*(a*p^2*q^2 + 2*c*p*q)*x^8*log(-(p*x^3 + q + sqrt(p^2*x^6 - 2*p*q*x^4 + 2*p*q*x^3 + q^2))/x^2) - (3*a*
p^3*x^9 + 4*b*p^2*x^8 + 8*b*p*q*x^5 + (9*a*p^2 - 8*b*p)*q*x^6 - 3*(a*p^2*q - 2*c*p)*x^7 + 9*a*p*q^2*x^3 + 4*b*
q^2*x^2 - 3*(a*p*q^2 - 2*c*q)*x^4 + 3*a*q^3)*sqrt(p^2*x^6 - 2*p*q*x^4 + 2*p*q*x^3 + q^2))/x^8

Sympy [F]

\[ \int \frac {\left (-2 q+p x^3\right ) \sqrt {q^2+2 p q x^3-2 p q x^4+p^2 x^6} \left (c x^4+b x^2 \left (q+p x^3\right )+a \left (q+p x^3\right )^2\right )}{x^9} \, dx=\int \frac {\left (p x^{3} - 2 q\right ) \sqrt {p^{2} x^{6} - 2 p q x^{4} + 2 p q x^{3} + q^{2}} \left (a p^{2} x^{6} + 2 a p q x^{3} + a q^{2} + b p x^{5} + b q x^{2} + c x^{4}\right )}{x^{9}}\, dx \]

[In]

integrate((p*x**3-2*q)*(p**2*x**6-2*p*q*x**4+2*p*q*x**3+q**2)**(1/2)*(c*x**4+b*x**2*(p*x**3+q)+a*(p*x**3+q)**2
)/x**9,x)

[Out]

Integral((p*x**3 - 2*q)*sqrt(p**2*x**6 - 2*p*q*x**4 + 2*p*q*x**3 + q**2)*(a*p**2*x**6 + 2*a*p*q*x**3 + a*q**2
+ b*p*x**5 + b*q*x**2 + c*x**4)/x**9, x)

Maxima [F]

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

[In]

integrate((p*x^3-2*q)*(p^2*x^6-2*p*q*x^4+2*p*q*x^3+q^2)^(1/2)*(c*x^4+b*x^2*(p*x^3+q)+a*(p*x^3+q)^2)/x^9,x, alg
orithm="maxima")

[Out]

integrate(sqrt(p^2*x^6 - 2*p*q*x^4 + 2*p*q*x^3 + q^2)*(c*x^4 + (p*x^3 + q)*b*x^2 + (p*x^3 + q)^2*a)*(p*x^3 - 2
*q)/x^9, x)

Giac [F]

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

[In]

integrate((p*x^3-2*q)*(p^2*x^6-2*p*q*x^4+2*p*q*x^3+q^2)^(1/2)*(c*x^4+b*x^2*(p*x^3+q)+a*(p*x^3+q)^2)/x^9,x, alg
orithm="giac")

[Out]

integrate(sqrt(p^2*x^6 - 2*p*q*x^4 + 2*p*q*x^3 + q^2)*(c*x^4 + (p*x^3 + q)*b*x^2 + (p*x^3 + q)^2*a)*(p*x^3 - 2
*q)/x^9, x)

Mupad [F(-1)]

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

[In]

int(-((2*q - p*x^3)*(a*(q + p*x^3)^2 + c*x^4 + b*x^2*(q + p*x^3))*(p^2*x^6 + q^2 + 2*p*q*x^3 - 2*p*q*x^4)^(1/2
))/x^9,x)

[Out]

int(-((2*q - p*x^3)*(a*(q + p*x^3)^2 + c*x^4 + b*x^2*(q + p*x^3))*(p^2*x^6 + q^2 + 2*p*q*x^3 - 2*p*q*x^4)^(1/2
))/x^9, x)