3.12.40 \(\int \frac {e^{4+9 x+x^2-x \log (4)-x \log (2-x)} (-18+4 x+2 x^2+(2-x) \log (4)+(2-x) \log (2-x))}{-2+x} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.45, antiderivative size = 25, normalized size of antiderivative = 0.86, number of steps used = 1, number of rules used = 1, integrand size = 60, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.017, Rules used = {6706} \begin {gather*} 4^{-x} e^{x^2+9 x+4} (2-x)^{-x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^(4 + 9*x + x^2 - x*Log[4] - x*Log[2 - x])*(-18 + 4*x + 2*x^2 + (2 - x)*Log[4] + (2 - x)*Log[2 - x]))/(-
2 + x),x]

[Out]

E^(4 + 9*x + x^2)/(4^x*(2 - x)^x)

Rule 6706

Int[(F_)^(v_)*(u_), x_Symbol] :> With[{q = DerivativeDivides[v, u, x]}, Simp[(q*F^v)/Log[F], x] /;  !FalseQ[q]
] /; FreeQ[F, x]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=4^{-x} e^{4+9 x+x^2} (2-x)^{-x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 1.78, size = 20, normalized size = 0.69 \begin {gather*} e^{4+9 x+x^2} (8-4 x)^{-x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(E^(4 + 9*x + x^2 - x*Log[4] - x*Log[2 - x])*(-18 + 4*x + 2*x^2 + (2 - x)*Log[4] + (2 - x)*Log[2 - x
]))/(-2 + x),x]

[Out]

E^(4 + 9*x + x^2)/(8 - 4*x)^x

________________________________________________________________________________________

fricas [A]  time = 1.06, size = 23, normalized size = 0.79 \begin {gather*} e^{\left (x^{2} - 2 \, x \log \relax (2) - x \log \left (-x + 2\right ) + 9 \, x + 4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2-x)*log(2-x)+2*(2-x)*log(2)+2*x^2+4*x-18)*exp(-x*log(2-x)-2*x*log(2)+x^2+9*x+4)/(x-2),x, algorith
m="fricas")

[Out]

e^(x^2 - 2*x*log(2) - x*log(-x + 2) + 9*x + 4)

________________________________________________________________________________________

giac [A]  time = 0.50, size = 23, normalized size = 0.79 \begin {gather*} e^{\left (x^{2} - 2 \, x \log \relax (2) - x \log \left (-x + 2\right ) + 9 \, x + 4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2-x)*log(2-x)+2*(2-x)*log(2)+2*x^2+4*x-18)*exp(-x*log(2-x)-2*x*log(2)+x^2+9*x+4)/(x-2),x, algorith
m="giac")

[Out]

e^(x^2 - 2*x*log(2) - x*log(-x + 2) + 9*x + 4)

________________________________________________________________________________________

maple [A]  time = 0.20, size = 23, normalized size = 0.79




method result size



risch \(\left (2-x \right )^{-x} \left (\frac {1}{4}\right )^{x} {\mathrm e}^{x^{2}+9 x +4}\) \(23\)
norman \({\mathrm e}^{-x \ln \left (2-x \right )-2 x \ln \relax (2)+x^{2}+9 x +4}\) \(24\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((2-x)*ln(2-x)+2*(2-x)*ln(2)+2*x^2+4*x-18)*exp(-x*ln(2-x)-2*x*ln(2)+x^2+9*x+4)/(x-2),x,method=_RETURNVERBO
SE)

[Out]

(2-x)^(-x)*(1/4)^x*exp(x^2+9*x+4)

________________________________________________________________________________________

maxima [A]  time = 0.99, size = 23, normalized size = 0.79 \begin {gather*} e^{\left (x^{2} - 2 \, x \log \relax (2) - x \log \left (-x + 2\right ) + 9 \, x + 4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2-x)*log(2-x)+2*(2-x)*log(2)+2*x^2+4*x-18)*exp(-x*log(2-x)-2*x*log(2)+x^2+9*x+4)/(x-2),x, algorith
m="maxima")

[Out]

e^(x^2 - 2*x*log(2) - x*log(-x + 2) + 9*x + 4)

________________________________________________________________________________________

mupad [B]  time = 1.10, size = 27, normalized size = 0.93 \begin {gather*} \frac {{\mathrm {e}}^{9\,x}\,{\mathrm {e}}^{x^2}\,{\mathrm {e}}^4}{2^{2\,x}\,{\left (2-x\right )}^x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(9*x - 2*x*log(2) - x*log(2 - x) + x^2 + 4)*(2*log(2)*(x - 2) - 4*x - 2*x^2 + log(2 - x)*(x - 2) + 18
))/(x - 2),x)

[Out]

(exp(9*x)*exp(x^2)*exp(4))/(2^(2*x)*(2 - x)^x)

________________________________________________________________________________________

sympy [A]  time = 0.38, size = 22, normalized size = 0.76 \begin {gather*} e^{x^{2} - x \log {\left (2 - x \right )} - 2 x \log {\relax (2 )} + 9 x + 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2-x)*ln(2-x)+2*(2-x)*ln(2)+2*x**2+4*x-18)*exp(-x*ln(2-x)-2*x*ln(2)+x**2+9*x+4)/(x-2),x)

[Out]

exp(x**2 - x*log(2 - x) - 2*x*log(2) + 9*x + 4)

________________________________________________________________________________________