### 3.79 $$\int \frac{4+x^2+3 x^4+5 x^6}{x (2+3 x^2+x^4)^2} \, dx$$

Optimal. Leaf size=44 $-\frac{12 x^2+11}{2 \left (x^4+3 x^2+2\right )}-\frac{9}{2} \log \left (x^2+1\right )+4 \log \left (x^2+2\right )+\log (x)$

[Out]

-(11 + 12*x^2)/(2*(2 + 3*x^2 + x^4)) + Log[x] - (9*Log[1 + x^2])/2 + 4*Log[2 + x^2]

________________________________________________________________________________________

Rubi [A]  time = 0.0766938, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 31, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.097, Rules used = {1663, 1646, 800} $-\frac{12 x^2+11}{2 \left (x^4+3 x^2+2\right )}-\frac{9}{2} \log \left (x^2+1\right )+4 \log \left (x^2+2\right )+\log (x)$

Antiderivative was successfully veriﬁed.

[In]

Int[(4 + x^2 + 3*x^4 + 5*x^6)/(x*(2 + 3*x^2 + x^4)^2),x]

[Out]

-(11 + 12*x^2)/(2*(2 + 3*x^2 + x^4)) + Log[x] - (9*Log[1 + x^2])/2 + 4*Log[2 + x^2]

Rule 1663

Int[(Pq_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Dist[1/2, Subst[Int[x^((m - 1)/2)
*SubstFor[x^2, Pq, x]*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x^2] && Inte
gerQ[(m - 1)/2]

Rule 1646

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = Polynomi
alQuotient[(d + e*x)^m*Pq, a + b*x + c*x^2, x], f = Coeff[PolynomialRemainder[(d + e*x)^m*Pq, a + b*x + c*x^2,
x], x, 0], g = Coeff[PolynomialRemainder[(d + e*x)^m*Pq, a + b*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2
*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(d
+ e*x)^m*(a + b*x + c*x^2)^(p + 1)*ExpandToSum[((p + 1)*(b^2 - 4*a*c)*Q)/(d + e*x)^m - ((2*p + 3)*(2*c*f - b*
g))/(d + e*x)^m, x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2
- b*d*e + a*e^2, 0] && LtQ[p, -1] && ILtQ[m, 0]

Rule 800

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[Exp
andIntegrand[((d + e*x)^m*(f + g*x))/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 -
4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[m]

Rubi steps

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

Mathematica [A]  time = 0.0215405, size = 44, normalized size = 1. $\frac{-12 x^2-11}{2 \left (x^4+3 x^2+2\right )}-\frac{9}{2} \log \left (x^2+1\right )+4 \log \left (x^2+2\right )+\log (x)$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(4 + x^2 + 3*x^4 + 5*x^6)/(x*(2 + 3*x^2 + x^4)^2),x]

[Out]

(-11 - 12*x^2)/(2*(2 + 3*x^2 + x^4)) + Log[x] - (9*Log[1 + x^2])/2 + 4*Log[2 + x^2]

________________________________________________________________________________________

Maple [A]  time = 0.017, size = 38, normalized size = 0.9 \begin{align*} 4\,\ln \left ({x}^{2}+2 \right ) -{\frac{13}{2\,{x}^{2}+4}}-{\frac{9\,\ln \left ({x}^{2}+1 \right ) }{2}}+{\frac{1}{2\,{x}^{2}+2}}+\ln \left ( x \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int((5*x^6+3*x^4+x^2+4)/x/(x^4+3*x^2+2)^2,x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.0193, size = 59, normalized size = 1.34 \begin{align*} -\frac{12 \, x^{2} + 11}{2 \,{\left (x^{4} + 3 \, x^{2} + 2\right )}} + 4 \, \log \left (x^{2} + 2\right ) - \frac{9}{2} \, \log \left (x^{2} + 1\right ) + \frac{1}{2} \, \log \left (x^{2}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^6+3*x^4+x^2+4)/x/(x^4+3*x^2+2)^2,x, algorithm="maxima")

[Out]

-1/2*(12*x^2 + 11)/(x^4 + 3*x^2 + 2) + 4*log(x^2 + 2) - 9/2*log(x^2 + 1) + 1/2*log(x^2)

________________________________________________________________________________________

Fricas [A]  time = 1.74922, size = 185, normalized size = 4.2 \begin{align*} -\frac{12 \, x^{2} - 8 \,{\left (x^{4} + 3 \, x^{2} + 2\right )} \log \left (x^{2} + 2\right ) + 9 \,{\left (x^{4} + 3 \, x^{2} + 2\right )} \log \left (x^{2} + 1\right ) - 2 \,{\left (x^{4} + 3 \, x^{2} + 2\right )} \log \left (x\right ) + 11}{2 \,{\left (x^{4} + 3 \, x^{2} + 2\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^6+3*x^4+x^2+4)/x/(x^4+3*x^2+2)^2,x, algorithm="fricas")

[Out]

-1/2*(12*x^2 - 8*(x^4 + 3*x^2 + 2)*log(x^2 + 2) + 9*(x^4 + 3*x^2 + 2)*log(x^2 + 1) - 2*(x^4 + 3*x^2 + 2)*log(x
) + 11)/(x^4 + 3*x^2 + 2)

________________________________________________________________________________________

Sympy [A]  time = 0.16426, size = 39, normalized size = 0.89 \begin{align*} - \frac{12 x^{2} + 11}{2 x^{4} + 6 x^{2} + 4} + \log{\left (x \right )} - \frac{9 \log{\left (x^{2} + 1 \right )}}{2} + 4 \log{\left (x^{2} + 2 \right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x**6+3*x**4+x**2+4)/x/(x**4+3*x**2+2)**2,x)

[Out]

-(12*x**2 + 11)/(2*x**4 + 6*x**2 + 4) + log(x) - 9*log(x**2 + 1)/2 + 4*log(x**2 + 2)

________________________________________________________________________________________

Giac [A]  time = 1.08408, size = 63, normalized size = 1.43 \begin{align*} \frac{x^{4} - 21 \, x^{2} - 20}{4 \,{\left (x^{4} + 3 \, x^{2} + 2\right )}} + 4 \, \log \left (x^{2} + 2\right ) - \frac{9}{2} \, \log \left (x^{2} + 1\right ) + \frac{1}{2} \, \log \left (x^{2}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^6+3*x^4+x^2+4)/x/(x^4+3*x^2+2)^2,x, algorithm="giac")

[Out]

1/4*(x^4 - 21*x^2 - 20)/(x^4 + 3*x^2 + 2) + 4*log(x^2 + 2) - 9/2*log(x^2 + 1) + 1/2*log(x^2)