3.6.81 \(\int \frac {-2 e^3+e^x (e^3 x-x^2)}{2 e^3 x-2 x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.25, antiderivative size = 20, normalized size of antiderivative = 0.95, number of steps used = 7, number of rules used = 6, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {1593, 6742, 2194, 36, 31, 29} \begin {gather*} \frac {e^x}{2}+\log \left (e^3-x\right )-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^x/2 + Log[E^3 - x] - Log[x]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 1593

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

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 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 {-2 e^3+e^x \left (e^3 x-x^2\right )}{\left (2 e^3-2 x\right ) x} \, dx\\ &=\int \left (\frac {e^x}{2}-\frac {e^3}{\left (e^3-x\right ) x}\right ) \, dx\\ &=\frac {\int e^x \, dx}{2}-e^3 \int \frac {1}{\left (e^3-x\right ) x} \, dx\\ &=\frac {e^x}{2}-\int \frac {1}{e^3-x} \, dx-\int \frac {1}{x} \, dx\\ &=\frac {e^x}{2}+\log \left (e^3-x\right )-\log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 20, normalized size = 0.95 \begin {gather*} \frac {e^x}{2}+\log \left (e^3-x\right )-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^x/2 + Log[E^3 - x] - Log[x]

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*e^x + log(x - e^3) - log(x)

________________________________________________________________________________________

giac [A]  time = 0.33, size = 16, normalized size = 0.76 \begin {gather*} \frac {1}{2} \, e^{x} + \log \left (x - e^{3}\right ) - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*e^x + log(x - e^3) - log(x)

________________________________________________________________________________________

maple [A]  time = 0.29, size = 17, normalized size = 0.81




method result size



default \(-\ln \relax (x )+\ln \left (x -{\mathrm e}^{3}\right )+\frac {{\mathrm e}^{x}}{2}\) \(17\)
norman \(\frac {{\mathrm e}^{x}}{2}-\ln \relax (x )+\ln \left (-x +{\mathrm e}^{3}\right )\) \(17\)
risch \(-\ln \relax (x )+\ln \left (x -{\mathrm e}^{3}\right )+\frac {{\mathrm e}^{x}}{2}\) \(17\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x*exp(3)-x^2)*exp(x)-2*exp(3))/(2*x*exp(3)-2*x^2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.45, size = 25, normalized size = 1.19 \begin {gather*} {\left (e^{\left (-3\right )} \log \left (x - e^{3}\right ) - e^{\left (-3\right )} \log \relax (x)\right )} e^{3} + \frac {1}{2} \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(e^(-3)*log(x - e^3) - e^(-3)*log(x))*e^3 + 1/2*e^x

________________________________________________________________________________________

mupad [B]  time = 0.15, size = 16, normalized size = 0.76 \begin {gather*} \ln \left (x-{\mathrm {e}}^3\right )+\frac {{\mathrm {e}}^x}{2}-\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(2*exp(3) - exp(x)*(x*exp(3) - x^2))/(2*x*exp(3) - 2*x^2),x)

[Out]

log(x - exp(3)) + exp(x)/2 - log(x)

________________________________________________________________________________________

sympy [A]  time = 0.20, size = 24, normalized size = 1.14 \begin {gather*} \left (- \frac {\log {\relax (x )}}{e^{3}} + \frac {\log {\left (x - e^{3} \right )}}{e^{3}}\right ) e^{3} + \frac {e^{x}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x*exp(3)-x**2)*exp(x)-2*exp(3))/(2*x*exp(3)-2*x**2),x)

[Out]

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

________________________________________________________________________________________