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\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.29, 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 = {1594, 27, 6742, 2197} \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 1594

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 2197

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 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 {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.10, 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]

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 17, normalized size = 0.61 \begin {gather*} \frac {{\left (x - 4\right )} \log \relax (x) + 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)

________________________________________________________________________________________

giac [A]  time = 3.22, size = 19, normalized size = 0.68 \begin {gather*} \frac {x \log \relax (x) + e^{\left (3 \, x\right )} - 4 \, \log \relax (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, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 14, normalized size = 0.50




method result size



norman \(\frac {{\mathrm e}^{3 x}}{x -4}+\ln \relax (x )\) \(14\)
risch \(\frac {{\mathrm e}^{3 x}}{x -4}+\ln \relax (x )\) \(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]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {x e^{\left (3 \, x\right )}}{x^{2} - 8 \, x + 16} + \frac {13 \, e^{12} E_{2}\left (-3 \, x + 12\right )}{x - 4} + 3 \, \int \frac {{\left (x + 4\right )} e^{\left (3 \, x\right )}}{3 \, {\left (x^{3} - 12 \, x^{2} + 48 \, x - 64\right )}}\,{d x} + \log \relax (x) \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)

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 13, normalized size = 0.46 \begin {gather*} \ln \relax (x)+\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)

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 10, normalized size = 0.36 \begin {gather*} \log {\relax (x )} + \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)

________________________________________________________________________________________