3.80.62 \(\int \frac {e^{8-2 x} (1+x^2)+e^{4-x} (-2-x) \log (4)+\log ^2(4)}{e^{8-2 x} x^2-2 e^{4-x} x \log (4)+\log ^2(4)} \, dx\)

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

________________________________________________________________________________________

Rubi [F]  time = 3.91, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {e^{8-2 x} \left (1+x^2\right )+e^{4-x} (-2-x) \log (4)+\log ^2(4)}{e^{8-2 x} x^2-2 e^{4-x} x \log (4)+\log ^2(4)} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Int[(E^(8 - 2*x)*(1 + x^2) + E^(4 - x)*(-2 - x)*Log[4] + Log[4]^2)/(E^(8 - 2*x)*x^2 - 2*E^(4 - x)*x*Log[4] + L
og[4]^2),x]

[Out]

-x^(-1) + x - (E^(-4 + x)*Log[4])/x^2 + (E^(-4 + x)*Log[4])/x + Log[4]^2*Defer[Int][E^(2*x)/(E^4*x - E^x*Log[4
])^2, x] + Log[4]^2*Defer[Int][E^(2*x)/(x^2*(E^4*x - E^x*Log[4])^2), x] - 2*Log[4]^2*Defer[Int][E^(2*x)/(x*(E^
4*x - E^x*Log[4])^2), x] + 2*Log[4]^2*Defer[Int][E^(-4 + 2*x)/(x^3*(E^4*x - E^x*Log[4])), x] - 2*Log[4]^2*Defe
r[Int][E^(-4 + 2*x)/(x^2*(E^4*x - E^x*Log[4])), x] + Log[4]^2*Defer[Int][E^(-4 + 2*x)/(x*(E^4*x - E^x*Log[4]))
, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.27, size = 24, normalized size = 0.86 \begin {gather*} x+\frac {e^4 (-1+x)}{e^4 x-e^x \log (4)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 36, normalized size = 1.29 \begin {gather*} \frac {{\left (x^{2} - 1\right )} e^{\left (-x + 4\right )} - 2 \, {\left (x - 1\right )} \log \relax (2)}{x e^{\left (-x + 4\right )} - 2 \, \log \relax (2)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2+1)*exp(-x+4)^2+2*(-x-2)*log(2)*exp(-x+4)+4*log(2)^2)/(x^2*exp(-x+4)^2-4*x*log(2)*exp(-x+4)+4*l
og(2)^2),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.23, size = 139, normalized size = 4.96 \begin {gather*} \frac {x^{4} e^{\left (-x + 8\right )} - 4 \, x^{3} e^{4} \log \relax (2) + 4 \, x^{2} e^{x} \log \relax (2)^{2} + 2 \, x^{2} e^{4} \log \relax (2) - 4 \, x e^{x} \log \relax (2)^{2} - 2 \, x^{2} e^{\left (-x + 8\right )} + 4 \, x e^{4} \log \relax (2) + x e^{\left (-x + 8\right )} - 2 \, e^{4} \log \relax (2)}{x^{3} e^{\left (-x + 8\right )} - 4 \, x^{2} e^{4} \log \relax (2) + 4 \, x e^{x} \log \relax (2)^{2} - x^{2} e^{\left (-x + 8\right )} + 4 \, x e^{4} \log \relax (2) - 4 \, e^{x} \log \relax (2)^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2+1)*exp(-x+4)^2+2*(-x-2)*log(2)*exp(-x+4)+4*log(2)^2)/(x^2*exp(-x+4)^2-4*x*log(2)*exp(-x+4)+4*l
og(2)^2),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.22, size = 34, normalized size = 1.21




method result size



risch \(x -\frac {1}{x}-\frac {2 \left (x -1\right ) \ln \relax (2)}{x \left (-x \,{\mathrm e}^{-x +4}+2 \ln \relax (2)\right )}\) \(34\)
norman \(\frac {2 x \ln \relax (2)-x^{2} {\mathrm e}^{-x +4}-2 \ln \relax (2)+{\mathrm e}^{-x +4}}{-x \,{\mathrm e}^{-x +4}+2 \ln \relax (2)}\) \(45\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.49, size = 36, normalized size = 1.29 \begin {gather*} \frac {x^{2} e^{4} - 2 \, x e^{x} \log \relax (2) + x e^{4} - e^{4}}{x e^{4} - 2 \, e^{x} \log \relax (2)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2+1)*exp(-x+4)^2+2*(-x-2)*log(2)*exp(-x+4)+4*log(2)^2)/(x^2*exp(-x+4)^2-4*x*log(2)*exp(-x+4)+4*l
og(2)^2),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.26, size = 28, normalized size = 1.00 \begin {gather*} \frac {x+x^2-x\,{\mathrm {e}}^{x-4}\,\ln \relax (4)-1}{x-2\,{\mathrm {e}}^{x-4}\,\ln \relax (2)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(8 - 2*x)*(x^2 + 1) + 4*log(2)^2 - 2*exp(4 - x)*log(2)*(x + 2))/(4*log(2)^2 + x^2*exp(8 - 2*x) - 4*x*e
xp(4 - x)*log(2)),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.16, size = 31, normalized size = 1.11 \begin {gather*} x + \frac {2 x \log {\relax (2 )} - 2 \log {\relax (2 )}}{x^{2} e^{4 - x} - 2 x \log {\relax (2 )}} - \frac {1}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + (2*x*log(2) - 2*log(2))/(x**2*exp(4 - x) - 2*x*log(2)) - 1/x

________________________________________________________________________________________