3.32.71 \(\int \frac {27+4 e^{-\frac {1}{-3+x}}-18 x+3 x^2+e^x (144-96 x+16 x^2)}{9-6 x+x^2} \, dx\)

Optimal. Leaf size=28 \[ -4-x+4 \left (16 e^{25}+e^{\frac {1}{3-x}}+4 e^x+x\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.23, antiderivative size = 20, normalized size of antiderivative = 0.71, number of steps used = 9, number of rules used = 5, integrand size = 46, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.109, Rules used = {27, 6742, 2194, 2209, 43} \begin {gather*} 3 x+16 e^x+4 e^{\frac {1}{3-x}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(27 + 4/E^(-3 + x)^(-1) - 18*x + 3*x^2 + E^x*(144 - 96*x + 16*x^2))/(9 - 6*x + x^2),x]

[Out]

4*E^(3 - x)^(-1) + 16*E^x + 3*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 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2209

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[((e + f*x)^n*
F^(a + b*(c + d*x)^n))/(b*f*n*(c + d*x)^n*Log[F]), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {27+4 e^{-\frac {1}{-3+x}}-18 x+3 x^2+e^x \left (144-96 x+16 x^2\right )}{(-3+x)^2} \, dx\\ &=\int \left (16 e^x+\frac {27}{(-3+x)^2}+\frac {4 e^{\frac {1}{3-x}}}{(-3+x)^2}-\frac {18 x}{(-3+x)^2}+\frac {3 x^2}{(-3+x)^2}\right ) \, dx\\ &=\frac {27}{3-x}+3 \int \frac {x^2}{(-3+x)^2} \, dx+4 \int \frac {e^{\frac {1}{3-x}}}{(-3+x)^2} \, dx+16 \int e^x \, dx-18 \int \frac {x}{(-3+x)^2} \, dx\\ &=4 e^{\frac {1}{3-x}}+16 e^x+\frac {27}{3-x}+3 \int \left (1+\frac {9}{(-3+x)^2}+\frac {6}{-3+x}\right ) \, dx-18 \int \left (\frac {3}{(-3+x)^2}+\frac {1}{-3+x}\right ) \, dx\\ &=4 e^{\frac {1}{3-x}}+16 e^x+3 x\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 20, normalized size = 0.71 \begin {gather*} 4 e^{\frac {1}{3-x}}+16 e^x+3 x \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(27 + 4/E^(-3 + x)^(-1) - 18*x + 3*x^2 + E^x*(144 - 96*x + 16*x^2))/(9 - 6*x + x^2),x]

[Out]

4*E^(3 - x)^(-1) + 16*E^x + 3*x

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 18, normalized size = 0.64 \begin {gather*} 3 \, x + 16 \, e^{x} + 4 \, e^{\left (-\frac {1}{x - 3}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((16*x^2-96*x+144)*exp(x)+4*exp(-1/(x-3))+3*x^2-18*x+27)/(x^2-6*x+9),x, algorithm="fricas")

[Out]

3*x + 16*e^x + 4*e^(-1/(x - 3))

________________________________________________________________________________________

giac [A]  time = 0.24, size = 18, normalized size = 0.64 \begin {gather*} 3 \, x + 16 \, e^{x} + 4 \, e^{\left (-\frac {1}{x - 3}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((16*x^2-96*x+144)*exp(x)+4*exp(-1/(x-3))+3*x^2-18*x+27)/(x^2-6*x+9),x, algorithm="giac")

[Out]

3*x + 16*e^x + 4*e^(-1/(x - 3))

________________________________________________________________________________________

maple [A]  time = 0.57, size = 19, normalized size = 0.68




method result size



default \(3 x +16 \,{\mathrm e}^{x}+4 \,{\mathrm e}^{-\frac {1}{x -3}}\) \(19\)
risch \(3 x +16 \,{\mathrm e}^{x}+4 \,{\mathrm e}^{-\frac {1}{x -3}}\) \(19\)
norman \(\frac {3 x^{2}+4 x \,{\mathrm e}^{-\frac {1}{x -3}}+16 \,{\mathrm e}^{x} x -48 \,{\mathrm e}^{x}-12 \,{\mathrm e}^{-\frac {1}{x -3}}-27}{x -3}\) \(44\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((16*x^2-96*x+144)*exp(x)+4*exp(-1/(x-3))+3*x^2-18*x+27)/(x^2-6*x+9),x,method=_RETURNVERBOSE)

[Out]

3*x+4/exp(1/(x-3))+16*exp(x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} 3 \, x + \frac {16 \, {\left (x^{2} - 6 \, x\right )} e^{x}}{x^{2} - 6 \, x + 9} - \frac {144 \, e^{3} E_{2}\left (-x + 3\right )}{x - 3} + 4 \, e^{\left (-\frac {1}{x - 3}\right )} - 288 \, \int \frac {e^{x}}{x^{3} - 9 \, x^{2} + 27 \, x - 27}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((16*x^2-96*x+144)*exp(x)+4*exp(-1/(x-3))+3*x^2-18*x+27)/(x^2-6*x+9),x, algorithm="maxima")

[Out]

3*x + 16*(x^2 - 6*x)*e^x/(x^2 - 6*x + 9) - 144*e^3*exp_integral_e(2, -x + 3)/(x - 3) + 4*e^(-1/(x - 3)) - 288*
integrate(e^x/(x^3 - 9*x^2 + 27*x - 27), x)

________________________________________________________________________________________

mupad [B]  time = 0.19, size = 18, normalized size = 0.64 \begin {gather*} 3\,x+16\,{\mathrm {e}}^x+4\,{\mathrm {e}}^{-\frac {1}{x-3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((4*exp(-1/(x - 3)) - 18*x + exp(x)*(16*x^2 - 96*x + 144) + 3*x^2 + 27)/(x^2 - 6*x + 9),x)

[Out]

3*x + 16*exp(x) + 4*exp(-1/(x - 3))

________________________________________________________________________________________

sympy [A]  time = 0.20, size = 15, normalized size = 0.54 \begin {gather*} 3 x + 16 e^{x} + 4 e^{- \frac {1}{x - 3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((16*x**2-96*x+144)*exp(x)+4*exp(-1/(x-3))+3*x**2-18*x+27)/(x**2-6*x+9),x)

[Out]

3*x + 16*exp(x) + 4*exp(-1/(x - 3))

________________________________________________________________________________________