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

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

Optimal result

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

[Out]

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

Rubi [F]

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

[In]

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

[Out]

(7*a*p^2*q*(q^2 - 2*p*q*x^2 + 2*p*q*x^3 + p^2*x^6)^(3/2))/9 + 2*b*p*Defer[Int][Sqrt[q^2 - 2*p*q*x^2 + 2*p*q*x^
3 + p^2*x^6], x] - a*q^5*Defer[Int][Sqrt[q^2 - 2*p*q*x^2 + 2*p*q*x^3 + p^2*x^6]/x^7, x] - 2*a*p*q^4*Defer[Int]
[Sqrt[q^2 - 2*p*q*x^2 + 2*p*q*x^3 + p^2*x^6]/x^4, x] - b*q*Defer[Int][Sqrt[q^2 - 2*p*q*x^2 + 2*p*q*x^3 + p^2*x
^6]/x^3, x] + 2*a*p^2*q^3*Defer[Int][Sqrt[q^2 - 2*p*q*x^2 + 2*p*q*x^3 + p^2*x^6]/x, x] + (14*a*p^3*q^2*Defer[I
nt][x*Sqrt[q^2 - 2*p*q*x^2 + 2*p*q*x^3 + p^2*x^6], x])/3 + a*p^3*q^2*Defer[Int][x^2*Sqrt[q^2 - 2*p*q*x^2 + 2*p
*q*x^3 + p^2*x^6], x] + 2*a*p^5*Defer[Int][x^8*Sqrt[q^2 - 2*p*q*x^2 + 2*p*q*x^3 + p^2*x^6], x]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.28 (sec) , antiderivative size = 186, normalized size of antiderivative = 0.73

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

[In]

int((2*p*x^3-q)*(p^2*x^6+2*p*q*x^3-2*p*q*x^2+q^2)^(1/2)*(b*x^4+a*(p*x^3+q)^4)/x^7,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [F(-1)]

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

[In]

integrate((2*p*x^3-q)*(p^2*x^6+2*p*q*x^3-2*p*q*x^2+q^2)^(1/2)*(b*x^4+a*(p*x^3+q)^4)/x^7,x, algorithm="fricas")

[Out]

Timed out

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

integrate((2*p*x^3-q)*(p^2*x^6+2*p*q*x^3-2*p*q*x^2+q^2)^(1/2)*(b*x^4+a*(p*x^3+q)^4)/x^7,x, algorithm="maxima")

[Out]

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

Giac [F]

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

[In]

integrate((2*p*x^3-q)*(p^2*x^6+2*p*q*x^3-2*p*q*x^2+q^2)^(1/2)*(b*x^4+a*(p*x^3+q)^4)/x^7,x, algorithm="giac")

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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