\(\int \frac {e^{-\log ^2(x^2)} (-x+e^{\log ^2(x^2)} (3 x-x^2+e^{21+x} (-3 x+x^2))+(-12+4 x) \log (-3+x) \log (x^2))}{-3 x+x^2} \, dx\) [7502]

   Optimal result
   Rubi [B] (verified)
   Mathematica [A] (verified)
   Maple [B] (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 = 69, antiderivative size = 25 \[ \int \frac {e^{-\log ^2\left (x^2\right )} \left (-x+e^{\log ^2\left (x^2\right )} \left (3 x-x^2+e^{21+x} \left (-3 x+x^2\right )\right )+(-12+4 x) \log (-3+x) \log \left (x^2\right )\right )}{-3 x+x^2} \, dx=e^{21+x}-x-e^{-\log ^2\left (x^2\right )} \log (-3+x) \]

[Out]

exp(x+21)-ln(-3+x)/exp(ln(x^2)^2)-x

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(56\) vs. \(2(25)=50\).

Time = 0.58 (sec) , antiderivative size = 56, normalized size of antiderivative = 2.24, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.058, Rules used = {1607, 6874, 2225, 2326} \[ \int \frac {e^{-\log ^2\left (x^2\right )} \left (-x+e^{\log ^2\left (x^2\right )} \left (3 x-x^2+e^{21+x} \left (-3 x+x^2\right )\right )+(-12+4 x) \log (-3+x) \log \left (x^2\right )\right )}{-3 x+x^2} \, dx=-\frac {e^{-\log ^2\left (x^2\right )} \left (3 \log (x-3) \log \left (x^2\right )-x \log (x-3) \log \left (x^2\right )\right )}{(3-x) \log \left (x^2\right )}-x+e^{x+21} \]

[In]

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

[Out]

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

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

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

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

Mathematica [A] (verified)

Time = 3.31 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00 \[ \int \frac {e^{-\log ^2\left (x^2\right )} \left (-x+e^{\log ^2\left (x^2\right )} \left (3 x-x^2+e^{21+x} \left (-3 x+x^2\right )\right )+(-12+4 x) \log (-3+x) \log \left (x^2\right )\right )}{-3 x+x^2} \, dx=e^{21+x}-x-e^{-\log ^2\left (x^2\right )} \log (-3+x) \]

[In]

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

[Out]

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

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(50\) vs. \(2(23)=46\).

Time = 1.14 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.04

method result size
parallelrisch \(\frac {\left (-18 \,{\mathrm e}^{\ln \left (x^{2}\right )^{2}} x +18 \,{\mathrm e}^{x +21} {\mathrm e}^{\ln \left (x^{2}\right )^{2}}-18 \ln \left (-3+x \right )-27 \,{\mathrm e}^{\ln \left (x^{2}\right )^{2}}\right ) {\mathrm e}^{-\ln \left (x^{2}\right )^{2}}}{18}\) \(51\)
risch \({\mathrm e}^{x +21}-x -\ln \left (-3+x \right ) {\mathrm e}^{-\frac {{\left (-i \pi \operatorname {csgn}\left (i x^{2}\right )^{3}+2 i \pi \operatorname {csgn}\left (i x^{2}\right )^{2} \operatorname {csgn}\left (i x \right )-i \pi \,\operatorname {csgn}\left (i x^{2}\right ) \operatorname {csgn}\left (i x \right )^{2}+4 \ln \left (x \right )\right )}^{2}}{4}}\) \(74\)

[In]

int((((x^2-3*x)*exp(x+21)-x^2+3*x)*exp(ln(x^2)^2)+(4*x-12)*ln(-3+x)*ln(x^2)-x)/(x^2-3*x)/exp(ln(x^2)^2),x,meth
od=_RETURNVERBOSE)

[Out]

1/18*(-18*exp(ln(x^2)^2)*x+18*exp(x+21)*exp(ln(x^2)^2)-18*ln(-3+x)-27*exp(ln(x^2)^2))/exp(ln(x^2)^2)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.28 \[ \int \frac {e^{-\log ^2\left (x^2\right )} \left (-x+e^{\log ^2\left (x^2\right )} \left (3 x-x^2+e^{21+x} \left (-3 x+x^2\right )\right )+(-12+4 x) \log (-3+x) \log \left (x^2\right )\right )}{-3 x+x^2} \, dx=-{\left ({\left (x - e^{\left (x + 21\right )}\right )} e^{\left (\log \left (x^{2}\right )^{2}\right )} + \log \left (x - 3\right )\right )} e^{\left (-\log \left (x^{2}\right )^{2}\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 1.16 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {e^{-\log ^2\left (x^2\right )} \left (-x+e^{\log ^2\left (x^2\right )} \left (3 x-x^2+e^{21+x} \left (-3 x+x^2\right )\right )+(-12+4 x) \log (-3+x) \log \left (x^2\right )\right )}{-3 x+x^2} \, dx=- x + e^{x + 21} - e^{- \log {\left (x^{2} \right )}^{2}} \log {\left (x - 3 \right )} \]

[In]

integrate((((x**2-3*x)*exp(x+21)-x**2+3*x)*exp(ln(x**2)**2)+(4*x-12)*ln(-3+x)*ln(x**2)-x)/(x**2-3*x)/exp(ln(x*
*2)**2),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.84 \[ \int \frac {e^{-\log ^2\left (x^2\right )} \left (-x+e^{\log ^2\left (x^2\right )} \left (3 x-x^2+e^{21+x} \left (-3 x+x^2\right )\right )+(-12+4 x) \log (-3+x) \log \left (x^2\right )\right )}{-3 x+x^2} \, dx=-e^{\left (-4 \, \log \left (x\right )^{2}\right )} \log \left (x - 3\right ) - x + e^{\left (x + 21\right )} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.92 \[ \int \frac {e^{-\log ^2\left (x^2\right )} \left (-x+e^{\log ^2\left (x^2\right )} \left (3 x-x^2+e^{21+x} \left (-3 x+x^2\right )\right )+(-12+4 x) \log (-3+x) \log \left (x^2\right )\right )}{-3 x+x^2} \, dx=-e^{\left (-\log \left (x^{2}\right )^{2}\right )} \log \left (x - 3\right ) - x + e^{\left (x + 21\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 13.10 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.92 \[ \int \frac {e^{-\log ^2\left (x^2\right )} \left (-x+e^{\log ^2\left (x^2\right )} \left (3 x-x^2+e^{21+x} \left (-3 x+x^2\right )\right )+(-12+4 x) \log (-3+x) \log \left (x^2\right )\right )}{-3 x+x^2} \, dx={\mathrm {e}}^{x+21}-x-\ln \left (x-3\right )\,{\mathrm {e}}^{-{\ln \left (x^2\right )}^2} \]

[In]

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

[Out]

exp(x + 21) - x - log(x - 3)*exp(-log(x^2)^2)