\(\int \frac {18+9 x+8 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} (6+6 x-12 x^2+4 x^3+6 x^4)}{9 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} (6 x^3+2 x^4)} \, dx\) [1982]

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

Optimal result

Integrand size = 120, antiderivative size = 27 \[ \int \frac {18+9 x+8 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6+6 x-12 x^2+4 x^3+6 x^4\right )}{9 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6 x^3+2 x^4\right )} \, dx=x+\frac {-\frac {3}{x}+x}{x \left (3+e^{(2-2 x) x}+x\right )} \]

[Out]

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

Rubi [F]

\[ \int \frac {18+9 x+8 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6+6 x-12 x^2+4 x^3+6 x^4\right )}{9 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6 x^3+2 x^4\right )} \, dx=\int \frac {18+9 x+8 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6+6 x-12 x^2+4 x^3+6 x^4\right )}{9 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6 x^3+2 x^4\right )} \, dx \]

[In]

Int[(18 + 9*x + 8*x^3 + E^(4*x - 4*x^2)*x^3 + 6*x^4 + x^5 + E^(2*x - 2*x^2)*(6 + 6*x - 12*x^2 + 4*x^3 + 6*x^4)
)/(9*x^3 + E^(4*x - 4*x^2)*x^3 + 6*x^4 + x^5 + E^(2*x - 2*x^2)*(6*x^3 + 2*x^4)),x]

[Out]

-x^(-2) + 1/(3*x) + x + 2/(3*(3 + x)) + 2*Defer[Int][E^(4*x)/(E^(2*x) + E^(2*x^2)*(3 + x))^2, x] + 4*Defer[Int
][E^(2*x*(1 + x))/(E^(2*x) + E^(2*x^2)*(3 + x))^2, x] + 2*Defer[Int][E^(4*x)/(x^3*(E^(2*x) + E^(2*x^2)*(3 + x)
)^2), x] + 6*Defer[Int][E^(2*x*(1 + x))/(x^3*(E^(2*x) + E^(2*x^2)*(3 + x))^2), x] - Defer[Int][E^(4*x)/(x^2*(E
^(2*x) + E^(2*x^2)*(3 + x))^2), x]/3 + 6*Defer[Int][E^(2*x*(1 + x))/(x^2*(E^(2*x) + E^(2*x^2)*(3 + x))^2), x]
- 12*Defer[Int][E^(2*x*(1 + x))/(x*(E^(2*x) + E^(2*x^2)*(3 + x))^2), x] + 6*Defer[Int][(E^(2*x*(1 + x))*x)/(E^
(2*x) + E^(2*x^2)*(3 + x))^2, x] - (2*Defer[Int][E^(4*x)/((3 + x)^2*(E^(2*x) + E^(2*x^2)*(3 + x))^2), x])/3 -
2*Defer[Int][E^(2*x)/(E^(2*x) + E^(2*x^2)*(3 + x)), x] - 4*Defer[Int][E^(2*x)/(x^3*(E^(2*x) + E^(2*x^2)*(3 + x
))), x] + (2*Defer[Int][E^(2*x)/(x^2*(E^(2*x) + E^(2*x^2)*(3 + x))), x])/3 + (4*Defer[Int][E^(2*x)/((3 + x)^2*
(E^(2*x) + E^(2*x^2)*(3 + x))), x])/3

