3.368 \(\int \frac {1+x^3+x^6}{x+x^5} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 18, number of rules used = 13, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.812, Rules used = {1593, 1833, 297, 1162, 617, 204, 1165, 628, 1834, 1248, 635, 203, 260} \[ \frac {x^2}{2}+\frac {\log \left (x^2-\sqrt {2} x+1\right )}{4 \sqrt {2}}-\frac {\log \left (x^2+\sqrt {2} x+1\right )}{4 \sqrt {2}}-\frac {1}{4} \log \left (x^4+1\right )-\frac {1}{2} \tan ^{-1}\left (x^2\right )+\log (x)-\frac {\tan ^{-1}\left (1-\sqrt {2} x\right )}{2 \sqrt {2}}+\frac {\tan ^{-1}\left (\sqrt {2} x+1\right )}{2 \sqrt {2}} \]

Antiderivative was successfully verified.

[In]

Int[(1 + x^3 + x^6)/(x + x^5),x]

[Out]

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

Rule 203

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

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 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 297

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[a/b, 2]], s = Denominator[Rt[a/b, 2]]},
Dist[1/(2*s), Int[(r + s*x^2)/(a + b*x^4), x], x] - Dist[1/(2*s), Int[(r - s*x^2)/(a + b*x^4), x], x]] /; Free
Q[{a, b}, x] && (GtQ[a/b, 0] || (PosQ[a/b] && AtomQ[SplitProduct[SumBaseQ, a]] && AtomQ[SplitProduct[SumBaseQ,
 b]]))

Rule 617

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[(a*c)/b^2]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + (2*c*x)/b], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(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]

Rule 635

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

Rule 1162

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

Rule 1165

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

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 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 1833

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Module[{q = Expon[Pq, x], j, k}, Int[
Sum[((c*x)^(m + j)*Sum[Coeff[Pq, x, j + (k*n)/2]*x^((k*n)/2), {k, 0, (2*(q - j))/n + 1}]*(a + b*x^n)^p)/c^j, {
j, 0, n/2 - 1}], x]] /; FreeQ[{a, b, c, m, p}, x] && PolyQ[Pq, x] && IGtQ[n/2, 0] &&  !PolyQ[Pq, x^(n/2)]

Rule 1834

