3.26.94 \(\int \frac {16-8 x+x^2+e^{3 x} (-13 x+3 x^2)}{16 x-8 x^2+x^3} \, dx\) [2594]

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

[Out]

exp(3*x)/(x-4)+4-exp(2)+ln(x/exp(4)-x)

________________________________________________________________________________________

Rubi [A]
time = 0.18, antiderivative size = 17, normalized size of antiderivative = 0.61, number of steps used = 5, number of rules used = 4, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {1608, 27, 6874, 2228} \begin {gather*} \log (x)-\frac {e^{3 x}}{4-x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(16 - 8*x + x^2 + E^(3*x)*(-13*x + 3*x^2))/(16*x - 8*x^2 + x^3),x]

[Out]

-(E^(3*x)/(4 - x)) + Log[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 1608

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 2228

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[g*u^(m + 1)*(F^(c*v)/(b*c*
e*Log[F])), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rule 6874

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.23, size = 14, normalized size = 0.50 \begin {gather*} \frac {e^{3 x}}{-4+x}+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(16 - 8*x + x^2 + E^(3*x)*(-13*x + 3*x^2))/(16*x - 8*x^2 + x^3),x]

[Out]

E^(3*x)/(-4 + x) + Log[x]

________________________________________________________________________________________

Maple [A]
time = 0.24, size = 19, normalized size = 0.68

method result size
norman \(\frac {{\mathrm e}^{3 x}}{x -4}+\ln \left (x \right )\) \(14\)
risch \(\frac {{\mathrm e}^{3 x}}{x -4}+\ln \left (x \right )\) \(14\)
derivativedivides \(\ln \left (3 x \right )+\frac {3 \,{\mathrm e}^{3 x}}{3 x -12}\) \(19\)
default \(\ln \left (3 x \right )+\frac {3 \,{\mathrm e}^{3 x}}{3 x -12}\) \(19\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((3*x^2-13*x)*exp(3*x)+x^2-8*x+16)/(x^3-8*x^2+16*x),x,method=_RETURNVERBOSE)

[Out]

ln(3*x)+3*exp(3*x)/(3*x-12)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x^2-13*x)*exp(3*x)+x^2-8*x+16)/(x^3-8*x^2+16*x),x, algorithm="maxima")

[Out]

x*e^(3*x)/(x^2 - 8*x + 16) + 13*e^12*exp_integral_e(2, -3*x + 12)/(x - 4) + 3*integrate(1/3*(x + 4)*e^(3*x)/(x
^3 - 12*x^2 + 48*x - 64), x) + log(x)

________________________________________________________________________________________

Fricas [A]
time = 0.33, size = 17, normalized size = 0.61 \begin {gather*} \frac {{\left (x - 4\right )} \log \left (x\right ) + e^{\left (3 \, x\right )}}{x - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x^2-13*x)*exp(3*x)+x^2-8*x+16)/(x^3-8*x^2+16*x),x, algorithm="fricas")

[Out]

((x - 4)*log(x) + e^(3*x))/(x - 4)

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 10, normalized size = 0.36 \begin {gather*} \log {\left (x \right )} + \frac {e^{3 x}}{x - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x**2-13*x)*exp(3*x)+x**2-8*x+16)/(x**3-8*x**2+16*x),x)

[Out]

log(x) + exp(3*x)/(x - 4)

________________________________________________________________________________________

Giac [A]
time = 0.39, size = 19, normalized size = 0.68 \begin {gather*} \frac {x \log \left (x\right ) + e^{\left (3 \, x\right )} - 4 \, \log \left (x\right )}{x - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x^2-13*x)*exp(3*x)+x^2-8*x+16)/(x^3-8*x^2+16*x),x, algorithm="giac")

[Out]

(x*log(x) + e^(3*x) - 4*log(x))/(x - 4)

________________________________________________________________________________________

Mupad [B]
time = 0.08, size = 13, normalized size = 0.46 \begin {gather*} \ln \left (x\right )+\frac {{\mathrm {e}}^{3\,x}}{x-4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(8*x + exp(3*x)*(13*x - 3*x^2) - x^2 - 16)/(16*x - 8*x^2 + x^3),x)

[Out]

log(x) + exp(3*x)/(x - 4)

________________________________________________________________________________________