\(\int \frac {1}{\sqrt {a+8 x-8 x^2+4 x^3-x^4}} \, dx\) [70]

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

Optimal result

Integrand size = 24, antiderivative size = 158 \[ \int \frac {1}{\sqrt {a+8 x-8 x^2+4 x^3-x^4}} \, dx=-\frac {\sqrt {3+a} \sqrt {1-\frac {\left (1-\sqrt {4+a}\right ) (1-x)^2}{3+a}} \sqrt {1-\frac {\left (1+\sqrt {4+a}\right ) (1-x)^2}{3+a}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {1+\sqrt {4+a}} (1-x)}{\sqrt {3+a}}\right ),\frac {1-\sqrt {4+a}}{1+\sqrt {4+a}}\right )}{\sqrt {1+\sqrt {4+a}} \sqrt {3+a-2 (1-x)^2-(1-x)^4}} \] Output:

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

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(540\) vs. \(2(158)=316\).

Time = 11.86 (sec) , antiderivative size = 540, normalized size of antiderivative = 3.42 \[ \int \frac {1}{\sqrt {a+8 x-8 x^2+4 x^3-x^4}} \, dx=\frac {2 \left (1+\sqrt {-1-\sqrt {4+a}}-x\right ) \sqrt {\frac {\sqrt {-1-\sqrt {4+a}} \left (1+\sqrt {-1+\sqrt {4+a}}-x\right )}{\left (\sqrt {-1-\sqrt {4+a}}+\sqrt {-1+\sqrt {4+a}}\right ) \left (1+\sqrt {-1-\sqrt {4+a}}-x\right )}} \left (-1+\sqrt {-1-\sqrt {4+a}}+x\right ) \sqrt {\frac {\sqrt {-1-\sqrt {4+a}} \left (-1+\sqrt {-1+\sqrt {4+a}}+x\right )}{\left (-\sqrt {-1-\sqrt {4+a}}+\sqrt {-1+\sqrt {4+a}}\right ) \left (1+\sqrt {-1-\sqrt {4+a}}-x\right )}} \operatorname {EllipticF}\left (\arcsin \left (\sqrt {\frac {\left (\sqrt {-1-\sqrt {4+a}}-\sqrt {-1+\sqrt {4+a}}\right ) \left (-1+\sqrt {-1-\sqrt {4+a}}+x\right )}{\left (\sqrt {-1-\sqrt {4+a}}+\sqrt {-1+\sqrt {4+a}}\right ) \left (1+\sqrt {-1-\sqrt {4+a}}-x\right )}}\right ),\frac {\left (\sqrt {-1-\sqrt {4+a}}+\sqrt {-1+\sqrt {4+a}}\right )^2}{\left (\sqrt {-1-\sqrt {4+a}}-\sqrt {-1+\sqrt {4+a}}\right )^2}\right )}{\sqrt {-1-\sqrt {4+a}} \sqrt {\frac {\left (\sqrt {-1-\sqrt {4+a}}-\sqrt {-1+\sqrt {4+a}}\right ) \left (-1+\sqrt {-1-\sqrt {4+a}}+x\right )}{\left (\sqrt {-1-\sqrt {4+a}}+\sqrt {-1+\sqrt {4+a}}\right ) \left (1+\sqrt {-1-\sqrt {4+a}}-x\right )}} \sqrt {a-x \left (-8+8 x-4 x^2+x^3\right )}} \] Input:

Integrate[1/Sqrt[a + 8*x - 8*x^2 + 4*x^3 - x^4],x]
 

Output:

