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

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

Optimal result

Integrand size = 58, antiderivative size = 185 \[ \int \frac {-1-x+4 \sqrt {2} x+2 x^2-2 \sqrt {2} x^2+2 \sqrt {2} x^3}{1-2 x+x^3+\sqrt {2} x^4} \, dx=-\sqrt {-1+4 \sqrt {2}} \arctan \left (\sqrt {\frac {41}{31}+\frac {40 \sqrt {2}}{31}}+\sqrt {\frac {8}{31}+\frac {32 \sqrt {2}}{31}} x\right )-\sqrt {-1+4 \sqrt {2}} \arctan \left (\sqrt {\frac {9}{31}+\frac {36 \sqrt {2}}{31}}-\sqrt {\frac {4}{31}+\frac {16 \sqrt {2}}{31}} x-\sqrt {\frac {76}{31}+\frac {56 \sqrt {2}}{31}} x^2-\sqrt {\frac {8}{31}+\frac {32 \sqrt {2}}{31}} x^3\right )+\frac {1}{2} \log \left (\sqrt {2}-2 \sqrt {2} x+\sqrt {2} x^3+2 x^4\right ) \] Output:

-(-1+4*2^(1/2))^(1/2)*arctan(1/31*(1271+1240*2^(1/2))^(1/2)+2/31*(62+248*2 
^(1/2))^(1/2)*x)+(-1+4*2^(1/2))^(1/2)*arctan(-3/31*(31+124*2^(1/2))^(1/2)+ 
2/31*(31+124*2^(1/2))^(1/2)*x+2/31*(589+434*2^(1/2))^(1/2)*x^2+2/31*(62+24 
8*2^(1/2))^(1/2)*x^3)+1/2*ln(2^(1/2)-2*x*2^(1/2)+x^3*2^(1/2)+2*x^4)
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.

Time = 0.07 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.71 \[ \int \frac {-1-x+4 \sqrt {2} x+2 x^2-2 \sqrt {2} x^2+2 \sqrt {2} x^3}{1-2 x+x^3+\sqrt {2} x^4} \, dx=\text {RootSum}\left [1-2 \text {$\#$1}+\text {$\#$1}^3+\sqrt {2} \text {$\#$1}^4\&,\frac {-\log (x-\text {$\#$1})-\log (x-\text {$\#$1}) \text {$\#$1}+4 \sqrt {2} \log (x-\text {$\#$1}) \text {$\#$1}+2 \log (x-\text {$\#$1}) \text {$\#$1}^2-2 \sqrt {2} \log (x-\text {$\#$1}) \text {$\#$1}^2+2 \sqrt {2} \log (x-\text {$\#$1}) \text {$\#$1}^3}{-2+3 \text {$\#$1}^2+4 \sqrt {2} \text {$\#$1}^3}\&\right ] \] Input:

Integrate[(-1 - x + 4*Sqrt[2]*x + 2*x^2 - 2*Sqrt[2]*x^2 + 2*Sqrt[2]*x^3)/( 
1 - 2*x + x^3 + Sqrt[2]*x^4),x]
 

Output:

RootSum[1 - 2*#1 + #1^3 + Sqrt[2]*#1^4 & , (-Log[x - #1] - Log[x - #1]*#1 
+ 4*Sqrt[2]*Log[x - #1]*#1 + 2*Log[x - #1]*#1^2 - 2*Sqrt[2]*Log[x - #1]*#1 
^2 + 2*Sqrt[2]*Log[x - #1]*#1^3)/(-2 + 3*#1^2 + 4*Sqrt[2]*#1^3) & ]
 

Rubi [F]

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 {2 \sqrt {2} x^3-2 \sqrt {2} x^2+2 x^2+4 \sqrt {2} x-x-1}{\sqrt {2} x^4+x^3-2 x+1} \, dx\)

\(\Big \downarrow \) 6

\(\displaystyle \int \frac {2 \sqrt {2} x^3-2 \sqrt {2} x^2+2 x^2+\left (4 \sqrt {2}-1\right ) x-1}{\sqrt {2} x^4+x^3-2 x+1}dx\)

\(\Big \downarrow \) 6

\(\displaystyle \int \frac {2 \sqrt {2} x^3+\left (2-2 \sqrt {2}\right ) x^2+\left (4 \sqrt {2}-1\right ) x-1}{\sqrt {2} x^4+x^3-2 x+1}dx\)

\(\Big \downarrow \) 2525

\(\displaystyle \frac {\int \frac {2 \left (2 \left (8-\sqrt {2}\right ) x-\left (8-\sqrt {2}\right ) x^2\right )}{\sqrt {2} x^4+x^3-2 x+1}dx}{4 \sqrt {2}}+\frac {1}{2} \log \left (\sqrt {2} x^4+x^3-2 x+1\right )\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {2 \left (8-\sqrt {2}\right ) x-\left (8-\sqrt {2}\right ) x^2}{\sqrt {2} x^4+x^3-2 x+1}dx}{2 \sqrt {2}}+\frac {1}{2} \log \left (\sqrt {2} x^4+x^3-2 x+1\right )\)

\(\Big \downarrow \) 2027

\(\displaystyle \frac {\int \frac {x \left (\left (-8+\sqrt {2}\right ) x+2 \left (8-\sqrt {2}\right )\right )}{\sqrt {2} x^4+x^3-2 x+1}dx}{2 \sqrt {2}}+\frac {1}{2} \log \left (\sqrt {2} x^4+x^3-2 x+1\right )\)

\(\Big \downarrow \) 7293

\(\displaystyle \frac {\int \left (\frac {\left (-8+\sqrt {2}\right ) x^2}{\sqrt {2} x^4+x^3-2 x+1}-\frac {2 \left (-8+\sqrt {2}\right ) x}{\sqrt {2} x^4+x^3-2 x+1}\right )dx}{2 \sqrt {2}}+\frac {1}{2} \log \left (\sqrt {2} x^4+x^3-2 x+1\right )\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 \left (8-\sqrt {2}\right ) \int \frac {x}{\sqrt {2} x^4+x^3-2 x+1}dx-\left (8-\sqrt {2}\right ) \int \frac {x^2}{\sqrt {2} x^4+x^3-2 x+1}dx}{2 \sqrt {2}}+\frac {1}{2} \log \left (\sqrt {2} x^4+x^3-2 x+1\right )\)

Input:

Int[(-1 - x + 4*Sqrt[2]*x + 2*x^2 - 2*Sqrt[2]*x^2 + 2*Sqrt[2]*x^3)/(1 - 2* 
x + x^3 + Sqrt[2]*x^4),x]
 

Output:

$Aborted
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.26 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.48

method result size
default \(\frac {\sqrt {2}\, \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\sqrt {2}\, \textit {\_Z}^{3}+2 \textit {\_Z}^{4}-2 \sqrt {2}\, \textit {\_Z} +\sqrt {2}\right )}{\sum }\frac {\left (-2+\sqrt {2}\, \left (4 \textit {\_R}^{3}+2 \textit {\_R}^{2} \left (\sqrt {2}-2\right )+\textit {\_R} \left (8-\sqrt {2}\right )\right )\right ) \ln \left (x -\textit {\_R} \right )}{8 \textit {\_R}^{3}+\sqrt {2}\, \left (3 \textit {\_R}^{2}-2\right )}\right )}{2}\) \(89\)

