### 3.277 $$\int \frac{1+x+x^3}{4 x+2 x^2+x^4} \, dx$$

Optimal. Leaf size=17 $\frac{1}{4} \log \left (x^4+2 x^2+4 x\right )$

[Out]

Log[4*x + 2*x^2 + x^4]/4

________________________________________________________________________________________

Rubi [A]  time = 0.0092228, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 21, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.048, Rules used = {1587} $\frac{1}{4} \log \left (x^4+2 x^2+4 x\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

Log[4*x + 2*x^2 + x^4]/4

Rule 1587

Int[(Pp_)/(Qq_), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[(Coeff[Pp, x, p]*Log[RemoveConte
nt[Qq, x]])/(q*Coeff[Qq, x, q]), x] /; EqQ[p, q - 1] && EqQ[Pp, Simplify[(Coeff[Pp, x, p]*D[Qq, x])/(q*Coeff[Q
q, x, q])]]] /; PolyQ[Pp, x] && PolyQ[Qq, x]

Rubi steps

\begin{align*} \int \frac{1+x+x^3}{4 x+2 x^2+x^4} \, dx &=\frac{1}{4} \log \left (4 x+2 x^2+x^4\right )\\ \end{align*}

Mathematica [A]  time = 0.005459, size = 20, normalized size = 1.18 $\frac{1}{4} \log \left (x^3+2 x+4\right )+\frac{\log (x)}{4}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

Log[x]/4 + Log[4 + 2*x + x^3]/4

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 14, normalized size = 0.8 \begin{align*}{\frac{\ln \left ( x \left ({x}^{3}+2\,x+4 \right ) \right ) }{4}} \end{align*}

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

[In]

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

[Out]

1/4*ln(x*(x^3+2*x+4))

________________________________________________________________________________________

Maxima [A]  time = 0.937277, size = 20, normalized size = 1.18 \begin{align*} \frac{1}{4} \, \log \left (x^{4} + 2 \, x^{2} + 4 \, x\right ) \end{align*}

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

[In]

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

[Out]

1/4*log(x^4 + 2*x^2 + 4*x)

________________________________________________________________________________________

Fricas [A]  time = 1.88942, size = 38, normalized size = 2.24 \begin{align*} \frac{1}{4} \, \log \left (x^{4} + 2 \, x^{2} + 4 \, x\right ) \end{align*}

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

[In]

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

[Out]

1/4*log(x^4 + 2*x^2 + 4*x)

________________________________________________________________________________________

Sympy [A]  time = 0.091942, size = 14, normalized size = 0.82 \begin{align*} \frac{\log{\left (x^{4} + 2 x^{2} + 4 x \right )}}{4} \end{align*}

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

[In]

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

[Out]

log(x**4 + 2*x**2 + 4*x)/4

________________________________________________________________________________________

Giac [A]  time = 1.06831, size = 24, normalized size = 1.41 \begin{align*} \frac{1}{4} \, \log \left ({\left | x^{3} + 2 \, x + 4 \right |}\right ) + \frac{1}{4} \, \log \left ({\left | x \right |}\right ) \end{align*}

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

[In]

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

[Out]

1/4*log(abs(x^3 + 2*x + 4)) + 1/4*log(abs(x))