\(\int \frac {(-3+2 \sqrt {2}-x^2) (-3+2 \sqrt {2}+x^2)}{-99+70 \sqrt {2}+(-39+28 \sqrt {2}) x^2+(-5+6 \sqrt {2}) x^4-x^6} \, dx\) [99]

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

Optimal result

Integrand size = 69, antiderivative size = 22 \[ \int \frac {\left (-3+2 \sqrt {2}-x^2\right ) \left (-3+2 \sqrt {2}+x^2\right )}{-99+70 \sqrt {2}+\left (-39+28 \sqrt {2}\right ) x^2+\left (-5+6 \sqrt {2}\right ) x^4-x^6} \, dx=-\frac {1}{2} \text {arctanh}\left (\frac {2 x}{3-2 \sqrt {2}+x^2}\right ) \] Output:

-1/2*arctanh(2*x/(3-2*2^(1/2)+x^2))
 

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(45\) vs. \(2(22)=44\).

Time = 0.07 (sec) , antiderivative size = 45, normalized size of antiderivative = 2.05 \[ \int \frac {\left (-3+2 \sqrt {2}-x^2\right ) \left (-3+2 \sqrt {2}+x^2\right )}{-99+70 \sqrt {2}+\left (-39+28 \sqrt {2}\right ) x^2+\left (-5+6 \sqrt {2}\right ) x^4-x^6} \, dx=-\frac {1}{4} \log \left (-3+2 \sqrt {2}-2 x-x^2\right )+\frac {1}{4} \log \left (-3+2 \sqrt {2}+2 x-x^2\right ) \] Input:

Integrate[((-3 + 2*Sqrt[2] - x^2)*(-3 + 2*Sqrt[2] + x^2))/(-99 + 70*Sqrt[2 
] + (-39 + 28*Sqrt[2])*x^2 + (-5 + 6*Sqrt[2])*x^4 - x^6),x]
 

Output:

-1/4*Log[-3 + 2*Sqrt[2] - 2*x - x^2] + Log[-3 + 2*Sqrt[2] + 2*x - x^2]/4
 

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(103\) vs. \(2(22)=44\).

Time = 0.52 (sec) , antiderivative size = 103, normalized size of antiderivative = 4.68, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.058, Rules used = {2019, 1475, 1081, 2009}

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 {\left (-x^2+2 \sqrt {2}-3\right ) \left (x^2+2 \sqrt {2}-3\right )}{-x^6+\left (6 \sqrt {2}-5\right ) x^4+\left (28 \sqrt {2}-39\right ) x^2+70 \sqrt {2}-99} \, dx\)

\(\Big \downarrow \) 2019

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

\(\Big \downarrow \) 1475

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

\(\Big \downarrow \) 1081

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \log \left (-x+\sqrt {2 \left (\sqrt {2}-1\right )}+1\right )-\frac {1}{2} \log \left (x-\sqrt {2 \left (\sqrt {2}-1\right )}+1\right )\right )+\frac {1}{2} \left (\frac {1}{2} \log \left (-x-\sqrt {2 \left (\sqrt {2}-1\right )}+1\right )-\frac {1}{2} \log \left (x+\sqrt {2 \left (\sqrt {2}-1\right )}+1\right )\right )\)

Input:

Int[((-3 + 2*Sqrt[2] - x^2)*(-3 + 2*Sqrt[2] + x^2))/(-99 + 70*Sqrt[2] + (- 
39 + 28*Sqrt[2])*x^2 + (-5 + 6*Sqrt[2])*x^4 - x^6),x]
 

Output:

(Log[1 + Sqrt[2*(-1 + Sqrt[2])] - x]/2 - Log[1 - Sqrt[2*(-1 + Sqrt[2])] + 
x]/2)/2 + (Log[1 - Sqrt[2*(-1 + Sqrt[2])] - x]/2 - Log[1 + Sqrt[2*(-1 + Sq 
rt[2])] + x]/2)/2
 

Defintions of rubi rules used

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

rule 1475
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : 
> With[{q = Rt[2*(d/e) - b/c, 2]}, Simp[e/(2*c)   Int[1/Simp[d/e + q*x + x^ 
2, x], x], x] + Simp[e/(2*c)   Int[1/Simp[d/e - q*x + x^2, x], x], x]] /; F 
reeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && 
 (GtQ[2*(d/e) - b/c, 0] || ( !LtQ[2*(d/e) - b/c, 0] && EqQ[d - e*Rt[a/c, 2] 
, 0]))
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2019
Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px 
, Qx, x]^p*Qx^(p + q), x] /; FreeQ[q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && 
 EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]
 
Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.55