Input:

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

Output:

1/2*2^(1/2)*sum((-2+2^(1/2)*(4*_R^3+2*_R^2*(2^(1/2)-2)+_R*(8-2^(1/2))))/(8 
*_R^3+2^(1/2)*(3*_R^2-2))*ln(x-_R),_R=RootOf(2^(1/2)*_Z^3+2*_Z^4-2*2^(1/2) 
*_Z+2^(1/2)))
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.61 \[ \int \frac {-1-x+4 \sqrt {2} x+2 x^2-2 \sqrt {2} x^2+2 \sqrt {2} x^3}{1-2 x+x^3+\sqrt {2} x^4} \, dx=\sqrt {4 \, \sqrt {2} - 1} \arctan \left (\frac {1}{31} \, {\left (16 \, x^{3} + 18 \, x^{2} + 2 \, \sqrt {2} {\left (x^{3} + 5 \, x^{2} + 4 \, x - 6\right )} + 2 \, x - 3\right )} \sqrt {4 \, \sqrt {2} - 1}\right ) - \sqrt {4 \, \sqrt {2} - 1} \arctan \left (\frac {1}{31} \, {\left (2 \, \sqrt {2} {\left (x + 3\right )} + 16 \, x + 17\right )} \sqrt {4 \, \sqrt {2} - 1}\right ) + \frac {1}{2} \, \log \left (2 \, x^{4} + \sqrt {2} {\left (x^{3} - 2 \, x + 1\right )}\right ) \] Input:

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

Output:

sqrt(4*sqrt(2) - 1)*arctan(1/31*(16*x^3 + 18*x^2 + 2*sqrt(2)*(x^3 + 5*x^2 
+ 4*x - 6) + 2*x - 3)*sqrt(4*sqrt(2) - 1)) - sqrt(4*sqrt(2) - 1)*arctan(1/ 
31*(2*sqrt(2)*(x + 3) + 16*x + 17)*sqrt(4*sqrt(2) - 1)) + 1/2*log(2*x^4 + 
sqrt(2)*(x^3 - 2*x + 1))
 

