3.48.100 \(\int \frac {-10+6 x+6 x^2+2 x^3+e^4 (-5+2 x+x^2)+(-5+2 x+x^2) \log (3)}{1+2 x+x^2} \, dx\)

Optimal. Leaf size=22 \[ \frac {x \left (5+x^2\right ) \left (3+e^4+x+\log (3)\right )}{x+x^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 28, normalized size of antiderivative = 1.27, number of steps used = 4, number of rules used = 3, integrand size = 49, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {6, 27, 1850} \begin {gather*} (x+1)^2+x \left (e^4+\log (3)\right )+\frac {6 \left (2+e^4+\log (3)\right )}{x+1} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-10 + 6*x + 6*x^2 + 2*x^3 + E^4*(-5 + 2*x + x^2) + (-5 + 2*x + x^2)*Log[3])/(1 + 2*x + x^2),x]

[Out]

(1 + x)^2 + x*(E^4 + Log[3]) + (6*(2 + E^4 + Log[3]))/(1 + x)

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 1850

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[
{a, b, n}, x] && PolyQ[Pq, x] && (IGtQ[p, 0] || EqQ[n, 1])

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-10+6 x+6 x^2+2 x^3+\left (-5+2 x+x^2\right ) \left (e^4+\log (3)\right )}{1+2 x+x^2} \, dx\\ &=\int \frac {-10+6 x+6 x^2+2 x^3+\left (-5+2 x+x^2\right ) \left (e^4+\log (3)\right )}{(1+x)^2} \, dx\\ &=\int \left (e^4+2 (1+x)+\log (3)-\frac {6 \left (2+e^4+\log (3)\right )}{(1+x)^2}\right ) \, dx\\ &=(1+x)^2+x \left (e^4+\log (3)\right )+\frac {6 \left (2+e^4+\log (3)\right )}{1+x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 27, normalized size = 1.23 \begin {gather*} x^2+x \left (2+e^4+\log (3)\right )+\frac {6 \left (2+e^4+\log (3)\right )}{1+x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-10 + 6*x + 6*x^2 + 2*x^3 + E^4*(-5 + 2*x + x^2) + (-5 + 2*x + x^2)*Log[3])/(1 + 2*x + x^2),x]

[Out]

x^2 + x*(2 + E^4 + Log[3]) + (6*(2 + E^4 + Log[3]))/(1 + x)

________________________________________________________________________________________

fricas [A]  time = 0.64, size = 37, normalized size = 1.68 \begin {gather*} \frac {x^{3} + 3 \, x^{2} + {\left (x^{2} + x + 6\right )} e^{4} + {\left (x^{2} + x + 6\right )} \log \relax (3) + 2 \, x + 12}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2+2*x-5)*log(3)+(x^2+2*x-5)*exp(4)+2*x^3+6*x^2+6*x-10)/(x^2+2*x+1),x, algorithm="fricas")

[Out]

(x^3 + 3*x^2 + (x^2 + x + 6)*e^4 + (x^2 + x + 6)*log(3) + 2*x + 12)/(x + 1)

________________________________________________________________________________________

giac [A]  time = 0.13, size = 28, normalized size = 1.27 \begin {gather*} x^{2} + x e^{4} + x \log \relax (3) + 2 \, x + \frac {6 \, {\left (e^{4} + \log \relax (3) + 2\right )}}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2+2*x-5)*log(3)+(x^2+2*x-5)*exp(4)+2*x^3+6*x^2+6*x-10)/(x^2+2*x+1),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.16, size = 30, normalized size = 1.36




method result size



norman \(\frac {x^{3}+\left ({\mathrm e}^{4}+\ln \relax (3)+3\right ) x^{2}+10+5 \,{\mathrm e}^{4}+5 \ln \relax (3)}{x +1}\) \(30\)
default \(x^{2}+2 x +x \,{\mathrm e}^{4}+x \ln \relax (3)-\frac {-12-6 \,{\mathrm e}^{4}-6 \ln \relax (3)}{x +1}\) \(33\)
gosper \(\frac {x^{2} {\mathrm e}^{4}+x^{2} \ln \relax (3)+x^{3}+3 x^{2}+5 \,{\mathrm e}^{4}+5 \ln \relax (3)+10}{x +1}\) \(37\)
risch \(x \,{\mathrm e}^{4}+x \ln \relax (3)+x^{2}+2 x +\frac {6 \,{\mathrm e}^{4}}{x +1}+\frac {6 \ln \relax (3)}{x +1}+\frac {12}{x +1}\) \(41\)
meijerg \(\left ({\mathrm e}^{4}+\ln \relax (3)+6\right ) \left (\frac {x \left (6+3 x \right )}{3 x +3}-2 \ln \left (x +1\right )\right )+\left (2 \,{\mathrm e}^{4}+2 \ln \relax (3)+6\right ) \left (-\frac {x}{x +1}+\ln \left (x +1\right )\right )-\frac {x \left (-2 x^{2}+6 x +12\right )}{2 \left (x +1\right )}+6 \ln \left (x +1\right )-\frac {5 \,{\mathrm e}^{4} x}{x +1}-\frac {5 \ln \relax (3) x}{x +1}-\frac {10 x}{x +1}\) \(105\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^2+2*x-5)*ln(3)+(x^2+2*x-5)*exp(4)+2*x^3+6*x^2+6*x-10)/(x^2+2*x+1),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 25, normalized size = 1.14 \begin {gather*} x^{2} + x {\left (e^{4} + \log \relax (3) + 2\right )} + \frac {6 \, {\left (e^{4} + \log \relax (3) + 2\right )}}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2+2*x-5)*log(3)+(x^2+2*x-5)*exp(4)+2*x^3+6*x^2+6*x-10)/(x^2+2*x+1),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.31, size = 26, normalized size = 1.18 \begin {gather*} x\,\left ({\mathrm {e}}^4+\ln \relax (3)+2\right )+\frac {6\,{\mathrm {e}}^4+\ln \left (729\right )+12}{x+1}+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((6*x + exp(4)*(2*x + x^2 - 5) + 6*x^2 + 2*x^3 + log(3)*(2*x + x^2 - 5) - 10)/(2*x + x^2 + 1),x)

[Out]

x*(exp(4) + log(3) + 2) + (6*exp(4) + log(729) + 12)/(x + 1) + x^2

________________________________________________________________________________________

sympy [A]  time = 0.16, size = 27, normalized size = 1.23 \begin {gather*} x^{2} + x \left (\log {\relax (3 )} + 2 + e^{4}\right ) + \frac {6 \log {\relax (3 )} + 12 + 6 e^{4}}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x**2+2*x-5)*ln(3)+(x**2+2*x-5)*exp(4)+2*x**3+6*x**2+6*x-10)/(x**2+2*x+1),x)

[Out]

x**2 + x*(log(3) + 2 + exp(4)) + (6*log(3) + 12 + 6*exp(4))/(x + 1)

________________________________________________________________________________________