3.12.53 \(\int \frac {-176-12 x+9 x^2-2 x^3+e^4 (-22+4 x-x^2)}{4-4 x+x^2} \, dx\)

Optimal. Leaf size=18 \[ \frac {(-11+x) x \left (8+e^4+x\right )}{2-x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 29, normalized size of antiderivative = 1.61, number of steps used = 3, number of rules used = 2, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {27, 1850} \begin {gather*} -x^2+\left (1-e^4\right ) x-\frac {18 \left (10+e^4\right )}{2-x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-176 - 12*x + 9*x^2 - 2*x^3 + E^4*(-22 + 4*x - x^2))/(4 - 4*x + x^2),x]

[Out]

(-18*(10 + E^4))/(2 - x) + (1 - E^4)*x - x^2

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 {-176-12 x+9 x^2-2 x^3+e^4 \left (-22+4 x-x^2\right )}{(-2+x)^2} \, dx\\ &=\int \left (1-e^4-\frac {18 \left (10+e^4\right )}{(-2+x)^2}-2 x\right ) \, dx\\ &=-\frac {18 \left (10+e^4\right )}{2-x}+\left (1-e^4\right ) x-x^2\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 30, normalized size = 1.67 \begin {gather*} \frac {18 \left (10+e^4\right )}{-2+x}-\left (3+e^4\right ) (-2+x)-(-2+x)^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-176 - 12*x + 9*x^2 - 2*x^3 + E^4*(-22 + 4*x - x^2))/(4 - 4*x + x^2),x]

[Out]

(18*(10 + E^4))/(-2 + x) - (3 + E^4)*(-2 + x) - (-2 + x)^2

________________________________________________________________________________________

fricas [A]  time = 0.65, size = 31, normalized size = 1.72 \begin {gather*} -\frac {x^{3} - 3 \, x^{2} + {\left (x^{2} - 2 \, x - 18\right )} e^{4} + 2 \, x - 180}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^2+4*x-22)*exp(4)-2*x^3+9*x^2-12*x-176)/(x^2-4*x+4),x, algorithm="fricas")

[Out]

-(x^3 - 3*x^2 + (x^2 - 2*x - 18)*e^4 + 2*x - 180)/(x - 2)

________________________________________________________________________________________

giac [A]  time = 0.35, size = 23, normalized size = 1.28 \begin {gather*} -x^{2} - x e^{4} + x + \frac {18 \, {\left (e^{4} + 10\right )}}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^2+4*x-22)*exp(4)-2*x^3+9*x^2-12*x-176)/(x^2-4*x+4),x, algorithm="giac")

[Out]

-x^2 - x*e^4 + x + 18*(e^4 + 10)/(x - 2)

________________________________________________________________________________________

maple [A]  time = 0.22, size = 26, normalized size = 1.44




method result size



default \(-x^{2}+x -x \,{\mathrm e}^{4}-\frac {-180-18 \,{\mathrm e}^{4}}{x -2}\) \(26\)
gosper \(-\frac {x^{2} {\mathrm e}^{4}+x^{3}-3 x^{2}-22 \,{\mathrm e}^{4}-176}{x -2}\) \(28\)
norman \(\frac {\left (3-{\mathrm e}^{4}\right ) x^{2}-x^{3}+176+22 \,{\mathrm e}^{4}}{x -2}\) \(28\)
risch \(-x \,{\mathrm e}^{4}-x^{2}+x +\frac {18 \,{\mathrm e}^{4}}{x -2}+\frac {180}{x -2}\) \(29\)
meijerg \(-\frac {44 x}{1-\frac {x}{2}}-2 \left (-{\mathrm e}^{4}+9\right ) \left (-\frac {x \left (-\frac {3 x}{2}+6\right )}{6 \left (1-\frac {x}{2}\right )}-2 \ln \left (1-\frac {x}{2}\right )\right )-2 \left (-2 \,{\mathrm e}^{4}+6\right ) \left (\frac {x}{2-x}+\ln \left (1-\frac {x}{2}\right )\right )-\frac {x \left (-\frac {1}{2} x^{2}-3 x +12\right )}{1-\frac {x}{2}}-24 \ln \left (1-\frac {x}{2}\right )-\frac {11 \,{\mathrm e}^{4} x}{2 \left (1-\frac {x}{2}\right )}\) \(109\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-x^2+4*x-22)*exp(4)-2*x^3+9*x^2-12*x-176)/(x^2-4*x+4),x,method=_RETURNVERBOSE)

[Out]

-x^2+x-x*exp(4)-(-180-18*exp(4))/(x-2)

________________________________________________________________________________________

maxima [A]  time = 0.63, size = 24, normalized size = 1.33 \begin {gather*} -x^{2} - x {\left (e^{4} - 1\right )} + \frac {18 \, {\left (e^{4} + 10\right )}}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^2+4*x-22)*exp(4)-2*x^3+9*x^2-12*x-176)/(x^2-4*x+4),x, algorithm="maxima")

[Out]

-x^2 - x*(e^4 - 1) + 18*(e^4 + 10)/(x - 2)

________________________________________________________________________________________

mupad [B]  time = 0.78, size = 25, normalized size = 1.39 \begin {gather*} \frac {18\,{\mathrm {e}}^4+180}{x-2}-x\,\left ({\mathrm {e}}^4-1\right )-x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(12*x + exp(4)*(x^2 - 4*x + 22) - 9*x^2 + 2*x^3 + 176)/(x^2 - 4*x + 4),x)

[Out]

(18*exp(4) + 180)/(x - 2) - x*(exp(4) - 1) - x^2

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 22, normalized size = 1.22 \begin {gather*} - x^{2} - x \left (-1 + e^{4}\right ) - \frac {- 18 e^{4} - 180}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x**2+4*x-22)*exp(4)-2*x**3+9*x**2-12*x-176)/(x**2-4*x+4),x)

[Out]

-x**2 - x*(-1 + exp(4)) - (-18*exp(4) - 180)/(x - 2)

________________________________________________________________________________________