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

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

________________________________________________________________________________________

Rubi [A]  time = 0.77, antiderivative size = 28, normalized size of antiderivative = 1.17, number of steps used = 12, number of rules used = 8, integrand size = 107, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.075, Rules used = {1594, 27, 6688, 2199, 2194, 2177, 2178, 683} \begin {gather*} x+e^{x+4}-\frac {4 e^{x+4}}{x}+\frac {\log (4)}{x-\log (4)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 683

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e,
 0] && IGtQ[p, 0] &&  !(EqQ[m, 3] && NeQ[p, 1])

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 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), Int[(c + d*x)^(m + 1)*(b*F^(g*
(e + f*x)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && LtQ[m, -1] && IntegerQ[2*m] &&  !$UseGamma ===
True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

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 2199

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$UseGamma === True

Rule 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 28, normalized size = 1.17 \begin {gather*} e^{4+x}-\frac {4 e^{4+x}}{x}+x+\frac {\log (4)}{x-\log (4)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.63, size = 52, normalized size = 2.17 \begin {gather*} \frac {x^{3} - {\left (2 \, {\left (x - 4\right )} e^{4} \log \relax (2) - {\left (x^{2} - 4 \, x\right )} e^{4}\right )} e^{x} - 2 \, {\left (x^{2} - x\right )} \log \relax (2)}{x^{2} - 2 \, x \log \relax (2)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.11, size = 26, normalized size = 1.08




method result size



risch \(x -\frac {\ln \relax (2)}{\ln \relax (2)-\frac {x}{2}}+\frac {\left (x -4\right ) {\mathrm e}^{4+x}}{x}\) \(26\)
default \(x +{\mathrm e}^{4} {\mathrm e}^{x}+\frac {2 \ln \relax (2)}{x -2 \ln \relax (2)}-\frac {4 \,{\mathrm e}^{4} {\mathrm e}^{x}}{x}\) \(29\)
norman \(\frac {\left (4 \ln \relax (2)^{2}-2 \ln \relax (2)\right ) x +\left (2 \,{\mathrm e}^{4} \ln \relax (2)+4 \,{\mathrm e}^{4}\right ) x \,{\mathrm e}^{x}-x^{3}-x^{2} {\mathrm e}^{4} {\mathrm e}^{x}-8 \,{\mathrm e}^{4} \ln \relax (2) {\mathrm e}^{x}}{x \left (2 \ln \relax (2)-x \right )}\) \(66\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.65, size = 80, normalized size = 3.33 \begin {gather*} 4 \, {\left (\frac {2 \, \log \relax (2)}{x - 2 \, \log \relax (2)} - \log \left (x - 2 \, \log \relax (2)\right )\right )} \log \relax (2) + 4 \, \log \relax (2) \log \left (x - 2 \, \log \relax (2)\right ) + x + \frac {{\left (x e^{4} - 4 \, e^{4}\right )} e^{x}}{x} - \frac {8 \, \log \relax (2)^{2}}{x - 2 \, \log \relax (2)} + \frac {2 \, \log \relax (2)}{x - 2 \, \log \relax (2)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 2.01, size = 69, normalized size = 2.88 \begin {gather*} x-\frac {{\mathrm {e}}^x\,\left (4\,{\mathrm {e}}^4-x\,{\mathrm {e}}^4\right )}{x}+\frac {4\,\ln \relax (2)\,\mathrm {atanh}\left (\frac {2\,x-\ln \left (16\right )}{\sqrt {2\,\ln \relax (4)+\ln \left (16\right )}\,\sqrt {\ln \left (16\right )-2\,\ln \relax (4)}}\right )}{\sqrt {2\,\ln \relax (4)+\ln \left (16\right )}\,\sqrt {\ln \left (16\right )-2\,\ln \relax (4)}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((4*x^2*log(2)^2 - 2*log(2)*(x^2 + 2*x^3) + exp(x)*(exp(4)*(4*x^2 - 4*x^3 + x^4) + 4*exp(4)*log(2)^2*(x^2 -
 4*x + 4) - 2*exp(4)*log(2)*(8*x - 8*x^2 + 2*x^3)) + x^4)/(4*x^2*log(2)^2 - 4*x^3*log(2) + x^4),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.22, size = 27, normalized size = 1.12 \begin {gather*} x + \frac {2 \log {\relax (2 )}}{x - 2 \log {\relax (2 )}} + \frac {\left (x e^{4} - 4 e^{4}\right ) e^{x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((4*(x**2-4*x+4)*exp(4)*ln(2)**2+2*(-2*x**3+8*x**2-8*x)*exp(4)*ln(2)+(x**4-4*x**3+4*x**2)*exp(4))*ex
p(x)+4*x**2*ln(2)**2+2*(-2*x**3-x**2)*ln(2)+x**4)/(4*x**2*ln(2)**2-4*x**3*ln(2)+x**4),x)

[Out]

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

________________________________________________________________________________________