(2*(1 + Sqrt[-1 - Sqrt[4 + a]] - x)*Sqrt[(Sqrt[-1 - Sqrt[4 + a]]*(1 + Sqrt 
[-1 + Sqrt[4 + a]] - x))/((Sqrt[-1 - Sqrt[4 + a]] + Sqrt[-1 + Sqrt[4 + a]] 
)*(1 + Sqrt[-1 - Sqrt[4 + a]] - x))]*(-1 + Sqrt[-1 - Sqrt[4 + a]] + x)*Sqr 
t[(Sqrt[-1 - Sqrt[4 + a]]*(-1 + Sqrt[-1 + Sqrt[4 + a]] + x))/((-Sqrt[-1 - 
Sqrt[4 + a]] + Sqrt[-1 + Sqrt[4 + a]])*(1 + Sqrt[-1 - Sqrt[4 + a]] - x))]* 
EllipticF[ArcSin[Sqrt[((Sqrt[-1 - Sqrt[4 + a]] - Sqrt[-1 + Sqrt[4 + a]])*( 
-1 + Sqrt[-1 - Sqrt[4 + a]] + x))/((Sqrt[-1 - Sqrt[4 + a]] + Sqrt[-1 + Sqr 
t[4 + a]])*(1 + Sqrt[-1 - Sqrt[4 + a]] - x))]], (Sqrt[-1 - Sqrt[4 + a]] + 
Sqrt[-1 + Sqrt[4 + a]])^2/(Sqrt[-1 - Sqrt[4 + a]] - Sqrt[-1 + Sqrt[4 + a]] 
)^2])/(Sqrt[-1 - Sqrt[4 + a]]*Sqrt[((Sqrt[-1 - Sqrt[4 + a]] - Sqrt[-1 + Sq 
rt[4 + a]])*(-1 + Sqrt[-1 - Sqrt[4 + a]] + x))/((Sqrt[-1 - Sqrt[4 + a]] + 
Sqrt[-1 + Sqrt[4 + a]])*(1 + Sqrt[-1 - Sqrt[4 + a]] - x))]*Sqrt[a - x*(-8 
+ 8*x - 4*x^2 + x^3)])
 

Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 144, normalized size of antiderivative = 0.91, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2458, 1417, 320}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {1}{\sqrt {a-x^4+4 x^3-8 x^2+8 x}} \, dx\)

\(\Big \downarrow \) 2458

\(\displaystyle \int \frac {1}{\sqrt {a-(x-1)^4-2 (x-1)^2+3}}d(x-1)\)

\(\Big \downarrow \) 1417

\(\displaystyle \frac {\sqrt {\frac {(x-1)^2}{1-\sqrt {a+4}}+1} \sqrt {\frac {(x-1)^2}{\sqrt {a+4}+1}+1} \int \frac {1}{\sqrt {\frac {(x-1)^2}{1-\sqrt {a+4}}+1} \sqrt {\frac {(x-1)^2}{\sqrt {a+4}+1}+1}}d(x-1)}{\sqrt {a-(x-1)^4-2 (x-1)^2+3}}\)

\(\Big \downarrow \) 320

\(\displaystyle \frac {\sqrt {\sqrt {a+4}+1} \left (\frac {(x-1)^2}{1-\sqrt {a+4}}+1\right ) \operatorname {EllipticF}\left (\arctan \left (\frac {x-1}{\sqrt {\sqrt {a+4}+1}}\right ),-\frac {2 \sqrt {a+4}}{1-\sqrt {a+4}}\right )}{\sqrt {\frac {\frac {(x-1)^2}{1-\sqrt {a+4}}+1}{\frac {(x-1)^2}{\sqrt {a+4}+1}+1}} \sqrt {a-(x-1)^4-2 (x-1)^2+3}}\)

Input:

Int[1/Sqrt[a + 8*x - 8*x^2 + 4*x^3 - x^4],x]
 

Output:

(Sqrt[1 + Sqrt[4 + a]]*(1 + (-1 + x)^2/(1 - Sqrt[4 + a]))*EllipticF[ArcTan 
[(-1 + x)/Sqrt[1 + Sqrt[4 + a]]], (-2*Sqrt[4 + a])/(1 - Sqrt[4 + a])])/(Sq 
rt[(1 + (-1 + x)^2/(1 - Sqrt[4 + a]))/(1 + (-1 + x)^2/(1 + Sqrt[4 + a]))]* 
Sqrt[3 + a - 2*(-1 + x)^2 - (-1 + x)^4])
 

Defintions of rubi rules used

rule 320
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_)^2]), x_Symbol] :> S 
imp[(Sqrt[a + b*x^2]/(a*Rt[d/c, 2]*Sqrt[c + d*x^2]*Sqrt[c*((a + b*x^2)/(a*( 
c + d*x^2)))]))*EllipticF[ArcTan[Rt[d/c, 2]*x], 1 - b*(c/(a*d))], x] /; Fre 
eQ[{a, b, c, d}, x] && PosQ[d/c] && PosQ[b/a] &&  !SimplerSqrtQ[b/a, d/c]
 

