Integrand size = 58, antiderivative size = 23 \[ \int \frac {3-6 x+9 x^2+e^{2+2 x} \left (-1+4 x-5 x^2+2 x^3\right )}{x^2-2 x^3+3 x^4-2 x^5+x^6} \, dx=\frac {-3+e^{2+2 x}}{x \left (1-x+x^2\right )} \]
Time = 1.45 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00 \[ \int \frac {3-6 x+9 x^2+e^{2+2 x} \left (-1+4 x-5 x^2+2 x^3\right )}{x^2-2 x^3+3 x^4-2 x^5+x^6} \, dx=\frac {-3+e^{2+2 x}}{x \left (1-x+x^2\right )} \]
Integrate[(3 - 6*x + 9*x^2 + E^(2 + 2*x)*(-1 + 4*x - 5*x^2 + 2*x^3))/(x^2 - 2*x^3 + 3*x^4 - 2*x^5 + x^6),x]
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 5.66 (sec) , antiderivative size = 1146, normalized size of antiderivative = 49.83, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.052, Rules used = {2026, 2463, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {9 x^2+e^{2 x+2} \left (2 x^3-5 x^2+4 x-1\right )-6 x+3}{x^6-2 x^5+3 x^4-2 x^3+x^2} \, dx\) |
\(\Big \downarrow \) 2026 |
\(\displaystyle \int \frac {9 x^2+e^{2 x+2} \left (2 x^3-5 x^2+4 x-1\right )-6 x+3}{x^2 \left (x^4-2 x^3+3 x^2-2 x+1\right )}dx\) |
\(\Big \downarrow \) 2463 |
\(\displaystyle \int \left (\frac {4 i \left (9 x^2+e^{2 x+2} \left (2 x^3-5 x^2+4 x-1\right )-6 x+3\right )}{3 \sqrt {3} x^2 \left (2 x+i \sqrt {3}-1\right )}+\frac {4 i \left (9 x^2+e^{2 x+2} \left (2 x^3-5 x^2+4 x-1\right )-6 x+3\right )}{3 \sqrt {3} \left (-2 x+i \sqrt {3}+1\right ) x^2}-\frac {4 \left (9 x^2+e^{2 x+2} \left (2 x^3-5 x^2+4 x-1\right )-6 x+3\right )}{3 \left (-2 x+i \sqrt {3}+1\right )^2 x^2}-\frac {4 \left (9 x^2+e^{2 x+2} \left (2 x^3-5 x^2+4 x-1\right )-6 x+3\right )}{3 x^2 \left (2 x+i \sqrt {3}-1\right )^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {4 e^{3-i \sqrt {3}} \operatorname {ExpIntegralEi}\left (i \left (-2 i x+\sqrt {3}+i\right )\right )}{\sqrt {3} \left (i+\sqrt {3}\right )}+\frac {4 \left (6 i+\sqrt {3}\right ) e^2 \operatorname {ExpIntegralEi}(2 x)}{9 \left (i+\sqrt {3}\right )}-\frac {8 e^2 \operatorname {ExpIntegralEi}(2 x)}{3 \sqrt {3} \left (i+\sqrt {3}\right )}-\frac {8 e^2 \operatorname {ExpIntegralEi}(2 x)}{3 \left (i+\sqrt {3}\right )^2}+\frac {4 \left (6 i-\sqrt {3}\right ) e^2 \operatorname {ExpIntegralEi}(2 x)}{9 \left (i-\sqrt {3}\right )}+\frac {8 e^2 \operatorname {ExpIntegralEi}(2 x)}{3 \sqrt {3} \left (i-\sqrt {3}\right )}-\frac {8 e^2 \operatorname {ExpIntegralEi}(2 x)}{3 \left (i-\sqrt {3}\right )^2}+\frac {2 \left (i+\sqrt {3}\right ) e^{2+\frac {4 i}{i-\sqrt {3}}} \operatorname {ExpIntegralEi}\left (-\frac {2 \left (2 i-\left (i-\sqrt {3}\right ) x\right )}{i-\sqrt {3}}\right )}{3 \left (i-\sqrt {3}\right )}-\frac {8 e^{2+\frac {4 i}{i-\sqrt {3}}} \operatorname {ExpIntegralEi}\left (-\frac {2 \left (2 i-\left (i-\sqrt {3}\right ) x\right )}{i-\sqrt {3}}\right )}{3 \left (1+i \sqrt {3}\right )}+\frac {2 \left (3 i+\sqrt {3}\right ) e^{-\frac {4 \sqrt {3}}{i-\sqrt {3}}} \operatorname {ExpIntegralEi}\left (\frac {2 \left (\left (i-\sqrt {3}\right ) x+\sqrt {3}+i\right )}{i-\sqrt {3}}\right )}{3 \left (i+\sqrt {3}\right )}-\frac {8 e^{2+\frac {4 i}{i+\sqrt {3}}} \operatorname {ExpIntegralEi}\left (-\frac {2 \left (2 i-\left (i+\sqrt {3}\right ) x\right )}{i+\sqrt {3}}\right )}{3 \left (1-i \sqrt {3}\right )}+\frac {2 \left (i-\sqrt {3}\right ) e^{\frac {2 \left (3 i+\sqrt {3}\right )}{i+\sqrt {3}}} \operatorname {ExpIntegralEi}\left (-\frac {2 \left (2 i-\left (i+\sqrt {3}\right ) x\right )}{i+\sqrt {3}}\right )}{3 \left (i+\sqrt {3}\right )}-\left (1-i \sqrt {3}\right ) \log \left (-2 i x-\sqrt {3}+i\right )-\left (1+i \sqrt {3}\right ) \log \left (-2 i x+\sqrt {3}+i\right )+\left (1+i \sqrt {3}\right ) \log (x)-\frac {4 \log (x)}{1+i \sqrt {3}}+\left (1-i \sqrt {3}\right ) \log (x)-\frac {4 \log (x)}{1-i \sqrt {3}}-\frac {2 \left (i+\sqrt {3}\right ) \log \left (2 i-\left (i-\sqrt {3}\right ) x\right )}{i-\sqrt {3}}-\frac {2 \left (i-\sqrt {3}\right ) \log \left (2 i-\left (i+\sqrt {3}\right ) x\right )}{i+\sqrt {3}}+\frac {4 e^{2 x+2}}{\sqrt {3} \left (1-i \sqrt {3}\right ) \left (-2 i x+\sqrt {3}+i\right )}-\frac {4 \sqrt {3}}{\left (1-i \sqrt {3}\right ) \left (-2 i x+\sqrt {3}+i\right )}+\frac {4 e^{2 x+2}}{3 \sqrt {3} \left (i+\sqrt {3}\right ) x}+\frac {4 e^{2 x+2}}{3 \left (i+\sqrt {3}\right )^2 x}-\frac {4 e^{2 x+2}}{3 \sqrt {3} \left (i-\sqrt {3}\right ) x}+\frac {4 e^{2 x+2}}{3 \left (i-\sqrt {3}\right )^2 x}-\frac {4}{\sqrt {3} \left (i+\sqrt {3}\right ) x}-\frac {4}{\left (i+\sqrt {3}\right )^2 x}+\frac {4}{\sqrt {3} \left (i-\sqrt {3}\right ) x}-\frac {4}{\left (i-\sqrt {3}\right )^2 x}+\frac {2 e^{2 x+2}}{\sqrt {3} \left (\left (i-\sqrt {3}\right ) x+\sqrt {3}+i\right )}-\frac {2 \sqrt {3}}{\left (i-\sqrt {3}\right ) x+\sqrt {3}+i}\) |
Int[(3 - 6*x + 9*x^2 + E^(2 + 2*x)*(-1 + 4*x - 5*x^2 + 2*x^3))/(x^2 - 2*x^ 3 + 3*x^4 - 2*x^5 + x^6),x]
(-4*Sqrt[3])/((1 - I*Sqrt[3])*(I + Sqrt[3] - (2*I)*x)) + (4*E^(2 + 2*x))/( Sqrt[3]*(1 - I*Sqrt[3])*(I + Sqrt[3] - (2*I)*x)) - 4/((I - Sqrt[3])^2*x) + 4/(Sqrt[3]*(I - Sqrt[3])*x) - 4/((I + Sqrt[3])^2*x) - 4/(Sqrt[3]*(I + Sqr t[3])*x) + (4*E^(2 + 2*x))/(3*(I - Sqrt[3])^2*x) - (4*E^(2 + 2*x))/(3*Sqrt [3]*(I - Sqrt[3])*x) + (4*E^(2 + 2*x))/(3*(I + Sqrt[3])^2*x) + (4*E^(2 + 2 *x))/(3*Sqrt[3]*(I + Sqrt[3])*x) - (2*Sqrt[3])/(I + Sqrt[3] + (I - Sqrt[3] )*x) + (2*E^(2 + 2*x))/(Sqrt[3]*(I + Sqrt[3] + (I - Sqrt[3])*x)) + (4*E^(3 - I*Sqrt[3])*ExpIntegralEi[I*(I + Sqrt[3] - (2*I)*x)])/(Sqrt[3]*(I + Sqrt [3])) - (8*E^2*ExpIntegralEi[2*x])/(3*(I - Sqrt[3])^2) + (8*E^2*ExpIntegra lEi[2*x])/(3*Sqrt[3]*(I - Sqrt[3])) + (4*(6*I - Sqrt[3])*E^2*ExpIntegralEi [2*x])/(9*(I - Sqrt[3])) - (8*E^2*ExpIntegralEi[2*x])/(3*(I + Sqrt[3])^2) - (8*E^2*ExpIntegralEi[2*x])/(3*Sqrt[3]*(I + Sqrt[3])) + (4*(6*I + Sqrt[3] )*E^2*ExpIntegralEi[2*x])/(9*(I + Sqrt[3])) - (8*E^(2 + (4*I)/(I - Sqrt[3] ))*ExpIntegralEi[(-2*(2*I - (I - Sqrt[3])*x))/(I - Sqrt[3])])/(3*(1 + I*Sq rt[3])) + (2*(I + Sqrt[3])*E^(2 + (4*I)/(I - Sqrt[3]))*ExpIntegralEi[(-2*( 2*I - (I - Sqrt[3])*x))/(I - Sqrt[3])])/(3*(I - Sqrt[3])) + (2*(3*I + Sqrt [3])*ExpIntegralEi[(2*(I + Sqrt[3] + (I - Sqrt[3])*x))/(I - Sqrt[3])])/(3* (I + Sqrt[3])*E^((4*Sqrt[3])/(I - Sqrt[3]))) + (2*(I - Sqrt[3])*E^((2*(3*I + Sqrt[3]))/(I + Sqrt[3]))*ExpIntegralEi[(-2*(2*I - (I + Sqrt[3])*x))/(I + Sqrt[3])])/(3*(I + Sqrt[3])) - (8*E^(2 + (4*I)/(I + Sqrt[3]))*ExpInte...
3.21.34.3.1 Defintions of rubi rules used
Int[(Fx_.)*(Px_)^(p_.), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Int[x^(p *r)*ExpandToSum[Px/x^r, x]^p*Fx, x] /; IGtQ[r, 0]] /; PolyQ[Px, x] && Integ erQ[p] && !MonomialQ[Px, x] && (ILtQ[p, 0] || !PolyQ[u, x])
Int[(u_.)*(Px_)^(p_), x_Symbol] :> With[{Qx = Factor[Px]}, Int[ExpandIntegr and[u, Qx^p, x], x] /; !SumQ[NonfreeFactors[Qx, x]]] /; PolyQ[Px, x] && Gt Q[Expon[Px, x], 2] && !BinomialQ[Px, x] && !TrinomialQ[Px, x] && ILtQ[p, 0]
Time = 0.22 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00
method | result | size |
norman | \(\frac {-3+{\mathrm e}^{2+2 x}}{x \left (x^{2}-x +1\right )}\) | \(23\) |
parallelrisch | \(\frac {-3+{\mathrm e}^{2+2 x}}{x \left (x^{2}-x +1\right )}\) | \(23\) |
risch | \(-\frac {3}{x \left (x^{2}-x +1\right )}+\frac {{\mathrm e}^{2+2 x}}{x \left (x^{2}-x +1\right )}\) | \(37\) |
parts | \(\frac {4 \,{\mathrm e}^{2+2 x} \left (4 \left (1+x \right )^{2}-1-13 x \right )}{\left (\left (1+x \right )^{2}-3 x \right ) x}-\frac {20 \,{\mathrm e}^{2+2 x} \left (\left (1+x \right )^{2}-4 x \right )}{\left (\left (1+x \right )^{2}-3 x \right ) x}-\frac {11 \,{\mathrm e}^{2+2 x} \left (-1+2 x \right )}{\left (\left (1+x \right )^{2}-3 x \right ) x}+\frac {2 \,{\mathrm e}^{2+2 x} \left (1+x \right ) \left (-1+2 x \right )}{\left (\left (1+x \right )^{2}-3 x \right ) x}-\frac {3}{x}-\frac {3 \left (1-x \right )}{x^{2}-x +1}\) | \(146\) |
derivativedivides | \(-\frac {3}{x}-\frac {18 \left (-\frac {2}{3}+\frac {x}{3}\right )}{\left (1+x \right )^{2}-3 x}-\frac {24}{\left (1+x \right )^{2}-3 x}+\frac {9 x +9}{\left (1+x \right )^{2}-3 x}+\frac {4 \,{\mathrm e}^{2+2 x} \left (4 \left (1+x \right )^{2}-1-13 x \right )}{\left (1+x \right )^{3}-4 \left (1+x \right )^{2}+3+6 x}-\frac {20 \,{\mathrm e}^{2+2 x} \left (\left (1+x \right )^{2}-4 x \right )}{\left (1+x \right )^{3}-4 \left (1+x \right )^{2}+3+6 x}-\frac {11 \,{\mathrm e}^{2+2 x} \left (-1+2 x \right )}{\left (1+x \right )^{3}-4 \left (1+x \right )^{2}+3+6 x}+\frac {2 \,{\mathrm e}^{2+2 x} \left (1+x \right ) \left (-1+2 x \right )}{\left (1+x \right )^{3}-4 \left (1+x \right )^{2}+3+6 x}\) | \(196\) |
default | \(-\frac {3}{x}-\frac {18 \left (-\frac {2}{3}+\frac {x}{3}\right )}{\left (1+x \right )^{2}-3 x}-\frac {24}{\left (1+x \right )^{2}-3 x}+\frac {9 x +9}{\left (1+x \right )^{2}-3 x}+\frac {4 \,{\mathrm e}^{2+2 x} \left (4 \left (1+x \right )^{2}-1-13 x \right )}{\left (1+x \right )^{3}-4 \left (1+x \right )^{2}+3+6 x}-\frac {20 \,{\mathrm e}^{2+2 x} \left (\left (1+x \right )^{2}-4 x \right )}{\left (1+x \right )^{3}-4 \left (1+x \right )^{2}+3+6 x}-\frac {11 \,{\mathrm e}^{2+2 x} \left (-1+2 x \right )}{\left (1+x \right )^{3}-4 \left (1+x \right )^{2}+3+6 x}+\frac {2 \,{\mathrm e}^{2+2 x} \left (1+x \right ) \left (-1+2 x \right )}{\left (1+x \right )^{3}-4 \left (1+x \right )^{2}+3+6 x}\) | \(196\) |
int(((2*x^3-5*x^2+4*x-1)*exp(1+x)^2+9*x^2-6*x+3)/(x^6-2*x^5+3*x^4-2*x^3+x^ 2),x,method=_RETURNVERBOSE)
Time = 0.25 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.91 \[ \int \frac {3-6 x+9 x^2+e^{2+2 x} \left (-1+4 x-5 x^2+2 x^3\right )}{x^2-2 x^3+3 x^4-2 x^5+x^6} \, dx=\frac {e^{\left (2 \, x + 2\right )} - 3}{x^{3} - x^{2} + x} \]
integrate(((2*x^3-5*x^2+4*x-1)*exp(1+x)^2+9*x^2-6*x+3)/(x^6-2*x^5+3*x^4-2* x^3+x^2),x, algorithm=\
Time = 0.08 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.04 \[ \int \frac {3-6 x+9 x^2+e^{2+2 x} \left (-1+4 x-5 x^2+2 x^3\right )}{x^2-2 x^3+3 x^4-2 x^5+x^6} \, dx=\frac {e^{2 x + 2}}{x^{3} - x^{2} + x} - \frac {3}{x^{3} - x^{2} + x} \]
integrate(((2*x**3-5*x**2+4*x-1)*exp(1+x)**2+9*x**2-6*x+3)/(x**6-2*x**5+3* x**4-2*x**3+x**2),x)
Leaf count of result is larger than twice the leaf count of optimal. 76 vs. \(2 (22) = 44\).
Time = 0.32 (sec) , antiderivative size = 76, normalized size of antiderivative = 3.30 \[ \int \frac {3-6 x+9 x^2+e^{2+2 x} \left (-1+4 x-5 x^2+2 x^3\right )}{x^2-2 x^3+3 x^4-2 x^5+x^6} \, dx=-\frac {4 \, x^{2} - 5 \, x + 3}{x^{3} - x^{2} + x} + \frac {3 \, {\left (2 \, x - 1\right )}}{x^{2} - x + 1} - \frac {2 \, {\left (x + 1\right )}}{x^{2} - x + 1} + \frac {e^{\left (2 \, x + 2\right )}}{x^{3} - x^{2} + x} \]
integrate(((2*x^3-5*x^2+4*x-1)*exp(1+x)^2+9*x^2-6*x+3)/(x^6-2*x^5+3*x^4-2* x^3+x^2),x, algorithm=\
-(4*x^2 - 5*x + 3)/(x^3 - x^2 + x) + 3*(2*x - 1)/(x^2 - x + 1) - 2*(x + 1) /(x^2 - x + 1) + e^(2*x + 2)/(x^3 - x^2 + x)
Time = 0.28 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.91 \[ \int \frac {3-6 x+9 x^2+e^{2+2 x} \left (-1+4 x-5 x^2+2 x^3\right )}{x^2-2 x^3+3 x^4-2 x^5+x^6} \, dx=\frac {e^{\left (2 \, x + 2\right )} - 3}{x^{3} - x^{2} + x} \]
integrate(((2*x^3-5*x^2+4*x-1)*exp(1+x)^2+9*x^2-6*x+3)/(x^6-2*x^5+3*x^4-2* x^3+x^2),x, algorithm=\
Time = 0.16 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.96 \[ \int \frac {3-6 x+9 x^2+e^{2+2 x} \left (-1+4 x-5 x^2+2 x^3\right )}{x^2-2 x^3+3 x^4-2 x^5+x^6} \, dx=\frac {{\mathrm {e}}^{2\,x+2}-3}{x\,\left (x^2-x+1\right )} \]