method result size
default \(\frac {\ln \left (x^{2}-2 \sqrt {2}-2 x +3\right )}{4}-\frac {\ln \left (x^{2}-2 \sqrt {2}+2 x +3\right )}{4}\) \(34\)
risch \(\frac {\ln \left (x^{2}-2 \sqrt {2}-2 x +3\right )}{4}-\frac {\ln \left (x^{2}-2 \sqrt {2}+2 x +3\right )}{4}\) \(34\)
parallelrisch \(\frac {\ln \left (x^{2}-2 \sqrt {2}-2 x +3\right )}{4}-\frac {\ln \left (x^{2}-2 \sqrt {2}+2 x +3\right )}{4}\) \(34\)

Input:

int((-3+2*2^(1/2)-x^2)*(-3+2*2^(1/2)+x^2)/(-99+70*2^(1/2)+(-39+28*2^(1/2)) 
*x^2+(-5+6*2^(1/2))*x^4-x^6),x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.50 \[ \int \frac {\left (-3+2 \sqrt {2}-x^2\right ) \left (-3+2 \sqrt {2}+x^2\right )}{-99+70 \sqrt {2}+\left (-39+28 \sqrt {2}\right ) x^2+\left (-5+6 \sqrt {2}\right ) x^4-x^6} \, dx=-\frac {1}{4} \, \log \left (x^{2} + 2 \, x - 2 \, \sqrt {2} + 3\right ) + \frac {1}{4} \, \log \left (x^{2} - 2 \, x - 2 \, \sqrt {2} + 3\right ) \] Input:

integrate((-3+2*2^(1/2)-x^2)*(-3+2*2^(1/2)+x^2)/(-99+70*2^(1/2)+(-39+28*2^ 
(1/2))*x^2+(-5+6*2^(1/2))*x^4-x^6),x, algorithm="fricas")
 

Output:

-1/4*log(x^2 + 2*x - 2*sqrt(2) + 3) + 1/4*log(x^2 - 2*x - 2*sqrt(2) + 3)
 

Sympy [F(-2)]

Exception generated. \[ \int \frac {\left (-3+2 \sqrt {2}-x^2\right ) \left (-3+2 \sqrt {2}+x^2\right )}{-99+70 \sqrt {2}+\left (-39+28 \sqrt {2}\right ) x^2+\left (-5+6 \sqrt {2}\right ) x^4-x^6} \, dx=\text {Exception raised: PolynomialError} \] Input:

integrate((-3+2*2**(1/2)-x**2)*(-3+2*2**(1/2)+x**2)/(-99+70*2**(1/2)+(-39+ 
28*2**(1/2))*x**2+(-5+6*2**(1/2))*x**4-x**6),x)
 

Output:

Exception raised: PolynomialError >> 1/(-160817378869521623700434126076296 
32108508413135104*_t**4 + 113715059131284938253449200806460980121432594954 
24*sqrt(2)*_t**4 - 525076531527889516631004780624192141786868300832*_t**2 
+ 3712851760852
 

Maxima [F]

\[ \int \frac {\left (-3+2 \sqrt {2}-x^2\right ) \left (-3+2 \sqrt {2}+x^2\right )}{-99+70 \sqrt {2}+\left (-39+28 \sqrt {2}\right ) x^2+\left (-5+6 \sqrt {2}\right ) x^4-x^6} \, dx=\int { \frac {{\left (x^{2} + 2 \, \sqrt {2} - 3\right )} {\left (x^{2} - 2 \, \sqrt {2} + 3\right )}}{x^{6} - x^{4} {\left (6 \, \sqrt {2} - 5\right )} - x^{2} {\left (28 \, \sqrt {2} - 39\right )} - 70 \, \sqrt {2} + 99} \,d x } \] Input:

integrate((-3+2*2^(1/2)-x^2)*(-3+2*2^(1/2)+x^2)/(-99+70*2^(1/2)+(-39+28*2^ 
(1/2))*x^2+(-5+6*2^(1/2))*x^4-x^6),x, algorithm="maxima")
 

Output:

integrate((x^2 + 2*sqrt(2) - 3)*(x^2 - 2*sqrt(2) + 3)/(x^6 - x^4*(6*sqrt(2 
) - 5) - x^2*(28*sqrt(2) - 39) - 70*sqrt(2) + 99), x)
 

Giac [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.59 \[ \int \frac {\left (-3+2 \sqrt {2}-x^2\right ) \left (-3+2 \sqrt {2}+x^2\right )}{-99+70 \sqrt {2}+\left (-39+28 \sqrt {2}\right ) x^2+\left (-5+6 \sqrt {2}\right ) x^4-x^6} \, dx=-\frac {1}{4} \, \log \left ({\left | x^{2} + 2 \, x - 2 \, \sqrt {2} + 3 \right |}\right ) + \frac {1}{4} \, \log \left ({\left | x^{2} - 2 \, x - 2 \, \sqrt {2} + 3 \right |}\right ) \] Input:

integrate((-3+2*2^(1/2)-x^2)*(-3+2*2^(1/2)+x^2)/(-99+70*2^(1/2)+(-39+28*2^ 
(1/2))*x^2+(-5+6*2^(1/2))*x^4-x^6),x, algorithm="giac")
 

Output:

-1/4*log(abs(x^2 + 2*x - 2*sqrt(2) + 3)) + 1/4*log(abs(x^2 - 2*x - 2*sqrt( 
2) + 3))
 

Mupad [B] (verification not implemented)

Time = 22.64 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.55 \[ \int \frac {\left (-3+2 \sqrt {2}-x^2\right ) \left (-3+2 \sqrt {2}+x^2\right )}{-99+70 \sqrt {2}+\left (-39+28 \sqrt {2}\right ) x^2+\left (-5+6 \sqrt {2}\right ) x^4-x^6} \, dx=-\frac {\mathrm {atanh}\left (\frac {x\,\left (16\,\sqrt {2}-16\right )}{2\,\left (20\,\sqrt {2}+4\,\sqrt {2}\,x^2-4\,x^2-28\right )}\right )}{2} \] Input:

int(-((x^2 - 2*2^(1/2) + 3)*(2*2^(1/2) + x^2 - 3))/(x^4*(6*2^(1/2) - 5) + 
x^2*(28*2^(1/2) - 39) + 70*2^(1/2) - x^6 - 99),x)
 

Output:

-atanh((x*(16*2^(1/2) - 16))/(2*(20*2^(1/2) + 4*2^(1/2)*x^2 - 4*x^2 - 28)) 
)/2
 

Reduce [F]

\[ \int \frac {\left (-3+2 \sqrt {2}-x^2\right ) \left (-3+2 \sqrt {2}+x^2\right )}{-99+70 \sqrt {2}+\left (-39+28 \sqrt {2}\right ) x^2+\left (-5+6 \sqrt {2}\right ) x^4-x^6} \, dx=6 \sqrt {2}\, \left (\int \frac {x^{4}}{x^{8}+4 x^{6}+6 x^{4}-124 x^{2}+1}d x \right )+4 \sqrt {2}\, \left (\int \frac {x^{2}}{x^{8}+4 x^{6}+6 x^{4}-124 x^{2}+1}d x \right )-2 \sqrt {2}\, \left (\int \frac {1}{x^{8}+4 x^{6}+6 x^{4}-124 x^{2}+1}d x \right )+\int \frac {x^{6}}{x^{8}+4 x^{6}+6 x^{4}-124 x^{2}+1}d x -\left (\int \frac {x^{4}}{x^{8}+4 x^{6}+6 x^{4}-124 x^{2}+1}d x \right )+27 \left (\int \frac {x^{2}}{x^{8}+4 x^{6}+6 x^{4}-124 x^{2}+1}d x \right )-3 \left (\int \frac {1}{x^{8}+4 x^{6}+6 x^{4}-124 x^{2}+1}d x \right ) \] Input:

int((-3+2*2^(1/2)-x^2)*(-3+2*2^(1/2)+x^2)/(-99+70*2^(1/2)+(-39+28*2^(1/2)) 
*x^2+(-5+6*2^(1/2))*x^4-x^6),x)
 

Output:

6*sqrt(2)*int(x**4/(x**8 + 4*x**6 + 6*x**4 - 124*x**2 + 1),x) + 4*sqrt(2)* 
int(x**2/(x**8 + 4*x**6 + 6*x**4 - 124*x**2 + 1),x) - 2*sqrt(2)*int(1/(x** 
8 + 4*x**6 + 6*x**4 - 124*x**2 + 1),x) + int(x**6/(x**8 + 4*x**6 + 6*x**4 
- 124*x**2 + 1),x) - int(x**4/(x**8 + 4*x**6 + 6*x**4 - 124*x**2 + 1),x) + 
 27*int(x**2/(x**8 + 4*x**6 + 6*x**4 - 124*x**2 + 1),x) - 3*int(1/(x**8 + 
4*x**6 + 6*x**4 - 124*x**2 + 1),x)