3.35.15 \(\int \frac {-117+396 x-225 x^2-36 x^3+27 x^4+e^2 (54-198 x+162 x^2-36 x^3)}{4+e^4+e^2 (-4-2 x)+4 x+x^2} \, dx\)

Optimal. Leaf size=22 \[ \frac {9 \left (1-3 x+x^2\right )^2}{2-e^2+x} \]

________________________________________________________________________________________

Rubi [B]  time = 0.10, antiderivative size = 55, normalized size of antiderivative = 2.50, number of steps used = 4, number of rules used = 3, integrand size = 62, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {1986, 27, 1850} \begin {gather*} 9 x^3-9 \left (8-e^2\right ) x^2+9 \left (27-10 e^2+e^4\right ) x+\frac {9 \left (11-7 e^2+e^4\right )^2}{x-e^2+2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-117 + 396*x - 225*x^2 - 36*x^3 + 27*x^4 + E^2*(54 - 198*x + 162*x^2 - 36*x^3))/(4 + E^4 + E^2*(-4 - 2*x)
 + 4*x + x^2),x]

[Out]

9*(27 - 10*E^2 + E^4)*x - 9*(8 - E^2)*x^2 + 9*x^3 + (9*(11 - 7*E^2 + E^4)^2)/(2 - E^2 + 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])

Rule 1986

Int[(Pq_)*(u_)^(p_.), x_Symbol] :> Int[Pq*ExpandToSum[u, x]^p, x] /; FreeQ[p, x] && PolyQ[Pq, x] && QuadraticQ
[u, x] &&  !QuadraticMatchQ[u, x]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-117+396 x-225 x^2-36 x^3+27 x^4+e^2 \left (54-198 x+162 x^2-36 x^3\right )}{\left (-2+e^2\right )^2+2 \left (2-e^2\right ) x+x^2} \, dx\\ &=\int \frac {-117+396 x-225 x^2-36 x^3+27 x^4+e^2 \left (54-198 x+162 x^2-36 x^3\right )}{\left (2-e^2+x\right )^2} \, dx\\ &=\int \left (9 \left (27-10 e^2+e^4\right )-\frac {9 \left (11-7 e^2+e^4\right )^2}{\left (-2+e^2-x\right )^2}+18 \left (-8+e^2\right ) x+27 x^2\right ) \, dx\\ &=9 \left (27-10 e^2+e^4\right ) x-9 \left (8-e^2\right ) x^2+9 x^3+\frac {9 \left (11-7 e^2+e^4\right )^2}{2-e^2+x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B]  time = 0.04, size = 64, normalized size = 2.91 \begin {gather*} -\frac {9 \left (309+4 e^8+148 x+11 x^2-6 x^3+x^4-2 e^6 (25+2 x)+e^4 (226+42 x)-2 e^2 (219+71 x)\right )}{-2+e^2-x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-117 + 396*x - 225*x^2 - 36*x^3 + 27*x^4 + E^2*(54 - 198*x + 162*x^2 - 36*x^3))/(4 + E^4 + E^2*(-4
- 2*x) + 4*x + x^2),x]

[Out]

(-9*(309 + 4*E^8 + 148*x + 11*x^2 - 6*x^3 + x^4 - 2*E^6*(25 + 2*x) + E^4*(226 + 42*x) - 2*E^2*(219 + 71*x)))/(
-2 + E^2 - x)

________________________________________________________________________________________

fricas [B]  time = 0.62, size = 55, normalized size = 2.50 \begin {gather*} \frac {9 \, {\left (x^{4} - 6 \, x^{3} + 11 \, x^{2} - {\left (x + 14\right )} e^{6} + {\left (12 \, x + 71\right )} e^{4} - {\left (47 \, x + 154\right )} e^{2} + 54 \, x + e^{8} + 121\right )}}{x - e^{2} + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-36*x^3+162*x^2-198*x+54)*exp(2)+27*x^4-36*x^3-225*x^2+396*x-117)/(exp(2)^2+(-2*x-4)*exp(2)+x^2+4*
x+4),x, algorithm="fricas")

