\(\int \frac {3-x-2 e^{3/2} x^2+e^{\frac {3}{2}+x} (-3 x+x^2)+e^{3/2} (6 x-2 x^2) \log (-3+x)}{e^{3/2} (-3 x+x^2)} \, dx\) [6848]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 64, antiderivative size = 20 \[ \int \frac {3-x-2 e^{3/2} x^2+e^{\frac {3}{2}+x} \left (-3 x+x^2\right )+e^{3/2} \left (6 x-2 x^2\right ) \log (-3+x)}{e^{3/2} \left (-3 x+x^2\right )} \, dx=e^x-2 x \log (-3+x)-\frac {\log (x)}{e^{3/2}} \]

[Out]

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

Rubi [A] (verified)

Time = 0.58 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.60, number of steps used = 11, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.109, Rules used = {12, 1607, 6874, 2225, 907, 2436, 2332} \[ \int \frac {3-x-2 e^{3/2} x^2+e^{\frac {3}{2}+x} \left (-3 x+x^2\right )+e^{3/2} \left (6 x-2 x^2\right ) \log (-3+x)}{e^{3/2} \left (-3 x+x^2\right )} \, dx=e^x-6 \log (3-x)+2 (3-x) \log (x-3)-\frac {\log (x)}{e^{3/2}} \]

[In]

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

[Out]

E^x - 6*Log[3 - x] + 2*(3 - x)*Log[-3 + x] - Log[x]/E^(3/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 907

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

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 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 2332

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

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {3-x-2 e^{3/2} x^2+e^{\frac {3}{2}+x} \left (-3 x+x^2\right )+e^{3/2} \left (6 x-2 x^2\right ) \log (-3+x)}{-3 x+x^2} \, dx}{e^{3/2}} \\ & = \frac {\int \frac {3-x-2 e^{3/2} x^2+e^{\frac {3}{2}+x} \left (-3 x+x^2\right )+e^{3/2} \left (6 x-2 x^2\right ) \log (-3+x)}{(-3+x) x} \, dx}{e^{3/2}} \\ & = \frac {\int \left (e^{\frac {3}{2}+x}+\frac {3-x-2 e^{3/2} x^2+6 e^{3/2} x \log (-3+x)-2 e^{3/2} x^2 \log (-3+x)}{(-3+x) x}\right ) \, dx}{e^{3/2}} \\ & = \frac {\int e^{\frac {3}{2}+x} \, dx}{e^{3/2}}+\frac {\int \frac {3-x-2 e^{3/2} x^2+6 e^{3/2} x \log (-3+x)-2 e^{3/2} x^2 \log (-3+x)}{(-3+x) x} \, dx}{e^{3/2}} \\ & = e^x+\frac {\int \left (\frac {3-x-2 e^{3/2} x^2}{(-3+x) x}-2 e^{3/2} \log (-3+x)\right ) \, dx}{e^{3/2}} \\ & = e^x-2 \int \log (-3+x) \, dx+\frac {\int \frac {3-x-2 e^{3/2} x^2}{(-3+x) x} \, dx}{e^{3/2}} \\ & = e^x-2 \text {Subst}(\int \log (x) \, dx,x,-3+x)+\frac {\int \left (-2 e^{3/2}-\frac {6 e^{3/2}}{-3+x}-\frac {1}{x}\right ) \, dx}{e^{3/2}} \\ & = e^x-6 \log (3-x)+2 (3-x) \log (-3+x)-\frac {\log (x)}{e^{3/2}} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(47\) vs. \(2(20)=40\).

Time = 0.23 (sec) , antiderivative size = 47, normalized size of antiderivative = 2.35 \[ \int \frac {3-x-2 e^{3/2} x^2+e^{\frac {3}{2}+x} \left (-3 x+x^2\right )+e^{3/2} \left (6 x-2 x^2\right ) \log (-3+x)}{e^{3/2} \left (-3 x+x^2\right )} \, dx=\frac {e^{\frac {3}{2}+x}-6 e^{3/2} \log (3-x)+2 e^{3/2} (3-x) \log (-3+x)-\log (x)}{e^{3/2}} \]

[In]

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

[Out]

(E^(3/2 + x) - 6*E^(3/2)*Log[3 - x] + 2*E^(3/2)*(3 - x)*Log[-3 + x] - Log[x])/E^(3/2)

Maple [A] (verified)

Time = 0.56 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.85

