\(\int \frac {-27+e^{\frac {1}{3} (9-42 x+49 x^2)} (-42 x^2+98 x^3)}{3 x^2} \, dx\) [8430]

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

Optimal result

Integrand size = 37, antiderivative size = 19 \[ \int \frac {-27+e^{\frac {1}{3} \left (9-42 x+49 x^2\right )} \left (-42 x^2+98 x^3\right )}{3 x^2} \, dx=e^{\frac {1}{3} (3-7 x)^2}+\frac {9}{x} \]

[Out]

9/x+exp(1/3*(3-7*x)^2)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.081, Rules used = {12, 14, 2240} \[ \int \frac {-27+e^{\frac {1}{3} \left (9-42 x+49 x^2\right )} \left (-42 x^2+98 x^3\right )}{3 x^2} \, dx=e^{\frac {1}{3} (3-7 x)^2}+\frac {9}{x} \]

[In]

Int[(-27 + E^((9 - 42*x + 49*x^2)/3)*(-42*x^2 + 98*x^3))/(3*x^2),x]

[Out]

E^((3 - 7*x)^2/3) + 9/x

Rule 12

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

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2240

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[(e + f*x)^n*(
F^(a + b*(c + d*x)^n)/(b*f*n*(c + d*x)^n*Log[F])), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{3} \int \frac {-27+e^{\frac {1}{3} \left (9-42 x+49 x^2\right )} \left (-42 x^2+98 x^3\right )}{x^2} \, dx \\ & = \frac {1}{3} \int \left (-\frac {27}{x^2}+14 e^{\frac {1}{3} (3-7 x)^2} (-3+7 x)\right ) \, dx \\ & = \frac {9}{x}+\frac {14}{3} \int e^{\frac {1}{3} (3-7 x)^2} (-3+7 x) \, dx \\ & = e^{\frac {1}{3} (3-7 x)^2}+\frac {9}{x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {-27+e^{\frac {1}{3} \left (9-42 x+49 x^2\right )} \left (-42 x^2+98 x^3\right )}{3 x^2} \, dx=e^{\frac {1}{3} (3-7 x)^2}+\frac {9}{x} \]

[In]

Integrate[(-27 + E^((9 - 42*x + 49*x^2)/3)*(-42*x^2 + 98*x^3))/(3*x^2),x]

[Out]

E^((3 - 7*x)^2/3) + 9/x

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.89

method result size
risch \(\frac {9}{x}+{\mathrm e}^{\frac {\left (7 x -3\right )^{2}}{3}}\) \(17\)
norman \(\frac {9+x \,{\mathrm e}^{\frac {49}{3} x^{2}-14 x +3}}{x}\) \(20\)
parallelrisch \(\frac {3 x \,{\mathrm e}^{\frac {49}{3} x^{2}-14 x +3}+27}{3 x}\) \(22\)
default \(\frac {9}{x}+i {\mathrm e}^{3} \sqrt {\pi }\, {\mathrm e}^{-3} \sqrt {3}\, \operatorname {erf}\left (\frac {7 i \sqrt {3}\, x}{3}-i \sqrt {3}\right )+\frac {98 \,{\mathrm e}^{3} \left (\frac {3 \,{\mathrm e}^{\frac {49}{3} x^{2}-14 x}}{98}-\frac {3 i \sqrt {\pi }\, {\mathrm e}^{-3} \sqrt {3}\, \operatorname {erf}\left (\frac {7 i \sqrt {3}\, x}{3}-i \sqrt {3}\right )}{98}\right )}{3}\) \(78\)
parts \(\frac {9}{x}+i {\mathrm e}^{3} \sqrt {\pi }\, {\mathrm e}^{-3} \sqrt {3}\, \operatorname {erf}\left (\frac {7 i \sqrt {3}\, x}{3}-i \sqrt {3}\right )+\frac {98 \,{\mathrm e}^{3} \left (\frac {3 \,{\mathrm e}^{\frac {49}{3} x^{2}-14 x}}{98}-\frac {3 i \sqrt {\pi }\, {\mathrm e}^{-3} \sqrt {3}\, \operatorname {erf}\left (\frac {7 i \sqrt {3}\, x}{3}-i \sqrt {3}\right )}{98}\right )}{3}\) \(78\)

[In]

int(1/3*((98*x^3-42*x^2)*exp(49/3*x^2-14*x+3)-27)/x^2,x,method=_RETURNVERBOSE)

[Out]

9/x+exp(1/3*(7*x-3)^2)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {-27+e^{\frac {1}{3} \left (9-42 x+49 x^2\right )} \left (-42 x^2+98 x^3\right )}{3 x^2} \, dx=\frac {x e^{\left (\frac {49}{3} \, x^{2} - 14 \, x + 3\right )} + 9}{x} \]

