3.13.21 \(\int \frac {1-x+x^2}{(-1+x^2) \sqrt {1-x+x^2-x^3+x^4}} \, dx\) [1221]
Optimal. Leaf size=89 \[ \frac {1}{2} \tanh ^{-1}\left (\frac {x}{1-2 x+x^2-\sqrt {1-x+x^2-x^3+x^4}}\right )+\frac {3 \tanh ^{-1}\left (\frac {\sqrt {5} x}{1+2 x+x^2-\sqrt {1-x+x^2-x^3+x^4}}\right )}{2 \sqrt {5}} \]
[Out]
1/2*arctanh(x/(1-2*x+x^2-(x^4-x^3+x^2-x+1)^(1/2)))+3/10*arctanh(5^(1/2)*x/(1+2*x+x^2-(x^4-x^3+x^2-x+1)^(1/2)))
*5^(1/2)
________________________________________________________________________________________
Rubi [F]
time = 0.37, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps
used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {}
\begin {gather*} \int \frac {1-x+x^2}{\left (-1+x^2\right ) \sqrt {1-x+x^2-x^3+x^4}} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
Int[(1 - x + x^2)/((-1 + x^2)*Sqrt[1 - x + x^2 - x^3 + x^4]),x]
[Out]
Defer[Int][1/Sqrt[1 - x + x^2 - x^3 + x^4], x] - Defer[Int][1/((1 - x)*Sqrt[1 - x + x^2 - x^3 + x^4]), x]/2 -
(3*Defer[Int][1/((1 + x)*Sqrt[1 - x + x^2 - x^3 + x^4]), x])/2
Rubi steps
\begin {align*} \int \frac {1-x+x^2}{\left (-1+x^2\right ) \sqrt {1-x+x^2-x^3+x^4}} \, dx &=\int \left (\frac {1}{\sqrt {1-x+x^2-x^3+x^4}}+\frac {2-x}{\left (-1+x^2\right ) \sqrt {1-x+x^2-x^3+x^4}}\right ) \, dx\\ &=\int \frac {1}{\sqrt {1-x+x^2-x^3+x^4}} \, dx+\int \frac {2-x}{\left (-1+x^2\right ) \sqrt {1-x+x^2-x^3+x^4}} \, dx\\ &=\int \frac {1}{\sqrt {1-x+x^2-x^3+x^4}} \, dx+\int \left (-\frac {1}{2 (1-x) \sqrt {1-x+x^2-x^3+x^4}}-\frac {3}{2 (1+x) \sqrt {1-x+x^2-x^3+x^4}}\right ) \, dx\\ &=-\left (\frac {1}{2} \int \frac {1}{(1-x) \sqrt {1-x+x^2-x^3+x^4}} \, dx\right )-\frac {3}{2} \int \frac {1}{(1+x) \sqrt {1-x+x^2-x^3+x^4}} \, dx+\int \frac {1}{\sqrt {1-x+x^2-x^3+x^4}} \, dx\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.26, size = 89, normalized size = 1.00 \begin {gather*} \frac {1}{2} \tanh ^{-1}\left (\frac {x}{1-2 x+x^2-\sqrt {1-x+x^2-x^3+x^4}}\right )+\frac {3 \tanh ^{-1}\left (\frac {\sqrt {5} x}{1+2 x+x^2-\sqrt {1-x+x^2-x^3+x^4}}\right )}{2 \sqrt {5}} \end {gather*}
Antiderivative was successfully verified.
[In]
Integrate[(1 - x + x^2)/((-1 + x^2)*Sqrt[1 - x + x^2 - x^3 + x^4]),x]
[Out]
ArcTanh[x/(1 - 2*x + x^2 - Sqrt[1 - x + x^2 - x^3 + x^4])]/2 + (3*ArcTanh[(Sqrt[5]*x)/(1 + 2*x + x^2 - Sqrt[1
- x + x^2 - x^3 + x^4])])/(2*Sqrt[5])
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 2.21, size = 2852, normalized size = 32.04
| | |
method |
result |
size |
| | |
trager |
\(-\frac {\ln \left (-\frac {3 x^{2}+2 \sqrt {x^{4}-x^{3}+x^{2}-x +1}-4 x +3}{\left (-1+x \right )^{2}}\right )}{4}+\frac {3 \RootOf \left (\textit {\_Z}^{2}-5\right ) \ln \left (-\frac {\RootOf \left (\textit {\_Z}^{2}-5\right ) x^{2}+2 \sqrt {x^{4}-x^{3}+x^{2}-x +1}+\RootOf \left (\textit {\_Z}^{2}-5\right )}{\left (1+x \right )^{2}}\right )}{20}\) |
\(95\) |
default |
\(\text {Expression too large to display}\) |
\(2852\) |
elliptic |
\(\text {Expression too large to display}\) |
\(101423\) |
| | |
|
|
|
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((x^2-x+1)/(x^2-1)/(x^4-x^3+x^2-x+1)^(1/2),x,method=_RETURNVERBOSE)
[Out]
I*2^(1/2)*(5-5^(1/2))^(1/2)*(I*(1/2*5^(1/2)-1/4*I*2^(1/2)*(5-5^(1/2))^(1/2)-1/4*I*2^(1/2)*(5+5^(1/2))^(1/2))*(
x-1/4*5^(1/2)-1/4-1/4*I*2^(1/2)*(5-5^(1/2))^(1/2))*2^(1/2)/(5-5^(1/2))^(1/2)/(x+1/4*5^(1/2)-1/4-1/4*I*2^(1/2)*
(5+5^(1/2))^(1/2)))^(1/2)*(x+1/4*5^(1/2)-1/4-1/4*I*2^(1/2)*(5+5^(1/2))^(1/2))^2*((-1/2*5^(1/2)+1/4*I*2^(1/2)*(
5+5^(1/2))^(1/2)-1/4*I*2^(1/2)*(5-5^(1/2))^(1/2))*(x+1/4*5^(1/2)-1/4+1/4*I*2^(1/2)*(5+5^(1/2))^(1/2))/(-1/2*5^
(1/2)-1/4*I*2^(1/2)*(5+5^(1/2))^(1/2)-1/4*I*2^(1/2)*(5-5^(1/2))^(1/2))/(x+1/4*5^(1/2)-1/4-1/4*I*2^(1/2)*(5+5^(
1/2))^(1/2)))^(1/2)*(I*(-1/2*5^(1/2)+1/4*I*2^(1/2)*(5+5^(1/2))^(1/2)-1/4*I*2^(1/2)*(5-5^(1/2))^(1/2))*(x-1/4*5
^(1/2)-1/4+1/4*I*2^(1/2)*(5-5^(1/2))^(1/2))*2^(1/2)/(5-5^(1/2))^(1/2)/(x+1/4*5^(1/2)-1/4-1/4*I*2^(1/2)*(5+5^(1
/2))^(1/2)))^(1/2)/(1/2*5^(1/2)-1/4*I*2^(1/2)*(5-5^(1/2))^(1/2)-1/4*I*2^(1/2)*(5+5^(1/2))^(1/2))/(-1/2*5^(1/2)
+1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I*(
1/2*5^(1/2)-1/4*I*2^(1/2)*(5-5^(1/2))^(1/2)-1/4*I*2^(1/2)*(5+5^(1/2))^(1/2))*(x-1/4*5^(1/2)-1/4-1/4*I*2^(1/2)*
(5-5^(1/2))^(1/2))*2^(1/2)/(5-5^(1/2))^(1/2)/(x+1/4*5^(1/2)-1/4-1/4*I*2^(1/2)*(5+5^(1/2))^(1/2)))^(1/2)*(x+1/4
*5^(1/2)-1/4-1/4*I*2^(1/2)*(5+5^(1/2))^(1/2))^2*((-1/2*5^(1/2)+1/4*I*2^(1/2)*(5+5^(1/2))^(1/2)-1/4*I*2^(1/2)*(
5-5^(1/2))^(1/2))*(x+1/4*5^(1/2)-1/4+1/4*I*2^(1/2)*(5+5^(1/2))^(1/2))/(-1/2*5^(1/2)-1/4*I*2^(1/2)*(5+5^(1/2))^
(1/2)-1/4*I*2^(1/2)*(5-5^(1/2))^(1/2))/(x+1/4*5^(1/2)-1/4-1/4*I*2^(1/2)*(5+5^(1/2))^(1/2)))^(1/2)*(I*(-1/2*5^(
1/2)+1/4*I*2^(1/2)*(5+5^(1/2))^(1/2)-1/4*I*2^(1/2)*(5-5^(1/2))^(1/2))*(x-1/4*5^(1/2)-1/4+1/4*I*2^(1/2)*(5-5^(1
/2))^(1/2))*2^(1/2)/(5-5^(1/2))^(1/2)/(x+1/4*5^(1/2)-1/4-1/4*I*2^(1/2)*(5+5^(1/2))^(1/2)))^(1/2)/(1/2*5^(1/2)-
1/4*I*2^(1/2)*(5-5^(1/2))^(1/2)-1/4*I*2^(1/2)*(5+5^(1/2))^(1/2))/(-1/2*5^(1/2)+1/4*I*2^(1/2)*(5+5^(1/2))^(1/2)
-1/4*I*2^(1/2)*(5-5^(1/2))^(1/2))/((x-1/4*5^(1/...
________________________________________________________________________________________
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((x^2-x+1)/(x^2-1)/(x^4-x^3+x^2-x+1)^(1/2),x, algorithm="maxima")
[Out]
integrate((x^2 - x + 1)/(sqrt(x^4 - x^3 + x^2 - x + 1)*(x^2 - 1)), x)
________________________________________________________________________________________
Fricas [A]
time = 0.44, size = 121, normalized size = 1.36 \begin {gather*} \frac {3}{40} \, \sqrt {5} \log \left (-\frac {9 \, x^{4} - 4 \, x^{3} + 4 \, \sqrt {5} \sqrt {x^{4} - x^{3} + x^{2} - x + 1} {\left (x^{2} + 1\right )} + 14 \, x^{2} - 4 \, x + 9}{x^{4} + 4 \, x^{3} + 6 \, x^{2} + 4 \, x + 1}\right ) + \frac {1}{4} \, \log \left (\frac {3 \, x^{2} - 4 \, x - 2 \, \sqrt {x^{4} - x^{3} + x^{2} - x + 1} + 3}{x^{2} - 2 \, x + 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((x^2-x+1)/(x^2-1)/(x^4-x^3+x^2-x+1)^(1/2),x, algorithm="fricas")
[Out]
3/40*sqrt(5)*log(-(9*x^4 - 4*x^3 + 4*sqrt(5)*sqrt(x^4 - x^3 + x^2 - x + 1)*(x^2 + 1) + 14*x^2 - 4*x + 9)/(x^4
+ 4*x^3 + 6*x^2 + 4*x + 1)) + 1/4*log((3*x^2 - 4*x - 2*sqrt(x^4 - x^3 + x^2 - x + 1) + 3)/(x^2 - 2*x + 1))
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2} - x + 1}{\left (x - 1\right ) \left (x + 1\right ) \sqrt {x^{4} - x^{3} + x^{2} - x + 1}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((x**2-x+1)/(x**2-1)/(x**4-x**3+x**2-x+1)**(1/2),x)
[Out]
Integral((x**2 - x + 1)/((x - 1)*(x + 1)*sqrt(x**4 - x**3 + x**2 - x + 1)), x)
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((x^2-x+1)/(x^2-1)/(x^4-x^3+x^2-x+1)^(1/2),x, algorithm="giac")
[Out]
integrate((x^2 - x + 1)/(sqrt(x^4 - x^3 + x^2 - x + 1)*(x^2 - 1)), x)
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x^2-x+1}{\left (x^2-1\right )\,\sqrt {x^4-x^3+x^2-x+1}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((x^2 - x + 1)/((x^2 - 1)*(x^2 - x - x^3 + x^4 + 1)^(1/2)),x)
[Out]
int((x^2 - x + 1)/((x^2 - 1)*(x^2 - x - x^3 + x^4 + 1)^(1/2)), x)
________________________________________________________________________________________