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

   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 = 65, antiderivative size = 24 \[ \int \frac {e^x (-20+4 x) \log (-5+x)+\left (10 x-2 x^2\right ) \log (x)+\left (2 e^x x+e^x \left (-10 x+2 x^2\right ) \log (-5+x)\right ) \log \left (x^2\right )}{-5 x+x^2} \, dx=2 x \left (1-\log (x)+\frac {e^x \log (-5+x) \log \left (x^2\right )}{x}\right ) \]

[Out]

2*(1+ln(x^2)*ln(-5+x)*exp(x)/x-ln(x))*x

Rubi [A] (verified)

Time = 0.47 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.92, number of steps used = 14, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {1607, 6820, 2332, 2209, 2634, 12, 2326, 6874, 2225, 2637} \[ \int \frac {e^x (-20+4 x) \log (-5+x)+\left (10 x-2 x^2\right ) \log (x)+\left (2 e^x x+e^x \left (-10 x+2 x^2\right ) \log (-5+x)\right ) \log \left (x^2\right )}{-5 x+x^2} \, dx=2 e^x \log (x-5) \log \left (x^2\right )+2 x-2 x \log (x) \]

[In]

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

[Out]

2*x - 2*x*Log[x] + 2*E^x*Log[-5 + x]*Log[x^2]

Rule 12

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

Rule 1607

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 2209

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

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]

Rule 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2634

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[w*(D[u, x]
/u), x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, x]

Rule 2637

Int[Log[v_]*Log[w_]*(u_), x_Symbol] :> With[{z = IntHide[u, x]}, Dist[Log[v]*Log[w], z, x] + (-Int[SimplifyInt
egrand[z*Log[w]*(D[v, x]/v), x], x] - Int[SimplifyIntegrand[z*Log[v]*(D[w, x]/w), x], x]) /; InverseFunctionFr
eeQ[z, x]] /; InverseFunctionFreeQ[v, x] && InverseFunctionFreeQ[w, x]

Rule 6820

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

Rule 6874

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

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

Mathematica [A] (verified)

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

[In]

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

[Out]

2*(x - x*Log[x] + E^x*Log[-5 + x]*Log[x^2])

Maple [A] (verified)

Time = 1.27 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.96

method result size
parallelrisch \(5+2 \ln \left (-5+x \right ) {\mathrm e}^{x} \ln \left (x^{2}\right )+2 x -2 x \ln \left (x \right )\) \(23\)
risch \(\left (-i \pi \operatorname {csgn}\left (i x \right )^{2} \operatorname {csgn}\left (i x^{2}\right ) {\mathrm e}^{x}+2 i \pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x^{2}\right )^{2} {\mathrm e}^{x}-i \pi \operatorname {csgn}\left (i x^{2}\right )^{3} {\mathrm e}^{x}+4 \,{\mathrm e}^{x} \ln \left (x \right )\right ) \ln \left (-5+x \right )-2 x \ln \left (x \right )+2 x\) \(77\)

[In]

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

[Out]

5+2*ln(-5+x)*exp(x)*ln(x^2)+2*x-2*x*ln(x)

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

2*(2*e^x*log(x - 5) - x)*log(x) + 2*x

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

2*e^x*log(x^2)*log(x - 5) - 2*x*log(x) + 2*x

Mupad [B] (verification not implemented)

Time = 13.11 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.88 \[ \int \frac {e^x (-20+4 x) \log (-5+x)+\left (10 x-2 x^2\right ) \log (x)+\left (2 e^x x+e^x \left (-10 x+2 x^2\right ) \log (-5+x)\right ) \log \left (x^2\right )}{-5 x+x^2} \, dx=2\,x-2\,x\,\ln \left (x\right )+2\,\ln \left (x-5\right )\,\ln \left (x^2\right )\,{\mathrm {e}}^x \]

[In]

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

[Out]

2*x - 2*x*log(x) + 2*log(x - 5)*log(x^2)*exp(x)