method result size
risch \({\mathrm e}^{x}-\ln \left (x \right ) {\mathrm e}^{-\frac {3}{2}}-2 \ln \left (-3+x \right ) x\) \(17\)
norman \({\mathrm e}^{x}-\ln \left (x \right ) {\mathrm e}^{-\frac {3}{2}}-2 \ln \left (-3+x \right ) x\) \(19\)
parallelrisch \({\mathrm e}^{-\frac {3}{2}} \left (-2 \,{\mathrm e}^{\frac {3}{2}} \ln \left (-3+x \right ) x -\ln \left (x \right )+{\mathrm e}^{\frac {3}{2}} {\mathrm e}^{x}\right )\) \(25\)
parts \(-6 \ln \left (-3+x \right )-\ln \left (x \right ) {\mathrm e}^{-\frac {3}{2}}-2 \left (-3+x \right ) \ln \left (-3+x \right )-6+{\mathrm e}^{x}\) \(28\)
default \({\mathrm e}^{-\frac {3}{2}} \left ({\mathrm e}^{\frac {3}{2}} {\mathrm e}^{x}-2 \,{\mathrm e}^{\frac {3}{2}} \left (\left (-3+x \right ) \ln \left (-3+x \right )+3-x \right )-2 x \,{\mathrm e}^{\frac {3}{2}}-\ln \left (x \right )-6 \,{\mathrm e}^{\frac {3}{2}} \ln \left (-3+x \right )\right )\) \(46\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.10 \[ \int \frac {3-x-2 e^{3/2} x^2+e^{\frac {3}{2}+x} \left (-3 x+x^2\right )+e^{3/2} \left (6 x-2 x^2\right ) \log (-3+x)}{e^{3/2} \left (-3 x+x^2\right )} \, dx=-{\left (2 \, x e^{\frac {3}{2}} \log \left (x - 3\right ) - e^{\left (x + \frac {3}{2}\right )} + \log \left (x\right )\right )} e^{\left (-\frac {3}{2}\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.95 \[ \int \frac {3-x-2 e^{3/2} x^2+e^{\frac {3}{2}+x} \left (-3 x+x^2\right )+e^{3/2} \left (6 x-2 x^2\right ) \log (-3+x)}{e^{3/2} \left (-3 x+x^2\right )} \, dx=- 2 x \log {\left (x - 3 \right )} + e^{x} - \frac {\log {\left (x \right )}}{e^{\frac {3}{2}}} \]

[In]

integrate(((-2*x**2+6*x)*exp(3/2)*ln(-3+x)+(x**2-3*x)*exp(3/2)*exp(x)-2*x**2*exp(3/2)+3-x)/(x**2-3*x)/exp(3/2)
,x)

[Out]

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

Maxima [F]

\[ \int \frac {3-x-2 e^{3/2} x^2+e^{\frac {3}{2}+x} \left (-3 x+x^2\right )+e^{3/2} \left (6 x-2 x^2\right ) \log (-3+x)}{e^{3/2} \left (-3 x+x^2\right )} \, dx=\int { -\frac {{\left (2 \, x^{2} e^{\frac {3}{2}} + 2 \, {\left (x^{2} - 3 \, x\right )} e^{\frac {3}{2}} \log \left (x - 3\right ) - {\left (x^{2} - 3 \, x\right )} e^{\left (x + \frac {3}{2}\right )} + x - 3\right )} e^{\left (-\frac {3}{2}\right )}}{x^{2} - 3 \, x} \,d x } \]

[In]

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

[Out]

-(2*(x + 3*log(x - 3))*e^(3/2)*log(x - 3) - 3*e^(3/2)*log(x - 3)^2 - (3*log(x - 3)^2 + 2*x + 6*log(x - 3))*e^(
3/2) + 2*(x + 3*log(x - 3))*e^(3/2) - 3*e^(9/2)*exp_integral_e(1, -x + 3) - x*e^(x + 3/2)/(x - 3) - 3*integrat
e(e^(x + 3/2)/(x^2 - 6*x + 9), x) + log(x))*e^(-3/2)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.10 \[ \int \frac {3-x-2 e^{3/2} x^2+e^{\frac {3}{2}+x} \left (-3 x+x^2\right )+e^{3/2} \left (6 x-2 x^2\right ) \log (-3+x)}{e^{3/2} \left (-3 x+x^2\right )} \, dx=-{\left (2 \, x e^{\frac {3}{2}} \log \left (x - 3\right ) - e^{\left (x + \frac {3}{2}\right )} + \log \left (x\right )\right )} e^{\left (-\frac {3}{2}\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.38 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.80 \[ \int \frac {3-x-2 e^{3/2} x^2+e^{\frac {3}{2}+x} \left (-3 x+x^2\right )+e^{3/2} \left (6 x-2 x^2\right ) \log (-3+x)}{e^{3/2} \left (-3 x+x^2\right )} \, dx={\mathrm {e}}^x-2\,x\,\ln \left (x-3\right )-{\mathrm {e}}^{-\frac {3}{2}}\,\ln \left (x\right ) \]

[In]

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

[Out]

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