Int[((Pq_)*((c_.)*(x_))^(m_.))/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[ExpandIntegrand[((c*x)^m*Pq)/(a + b*
x^n), x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IntegerQ[n] &&  !IGtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {1+x^3+x^6}{x+x^5} \, dx &=\int \frac {1+x^3+x^6}{x \left (1+x^4\right )} \, dx\\ &=\int \left (\frac {x^2}{1+x^4}+\frac {1+x^6}{x \left (1+x^4\right )}\right ) \, dx\\ &=\int \frac {x^2}{1+x^4} \, dx+\int \frac {1+x^6}{x \left (1+x^4\right )} \, dx\\ &=-\left (\frac {1}{2} \int \frac {1-x^2}{1+x^4} \, dx\right )+\frac {1}{2} \int \frac {1+x^2}{1+x^4} \, dx+\int \left (\frac {1}{x}+x+\frac {x \left (-1-x^2\right )}{1+x^4}\right ) \, dx\\ &=\frac {x^2}{2}+\log (x)+\frac {1}{4} \int \frac {1}{1-\sqrt {2} x+x^2} \, dx+\frac {1}{4} \int \frac {1}{1+\sqrt {2} x+x^2} \, dx+\frac {\int \frac {\sqrt {2}+2 x}{-1-\sqrt {2} x-x^2} \, dx}{4 \sqrt {2}}+\frac {\int \frac {\sqrt {2}-2 x}{-1+\sqrt {2} x-x^2} \, dx}{4 \sqrt {2}}+\int \frac {x \left (-1-x^2\right )}{1+x^4} \, dx\\ &=\frac {x^2}{2}+\log (x)+\frac {\log \left (1-\sqrt {2} x+x^2\right )}{4 \sqrt {2}}-\frac {\log \left (1+\sqrt {2} x+x^2\right )}{4 \sqrt {2}}+\frac {1}{2} \operatorname {Subst}\left (\int \frac {-1-x}{1+x^2} \, dx,x,x^2\right )+\frac {\operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} x\right )}{2 \sqrt {2}}-\frac {\operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\sqrt {2} x\right )}{2 \sqrt {2}}\\ &=\frac {x^2}{2}-\frac {\tan ^{-1}\left (1-\sqrt {2} x\right )}{2 \sqrt {2}}+\frac {\tan ^{-1}\left (1+\sqrt {2} x\right )}{2 \sqrt {2}}+\log (x)+\frac {\log \left (1-\sqrt {2} x+x^2\right )}{4 \sqrt {2}}-\frac {\log \left (1+\sqrt {2} x+x^2\right )}{4 \sqrt {2}}-\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,x^2\right )-\frac {1}{2} \operatorname {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,x^2\right )\\ &=\frac {x^2}{2}-\frac {1}{2} \tan ^{-1}\left (x^2\right )-\frac {\tan ^{-1}\left (1-\sqrt {2} x\right )}{2 \sqrt {2}}+\frac {\tan ^{-1}\left (1+\sqrt {2} x\right )}{2 \sqrt {2}}+\log (x)+\frac {\log \left (1-\sqrt {2} x+x^2\right )}{4 \sqrt {2}}-\frac {\log \left (1+\sqrt {2} x+x^2\right )}{4 \sqrt {2}}-\frac {1}{4} \log \left (1+x^4\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 101, normalized size = 0.90 \[ \frac {1}{8} \left (-2 \log \left (x^4+1\right )+4 x^2+\sqrt {2} \log \left (x^2-\sqrt {2} x+1\right )-\sqrt {2} \log \left (x^2+\sqrt {2} x+1\right )+8 \log (x)-2 \left (\sqrt {2}-2\right ) \tan ^{-1}\left (1-\sqrt {2} x\right )+2 \left (2+\sqrt {2}\right ) \tan ^{-1}\left (\sqrt {2} x+1\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + x^3 + x^6)/(x + x^5),x]

[Out]

(4*x^2 - 2*(-2 + Sqrt[2])*ArcTan[1 - Sqrt[2]*x] + 2*(2 + Sqrt[2])*ArcTan[1 + Sqrt[2]*x] + 8*Log[x] + Sqrt[2]*L
og[1 - Sqrt[2]*x + x^2] - Sqrt[2]*Log[1 + Sqrt[2]*x + x^2] - 2*Log[1 + x^4])/8

________________________________________________________________________________________

fricas [C]  time = 2.41, size = 515, normalized size = 4.60 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^6+x^3+1)/(x^5+x),x, algorithm="fricas")

[Out]

