3.9.75 \(\int \frac {(-1+x^2) \sqrt {1+x^4}}{(1-x+x^2) (1+x+x^2)^2} \, dx\)

Optimal. Leaf size=72 \[ \frac {\sqrt {x^4+1}}{2 \left (x^2+x+1\right )}+\frac {1}{2} \tan ^{-1}\left (\frac {x}{\sqrt {x^4+1}+x^2-x+1}\right )-\frac {3}{2} \tan ^{-1}\left (\frac {x}{\sqrt {x^4+1}+x^2+x+1}\right ) \]

________________________________________________________________________________________

Rubi [C]  time = 9.86, antiderivative size = 2595, normalized size of antiderivative = 36.04, number of steps used = 248, number of rules used = 20, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.606, Rules used = {6728, 1729, 1209, 1198, 220, 1196, 1217, 1707, 1248, 735, 844, 215, 725, 206, 6742, 2153, 1227, 733, 204, 1336}

result too large to display

Warning: Unable to verify antiderivative.

[In]

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

[Out]

((1 - I*Sqrt[3])*Sqrt[1 + x^4])/16 + ((1 + I*Sqrt[3])*Sqrt[1 + x^4])/16 - ((3 - (5*I)*Sqrt[3])*Sqrt[1 + x^4])/
48 - ((3 + (5*I)*Sqrt[3])*Sqrt[1 + x^4])/48 + ((I - Sqrt[3])*Sqrt[1 + x^4])/(3*(I - Sqrt[3] + (2*I)*x^2)) + ((
I + Sqrt[3])*Sqrt[1 + x^4])/(6*(I - Sqrt[3] + (2*I)*x^2)) - ((I/3)*x*Sqrt[1 + x^4])/(I - Sqrt[3] + (2*I)*x^2)
+ ((I + Sqrt[3])*x*Sqrt[1 + x^4])/(3*(I - Sqrt[3] + (2*I)*x^2)) + ((I - Sqrt[3])*Sqrt[1 + x^4])/(6*(I + Sqrt[3
] + (2*I)*x^2)) + ((I + Sqrt[3])*Sqrt[1 + x^4])/(3*(I + Sqrt[3] + (2*I)*x^2)) - ((I/3)*x*Sqrt[1 + x^4])/(I + S
qrt[3] + (2*I)*x^2) + ((I - Sqrt[3])*x*Sqrt[1 + x^4])/(3*(I + Sqrt[3] + (2*I)*x^2)) + (7*x*Sqrt[1 + x^4])/(6*(
1 + x^2)) - ((1 - I*Sqrt[3])*x*Sqrt[1 + x^4])/(3*(1 + x^2)) - ((1 + I*Sqrt[3])*x*Sqrt[1 + x^4])/(3*(1 + x^2))
- ((3 - (2*I)*Sqrt[3])*x*Sqrt[1 + x^4])/(12*(1 + x^2)) - ((3 + (2*I)*Sqrt[3])*x*Sqrt[1 + x^4])/(12*(1 + x^2))
- ((1 - I*Sqrt[3])*ArcSinh[x^2])/4 + ((9 - I*Sqrt[3])*ArcSinh[x^2])/48 - (3*(1 + I*Sqrt[3])*ArcSinh[x^2])/16 -
 ((1 + I*Sqrt[3])^2*ArcSinh[x^2])/32 + ((9 + I*Sqrt[3])*ArcSinh[x^2])/48 + (5*ArcTan[x/Sqrt[1 + x^4]])/12 - ((
1 - I*Sqrt[3])*ArcTan[x/Sqrt[1 + x^4]])/12 - ((3 - I*Sqrt[3])*ArcTan[x/Sqrt[1 + x^4]])/12 - ((1 + I*Sqrt[3])*A
rcTan[x/Sqrt[1 + x^4]])/12 - ((3 + I*Sqrt[3])*ArcTan[x/Sqrt[1 + x^4]])/12 - ((3 - (2*I)*Sqrt[3])*ArcTan[x/Sqrt
[1 + x^4]])/24 - ((3 + (2*I)*Sqrt[3])*ArcTan[x/Sqrt[1 + x^4]])/24 - ArcTan[(2*I - (I - Sqrt[3])*x^2)/(Sqrt[2*(
1 + I*Sqrt[3])]*Sqrt[1 + x^4])]/3 - ((I + Sqrt[3])*ArcTan[(2*I - (I - Sqrt[3])*x^2)/(Sqrt[2*(1 + I*Sqrt[3])]*S
qrt[1 + x^4])])/(6*(I - Sqrt[3])) + ArcTan[(2*I - (I + Sqrt[3])*x^2)/(Sqrt[2*(1 - I*Sqrt[3])]*Sqrt[1 + x^4])]/
3 + ((I - Sqrt[3])*ArcTan[(2*I - (I + Sqrt[3])*x^2)/(Sqrt[2*(1 - I*Sqrt[3])]*Sqrt[1 + x^4])])/(6*(I + Sqrt[3])
) + (I/8)*ArcTanh[(2 - (1 - I*Sqrt[3])*x^2)/(Sqrt[2*(1 - I*Sqrt[3])]*Sqrt[1 + x^4])] - (I/8)*ArcTanh[(2 - (1 +
 I*Sqrt[3])*x^2)/(Sqrt[2*(1 + I*Sqrt[3])]*Sqrt[1 + x^4])] - ((3*I - 2*Sqrt[3])*ArcTanh[(2 - (1 + I*Sqrt[3])*x^
2)/(Sqrt[2*(1 + I*Sqrt[3])]*Sqrt[1 + x^4])])/24 + ((3*I + 2*Sqrt[3])*ArcTanh[(4 + (1 + I*Sqrt[3])^2*x^2)/(2*Sq
rt[2*(1 - I*Sqrt[3])]*Sqrt[1 + x^4])])/24 - (7*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticE[2*ArcTan[x], 1/
2])/(6*Sqrt[1 + x^4]) + ((1 - I*Sqrt[3])*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticE[2*ArcTan[x], 1/2])/(3
*Sqrt[1 + x^4]) + ((1 + I*Sqrt[3])*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticE[2*ArcTan[x], 1/2])/(3*Sqrt[
1 + x^4]) + ((3 - (2*I)*Sqrt[3])*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticE[2*ArcTan[x], 1/2])/(12*Sqrt[1
 + x^4]) + ((3 + (2*I)*Sqrt[3])*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticE[2*ArcTan[x], 1/2])/(12*Sqrt[1
+ x^4]) - ((1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticF[2*ArcTan[x], 1/2])/(Sqrt[3]*(3*I - Sqrt[3])*Sqrt[1
+ x^4]) + ((1 - I*Sqrt[3])*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticF[2*ArcTan[x], 1/2])/(4*Sqrt[1 + x^4]
) - ((3 - I*Sqrt[3])*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticF[2*ArcTan[x], 1/2])/(24*Sqrt[1 + x^4]) - (
(9 - I*Sqrt[3])*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticF[2*ArcTan[x], 1/2])/(24*Sqrt[1 + x^4]) + (3*(1
+ I*Sqrt[3])*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticF[2*ArcTan[x], 1/2])/(8*Sqrt[1 + x^4]) - ((1 + I*Sq
rt[3])^2*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticF[2*ArcTan[x], 1/2])/(16*Sqrt[1 + x^4]) - ((3 + I*Sqrt[
3])*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticF[2*ArcTan[x], 1/2])/(24*Sqrt[1 + x^4]) - ((9 + I*Sqrt[3])*(
1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticF[2*ArcTan[x], 1/2])/(24*Sqrt[1 + x^4]) + ((1 + x^2)*Sqrt[(1 + x^
4)/(1 + x^2)^2]*EllipticF[2*ArcTan[x], 1/2])/(Sqrt[3]*(3*I + Sqrt[3])*Sqrt[1 + x^4]) + ((3*I - Sqrt[3])*(1 + x
^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticF[2*ArcTan[x], 1/2])/(12*(3*I + Sqrt[3])*Sqrt[1 + x^4]) + ((3*I + Sqrt
[3])*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticF[2*ArcTan[x], 1/2])/(12*(3*I - Sqrt[3])*Sqrt[1 + x^4]) - (
(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticPi[1/4, 2*ArcTan[x], 1/2])/(4*Sqrt[1 + x^4]) + ((1 - I*Sqrt[3])*
(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticPi[1/4, 2*ArcTan[x], 1/2])/(8*Sqrt[1 + x^4]) + ((2 - I*Sqrt[3])*
(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticPi[1/4, 2*ArcTan[x], 1/2])/(16*Sqrt[1 + x^4]) - ((3 - I*Sqrt[3])
*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticPi[1/4, 2*ArcTan[x], 1/2])/(24*Sqrt[1 + x^4]) + ((1 + I*Sqrt[3]
)*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticPi[1/4, 2*ArcTan[x], 1/2])/(8*Sqrt[1 + x^4]) + ((2 + I*Sqrt[3]
)*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticPi[1/4, 2*ArcTan[x], 1/2])/(16*Sqrt[1 + x^4]) - ((3 + I*Sqrt[3
])*(1 + x^2)*Sqrt[(1 + x^4)/(1 + x^2)^2]*EllipticPi[1/4, 2*ArcTan[x], 1/2])/(24*Sqrt[1 + x^4])

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 215

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[(Rt[b, 2]*x)/Sqrt[a]]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[b]

Rule 220

Int[1/Sqrt[(a_) + (b_.)*(x_)^4], x_Symbol] :> With[{q = Rt[b/a, 4]}, Simp[((1 + q^2*x^2)*Sqrt[(a + b*x^4)/(a*(
1 + q^2*x^2)^2)]*EllipticF[2*ArcTan[q*x], 1/2])/(2*q*Sqrt[a + b*x^4]), x]] /; FreeQ[{a, b}, x] && PosQ[b/a]

Rule 725

Int[1/(((d_) + (e_.)*(x_))*Sqrt[(a_) + (c_.)*(x_)^2]), x_Symbol] :> -Subst[Int[1/(c*d^2 + a*e^2 - x^2), x], x,
 (a*e - c*d*x)/Sqrt[a + c*x^2]] /; FreeQ[{a, c, d, e}, x]

Rule 733

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((d + e*x)^(m + 1)*(a + c*x^2)^p)/(
e*(m + 1)), x] - Dist[(2*c*p)/(e*(m + 1)), Int[x*(d + e*x)^(m + 1)*(a + c*x^2)^(p - 1), x], x] /; FreeQ[{a, c,
 d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && GtQ[p, 0] && (IntegerQ[p] || LtQ[m, -1]) && NeQ[m, -1] &&  !ILtQ[m +
 2*p + 1, 0] && IntQuadraticQ[a, 0, c, d, e, m, p, x]

Rule 735

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((d + e*x)^(m + 1)*(a + c*x^2)^p)/(
e*(m + 2*p + 1)), x] + Dist[(2*p)/(e*(m + 2*p + 1)), Int[(d + e*x)^m*Simp[a*e - c*d*x, x]*(a + c*x^2)^(p - 1),
 x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && GtQ[p, 0] && NeQ[m + 2*p + 1, 0] && ( !Ration
alQ[m] || LtQ[m, 1]) &&  !ILtQ[m + 2*p, 0] && IntQuadraticQ[a, 0, c, d, e, m, p, x]

Rule 844

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dist[g/e, Int[(d
+ e*x)^(m + 1)*(a + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + c*x^2)^p, x], x] /; FreeQ[{a,
c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !IGtQ[m, 0]

Rule 1196

Int[((d_) + (e_.)*(x_)^2)/Sqrt[(a_) + (c_.)*(x_)^4], x_Symbol] :> With[{q = Rt[c/a, 4]}, -Simp[(d*x*Sqrt[a + c
*x^4])/(a*(1 + q^2*x^2)), x] + Simp[(d*(1 + q^2*x^2)*Sqrt[(a + c*x^4)/(a*(1 + q^2*x^2)^2)]*EllipticE[2*ArcTan[
q*x], 1/2])/(q*Sqrt[a + c*x^4]), x] /; EqQ[e + d*q^2, 0]] /; FreeQ[{a, c, d, e}, x] && PosQ[c/a]

Rule 1198

Int[((d_) + (e_.)*(x_)^2)/Sqrt[(a_) + (c_.)*(x_)^4], x_Symbol] :> With[{q = Rt[c/a, 2]}, Dist[(e + d*q)/q, Int
[1/Sqrt[a + c*x^4], x], x] - Dist[e/q, Int[(1 - q*x^2)/Sqrt[a + c*x^4], x], x] /; NeQ[e + d*q, 0]] /; FreeQ[{a
, c, d, e}, x] && PosQ[c/a]

Rule 1209

Int[((a_) + (c_.)*(x_)^4)^(p_)/((d_) + (e_.)*(x_)^2), x_Symbol] :> -Dist[(e^2)^(-1), Int[(c*d - c*e*x^2)*(a +
c*x^4)^(p - 1), x], x] + Dist[(c*d^2 + a*e^2)/e^2, Int[(a + c*x^4)^(p - 1)/(d + e*x^2), x], x] /; FreeQ[{a, c,
 d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p + 1/2, 0]

Rule 1217

Int[1/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (c_.)*(x_)^4]), x_Symbol] :> With[{q = Rt[c/a, 2]}, Dist[(c*d + a*e*q
)/(c*d^2 - a*e^2), Int[1/Sqrt[a + c*x^4], x], x] - Dist[(a*e*(e + d*q))/(c*d^2 - a*e^2), Int[(1 + q*x^2)/((d +
 e*x^2)*Sqrt[a + c*x^4]), x], x]] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && NeQ[c*d^2 - a*e^2, 0]
&& PosQ[c/a]

Rule 1227

Int[Sqrt[(a_) + (c_.)*(x_)^4]/((d_) + (e_.)*(x_)^2)^2, x_Symbol] :> Simp[(x*Sqrt[a + c*x^4])/(2*d*(d + e*x^2))
, x] + (Dist[c/(2*d*e^2), Int[(d - e*x^2)/Sqrt[a + c*x^4], x], x] - Dist[(c*d^2 - a*e^2)/(2*d*e^2), Int[1/((d
+ e*x^2)*Sqrt[a + c*x^4]), x], x]) /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0]

Rule 1248

Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[(d + e*x)^q
*(a + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, c, d, e, p, q}, x]

Rule 1336

Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(f*x)^m*(d + e*x^2)^q*(a + c*x^4)^p, x], x] /; FreeQ[{a, c, d, e, f, m, p, q}, x] && (IGtQ[p, 0] || IGtQ[q,
 0] || IntegersQ[m, q])

Rule 1707

Int[((A_) + (B_.)*(x_)^2)/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (c_.)*(x_)^4]), x_Symbol] :> With[{q = Rt[B/A, 2]
}, -Simp[((B*d - A*e)*ArcTan[(Rt[(c*d)/e + (a*e)/d, 2]*x)/Sqrt[a + c*x^4]])/(2*d*e*Rt[(c*d)/e + (a*e)/d, 2]),
x] + Simp[((B*d + A*e)*(A + B*x^2)*Sqrt[(A^2*(a + c*x^4))/(a*(A + B*x^2)^2)]*EllipticPi[Cancel[-((B*d - A*e)^2
/(4*d*e*A*B))], 2*ArcTan[q*x], 1/2])/(4*d*e*A*q*Sqrt[a + c*x^4]), x]] /; FreeQ[{a, c, d, e, A, B}, x] && NeQ[c
*d^2 + a*e^2, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[c/a] && EqQ[c*A^2 - a*B^2, 0]

Rule 1729

Int[((a_) + (c_.)*(x_)^4)^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Dist[d, Int[(a + c*x^4)^p/(d^2 - e^2*x^2), x
], x] - Dist[e, Int[(x*(a + c*x^4)^p)/(d^2 - e^2*x^2), x], x] /; FreeQ[{a, c, d, e}, x] && IntegerQ[p + 1/2]

Rule 2153

Int[((c_) + (d_.)*(x_)^(n_.))^(q_)*((a_) + (b_.)*(x_)^(nn_.))^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^
nn)^p, (c/(c^2 - d^2*x^(2*n)) - (d*x^n)/(c^2 - d^2*x^(2*n)))^(-q), x], x] /; FreeQ[{a, b, c, d, n, nn, p}, x]
&&  !IntegerQ[p] && ILtQ[q, 0] && IGtQ[Log[2, nn/n], 0]

Rule 6728

Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a +
b*x^n + c*x^(2*n)), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int \frac {\left (-1+x^2\right ) \sqrt {1+x^4}}{\left (1-x+x^2\right ) \left (1+x+x^2\right )^2} \, dx &=\int \left (\frac {(1+x) \sqrt {1+x^4}}{4 \left (1-x+x^2\right )}+\frac {(-1-2 x) \sqrt {1+x^4}}{2 \left (1+x+x^2\right )^2}+\frac {(-3-x) \sqrt {1+x^4}}{4 \left (1+x+x^2\right )}\right ) \, dx\\ &=\frac {1}{4} \int \frac {(1+x) \sqrt {1+x^4}}{1-x+x^2} \, dx+\frac {1}{4} \int \frac {(-3-x) \sqrt {1+x^4}}{1+x+x^2} \, dx+\frac {1}{2} \int \frac {(-1-2 x) \sqrt {1+x^4}}{\left (1+x+x^2\right )^2} \, dx\\ &=\frac {1}{4} \int \left (\frac {\left (1-i \sqrt {3}\right ) \sqrt {1+x^4}}{-1-i \sqrt {3}+2 x}+\frac {\left (1+i \sqrt {3}\right ) \sqrt {1+x^4}}{-1+i \sqrt {3}+2 x}\right ) \, dx+\frac {1}{4} \int \left (\frac {\left (-1+\frac {5 i}{\sqrt {3}}\right ) \sqrt {1+x^4}}{1-i \sqrt {3}+2 x}+\frac {\left (-1-\frac {5 i}{\sqrt {3}}\right ) \sqrt {1+x^4}}{1+i \sqrt {3}+2 x}\right ) \, dx+\frac {1}{2} \int \left (-\frac {\sqrt {1+x^4}}{\left (1+x+x^2\right )^2}-\frac {2 x \sqrt {1+x^4}}{\left (1+x+x^2\right )^2}\right ) \, dx\\ &=-\left (\frac {1}{2} \int \frac {\sqrt {1+x^4}}{\left (1+x+x^2\right )^2} \, dx\right )+\frac {1}{4} \left (1-i \sqrt {3}\right ) \int \frac {\sqrt {1+x^4}}{-1-i \sqrt {3}+2 x} \, dx+\frac {1}{4} \left (1+i \sqrt {3}\right ) \int \frac {\sqrt {1+x^4}}{-1+i \sqrt {3}+2 x} \, dx+\frac {1}{12} \left (-3+5 i \sqrt {3}\right ) \int \frac {\sqrt {1+x^4}}{1-i \sqrt {3}+2 x} \, dx-\frac {1}{12} \left (3+5 i \sqrt {3}\right ) \int \frac {\sqrt {1+x^4}}{1+i \sqrt {3}+2 x} \, dx-\int \frac {x \sqrt {1+x^4}}{\left (1+x+x^2\right )^2} \, dx\\ &=\text {rest of steps removed due to Latex formating problem} \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 1.44, size = 350, normalized size = 4.86 \begin {gather*} \frac {1}{8} \left (\frac {4 \sqrt {x^4+1}}{x^2+x+1}-i \sqrt {6+6 i \sqrt {3}} \tanh ^{-1}\left (\frac {2+\left (-1-i \sqrt {3}\right ) x^2}{\sqrt {2+2 i \sqrt {3}} \sqrt {x^4+1}}\right )-\sqrt {2+2 i \sqrt {3}} \tanh ^{-1}\left (\frac {2+\left (-1-i \sqrt {3}\right ) x^2}{\sqrt {2+2 i \sqrt {3}} \sqrt {x^4+1}}\right )+i \sqrt {6-6 i \sqrt {3}} \tanh ^{-1}\left (\frac {2+i \left (\sqrt {3}+i\right ) x^2}{\sqrt {2-2 i \sqrt {3}} \sqrt {x^4+1}}\right )-\sqrt {2-2 i \sqrt {3}} \tanh ^{-1}\left (\frac {2+i \left (\sqrt {3}+i\right ) x^2}{\sqrt {2-2 i \sqrt {3}} \sqrt {x^4+1}}\right )+4 \sqrt [4]{-1} \Pi \left (-\sqrt [6]{-1};\left .i \sinh ^{-1}\left (\sqrt [4]{-1} x\right )\right |-1\right )+4 \sqrt [4]{-1} \Pi \left (-(-1)^{5/6};\left .i \sinh ^{-1}\left (\sqrt [4]{-1} x\right )\right |-1\right )\right )-\frac {1}{2} \sqrt [4]{-1} F\left (\left .i \sinh ^{-1}\left (\sqrt [4]{-1} x\right )\right |-1\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-1/2*((-1)^(1/4)*EllipticF[I*ArcSinh[(-1)^(1/4)*x], -1]) + ((4*Sqrt[1 + x^4])/(1 + x + x^2) - Sqrt[2 + (2*I)*S
qrt[3]]*ArcTanh[(2 + (-1 - I*Sqrt[3])*x^2)/(Sqrt[2 + (2*I)*Sqrt[3]]*Sqrt[1 + x^4])] - I*Sqrt[6 + (6*I)*Sqrt[3]
]*ArcTanh[(2 + (-1 - I*Sqrt[3])*x^2)/(Sqrt[2 + (2*I)*Sqrt[3]]*Sqrt[1 + x^4])] - Sqrt[2 - (2*I)*Sqrt[3]]*ArcTan
h[(2 + I*(I + Sqrt[3])*x^2)/(Sqrt[2 - (2*I)*Sqrt[3]]*Sqrt[1 + x^4])] + I*Sqrt[6 - (6*I)*Sqrt[3]]*ArcTanh[(2 +
I*(I + Sqrt[3])*x^2)/(Sqrt[2 - (2*I)*Sqrt[3]]*Sqrt[1 + x^4])] + 4*(-1)^(1/4)*EllipticPi[-(-1)^(1/6), I*ArcSinh
[(-1)^(1/4)*x], -1] + 4*(-1)^(1/4)*EllipticPi[-(-1)^(5/6), I*ArcSinh[(-1)^(1/4)*x], -1])/8

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 1.62, size = 72, normalized size = 1.00 \begin {gather*} \frac {\sqrt {x^4+1}}{2 \left (x^2+x+1\right )}+\frac {1}{2} \tan ^{-1}\left (\frac {x}{\sqrt {x^4+1}+x^2-x+1}\right )-\frac {3}{2} \tan ^{-1}\left (\frac {x}{\sqrt {x^4+1}+x^2+x+1}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 73, normalized size = 1.01 \begin {gather*} \frac {3 \, {\left (x^{2} + x + 1\right )} \arctan \left (\frac {\sqrt {x^{4} + 1}}{x^{2} + 2 \, x + 1}\right ) + {\left (x^{2} + x + 1\right )} \arctan \left (\frac {\sqrt {x^{4} + 1}}{x^{2} - 2 \, x + 1}\right ) + 2 \, \sqrt {x^{4} + 1}}{4 \, {\left (x^{2} + x + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {x^{4} + 1} {\left (x^{2} - 1\right )}}{{\left (x^{2} + x + 1\right )}^{2} {\left (x^{2} - x + 1\right )}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [C]  time = 0.07, size = 753, normalized size = 10.46

result too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(x^4+1)^(1/2)/(x^2+x+1)+1/2/(1/2*2^(1/2)+1/2*I*2^(1/2))*(1-I*x^2)^(1/2)*(1+I*x^2)^(1/2)/(x^4+1)^(1/2)*Elli
pticF(x*(1/2*2^(1/2)+1/2*I*2^(1/2)),I)-1/3*I*3^(1/2)*(1/2/(1/2-1/2*I*3^(1/2))^(1/2)*arctanh((1/2-1/2*I*3^(1/2)
)^(1/2)*(x^2-1/2-1/2*I*3^(1/2))/(x^4+1)^(1/2))+(-1)^(3/4)*(-1/2+1/2*I*3^(1/2))*(1-I*x^2)^(1/2)*(1+I*x^2)^(1/2)
/(x^4+1)^(1/2)*EllipticPi((-1)^(1/4)*x,-I*(-1/2-1/2*I*3^(1/2)),I))+1/3*I*3^(1/2)*(1/2/(1/2+1/2*I*3^(1/2))^(1/2
)*arctanh((1/2+1/2*I*3^(1/2))^(1/2)*(x^2-1/2+1/2*I*3^(1/2))/(x^4+1)^(1/2))+(-1)^(3/4)*(-1/2-1/2*I*3^(1/2))*(1-
I*x^2)^(1/2)*(1+I*x^2)^(1/2)/(x^4+1)^(1/2)*EllipticPi((-1)^(1/4)*x,-I*(-1/2+1/2*I*3^(1/2)),I))-1/4*(3/2-1/6*I*
3^(1/2))*(1/2/(1/2+1/2*I*3^(1/2))^(1/2)*arctanh((1/2+1/2*I*3^(1/2))^(1/2)*(x^2-1/2+1/2*I*3^(1/2))/(x^4+1)^(1/2
))+(-1)^(3/4)*(-1/2-1/2*I*3^(1/2))*(1-I*x^2)^(1/2)*(1+I*x^2)^(1/2)/(x^4+1)^(1/2)*EllipticPi((-1)^(1/4)*x,-I*(-
1/2+1/2*I*3^(1/2)),I))-1/4*(3/2+1/6*I*3^(1/2))*(1/2/(1/2-1/2*I*3^(1/2))^(1/2)*arctanh((1/2-1/2*I*3^(1/2))^(1/2
)*(x^2-1/2-1/2*I*3^(1/2))/(x^4+1)^(1/2))+(-1)^(3/4)*(-1/2+1/2*I*3^(1/2))*(1-I*x^2)^(1/2)*(1+I*x^2)^(1/2)/(x^4+
1)^(1/2)*EllipticPi((-1)^(1/4)*x,-I*(-1/2-1/2*I*3^(1/2)),I))-1/4*(1/2+1/2*I*3^(1/2))*(-1/2/(1/2-1/2*I*3^(1/2))
^(1/2)*arctanh((-1/2+1/2*I*3^(1/2))*(x^2-1/2-1/2*I*3^(1/2))/(1/2-1/2*I*3^(1/2))^(1/2)/(x^4+1)^(1/2))+(-1)^(3/4
)*(1/2-1/2*I*3^(1/2))*(1-I*x^2)^(1/2)*(1+I*x^2)^(1/2)/(x^4+1)^(1/2)*EllipticPi((-1)^(1/4)*x,I*(1/2+1/2*I*3^(1/
2)),I))-1/4*(1/2-1/2*I*3^(1/2))*(-1/2/(1/2+1/2*I*3^(1/2))^(1/2)*arctanh((-1/2-1/2*I*3^(1/2))*(x^2-1/2+1/2*I*3^
(1/2))/(1/2+1/2*I*3^(1/2))^(1/2)/(x^4+1)^(1/2))+(-1)^(3/4)*(1/2+1/2*I*3^(1/2))*(1-I*x^2)^(1/2)*(1+I*x^2)^(1/2)
/(x^4+1)^(1/2)*EllipticPi((-1)^(1/4)*x,I*(1/2-1/2*I*3^(1/2)),I))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {x^{4} + 1} {\left (x^{2} - 1\right )}}{{\left (x^{2} + x + 1\right )}^{2} {\left (x^{2} - x + 1\right )}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (x^2-1\right )\,\sqrt {x^4+1}}{\left (x^2-x+1\right )\,{\left (x^2+x+1\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (x - 1\right ) \left (x + 1\right ) \sqrt {x^{4} + 1}}{\left (x^{2} - x + 1\right ) \left (x^{2} + x + 1\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________