[Out]

9*(x^4 - 6*x^3 + 11*x^2 - (x + 14)*e^6 + (12*x + 71)*e^4 - (47*x + 154)*e^2 + 54*x + e^8 + 121)/(x - e^2 + 2)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: NotImplementedError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-36*x^3+162*x^2-198*x+54)*exp(2)+27*x^4-36*x^3-225*x^2+396*x-117)/(exp(2)^2+(-2*x-4)*exp(2)+x^2+4*
x+4),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: 9*(sageVARx^3+sageVARx^2*exp(2)-8*sageVA
Rx^2+4*sageVARx*exp(2)^2-10*sageVARx*exp(2)-3*sageVARx*exp(4)+27*sageVARx+(4*exp(2)^3-14*exp(2)^2-4*exp(2)*exp
(4)+14*exp(4))*ln(sag

________________________________________________________________________________________

maple [A]  time = 8.22, size = 32, normalized size = 1.45




method result size



norman \(\frac {-99 x^{2}+54 x^{3}-9 x^{4}+54 \,{\mathrm e}^{2}-117}{{\mathrm e}^{2}-x -2}\) \(32\)
gosper \(\frac {-99 x^{2}+54 x^{3}-9 x^{4}+54 \,{\mathrm e}^{2}-117}{{\mathrm e}^{2}-x -2}\) \(33\)
risch \(9 x \,{\mathrm e}^{4}+9 x^{2} {\mathrm e}^{2}+9 x^{3}-90 \,{\mathrm e}^{2} x -72 x^{2}+243 x -\frac {9 \,{\mathrm e}^{8}}{{\mathrm e}^{2}-x -2}+\frac {126 \,{\mathrm e}^{6}}{{\mathrm e}^{2}-x -2}-\frac {639 \,{\mathrm e}^{4}}{{\mathrm e}^{2}-x -2}+\frac {1386 \,{\mathrm e}^{2}}{{\mathrm e}^{2}-x -2}-\frac {1089}{{\mathrm e}^{2}-x -2}\) \(95\)
meijerg \(-\frac {\left (-36 \,{\mathrm e}^{2}-36\right ) \left ({\mathrm e}^{2}-2\right )^{3} \left (\frac {x \left (-\frac {2 x^{2}}{\left ({\mathrm e}^{2}-2\right )^{2}}-\frac {6 x}{{\mathrm e}^{2}-2}+12\right )}{4 \left ({\mathrm e}^{2}-2\right ) \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )}+3 \ln \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )\right )}{2-{\mathrm e}^{2}}+\frac {\left (162 \,{\mathrm e}^{2}-225\right ) \left ({\mathrm e}^{2}-2\right )^{2} \left (-\frac {x \left (-\frac {3 x}{{\mathrm e}^{2}-2}+6\right )}{3 \left ({\mathrm e}^{2}-2\right ) \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )}-2 \ln \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )\right )}{2-{\mathrm e}^{2}}+\left (-198 \,{\mathrm e}^{2}+396\right ) \left (\frac {x}{\left ({\mathrm e}^{2}-2\right ) \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )}+\ln \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )\right )+\frac {27 \left ({\mathrm e}^{2}-2\right )^{4} \left (-\frac {x \left (-\frac {5 x^{3}}{\left ({\mathrm e}^{2}-2\right )^{3}}-\frac {10 x^{2}}{\left ({\mathrm e}^{2}-2\right )^{2}}-\frac {30 x}{{\mathrm e}^{2}-2}+60\right )}{15 \left ({\mathrm e}^{2}-2\right ) \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )}-4 \ln \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )\right )}{2-{\mathrm e}^{2}}-\frac {54 \,{\mathrm e}^{2} x}{\left (2-{\mathrm e}^{2}\right ) \left ({\mathrm e}^{2}-2\right ) \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )}+\frac {117 x}{\left (2-{\mathrm e}^{2}\right ) \left ({\mathrm e}^{2}-2\right ) \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )}\) \(341\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-36*x^3+162*x^2-198*x+54)*exp(2)+27*x^4-36*x^3-225*x^2+396*x-117)/(exp(2)^2+(-2*x-4)*exp(2)+x^2+4*x+4),x
,method=_RETURNVERBOSE)

