\(\int \frac {10+5 e^{4-x} x^2}{4 x^2+e^2 x^2} \, dx\) [9186]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 30, antiderivative size = 27 \[ \int \frac {10+5 e^{4-x} x^2}{4 x^2+e^2 x^2} \, dx=4-\frac {5 \left (7+e^{4-x}+\frac {2}{x}+\log (4)\right )}{4+e^2} \]

[Out]

4-5*(2/x+7+2*ln(2)+exp(-x+4))/(4+exp(2))

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.07, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {6, 12, 14, 2225} \[ \int \frac {10+5 e^{4-x} x^2}{4 x^2+e^2 x^2} \, dx=-\frac {5 e^{4-x}}{4+e^2}-\frac {10}{\left (4+e^2\right ) x} \]

[In]

Int[(10 + 5*E^(4 - x)*x^2)/(4*x^2 + E^2*x^2),x]

[Out]

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

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2225

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]

Rubi steps \begin{align*} \text {integral}& = \int \frac {10+5 e^{4-x} x^2}{\left (4+e^2\right ) x^2} \, dx \\ & = \frac {\int \frac {10+5 e^{4-x} x^2}{x^2} \, dx}{4+e^2} \\ & = \frac {\int \left (5 e^{4-x}+\frac {10}{x^2}\right ) \, dx}{4+e^2} \\ & = -\frac {10}{\left (4+e^2\right ) x}+\frac {5 \int e^{4-x} \, dx}{4+e^2} \\ & = -\frac {5 e^{4-x}}{4+e^2}-\frac {10}{\left (4+e^2\right ) x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.93 \[ \int \frac {10+5 e^{4-x} x^2}{4 x^2+e^2 x^2} \, dx=-\frac {10+5 e^{4-x} x}{4 x+e^2 x} \]

[In]

Integrate[(10 + 5*E^(4 - x)*x^2)/(4*x^2 + E^2*x^2),x]

[Out]

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

Maple [A] (verified)

Time = 0.84 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85

method result size
parallelrisch \(-\frac {5 x \,{\mathrm e}^{-x +4}+10}{\left (4+{\mathrm e}^{2}\right ) x}\) \(23\)
derivativedivides \(-\frac {5 \,{\mathrm e}^{-x +4}}{4+{\mathrm e}^{2}}-\frac {10}{x \left (4+{\mathrm e}^{2}\right )}\) \(27\)
default \(-\frac {5 \,{\mathrm e}^{-x +4}}{4+{\mathrm e}^{2}}-\frac {10}{x \left (4+{\mathrm e}^{2}\right )}\) \(27\)
risch \(-\frac {5 \,{\mathrm e}^{-x +4}}{4+{\mathrm e}^{2}}-\frac {10}{x \left (4+{\mathrm e}^{2}\right )}\) \(27\)
parts \(-\frac {5 \,{\mathrm e}^{-x +4}}{4+{\mathrm e}^{2}}-\frac {10}{x \left (4+{\mathrm e}^{2}\right )}\) \(27\)
norman \(\frac {-\frac {10}{4+{\mathrm e}^{2}}-\frac {5 x \,{\mathrm e}^{-x +4}}{4+{\mathrm e}^{2}}}{x}\) \(29\)

[In]

int((5*x^2*exp(-x+4)+10)/(x^2*exp(2)+4*x^2),x,method=_RETURNVERBOSE)

[Out]

-(5*x*exp(-x+4)+10)/(4+exp(2))/x

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.81 \[ \int \frac {10+5 e^{4-x} x^2}{4 x^2+e^2 x^2} \, dx=-\frac {5 \, {\left (x e^{\left (-x + 4\right )} + 2\right )}}{x e^{2} + 4 \, x} \]

[In]

integrate((5*x^2*exp(-x+4)+10)/(x^2*exp(2)+4*x^2),x, algorithm="fricas")

[Out]

-5*(x*e^(-x + 4) + 2)/(x*e^2 + 4*x)

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.74 \[ \int \frac {10+5 e^{4-x} x^2}{4 x^2+e^2 x^2} \, dx=- \frac {5 e^{4 - x}}{4 + e^{2}} - \frac {10}{x \left (4 + e^{2}\right )} \]

[In]

integrate((5*x**2*exp(-x+4)+10)/(x**2*exp(2)+4*x**2),x)

[Out]

-5*exp(4 - x)/(4 + exp(2)) - 10/(x*(4 + exp(2)))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \int \frac {10+5 e^{4-x} x^2}{4 x^2+e^2 x^2} \, dx=-\frac {5 \, e^{\left (-x + 4\right )}}{e^{2} + 4} - \frac {10}{x {\left (e^{2} + 4\right )}} \]

[In]

integrate((5*x^2*exp(-x+4)+10)/(x^2*exp(2)+4*x^2),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.41 \[ \int \frac {10+5 e^{4-x} x^2}{4 x^2+e^2 x^2} \, dx=-\frac {5 \, {\left ({\left (x - 4\right )} e^{\left (-x + 4\right )} + 4 \, e^{\left (-x + 4\right )} + 2\right )}}{{\left (x - 4\right )} e^{2} + 4 \, x + 4 \, e^{2}} \]

[In]

integrate((5*x^2*exp(-x+4)+10)/(x^2*exp(2)+4*x^2),x, algorithm="giac")

[Out]

-5*((x - 4)*e^(-x + 4) + 4*e^(-x + 4) + 2)/((x - 4)*e^2 + 4*x + 4*e^2)

Mupad [B] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.81 \[ \int \frac {10+5 e^{4-x} x^2}{4 x^2+e^2 x^2} \, dx=-\frac {5\,x\,{\mathrm {e}}^{4-x}+10}{x\,\left ({\mathrm {e}}^2+4\right )} \]

[In]

int((5*x^2*exp(4 - x) + 10)/(x^2*exp(2) + 4*x^2),x)

[Out]

-(5*x*exp(4 - x) + 10)/(x*(exp(2) + 4))