3.8.49 \(\int (b+a x^3) \sqrt {-x+x^4} \, dx\) [749]

Optimal. Leaf size=58 \[ \frac {1}{12} \sqrt {-x+x^4} \left (-a x+4 b x+2 a x^4\right )+\frac {1}{12} (-a-4 b) \tanh ^{-1}\left (\frac {x^2}{\sqrt {-x+x^4}}\right ) \]

[Out]

1/12*(x^4-x)^(1/2)*(2*a*x^4-a*x+4*b*x)+1/12*(-a-4*b)*arctanh(x^2/(x^4-x)^(1/2))

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 96, normalized size of antiderivative = 1.66, number of steps used = 9, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {2078, 2029, 2054, 212, 2046, 2049} \begin {gather*} \frac {1}{6} a \sqrt {x^4-x} x^4-\frac {1}{12} a \sqrt {x^4-x} x-\frac {1}{12} a \tanh ^{-1}\left (\frac {x^2}{\sqrt {x^4-x}}\right )+\frac {1}{3} b \sqrt {x^4-x} x-\frac {1}{3} b \tanh ^{-1}\left (\frac {x^2}{\sqrt {x^4-x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(b + a*x^3)*Sqrt[-x + x^4],x]

[Out]

-1/12*(a*x*Sqrt[-x + x^4]) + (b*x*Sqrt[-x + x^4])/3 + (a*x^4*Sqrt[-x + x^4])/6 - (a*ArcTanh[x^2/Sqrt[-x + x^4]
])/12 - (b*ArcTanh[x^2/Sqrt[-x + x^4]])/3

Rule 212

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

Rule 2029

Int[((a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.))^(p_), x_Symbol] :> Simp[x*((a*x^j + b*x^n)^p/(n*p + 1)), x] + Dist[a
*(n - j)*(p/(n*p + 1)), Int[x^j*(a*x^j + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] &&  !IntegerQ[p] && LtQ[0,
 j, n] && GtQ[p, 0] && NeQ[n*p + 1, 0]

Rule 2046

Int[((c_.)*(x_))^(m_.)*((a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a*x^j + b
*x^n)^p/(c*(m + n*p + 1))), x] + Dist[a*(n - j)*(p/(c^j*(m + n*p + 1))), Int[(c*x)^(m + j)*(a*x^j + b*x^n)^(p
- 1), x], x] /; FreeQ[{a, b, c, m}, x] &&  !IntegerQ[p] && LtQ[0, j, n] && (IntegersQ[j, n] || GtQ[c, 0]) && G
tQ[p, 0] && NeQ[m + n*p + 1, 0]

Rule 2049

Int[((c_.)*(x_))^(m_.)*((a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n +
1)*((a*x^j + b*x^n)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^(n - j)*((m + j*p - n + j + 1)/(b*(m + n*p + 1))
), Int[(c*x)^(m - (n - j))*(a*x^j + b*x^n)^p, x], x] /; FreeQ[{a, b, c, m, p}, x] &&  !IntegerQ[p] && LtQ[0, j
, n] && (IntegersQ[j, n] || GtQ[c, 0]) && GtQ[m + j*p + 1 - n + j, 0] && NeQ[m + n*p + 1, 0]

Rule 2054

Int[(x_)^(m_.)/Sqrt[(a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.)], x_Symbol] :> Dist[-2/(n - j), Subst[Int[1/(1 - a*x^2
), x], x, x^(j/2)/Sqrt[a*x^j + b*x^n]], x] /; FreeQ[{a, b, j, n}, x] && EqQ[m, j/2 - 1] && NeQ[n, j]

Rule 2078

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.17, size = 75, normalized size = 1.29 \begin {gather*} \frac {x^2 \left (-1+x^3\right ) \left (4 b+a \left (-1+2 x^3\right )\right )-(a+4 b) \sqrt {x} \sqrt {-1+x^3} \tanh ^{-1}\left (\frac {\sqrt {-1+x^3}}{x^{3/2}}\right )}{12 \sqrt {x \left (-1+x^3\right )}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(b + a*x^3)*Sqrt[-x + x^4],x]

[Out]

(x^2*(-1 + x^3)*(4*b + a*(-1 + 2*x^3)) - (a + 4*b)*Sqrt[x]*Sqrt[-1 + x^3]*ArcTanh[Sqrt[-1 + x^3]/x^(3/2)])/(12
*Sqrt[x*(-1 + x^3)])

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 1.03, size = 620, normalized size = 10.69 Too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

a*(1/6*x^4*(x^4-x)^(1/2)-1/12*x*(x^4-x)^(1/2)-1/4*(1/2-1/2*I*3^(1/2))*((-3/2+1/2*I*3^(1/2))*x/(-1/2+1/2*I*3^(1
/2))/(-1+x))^(1/2)*(-1+x)^2*((x+1/2+1/2*I*3^(1/2))/(-1/2-1/2*I*3^(1/2))/(-1+x))^(1/2)*((x+1/2-1/2*I*3^(1/2))/(
-1/2+1/2*I*3^(1/2))/(-1+x))^(1/2)/(-3/2+1/2*I*3^(1/2))/(x*(-1+x)*(x+1/2+1/2*I*3^(1/2))*(x+1/2-1/2*I*3^(1/2)))^
(1/2)*(EllipticF(((-3/2+1/2*I*3^(1/2))*x/(-1/2+1/2*I*3^(1/2))/(-1+x))^(1/2),((3/2+1/2*I*3^(1/2))*(1/2-1/2*I*3^
(1/2))/(1/2+1/2*I*3^(1/2))/(3/2-1/2*I*3^(1/2)))^(1/2))-EllipticPi(((-3/2+1/2*I*3^(1/2))*x/(-1/2+1/2*I*3^(1/2))
/(-1+x))^(1/2),(-1/2+1/2*I*3^(1/2))/(-3/2+1/2*I*3^(1/2)),((3/2+1/2*I*3^(1/2))*(1/2-1/2*I*3^(1/2))/(1/2+1/2*I*3
^(1/2))/(3/2-1/2*I*3^(1/2)))^(1/2))))+b*(1/3*x*(x^4-x)^(1/2)-(1/2-1/2*I*3^(1/2))*((-3/2+1/2*I*3^(1/2))*x/(-1/2
+1/2*I*3^(1/2))/(-1+x))^(1/2)*(-1+x)^2*((x+1/2+1/2*I*3^(1/2))/(-1/2-1/2*I*3^(1/2))/(-1+x))^(1/2)*((x+1/2-1/2*I
*3^(1/2))/(-1/2+1/2*I*3^(1/2))/(-1+x))^(1/2)/(-3/2+1/2*I*3^(1/2))/(x*(-1+x)*(x+1/2+1/2*I*3^(1/2))*(x+1/2-1/2*I
*3^(1/2)))^(1/2)*(EllipticF(((-3/2+1/2*I*3^(1/2))*x/(-1/2+1/2*I*3^(1/2))/(-1+x))^(1/2),((3/2+1/2*I*3^(1/2))*(1
/2-1/2*I*3^(1/2))/(1/2+1/2*I*3^(1/2))/(3/2-1/2*I*3^(1/2)))^(1/2))-EllipticPi(((-3/2+1/2*I*3^(1/2))*x/(-1/2+1/2
*I*3^(1/2))/(-1+x))^(1/2),(-1/2+1/2*I*3^(1/2))/(-3/2+1/2*I*3^(1/2)),((3/2+1/2*I*3^(1/2))*(1/2-1/2*I*3^(1/2))/(
1/2+1/2*I*3^(1/2))/(3/2-1/2*I*3^(1/2)))^(1/2))))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate((a*x^3 + b)*sqrt(x^4 - x), x)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 54, normalized size = 0.93 \begin {gather*} \frac {1}{24} \, {\left (a + 4 \, b\right )} \log \left (2 \, x^{3} - 2 \, \sqrt {x^{4} - x} x - 1\right ) + \frac {1}{12} \, {\left (2 \, a x^{4} - {\left (a - 4 \, b\right )} x\right )} \sqrt {x^{4} - x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/24*(a + 4*b)*log(2*x^3 - 2*sqrt(x^4 - x)*x - 1) + 1/12*(2*a*x^4 - (a - 4*b)*x)*sqrt(x^4 - x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {x \left (x - 1\right ) \left (x^{2} + x + 1\right )} \left (a x^{3} + b\right )\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x**3+b)*(x**4-x)**(1/2),x)

[Out]

Integral(sqrt(x*(x - 1)*(x**2 + x + 1))*(a*x**3 + b), x)

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 61, normalized size = 1.05 \begin {gather*} \frac {1}{12} \, {\left (2 \, a x^{3} - a + 4 \, b\right )} \sqrt {x^{4} - x} x - \frac {1}{24} \, {\left (a + 4 \, b\right )} {\left (\log \left (\sqrt {-\frac {1}{x^{3}} + 1} + 1\right ) - \log \left ({\left | \sqrt {-\frac {1}{x^{3}} + 1} - 1 \right |}\right )\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/12*(2*a*x^3 - a + 4*b)*sqrt(x^4 - x)*x - 1/24*(a + 4*b)*(log(sqrt(-1/x^3 + 1) + 1) - log(abs(sqrt(-1/x^3 + 1
) - 1)))

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \sqrt {x^4-x}\,\left (a\,x^3+b\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________