Rubi steps \begin{align*} \text {integral}& = \int \frac {e^{4 x} x^3+2 e^{2 x (1+x)} \left (3+3 x-6 x^2+2 x^3+3 x^4\right )+e^{4 x^2} \left (18+9 x+8 x^3+6 x^4+x^5\right )}{x^3 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx \\ & = \int \left (\frac {2 e^{2 x (1+x)} \left (3+3 x-6 x^2+2 x^3+3 x^4\right )}{x^3 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2}+\frac {18 e^{4 x^2}+9 e^{4 x^2} x+e^{4 x} x^3+8 e^{4 x^2} x^3+6 e^{4 x^2} x^4+e^{4 x^2} x^5}{x^3 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2}\right ) \, dx \\ & = 2 \int \frac {e^{2 x (1+x)} \left (3+3 x-6 x^2+2 x^3+3 x^4\right )}{x^3 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2} \, dx+\int \frac {18 e^{4 x^2}+9 e^{4 x^2} x+e^{4 x} x^3+8 e^{4 x^2} x^3+6 e^{4 x^2} x^4+e^{4 x^2} x^5}{x^3 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2} \, dx \\ & = 2 \int \frac {e^{2 x (1+x)} \left (3+3 x-6 x^2+2 x^3+3 x^4\right )}{x^3 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+\int \frac {e^{4 x} x^3+e^{4 x^2} \left (18+9 x+8 x^3+6 x^4+x^5\right )}{x^3 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx \\ & = 2 \int \left (\frac {2 e^{2 x (1+x)}}{\left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2}+\frac {3 e^{2 x (1+x)}}{x^3 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2}+\frac {3 e^{2 x (1+x)}}{x^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2}-\frac {6 e^{2 x (1+x)}}{x \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2}+\frac {3 e^{2 x (1+x)} x}{\left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2}\right ) \, dx+\int \left (\frac {(2+x) \left (9+4 x^3+x^4\right )}{x^3 (3+x)^2}-\frac {2 e^{2 x} \left (18+9 x+8 x^3+6 x^4+x^5\right )}{x^3 (3+x)^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )}+\frac {e^{4 x} \left (18+9 x+17 x^3+12 x^4+2 x^5\right )}{x^3 (3+x)^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2}\right ) \, dx \\ & = -\left (2 \int \frac {e^{2 x} \left (18+9 x+8 x^3+6 x^4+x^5\right )}{x^3 (3+x)^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )} \, dx\right )+4 \int \frac {e^{2 x (1+x)}}{\left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)}}{x^3 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)}}{x^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)} x}{\left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2} \, dx-12 \int \frac {e^{2 x (1+x)}}{x \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2} \, dx+\int \frac {(2+x) \left (9+4 x^3+x^4\right )}{x^3 (3+x)^2} \, dx+\int \frac {e^{4 x} \left (18+9 x+17 x^3+12 x^4+2 x^5\right )}{x^3 (3+x)^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2} \, dx \\ & = -\left (2 \int \frac {e^{2 x} \left (18+9 x+8 x^3+6 x^4+x^5\right )}{x^3 (3+x)^2 \left (e^{2 x}+e^{2 x^2} (3+x)\right )} \, dx\right )+4 \int \frac {e^{2 x (1+x)}}{\left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)}}{x^3 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)}}{x^2 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)} x}{\left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx-12 \int \frac {e^{2 x (1+x)}}{x \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+\int \left (1+\frac {2}{x^3}-\frac {1}{3 x^2}-\frac {2}{3 (3+x)^2}\right ) \, dx+\int \frac {e^{4 x} \left (18+9 x+17 x^3+12 x^4+2 x^5\right )}{x^3 (3+x)^2 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx \\ & = -\frac {1}{x^2}+\frac {1}{3 x}+x+\frac {2}{3 (3+x)}-2 \int \left (\frac {e^{2 x}}{e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x}+\frac {2 e^{2 x}}{x^3 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )}-\frac {e^{2 x}}{3 x^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )}-\frac {2 e^{2 x}}{3 (3+x)^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )}\right ) \, dx+4 \int \frac {e^{2 x (1+x)}}{\left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)}}{x^3 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)}}{x^2 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)} x}{\left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx-12 \int \frac {e^{2 x (1+x)}}{x \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+\int \left (\frac {2 e^{4 x}}{\left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2}+\frac {2 e^{4 x}}{x^3 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2}-\frac {e^{4 x}}{3 x^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2}-\frac {2 e^{4 x}}{3 (3+x)^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2}\right ) \, dx \\ & = -\frac {1}{x^2}+\frac {1}{3 x}+x+\frac {2}{3 (3+x)}-\frac {1}{3} \int \frac {e^{4 x}}{x^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2} \, dx-\frac {2}{3} \int \frac {e^{4 x}}{(3+x)^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2} \, dx+\frac {2}{3} \int \frac {e^{2 x}}{x^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )} \, dx+\frac {4}{3} \int \frac {e^{2 x}}{(3+x)^2 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )} \, dx+2 \int \frac {e^{4 x}}{\left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2} \, dx+2 \int \frac {e^{4 x}}{x^3 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )^2} \, dx-2 \int \frac {e^{2 x}}{e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x} \, dx-4 \int \frac {e^{2 x}}{x^3 \left (e^{2 x}+3 e^{2 x^2}+e^{2 x^2} x\right )} \, dx+4 \int \frac {e^{2 x (1+x)}}{\left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)}}{x^3 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)}}{x^2 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)} x}{\left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx-12 \int \frac {e^{2 x (1+x)}}{x \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx \\ & = -\frac {1}{x^2}+\frac {1}{3 x}+x+\frac {2}{3 (3+x)}-\frac {1}{3} \int \frac {e^{4 x}}{x^2 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx-\frac {2}{3} \int \frac {e^{4 x}}{(3+x)^2 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+\frac {2}{3} \int \frac {e^{2 x}}{x^2 \left (e^{2 x}+e^{2 x^2} (3+x)\right )} \, dx+\frac {4}{3} \int \frac {e^{2 x}}{(3+x)^2 \left (e^{2 x}+e^{2 x^2} (3+x)\right )} \, dx+2 \int \frac {e^{4 x}}{\left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+2 \int \frac {e^{4 x}}{x^3 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx-2 \int \frac {e^{2 x}}{e^{2 x}+e^{2 x^2} (3+x)} \, dx+4 \int \frac {e^{2 x (1+x)}}{\left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx-4 \int \frac {e^{2 x}}{x^3 \left (e^{2 x}+e^{2 x^2} (3+x)\right )} \, dx+6 \int \frac {e^{2 x (1+x)}}{x^3 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)}}{x^2 \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx+6 \int \frac {e^{2 x (1+x)} x}{\left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx-12 \int \frac {e^{2 x (1+x)}}{x \left (e^{2 x}+e^{2 x^2} (3+x)\right )^2} \, dx \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(197\) vs. \(2(27)=54\).

Time = 14.58 (sec) , antiderivative size = 197, normalized size of antiderivative = 7.30 \[ \int \frac {18+9 x+8 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6+6 x-12 x^2+4 x^3+6 x^4\right )}{9 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6 x^3+2 x^4\right )} \, dx=\frac {1}{450} \left (\frac {540}{x^3}+\frac {3564}{x^2}+\frac {19440}{x}+\frac {45 (2263+760 x)}{\left (-5+10 x+4 x^2\right )^2}+\frac {4 (838+17 x)}{-5+10 x+4 x^2}\right )+\frac {e^{2 x} \left (-13500-35100 x-162000 x^2+1601885 x^3-1516290 x^4-1671312 x^5-284312 x^6+36000 x^7+7200 x^8\right )+e^{2 x^2} \left (-40500-152550 x-386100 x^2+4573905 x^3-3099985 x^4-6524826 x^5-2488248 x^6-169112 x^7+57600 x^8+7200 x^9\right )}{450 x^3 \left (-5+10 x+4 x^2\right )^2 \left (e^{2 x}+e^{2 x^2} (3+x)\right )} \]

[In]

Integrate[(18 + 9*x + 8*x^3 + E^(4*x - 4*x^2)*x^3 + 6*x^4 + x^5 + E^(2*x - 2*x^2)*(6 + 6*x - 12*x^2 + 4*x^3 +
6*x^4))/(9*x^3 + E^(4*x - 4*x^2)*x^3 + 6*x^4 + x^5 + E^(2*x - 2*x^2)*(6*x^3 + 2*x^4)),x]

[Out]

(540/x^3 + 3564/x^2 + 19440/x + (45*(2263 + 760*x))/(-5 + 10*x + 4*x^2)^2 + (4*(838 + 17*x))/(-5 + 10*x + 4*x^
2))/450 + (E^(2*x)*(-13500 - 35100*x - 162000*x^2 + 1601885*x^3 - 1516290*x^4 - 1671312*x^5 - 284312*x^6 + 360
00*x^7 + 7200*x^8) + E^(2*x^2)*(-40500 - 152550*x - 386100*x^2 + 4573905*x^3 - 3099985*x^4 - 6524826*x^5 - 248
8248*x^6 - 169112*x^7 + 57600*x^8 + 7200*x^9))/(450*x^3*(-5 + 10*x + 4*x^2)^2*(E^(2*x) + E^(2*x^2)*(3 + x)))

Maple [A] (verified)

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

method result size
risch \(x +\frac {x^{2}-3}{x^{2} \left (3+{\mathrm e}^{-2 x \left (-1+x \right )}+x \right )}\) \(24\)
parallelrisch \(\frac {x^{4}+{\mathrm e}^{-2 x^{2}+2 x} x^{3}-3+3 x^{3}+x^{2}}{x^{2} \left (3+{\mathrm e}^{-2 x^{2}+2 x}+x \right )}\) \(47\)
norman \(\frac {-3+x^{4}-8 x^{2}+{\mathrm e}^{-2 x^{2}+2 x} x^{3}-3 \,{\mathrm e}^{-2 x^{2}+2 x} x^{2}}{x^{2} \left (3+{\mathrm e}^{-2 x^{2}+2 x}+x \right )}\) \(59\)

[In]

int((x^3*exp(-2*x^2+2*x)^2+(6*x^4+4*x^3-12*x^2+6*x+6)*exp(-2*x^2+2*x)+x^5+6*x^4+8*x^3+9*x+18)/(x^3*exp(-2*x^2+
2*x)^2+(2*x^4+6*x^3)*exp(-2*x^2+2*x)+x^5+6*x^4+9*x^3),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

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

Time = 0.26 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.96 \[ \int \frac {18+9 x+8 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6+6 x-12 x^2+4 x^3+6 x^4\right )}{9 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6 x^3+2 x^4\right )} \, dx=\frac {x^{4} + x^{3} e^{\left (-2 \, x^{2} + 2 \, x\right )} + 3 \, x^{3} + x^{2} - 3}{x^{3} + x^{2} e^{\left (-2 \, x^{2} + 2 \, x\right )} + 3 \, x^{2}} \]

[In]

integrate((x^3*exp(-2*x^2+2*x)^2+(6*x^4+4*x^3-12*x^2+6*x+6)*exp(-2*x^2+2*x)+x^5+6*x^4+8*x^3+9*x+18)/(x^3*exp(-
2*x^2+2*x)^2+(2*x^4+6*x^3)*exp(-2*x^2+2*x)+x^5+6*x^4+9*x^3),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {18+9 x+8 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6+6 x-12 x^2+4 x^3+6 x^4\right )}{9 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6 x^3+2 x^4\right )} \, dx=x + \frac {x^{2} - 3}{x^{3} + x^{2} e^{- 2 x^{2} + 2 x} + 3 x^{2}} \]

[In]

integrate((x**3*exp(-2*x**2+2*x)**2+(6*x**4+4*x**3-12*x**2+6*x+6)*exp(-2*x**2+2*x)+x**5+6*x**4+8*x**3+9*x+18)/
(x**3*exp(-2*x**2+2*x)**2+(2*x**4+6*x**3)*exp(-2*x**2+2*x)+x**5+6*x**4+9*x**3),x)

[Out]

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

Maxima [B] (verification not implemented)

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

Time = 0.24 (sec) , antiderivative size = 57, normalized size of antiderivative = 2.11 \[ \int \frac {18+9 x+8 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6+6 x-12 x^2+4 x^3+6 x^4\right )}{9 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6 x^3+2 x^4\right )} \, dx=\frac {x^{3} e^{\left (2 \, x\right )} + {\left (x^{4} + 3 \, x^{3} + x^{2} - 3\right )} e^{\left (2 \, x^{2}\right )}}{x^{2} e^{\left (2 \, x\right )} + {\left (x^{3} + 3 \, x^{2}\right )} e^{\left (2 \, x^{2}\right )}} \]