rule 1417
Int[1/Sqrt[(a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4], x_Symbol] :> With[{q = Rt[b 
^2 - 4*a*c, 2]}, Simp[Sqrt[1 + 2*c*(x^2/(b - q))]*(Sqrt[1 + 2*c*(x^2/(b + q 
))]/Sqrt[a + b*x^2 + c*x^4])   Int[1/(Sqrt[1 + 2*c*(x^2/(b - q))]*Sqrt[1 + 
2*c*(x^2/(b + q))]), x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] 
&& NegQ[c/a]
 

rule 2458
Int[(Pn_)^(p_.), x_Symbol] :> With[{S = Coeff[Pn, x, Expon[Pn, x] - 1]/(Exp 
on[Pn, x]*Coeff[Pn, x, Expon[Pn, x]])}, Subst[Int[ExpandToSum[Pn /. x -> x 
- S, x]^p, x], x, x + S] /; BinomialQ[Pn /. x -> x - S, x] || (IntegerQ[Exp 
on[Pn, x]/2] && TrinomialQ[Pn /. x -> x - S, x])] /; FreeQ[p, x] && PolyQ[P 
n, x] && GtQ[Expon[Pn, x], 2] && NeQ[Coeff[Pn, x, Expon[Pn, x] - 1], 0]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(529\) vs. \(2(133)=266\).

Time = 0.89 (sec) , antiderivative size = 530, normalized size of antiderivative = 3.35

method result size
default \(-\frac {\left (\sqrt {-1-\sqrt {a +4}}+\sqrt {-1+\sqrt {a +4}}\right ) \sqrt {\frac {\left (-\sqrt {-1-\sqrt {a +4}}+\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1-\sqrt {-1+\sqrt {a +4}}\right )}{\left (-\sqrt {-1-\sqrt {a +4}}-\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1+\sqrt {-1+\sqrt {a +4}}\right )}}\, \left (x -1+\sqrt {-1+\sqrt {a +4}}\right )^{2} \sqrt {-\frac {2 \sqrt {-1+\sqrt {a +4}}\, \left (x -1-\sqrt {-1-\sqrt {a +4}}\right )}{\left (\sqrt {-1-\sqrt {a +4}}-\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1+\sqrt {-1+\sqrt {a +4}}\right )}}\, \sqrt {-\frac {2 \sqrt {-1+\sqrt {a +4}}\, \left (x -1+\sqrt {-1-\sqrt {a +4}}\right )}{\left (-\sqrt {-1-\sqrt {a +4}}-\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1+\sqrt {-1+\sqrt {a +4}}\right )}}\, \operatorname {EllipticF}\left (\sqrt {\frac {\left (-\sqrt {-1-\sqrt {a +4}}+\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1-\sqrt {-1+\sqrt {a +4}}\right )}{\left (-\sqrt {-1-\sqrt {a +4}}-\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1+\sqrt {-1+\sqrt {a +4}}\right )}}, \sqrt {\frac {\left (-\sqrt {-1-\sqrt {a +4}}-\sqrt {-1+\sqrt {a +4}}\right ) \left (\sqrt {-1-\sqrt {a +4}}+\sqrt {-1+\sqrt {a +4}}\right )}{\left (-\sqrt {-1-\sqrt {a +4}}+\sqrt {-1+\sqrt {a +4}}\right ) \left (\sqrt {-1-\sqrt {a +4}}-\sqrt {-1+\sqrt {a +4}}\right )}}\right )}{\left (-\sqrt {-1-\sqrt {a +4}}+\sqrt {-1+\sqrt {a +4}}\right ) \sqrt {-1+\sqrt {a +4}}\, \sqrt {-\left (x -1-\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1+\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1-\sqrt {-1-\sqrt {a +4}}\right ) \left (x -1+\sqrt {-1-\sqrt {a +4}}\right )}}\) \(530\)
elliptic \(-\frac {\left (\sqrt {-1-\sqrt {a +4}}+\sqrt {-1+\sqrt {a +4}}\right ) \sqrt {\frac {\left (-\sqrt {-1-\sqrt {a +4}}+\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1-\sqrt {-1+\sqrt {a +4}}\right )}{\left (-\sqrt {-1-\sqrt {a +4}}-\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1+\sqrt {-1+\sqrt {a +4}}\right )}}\, \left (x -1+\sqrt {-1+\sqrt {a +4}}\right )^{2} \sqrt {-\frac {2 \sqrt {-1+\sqrt {a +4}}\, \left (x -1-\sqrt {-1-\sqrt {a +4}}\right )}{\left (\sqrt {-1-\sqrt {a +4}}-\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1+\sqrt {-1+\sqrt {a +4}}\right )}}\, \sqrt {-\frac {2 \sqrt {-1+\sqrt {a +4}}\, \left (x -1+\sqrt {-1-\sqrt {a +4}}\right )}{\left (-\sqrt {-1-\sqrt {a +4}}-\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1+\sqrt {-1+\sqrt {a +4}}\right )}}\, \operatorname {EllipticF}\left (\sqrt {\frac {\left (-\sqrt {-1-\sqrt {a +4}}+\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1-\sqrt {-1+\sqrt {a +4}}\right )}{\left (-\sqrt {-1-\sqrt {a +4}}-\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1+\sqrt {-1+\sqrt {a +4}}\right )}}, \sqrt {\frac {\left (-\sqrt {-1-\sqrt {a +4}}-\sqrt {-1+\sqrt {a +4}}\right ) \left (\sqrt {-1-\sqrt {a +4}}+\sqrt {-1+\sqrt {a +4}}\right )}{\left (-\sqrt {-1-\sqrt {a +4}}+\sqrt {-1+\sqrt {a +4}}\right ) \left (\sqrt {-1-\sqrt {a +4}}-\sqrt {-1+\sqrt {a +4}}\right )}}\right )}{\left (-\sqrt {-1-\sqrt {a +4}}+\sqrt {-1+\sqrt {a +4}}\right ) \sqrt {-1+\sqrt {a +4}}\, \sqrt {-\left (x -1-\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1+\sqrt {-1+\sqrt {a +4}}\right ) \left (x -1-\sqrt {-1-\sqrt {a +4}}\right ) \left (x -1+\sqrt {-1-\sqrt {a +4}}\right )}}\) \(530\)

Input:

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

Output:

-((-1-(a+4)^(1/2))^(1/2)+(-1+(a+4)^(1/2))^(1/2))*((-(-1-(a+4)^(1/2))^(1/2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x^2+4 x^3-x^4}} \, dx=\int { \frac {1}{\sqrt {-x^{4} + 4 \, x^{3} - 8 \, x^{2} + a + 8 \, x}} \,d x } \] Input:

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

Output:

integral(-sqrt(-x^4 + 4*x^3 - 8*x^2 + a + 8*x)/(x^4 - 4*x^3 + 8*x^2 - a - 
8*x), x)
 

Sympy [F]

\[ \int \frac {1}{\sqrt {a+8 x-8 x^2+4 x^3-x^4}} \, dx=\int \frac {1}{\sqrt {a - x^{4} + 4 x^{3} - 8 x^{2} + 8 x}}\, dx \] Input:

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

Output:

Integral(1/sqrt(a - x**4 + 4*x**3 - 8*x**2 + 8*x), x)
 

Maxima [F]

\[ \int \frac {1}{\sqrt {a+8 x-8 x^2+4 x^3-x^4}} \, dx=\int { \frac {1}{\sqrt {-x^{4} + 4 \, x^{3} - 8 \, x^{2} + a + 8 \, x}} \,d x } \] Input:

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

Output:

integrate(1/sqrt(-x^4 + 4*x^3 - 8*x^2 + a + 8*x), x)
 

Giac [F]

\[ \int \frac {1}{\sqrt {a+8 x-8 x^2+4 x^3-x^4}} \, dx=\int { \frac {1}{\sqrt {-x^{4} + 4 \, x^{3} - 8 \, x^{2} + a + 8 \, x}} \,d x } \] Input:

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

Output:

integrate(1/sqrt(-x^4 + 4*x^3 - 8*x^2 + a + 8*x), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {a+8 x-8 x^2+4 x^3-x^4}} \, dx=\int \frac {1}{\sqrt {-x^4+4\,x^3-8\,x^2+8\,x+a}} \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int \frac {1}{\sqrt {a+8 x-8 x^2+4 x^3-x^4}} \, dx=\int \frac {\sqrt {-x^{4}+4 x^{3}-8 x^{2}+a +8 x}}{-x^{4}+4 x^{3}-8 x^{2}+a +8 x}d x \] Input:

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

Output:

int(sqrt(a - x**4 + 4*x**3 - 8*x**2 + 8*x)/(a - x**4 + 4*x**3 - 8*x**2 + 8 
*x),x)