Integrand size = 34, antiderivative size = 40 \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+2 x^2+x^4}}{\left (1+x^2\right ) \left (1+x^4\right )} \, dx=-\frac {\sqrt {\left (1+x^2\right )^2} \text {arctanh}\left (\frac {\sqrt {2} x}{1+x^2}\right )}{\sqrt {2} \left (1+x^2\right )} \] Output:
-1/2*((x^2+1)^2)^(1/2)*arctanh(2^(1/2)*x/(x^2+1))*2^(1/2)/(x^2+1)
Time = 0.17 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.65 \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+2 x^2+x^4}}{\left (1+x^2\right ) \left (1+x^4\right )} \, dx=-\frac {\text {arctanh}\left (\frac {\sqrt {2} x}{\sqrt {\left (1+x^2\right )^2}}\right )}{\sqrt {2}} \] Input:
Integrate[((-1 + x^2)*Sqrt[1 + 2*x^2 + x^4])/((1 + x^2)*(1 + x^4)),x]
Output:
-(ArcTanh[(Sqrt[2]*x)/Sqrt[(1 + x^2)^2]]/Sqrt[2])
Time = 0.27 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.68, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.206, Rules used = {1382, 25, 1383, 1479, 25, 27, 1103}
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-1\right ) \sqrt {x^4+2 x^2+1}}{\left (x^2+1\right ) \left (x^4+1\right )} \, dx\) |
\(\Big \downarrow \) 1382 |
\(\displaystyle \int -\frac {\left (1-x^2\right ) \left (x^2+1\right )}{\left (x^4+1\right ) \sqrt {x^4+2 x^2+1}}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\left (1-x^2\right ) \left (x^2+1\right )}{\left (x^4+1\right ) \sqrt {x^4+2 x^2+1}}dx\) |
\(\Big \downarrow \) 1383 |
\(\displaystyle -\frac {\left (x^2+1\right ) \int \frac {1-x^2}{x^4+1}dx}{\sqrt {x^4+2 x^2+1}}\) |
\(\Big \downarrow \) 1479 |
\(\displaystyle -\frac {\left (x^2+1\right ) \left (-\frac {\int -\frac {\sqrt {2}-2 x}{x^2-\sqrt {2} x+1}dx}{2 \sqrt {2}}-\frac {\int -\frac {\sqrt {2} \left (\sqrt {2} x+1\right )}{x^2+\sqrt {2} x+1}dx}{2 \sqrt {2}}\right )}{\sqrt {x^4+2 x^2+1}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\left (x^2+1\right ) \left (\frac {\int \frac {\sqrt {2}-2 x}{x^2-\sqrt {2} x+1}dx}{2 \sqrt {2}}+\frac {\int \frac {\sqrt {2} \left (\sqrt {2} x+1\right )}{x^2+\sqrt {2} x+1}dx}{2 \sqrt {2}}\right )}{\sqrt {x^4+2 x^2+1}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {\left (x^2+1\right ) \left (\frac {\int \frac {\sqrt {2}-2 x}{x^2-\sqrt {2} x+1}dx}{2 \sqrt {2}}+\frac {1}{2} \int \frac {\sqrt {2} x+1}{x^2+\sqrt {2} x+1}dx\right )}{\sqrt {x^4+2 x^2+1}}\) |
\(\Big \downarrow \) 1103 |
\(\displaystyle -\frac {\left (x^2+1\right ) \left (\frac {\log \left (x^2+\sqrt {2} x+1\right )}{2 \sqrt {2}}-\frac {\log \left (x^2-\sqrt {2} x+1\right )}{2 \sqrt {2}}\right )}{\sqrt {x^4+2 x^2+1}}\) |
Input:
Int[((-1 + x^2)*Sqrt[1 + 2*x^2 + x^4])/((1 + x^2)*(1 + x^4)),x]
Output:
-(((1 + x^2)*(-1/2*Log[1 - Sqrt[2]*x + x^2]/Sqrt[2] + Log[1 + Sqrt[2]*x + x^2]/(2*Sqrt[2])))/Sqrt[1 + 2*x^2 + x^4])
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]
Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_)*((d_) + (e_.)*( x_)^(n_))^(q_), x_Symbol] :> Simp[e^(q - 1)/c^((q - 1)/2) Int[u*(d + e*x^ n)*(a + b*x^n + c*x^(2*n))^(p + (q - 1)/2), x], x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e, 0] && !IntegerQ[p] && I ntegerQ[(q - 1)/2]
Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_)*((d_) + (e_.)*( x_)^(n_))^(q_.), x_Symbol] :> Simp[(a + b*x^n + c*x^(2*n))^p/(d + e*x^n)^(2 *p) Int[u*(d + e*x^n)^(q + 2*p), x], x] /; FreeQ[{a, b, c, d, e, n, p, q} , x] && EqQ[n2, 2*n] && EqQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e, 0] && !Int egerQ[p]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[ -2*(d/e), 2]}, Simp[e/(2*c*q) Int[(q - 2*x)/Simp[d/e + q*x - x^2, x], x], x] + Simp[e/(2*c*q) Int[(q + 2*x)/Simp[d/e - q*x - x^2, x], x], x]] /; F reeQ[{a, c, d, e}, x] && EqQ[c*d^2 - a*e^2, 0] && NegQ[d*e]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.19 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.75
method | result | size |
pseudoelliptic | \(-\frac {\operatorname {csgn}\left (\frac {x^{2}+1}{x}\right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {\left (x^{2}+1\right ) \sqrt {2}}{2 x}\right )}{2}\) | \(30\) |
risch | \(\frac {\sqrt {\left (x^{2}+1\right )^{2}}\, \sqrt {2}\, \ln \left (x^{2}-x \sqrt {2}+1\right )}{4 x^{2}+4}-\frac {\sqrt {\left (x^{2}+1\right )^{2}}\, \sqrt {2}\, \ln \left (x^{2}+x \sqrt {2}+1\right )}{4 \left (x^{2}+1\right )}\) | \(67\) |
default | \(-\frac {\sqrt {\left (x^{2}+1\right )^{2}}\, \sqrt {2}\, \left (\ln \left (-\frac {x^{2}+x \sqrt {2}+1}{x \sqrt {2}-x^{2}-1}\right )-\ln \left (-\frac {x \sqrt {2}-x^{2}-1}{x^{2}+x \sqrt {2}+1}\right )\right )}{8 \left (x^{2}+1\right )}\) | \(79\) |
Input:
int((x^2-1)*((x^2+1)^2)^(1/2)/(x^2+1)/(x^4+1),x,method=_RETURNVERBOSE)
Output:
-1/2*csgn(1/x*(x^2+1))*2^(1/2)*arctanh(1/2/x*(x^2+1)*2^(1/2))
Time = 0.10 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.85 \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+2 x^2+x^4}}{\left (1+x^2\right ) \left (1+x^4\right )} \, dx=\frac {1}{4} \, \sqrt {2} \log \left (\frac {x^{4} + 4 \, x^{2} - 2 \, \sqrt {2} {\left (x^{3} + x\right )} + 1}{x^{4} + 1}\right ) \] Input:
integrate((x^2-1)*((x^2+1)^2)^(1/2)/(x^2+1)/(x^4+1),x, algorithm="fricas")
Output:
1/4*sqrt(2)*log((x^4 + 4*x^2 - 2*sqrt(2)*(x^3 + x) + 1)/(x^4 + 1))
\[ \int \frac {\left (-1+x^2\right ) \sqrt {1+2 x^2+x^4}}{\left (1+x^2\right ) \left (1+x^4\right )} \, dx=\int \frac {\left (x - 1\right ) \left (x + 1\right ) \sqrt {\left (x^{2} + 1\right )^{2}}}{\left (x^{2} + 1\right ) \left (x^{4} + 1\right )}\, dx \] Input:
integrate((x**2-1)*((x**2+1)**2)**(1/2)/(x**2+1)/(x**4+1),x)
Output:
Integral((x - 1)*(x + 1)*sqrt((x**2 + 1)**2)/((x**2 + 1)*(x**4 + 1)), x)
Time = 0.11 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.85 \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+2 x^2+x^4}}{\left (1+x^2\right ) \left (1+x^4\right )} \, dx=-\frac {1}{4} \, \sqrt {2} \log \left (x^{2} + \sqrt {2} x + 1\right ) + \frac {1}{4} \, \sqrt {2} \log \left (x^{2} - \sqrt {2} x + 1\right ) \] Input:
integrate((x^2-1)*((x^2+1)^2)^(1/2)/(x^2+1)/(x^4+1),x, algorithm="maxima")
Output:
-1/4*sqrt(2)*log(x^2 + sqrt(2)*x + 1) + 1/4*sqrt(2)*log(x^2 - sqrt(2)*x + 1)
Time = 0.46 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.85 \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+2 x^2+x^4}}{\left (1+x^2\right ) \left (1+x^4\right )} \, dx=-\frac {1}{4} \, \sqrt {2} \log \left (x^{2} + \sqrt {2} x + 1\right ) + \frac {1}{4} \, \sqrt {2} \log \left (x^{2} - \sqrt {2} x + 1\right ) \] Input:
integrate((x^2-1)*((x^2+1)^2)^(1/2)/(x^2+1)/(x^4+1),x, algorithm="giac")
Output:
-1/4*sqrt(2)*log(x^2 + sqrt(2)*x + 1) + 1/4*sqrt(2)*log(x^2 - sqrt(2)*x + 1)
Time = 0.10 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.45 \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+2 x^2+x^4}}{\left (1+x^2\right ) \left (1+x^4\right )} \, dx=-\frac {\sqrt {2}\,\mathrm {atanh}\left (\frac {\sqrt {2}\,x}{x^2+1}\right )}{2} \] Input:
int(((x^2 - 1)*((x^2 + 1)^2)^(1/2))/((x^2 + 1)*(x^4 + 1)),x)
Output:
-(2^(1/2)*atanh((2^(1/2)*x)/(x^2 + 1)))/2
Time = 0.16 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.70 \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+2 x^2+x^4}}{\left (1+x^2\right ) \left (1+x^4\right )} \, dx=\frac {\sqrt {2}\, \left (\mathrm {log}\left (-\sqrt {2}\, x +x^{2}+1\right )-\mathrm {log}\left (\sqrt {2}\, x +x^{2}+1\right )\right )}{4} \] Input:
int((x^2-1)*((x^2+1)^2)^(1/2)/(x^2+1)/(x^4+1),x)
Output:
(sqrt(2)*(log( - sqrt(2)*x + x**2 + 1) - log(sqrt(2)*x + x**2 + 1)))/4