[In]

integrate(1/3*((98*x^3-42*x^2)*exp(49/3*x^2-14*x+3)-27)/x^2,x, algorithm="fricas")

[Out]

(x*e^(49/3*x^2 - 14*x + 3) + 9)/x

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.79 \[ \int \frac {-27+e^{\frac {1}{3} \left (9-42 x+49 x^2\right )} \left (-42 x^2+98 x^3\right )}{3 x^2} \, dx=e^{\frac {49 x^{2}}{3} - 14 x + 3} + \frac {9}{x} \]

[In]

integrate(1/3*((98*x**3-42*x**2)*exp(49/3*x**2-14*x+3)-27)/x**2,x)

[Out]

exp(49*x**2/3 - 14*x + 3) + 9/x

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.31 (sec) , antiderivative size = 92, normalized size of antiderivative = 4.84 \[ \int \frac {-27+e^{\frac {1}{3} \left (9-42 x+49 x^2\right )} \left (-42 x^2+98 x^3\right )}{3 x^2} \, dx=i \, \sqrt {3} \sqrt {\pi } \operatorname {erf}\left (\frac {7}{3} i \, \sqrt {3} x - i \, \sqrt {3}\right ) + \frac {1}{3} \, \sqrt {3} {\left (\frac {3 \, \sqrt {3} \sqrt {\frac {1}{3}} \sqrt {\pi } {\left (7 \, x - 3\right )} {\left (\operatorname {erf}\left (\sqrt {\frac {1}{3}} \sqrt {-{\left (7 \, x - 3\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (7 \, x - 3\right )}^{2}}} + \sqrt {3} e^{\left (\frac {1}{3} \, {\left (7 \, x - 3\right )}^{2}\right )}\right )} + \frac {9}{x} \]

[In]

integrate(1/3*((98*x^3-42*x^2)*exp(49/3*x^2-14*x+3)-27)/x^2,x, algorithm="maxima")

[Out]

I*sqrt(3)*sqrt(pi)*erf(7/3*I*sqrt(3)*x - I*sqrt(3)) + 1/3*sqrt(3)*(3*sqrt(3)*sqrt(1/3)*sqrt(pi)*(7*x - 3)*(erf
(sqrt(1/3)*sqrt(-(7*x - 3)^2)) - 1)/sqrt(-(7*x - 3)^2) + sqrt(3)*e^(1/3*(7*x - 3)^2)) + 9/x

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {-27+e^{\frac {1}{3} \left (9-42 x+49 x^2\right )} \left (-42 x^2+98 x^3\right )}{3 x^2} \, dx=\frac {x e^{\left (\frac {49}{3} \, x^{2} - 14 \, x + 3\right )} + 9}{x} \]

[In]

integrate(1/3*((98*x^3-42*x^2)*exp(49/3*x^2-14*x+3)-27)/x^2,x, algorithm="giac")

[Out]

(x*e^(49/3*x^2 - 14*x + 3) + 9)/x

Mupad [B] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.89 \[ \int \frac {-27+e^{\frac {1}{3} \left (9-42 x+49 x^2\right )} \left (-42 x^2+98 x^3\right )}{3 x^2} \, dx={\mathrm {e}}^{\frac {49\,x^2}{3}-14\,x+3}+\frac {9}{x} \]

[In]

int(-((exp((49*x^2)/3 - 14*x + 3)*(42*x^2 - 98*x^3))/3 + 9)/x^2,x)

[Out]

exp((49*x^2)/3 - 14*x + 3) + 9/x