1/2*x^2 - 1/4*(2*sqrt(1/4*I) + I + 1)*log((2*sqrt(1/4*I) + I + 1)^3 - 5*(2*sqrt(1/4*I) + I + 1)^2 + 3*x + 20*s
qrt(1/4*I) + 10*I + 5) - 1/4*(2*sqrt(-1/4*I) - I + 1)*log(-(2*sqrt(1/4*I) + I + 1)^3 - (2*sqrt(1/4*I) + I + 2)
*(2*sqrt(-1/4*I) - I + 1)^2 + 4*(2*sqrt(1/4*I) + I + 1)^2 - ((2*sqrt(1/4*I) + I + 1)^2 - 8*sqrt(1/4*I) - 4*I -
 6)*(2*sqrt(-1/4*I) - I + 1) + 3*x - 16*sqrt(1/4*I) - 8*I - 9) + 1/4*(sqrt(1/4*I) + sqrt(-1/4*I) - 2*sqrt(-3/1
6*(2*sqrt(1/4*I) + I + 1)^2 - 1/8*(2*sqrt(1/4*I) + I - 3)*(2*sqrt(-1/4*I) - I + 1) - 3/16*(2*sqrt(-1/4*I) - I
+ 1)^2 + sqrt(1/4*I) + 1/2*I - 1/2) - 1)*log(1/2*(2*sqrt(1/4*I) + I + 2)*(2*sqrt(-1/4*I) - I + 1)^2 + 1/2*(2*s
qrt(1/4*I) + I + 1)^2 + 1/2*((2*sqrt(1/4*I) + I + 1)^2 - 8*sqrt(1/4*I) - 4*I - 6)*(2*sqrt(-1/4*I) - I + 1) + 2
*sqrt(-3/16*(2*sqrt(1/4*I) + I + 1)^2 - 1/8*(2*sqrt(1/4*I) + I - 3)*(2*sqrt(-1/4*I) - I + 1) - 3/16*(2*sqrt(-1
/4*I) - I + 1)^2 + sqrt(1/4*I) + 1/2*I - 1/2)*((2*sqrt(1/4*I) + I + 2)*(2*sqrt(-1/4*I) - I + 1) + 2*sqrt(1/4*I
) + I - 1) + 3*x - 2*sqrt(1/4*I) - I + 2) + 1/4*(sqrt(1/4*I) + sqrt(-1/4*I) + 2*sqrt(-3/16*(2*sqrt(1/4*I) + I
+ 1)^2 - 1/8*(2*sqrt(1/4*I) + I - 3)*(2*sqrt(-1/4*I) - I + 1) - 3/16*(2*sqrt(-1/4*I) - I + 1)^2 + sqrt(1/4*I)
+ 1/2*I - 1/2) - 1)*log(1/2*(2*sqrt(1/4*I) + I + 2)*(2*sqrt(-1/4*I) - I + 1)^2 + 1/2*(2*sqrt(1/4*I) + I + 1)^2
 + 1/2*((2*sqrt(1/4*I) + I + 1)^2 - 8*sqrt(1/4*I) - 4*I - 6)*(2*sqrt(-1/4*I) - I + 1) - 2*sqrt(-3/16*(2*sqrt(1
/4*I) + I + 1)^2 - 1/8*(2*sqrt(1/4*I) + I - 3)*(2*sqrt(-1/4*I) - I + 1) - 3/16*(2*sqrt(-1/4*I) - I + 1)^2 + sq
rt(1/4*I) + 1/2*I - 1/2)*((2*sqrt(1/4*I) + I + 2)*(2*sqrt(-1/4*I) - I + 1) + 2*sqrt(1/4*I) + I - 1) + 3*x - 2*
sqrt(1/4*I) - I + 2) + log(x)

________________________________________________________________________________________

giac [A]  time = 0.39, size = 92, normalized size = 0.82 \[ \frac {1}{2} \, x^{2} + \frac {1}{4} \, {\left (\sqrt {2} + 2\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x + \sqrt {2}\right )}\right ) + \frac {1}{4} \, {\left (\sqrt {2} - 2\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x - \sqrt {2}\right )}\right ) - \frac {1}{8} \, \sqrt {2} \log \left (x^{2} + \sqrt {2} x + 1\right ) + \frac {1}{8} \, \sqrt {2} \log \left (x^{2} - \sqrt {2} x + 1\right ) - \frac {1}{4} \, \log \left (x^{4} + 1\right ) + \log \left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^6+x^3+1)/(x^5+x),x, algorithm="giac")

[Out]

1/2*x^2 + 1/4*(sqrt(2) + 2)*arctan(1/2*sqrt(2)*(2*x + sqrt(2))) + 1/4*(sqrt(2) - 2)*arctan(1/2*sqrt(2)*(2*x -
sqrt(2))) - 1/8*sqrt(2)*log(x^2 + sqrt(2)*x + 1) + 1/8*sqrt(2)*log(x^2 - sqrt(2)*x + 1) - 1/4*log(x^4 + 1) + l
og(abs(x))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 79, normalized size = 0.71 \[ \frac {x^{2}}{2}-\frac {\arctan \left (x^{2}\right )}{2}+\frac {\sqrt {2}\, \arctan \left (\sqrt {2}\, x -1\right )}{4}+\frac {\sqrt {2}\, \arctan \left (\sqrt {2}\, x +1\right )}{4}+\ln \relax (x )+\frac {\sqrt {2}\, \ln \left (\frac {x^{2}-\sqrt {2}\, x +1}{x^{2}+\sqrt {2}\, x +1}\right )}{8}-\frac {\ln \left (x^{4}+1\right )}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^6+x^3+1)/(x^5+x),x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 2.06, size = 99, normalized size = 0.88 \[ \frac {1}{4} \, \sqrt {2} {\left (\sqrt {2} + 1\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x + \sqrt {2}\right )}\right ) - \frac {1}{4} \, \sqrt {2} {\left (\sqrt {2} - 1\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x - \sqrt {2}\right )}\right ) - \frac {1}{8} \, \sqrt {2} {\left (\sqrt {2} + 1\right )} \log \left (x^{2} + \sqrt {2} x + 1\right ) - \frac {1}{8} \, \sqrt {2} {\left (\sqrt {2} - 1\right )} \log \left (x^{2} - \sqrt {2} x + 1\right ) + \frac {1}{2} \, x^{2} + \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^6+x^3+1)/(x^5+x),x, algorithm="maxima")