[Out]

(-99*x^2+54*x^3-9*x^4+54*exp(2)-117)/(exp(2)-x-2)

________________________________________________________________________________________

maxima [B]  time = 0.79, size = 53, normalized size = 2.41 \begin {gather*} 9 \, x^{3} + 9 \, x^{2} {\left (e^{2} - 8\right )} + 9 \, x {\left (e^{4} - 10 \, e^{2} + 27\right )} + \frac {9 \, {\left (e^{8} - 14 \, e^{6} + 71 \, e^{4} - 154 \, e^{2} + 121\right )}}{x - e^{2} + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-36*x^3+162*x^2-198*x+54)*exp(2)+27*x^4-36*x^3-225*x^2+396*x-117)/(exp(2)^2+(-2*x-4)*exp(2)+x^2+4*
x+4),x, algorithm="maxima")

[Out]

9*x^3 + 9*x^2*(e^2 - 8) + 9*x*(e^4 - 10*e^2 + 27) + 9*(e^8 - 14*e^6 + 71*e^4 - 154*e^2 + 121)/(x - e^2 + 2)

________________________________________________________________________________________

mupad [B]  time = 0.15, size = 73, normalized size = 3.32 \begin {gather*} x\,\left (162\,{\mathrm {e}}^2-27\,{\left ({\mathrm {e}}^2-2\right )}^2+\left (2\,{\mathrm {e}}^2-4\right )\,\left (18\,{\mathrm {e}}^2-144\right )-225\right )+x^2\,\left (9\,{\mathrm {e}}^2-72\right )+\frac {639\,{\mathrm {e}}^4-1386\,{\mathrm {e}}^2-126\,{\mathrm {e}}^6+9\,{\mathrm {e}}^8+1089}{x-{\mathrm {e}}^2+2}+9\,x^3 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(2)*(198*x - 162*x^2 + 36*x^3 - 54) - 396*x + 225*x^2 + 36*x^3 - 27*x^4 + 117)/(4*x + exp(4) + x^2 -
exp(2)*(2*x + 4) + 4),x)

[Out]

x*(162*exp(2) - 27*(exp(2) - 2)^2 + (2*exp(2) - 4)*(18*exp(2) - 144) - 225) + x^2*(9*exp(2) - 72) + (639*exp(4
) - 1386*exp(2) - 126*exp(6) + 9*exp(8) + 1089)/(x - exp(2) + 2) + 9*x^3

________________________________________________________________________________________

sympy [B]  time = 0.32, size = 56, normalized size = 2.55 \begin {gather*} 9 x^{3} + x^{2} \left (-72 + 9 e^{2}\right ) + x \left (- 90 e^{2} + 243 + 9 e^{4}\right ) + \frac {- 126 e^{6} - 1386 e^{2} + 1089 + 9 e^{8} + 639 e^{4}}{x - e^{2} + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-36*x**3+162*x**2-198*x+54)*exp(2)+27*x**4-36*x**3-225*x**2+396*x-117)/(exp(2)**2+(-2*x-4)*exp(2)+
x**2+4*x+4),x)

[Out]

9*x**3 + x**2*(-72 + 9*exp(2)) + x*(-90*exp(2) + 243 + 9*exp(4)) + (-126*exp(6) - 1386*exp(2) + 1089 + 9*exp(8
) + 639*exp(4))/(x - exp(2) + 2)

________________________________________________________________________________________