Sympy [F(-2)]

Exception generated. \[ \int \frac {-1-x+4 \sqrt {2} x+2 x^2-2 \sqrt {2} x^2+2 \sqrt {2} x^3}{1-2 x+x^3+\sqrt {2} x^4} \, dx=\text {Exception raised: PolynomialError} \] Input:

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

Output:

Exception raised: PolynomialError >> 1/(9*_t**4 - 204*_t**3 + 12*sqrt(2)*_ 
t**2 + 1204*_t**2 - 544*_t - 136*sqrt(2)*_t + 32*sqrt(2) + 72) contains an 
 element of the set of generators.
 

Maxima [F]

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

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

Output:

integrate((2*sqrt(2)*x^3 - 2*sqrt(2)*x^2 + 2*x^2 + 4*sqrt(2)*x - x - 1)/(s 
qrt(2)*x^4 + x^3 - 2*x + 1), x)
 

Giac [F(-2)]

Exception generated. \[ \int \frac {-1-x+4 \sqrt {2} x+2 x^2-2 \sqrt {2} x^2+2 \sqrt {2} x^3}{1-2 x+x^3+\sqrt {2} x^4} \, dx=\text {Exception raised: TypeError} \] Input:

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro 
unding error%%%{%%{[1,0]:[1,0,-2]%%},[4]%%%}+%%%{1,[3]%%%}+%%%{-2,[1]%%%}+ 
%%%{1,[0]
 

Mupad [B] (verification not implemented)

Time = 1.34 (sec) , antiderivative size = 224, normalized size of antiderivative = 1.21 \[ \int \frac {-1-x+4 \sqrt {2} x+2 x^2-2 \sqrt {2} x^2+2 \sqrt {2} x^3}{1-2 x+x^3+\sqrt {2} x^4} \, dx=\ln \left (\frac {63\,x}{4}-\sqrt {2}\,x-\frac {x\,\sqrt {1-4\,\sqrt {2}}}{4}+\sqrt {2}+\frac {\sqrt {2}\,x^2}{2}+\frac {31\,x^2\,\sqrt {1-4\,\sqrt {2}}}{4}+\frac {15\,x^2}{4}-2^{1/4}\,\sqrt {\sqrt {2}-8}+\frac {2^{3/4}\,\sqrt {\sqrt {2}-8}}{8}+\sqrt {2}\,x\,\sqrt {1-4\,\sqrt {2}}-\frac {63}{4}\right )\,\left (\frac {\sqrt {2}\,\sqrt {\sqrt {2}\,\left (\sqrt {2}-8\right )}}{4}+\frac {1}{2}\right )-\ln \left (\frac {63\,x}{4}-\sqrt {2}\,x+\frac {x\,\sqrt {1-4\,\sqrt {2}}}{4}+\sqrt {2}+\frac {\sqrt {2}\,x^2}{2}-\frac {31\,x^2\,\sqrt {1-4\,\sqrt {2}}}{4}+\frac {15\,x^2}{4}+2^{1/4}\,\sqrt {\sqrt {2}-8}-\frac {2^{3/4}\,\sqrt {\sqrt {2}-8}}{8}-\sqrt {2}\,x\,\sqrt {1-4\,\sqrt {2}}-\frac {63}{4}\right )\,\left (\frac {\sqrt {2}\,\sqrt {\sqrt {2}\,\left (\sqrt {2}-8\right )}}{4}-\frac {1}{2}\right ) \] Input:

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

Output:

log((63*x)/4 - 2^(1/2)*x - (x*(1 - 4*2^(1/2))^(1/2))/4 + 2^(1/2) + (2^(1/2 
)*x^2)/2 + (31*x^2*(1 - 4*2^(1/2))^(1/2))/4 + (15*x^2)/4 - 2^(1/4)*(2^(1/2 
) - 8)^(1/2) + (2^(3/4)*(2^(1/2) - 8)^(1/2))/8 + 2^(1/2)*x*(1 - 4*2^(1/2)) 
^(1/2) - 63/4)*((2^(1/2)*(2^(1/2)*(2^(1/2) - 8))^(1/2))/4 + 1/2) - log((63 
*x)/4 - 2^(1/2)*x + (x*(1 - 4*2^(1/2))^(1/2))/4 + 2^(1/2) + (2^(1/2)*x^2)/ 
2 - (31*x^2*(1 - 4*2^(1/2))^(1/2))/4 + (15*x^2)/4 + 2^(1/4)*(2^(1/2) - 8)^ 
(1/2) - (2^(3/4)*(2^(1/2) - 8)^(1/2))/8 - 2^(1/2)*x*(1 - 4*2^(1/2))^(1/2) 
- 63/4)*((2^(1/2)*(2^(1/2)*(2^(1/2) - 8))^(1/2))/4 - 1/2)
 

Reduce [F]

\[ \int \frac {-1-x+4 \sqrt {2} x+2 x^2-2 \sqrt {2} x^2+2 \sqrt {2} x^3}{1-2 x+x^3+\sqrt {2} x^4} \, dx=\sqrt {2}\, \left (\int \frac {x^{5}}{2 x^{8}-x^{6}+4 x^{4}-2 x^{3}-4 x^{2}+4 x -1}d x \right )-\sqrt {2}\, \left (\int \frac {x^{4}}{2 x^{8}-x^{6}+4 x^{4}-2 x^{3}-4 x^{2}+4 x -1}d x \right )-6 \sqrt {2}\, \left (\int \frac {x^{3}}{2 x^{8}-x^{6}+4 x^{4}-2 x^{3}-4 x^{2}+4 x -1}d x \right )+10 \sqrt {2}\, \left (\int \frac {x^{2}}{2 x^{8}-x^{6}+4 x^{4}-2 x^{3}-4 x^{2}+4 x -1}d x \right )-4 \sqrt {2}\, \left (\int \frac {x}{2 x^{8}-x^{6}+4 x^{4}-2 x^{3}-4 x^{2}+4 x -1}d x \right )+4 \left (\int \frac {x^{7}}{2 x^{8}-x^{6}+4 x^{4}-2 x^{3}-4 x^{2}+4 x -1}d x \right )-4 \left (\int \frac {x^{6}}{2 x^{8}-x^{6}+4 x^{4}-2 x^{3}-4 x^{2}+4 x -1}d x \right )+6 \left (\int \frac {x^{5}}{2 x^{8}-x^{6}+4 x^{4}-2 x^{3}-4 x^{2}+4 x -1}d x \right )+\int \frac {x^{4}}{2 x^{8}-x^{6}+4 x^{4}-2 x^{3}-4 x^{2}+4 x -1}d x +5 \left (\int \frac {x^{3}}{2 x^{8}-x^{6}+4 x^{4}-2 x^{3}-4 x^{2}+4 x -1}d x \right )-4 \left (\int \frac {x^{2}}{2 x^{8}-x^{6}+4 x^{4}-2 x^{3}-4 x^{2}+4 x -1}d x \right )-\left (\int \frac {x}{2 x^{8}-x^{6}+4 x^{4}-2 x^{3}-4 x^{2}+4 x -1}d x \right )+\int \frac {1}{2 x^{8}-x^{6}+4 x^{4}-2 x^{3}-4 x^{2}+4 x -1}d x \] Input:

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

Output:

sqrt(2)*int(x**5/(2*x**8 - x**6 + 4*x**4 - 2*x**3 - 4*x**2 + 4*x - 1),x) - 
 sqrt(2)*int(x**4/(2*x**8 - x**6 + 4*x**4 - 2*x**3 - 4*x**2 + 4*x - 1),x) 
- 6*sqrt(2)*int(x**3/(2*x**8 - x**6 + 4*x**4 - 2*x**3 - 4*x**2 + 4*x - 1), 
x) + 10*sqrt(2)*int(x**2/(2*x**8 - x**6 + 4*x**4 - 2*x**3 - 4*x**2 + 4*x - 
 1),x) - 4*sqrt(2)*int(x/(2*x**8 - x**6 + 4*x**4 - 2*x**3 - 4*x**2 + 4*x - 
 1),x) + 4*int(x**7/(2*x**8 - x**6 + 4*x**4 - 2*x**3 - 4*x**2 + 4*x - 1),x 
) - 4*int(x**6/(2*x**8 - x**6 + 4*x**4 - 2*x**3 - 4*x**2 + 4*x - 1),x) + 6 
*int(x**5/(2*x**8 - x**6 + 4*x**4 - 2*x**3 - 4*x**2 + 4*x - 1),x) + int(x* 
*4/(2*x**8 - x**6 + 4*x**4 - 2*x**3 - 4*x**2 + 4*x - 1),x) + 5*int(x**3/(2 
*x**8 - x**6 + 4*x**4 - 2*x**3 - 4*x**2 + 4*x - 1),x) - 4*int(x**2/(2*x**8 
 - x**6 + 4*x**4 - 2*x**3 - 4*x**2 + 4*x - 1),x) - int(x/(2*x**8 - x**6 + 
4*x**4 - 2*x**3 - 4*x**2 + 4*x - 1),x) + int(1/(2*x**8 - x**6 + 4*x**4 - 2 
*x**3 - 4*x**2 + 4*x - 1),x)