[Out]

1/4*sqrt(2)*(sqrt(2) + 1)*arctan(1/2*sqrt(2)*(2*x + sqrt(2))) - 1/4*sqrt(2)*(sqrt(2) - 1)*arctan(1/2*sqrt(2)*(
2*x - sqrt(2))) - 1/8*sqrt(2)*(sqrt(2) + 1)*log(x^2 + sqrt(2)*x + 1) - 1/8*sqrt(2)*(sqrt(2) - 1)*log(x^2 - sqr
t(2)*x + 1) + 1/2*x^2 + log(x)

________________________________________________________________________________________

mupad [B]  time = 2.23, size = 170, normalized size = 1.52 \[ \ln \relax (x)+\left (\sum _{k=1}^4\ln \left (\mathrm {root}\left (z^4+z^3+\frac {z^2}{2}+\frac {z}{16}+\frac {1}{256},z,k\right )\,\left (8\,\mathrm {root}\left (z^4+z^3+\frac {z^2}{2}+\frac {z}{16}+\frac {1}{256},z,k\right )+x+\mathrm {root}\left (z^4+z^3+\frac {z^2}{2}+\frac {z}{16}+\frac {1}{256},z,k\right )\,x\,96+{\mathrm {root}\left (z^4+z^3+\frac {z^2}{2}+\frac {z}{16}+\frac {1}{256},z,k\right )}^2\,x\,240+{\mathrm {root}\left (z^4+z^3+\frac {z^2}{2}+\frac {z}{16}+\frac {1}{256},z,k\right )}^3\,x\,320-16\,{\mathrm {root}\left (z^4+z^3+\frac {z^2}{2}+\frac {z}{16}+\frac {1}{256},z,k\right )}^2+8\right )\right )\,\mathrm {root}\left (z^4+z^3+\frac {z^2}{2}+\frac {z}{16}+\frac {1}{256},z,k\right )\right )+\frac {x^2}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^3 + x^6 + 1)/(x + x^5),x)

[Out]

log(x) + symsum(log(root(z^4 + z^3 + z^2/2 + z/16 + 1/256, z, k)*(8*root(z^4 + z^3 + z^2/2 + z/16 + 1/256, z,
k) + x + 96*root(z^4 + z^3 + z^2/2 + z/16 + 1/256, z, k)*x + 240*root(z^4 + z^3 + z^2/2 + z/16 + 1/256, z, k)^
2*x + 320*root(z^4 + z^3 + z^2/2 + z/16 + 1/256, z, k)^3*x - 16*root(z^4 + z^3 + z^2/2 + z/16 + 1/256, z, k)^2
 + 8))*root(z^4 + z^3 + z^2/2 + z/16 + 1/256, z, k), k, 1, 4) + x^2/2

________________________________________________________________________________________

sympy [A]  time = 0.96, size = 61, normalized size = 0.54 \[ \frac {x^{2}}{2} + \log {\relax (x )} + \operatorname {RootSum} {\left (256 t^{4} + 256 t^{3} + 128 t^{2} + 16 t + 1, \left (t \mapsto t \log {\left (\frac {1792 t^{4}}{73} + \frac {704 t^{3}}{219} - \frac {3152 t^{2}}{219} - \frac {2584 t}{219} + x - \frac {344}{219} \right )} \right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**6+x**3+1)/(x**5+x),x)

[Out]

x**2/2 + log(x) + RootSum(256*_t**4 + 256*_t**3 + 128*_t**2 + 16*_t + 1, Lambda(_t, _t*log(1792*_t**4/73 + 704
*_t**3/219 - 3152*_t**2/219 - 2584*_t/219 + x - 344/219)))

________________________________________________________________________________________