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

Optimal. Leaf size=112 \[ \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}} \]

[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

________________________________________________________________________________________

Rubi [A]  time = 0.114055, antiderivative size = 112, normalized size of antiderivative = 1., 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 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 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 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 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 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 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 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 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]

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 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 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 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]

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.0507398, size = 101, normalized size = 0.9 \[ \frac{1}{8} \left (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 )-2 \log \left (x^4+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

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 79, normalized size = 0.7 \begin{align*}{\frac{{x}^{2}}{2}}+\ln \left ( x \right ) -{\frac{\arctan \left ({x}^{2} \right ) }{2}}+{\frac{\arctan \left ( 1+x\sqrt{2} \right ) \sqrt{2}}{4}}+{\frac{\arctan \left ( -1+x\sqrt{2} \right ) \sqrt{2}}{4}}+{\frac{\sqrt{2}}{8}\ln \left ({\frac{1+{x}^{2}-x\sqrt{2}}{1+{x}^{2}+x\sqrt{2}}} \right ) }-{\frac{\ln \left ({x}^{4}+1 \right ) }{4}} \end{align*}

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+ln(x)-1/2*arctan(x^2)+1/4*arctan(1+x*2^(1/2))*2^(1/2)+1/4*arctan(-1+x*2^(1/2))*2^(1/2)+1/8*2^(1/2)*ln(
(1+x^2-x*2^(1/2))/(1+x^2+x*2^(1/2)))-1/4*ln(x^4+1)

________________________________________________________________________________________

Maxima [A]  time = 1.71442, size = 134, normalized size = 1.2 \begin{align*} \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 \left (x\right ) \end{align*}

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)

________________________________________________________________________________________

Fricas [C]  time = 9.76508, size = 2269, normalized size = 20.26 \begin{align*} \text{result too large to display} \end{align*}

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)

________________________________________________________________________________________

Sympy [A]  time = 0.782248, size = 61, normalized size = 0.54 \begin{align*} \frac{x^{2}}{2} + \log{\left (x \right )} + \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 )} \end{align*}

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)))

________________________________________________________________________________________

Giac [A]  time = 1.28067, size = 124, normalized size = 1.11 \begin{align*} \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 ) \end{align*}

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))