[In]

integrate((x^3*exp(-2*x^2+2*x)^2+(6*x^4+4*x^3-12*x^2+6*x+6)*exp(-2*x^2+2*x)+x^5+6*x^4+8*x^3+9*x+18)/(x^3*exp(-
2*x^2+2*x)^2+(2*x^4+6*x^3)*exp(-2*x^2+2*x)+x^5+6*x^4+9*x^3),x, algorithm="maxima")

[Out]

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

Giac [B] (verification not implemented)

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

Time = 0.28 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.96 \[ \int \frac {18+9 x+8 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6+6 x-12 x^2+4 x^3+6 x^4\right )}{9 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6 x^3+2 x^4\right )} \, dx=\frac {x^{4} + x^{3} e^{\left (-2 \, x^{2} + 2 \, x\right )} + 3 \, x^{3} + x^{2} - 3}{x^{3} + x^{2} e^{\left (-2 \, x^{2} + 2 \, x\right )} + 3 \, x^{2}} \]

[In]

integrate((x^3*exp(-2*x^2+2*x)^2+(6*x^4+4*x^3-12*x^2+6*x+6)*exp(-2*x^2+2*x)+x^5+6*x^4+8*x^3+9*x+18)/(x^3*exp(-
2*x^2+2*x)^2+(2*x^4+6*x^3)*exp(-2*x^2+2*x)+x^5+6*x^4+9*x^3),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.60 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.22 \[ \int \frac {18+9 x+8 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6+6 x-12 x^2+4 x^3+6 x^4\right )}{9 x^3+e^{4 x-4 x^2} x^3+6 x^4+x^5+e^{2 x-2 x^2} \left (6 x^3+2 x^4\right )} \, dx=x+\frac {x^2-3}{x^2\,{\mathrm {e}}^{2\,x-2\,x^2}+3\,x^2+x^3} \]

[In]

int((9*x + x^3*exp(4*x - 4*x^2) + exp(2*x - 2*x^2)*(6*x - 12*x^2 + 4*x^3 + 6*x^4 + 6) + 8*x^3 + 6*x^4 + x^5 +
18)/(x^3*exp(4*x - 4*x^2) + 9*x^3 + 6*x^4 + x^5 + exp(2*x - 2*x^2)*(6*x^3 + 2*x^4)),x)

[Out]

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