Integrand size = 76, antiderivative size = 30 \begin {dmath*} \int \frac {-4 x-2 x^2+6 x^3-2 x^4+\frac {e^x x^2 \left (2+x+3 x^2-x^3\right )}{1+2 x-x^2-2 x^3+x^4}}{-4 x-4 x^2+4 x^3} \, dx=x+\frac {1}{4} \left (-x^2-\frac {e^x x^2}{\left (1+x-x^2\right )^2}\right ) \end {dmath*}
Time = 2.73 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.53 \begin {dmath*} \int \frac {-4 x-2 x^2+6 x^3-2 x^4+\frac {e^x x^2 \left (2+x+3 x^2-x^3\right )}{1+2 x-x^2-2 x^3+x^4}}{-4 x-4 x^2+4 x^3} \, dx=\frac {1}{4} \left (4 x-x^2+e^x \left (\frac {-1-x}{\left (-1-x+x^2\right )^2}-\frac {1}{-1-x+x^2}\right )\right ) \end {dmath*}
Integrate[(-4*x - 2*x^2 + 6*x^3 - 2*x^4 + (E^x*x^2*(2 + x + 3*x^2 - x^3))/ (1 + 2*x - x^2 - 2*x^3 + x^4))/(-4*x - 4*x^2 + 4*x^3),x]
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 2.20 (sec) , antiderivative size = 774, normalized size of antiderivative = 25.80, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.039, Rules used = {2026, 7279, 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 {-2 x^4+6 x^3-2 x^2+\frac {e^x \left (-x^3+3 x^2+x+2\right ) x^2}{x^4-2 x^3-x^2+2 x+1}-4 x}{4 x^3-4 x^2-4 x} \, dx\) |
\(\Big \downarrow \) 2026 |
\(\displaystyle \int \frac {-2 x^4+6 x^3-2 x^2+\frac {e^x \left (-x^3+3 x^2+x+2\right ) x^2}{x^4-2 x^3-x^2+2 x+1}-4 x}{x \left (4 x^2-4 x-4\right )}dx\) |
\(\Big \downarrow \) 7279 |
\(\displaystyle \int \left (\frac {2-x}{2}-\frac {e^x x \left (x^3-3 x^2-x-2\right )}{4 \left (x^2-x-1\right )^3}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {3}{200} \left (5+\sqrt {5}\right ) e^{\frac {1}{2} \left (1+\sqrt {5}\right )} \operatorname {ExpIntegralEi}\left (\frac {1}{2} \left (2 x-\sqrt {5}-1\right )\right )-\frac {3}{100} \left (3+\sqrt {5}\right ) e^{\frac {1}{2} \left (1+\sqrt {5}\right )} \operatorname {ExpIntegralEi}\left (\frac {1}{2} \left (2 x-\sqrt {5}-1\right )\right )+\frac {1}{40} \left (1+\sqrt {5}\right ) e^{\frac {1}{2} \left (1+\sqrt {5}\right )} \operatorname {ExpIntegralEi}\left (\frac {1}{2} \left (2 x-\sqrt {5}-1\right )\right )-\frac {e^{\frac {1}{2} \left (1+\sqrt {5}\right )} \operatorname {ExpIntegralEi}\left (\frac {1}{2} \left (2 x-\sqrt {5}-1\right )\right )}{20 \sqrt {5}}-\frac {1}{100} e^{\frac {1}{2} \left (1+\sqrt {5}\right )} \operatorname {ExpIntegralEi}\left (\frac {1}{2} \left (2 x-\sqrt {5}-1\right )\right )+\frac {3}{200} \left (5-\sqrt {5}\right ) e^{\frac {1}{2}-\frac {\sqrt {5}}{2}} \operatorname {ExpIntegralEi}\left (\frac {1}{2} \left (2 x+\sqrt {5}-1\right )\right )-\frac {3}{100} \left (3-\sqrt {5}\right ) e^{\frac {1}{2}-\frac {\sqrt {5}}{2}} \operatorname {ExpIntegralEi}\left (\frac {1}{2} \left (2 x+\sqrt {5}-1\right )\right )+\frac {1}{40} \left (1-\sqrt {5}\right ) e^{\frac {1}{2}-\frac {\sqrt {5}}{2}} \operatorname {ExpIntegralEi}\left (\frac {1}{2} \left (2 x+\sqrt {5}-1\right )\right )+\frac {e^{\frac {1}{2}-\frac {\sqrt {5}}{2}} \operatorname {ExpIntegralEi}\left (\frac {1}{2} \left (2 x+\sqrt {5}-1\right )\right )}{20 \sqrt {5}}-\frac {1}{100} e^{\frac {1}{2}-\frac {\sqrt {5}}{2}} \operatorname {ExpIntegralEi}\left (\frac {1}{2} \left (2 x+\sqrt {5}-1\right )\right )-\frac {1}{4} (2-x)^2+\frac {3 \left (5-\sqrt {5}\right ) e^x}{100 \left (-2 x-\sqrt {5}+1\right )}-\frac {3 \left (3-\sqrt {5}\right ) e^x}{50 \left (-2 x-\sqrt {5}+1\right )}+\frac {\left (1-\sqrt {5}\right ) e^x}{20 \left (-2 x-\sqrt {5}+1\right )}-\frac {e^x}{10 \sqrt {5} \left (-2 x-\sqrt {5}+1\right )}-\frac {e^x}{50 \left (-2 x-\sqrt {5}+1\right )}+\frac {3 \left (5+\sqrt {5}\right ) e^x}{100 \left (-2 x+\sqrt {5}+1\right )}-\frac {3 \left (3+\sqrt {5}\right ) e^x}{50 \left (-2 x+\sqrt {5}+1\right )}+\frac {\left (1+\sqrt {5}\right ) e^x}{20 \left (-2 x+\sqrt {5}+1\right )}+\frac {e^x}{10 \sqrt {5} \left (-2 x+\sqrt {5}+1\right )}-\frac {e^x}{50 \left (-2 x+\sqrt {5}+1\right )}-\frac {3 \left (5-\sqrt {5}\right ) e^x}{50 \left (-2 x-\sqrt {5}+1\right )^2}+\frac {e^x}{5 \sqrt {5} \left (-2 x-\sqrt {5}+1\right )^2}-\frac {3 \left (5+\sqrt {5}\right ) e^x}{50 \left (-2 x+\sqrt {5}+1\right )^2}-\frac {e^x}{5 \sqrt {5} \left (-2 x+\sqrt {5}+1\right )^2}\) |
Int[(-4*x - 2*x^2 + 6*x^3 - 2*x^4 + (E^x*x^2*(2 + x + 3*x^2 - x^3))/(1 + 2 *x - x^2 - 2*x^3 + x^4))/(-4*x - 4*x^2 + 4*x^3),x]
E^x/(5*Sqrt[5]*(1 - Sqrt[5] - 2*x)^2) - (3*(5 - Sqrt[5])*E^x)/(50*(1 - Sqr t[5] - 2*x)^2) - E^x/(50*(1 - Sqrt[5] - 2*x)) - E^x/(10*Sqrt[5]*(1 - Sqrt[ 5] - 2*x)) + ((1 - Sqrt[5])*E^x)/(20*(1 - Sqrt[5] - 2*x)) - (3*(3 - Sqrt[5 ])*E^x)/(50*(1 - Sqrt[5] - 2*x)) + (3*(5 - Sqrt[5])*E^x)/(100*(1 - Sqrt[5] - 2*x)) - E^x/(5*Sqrt[5]*(1 + Sqrt[5] - 2*x)^2) - (3*(5 + Sqrt[5])*E^x)/( 50*(1 + Sqrt[5] - 2*x)^2) - E^x/(50*(1 + Sqrt[5] - 2*x)) + E^x/(10*Sqrt[5] *(1 + Sqrt[5] - 2*x)) + ((1 + Sqrt[5])*E^x)/(20*(1 + Sqrt[5] - 2*x)) - (3* (3 + Sqrt[5])*E^x)/(50*(1 + Sqrt[5] - 2*x)) + (3*(5 + Sqrt[5])*E^x)/(100*( 1 + Sqrt[5] - 2*x)) - (2 - x)^2/4 - (E^((1 + Sqrt[5])/2)*ExpIntegralEi[(-1 - Sqrt[5] + 2*x)/2])/100 - (E^((1 + Sqrt[5])/2)*ExpIntegralEi[(-1 - Sqrt[ 5] + 2*x)/2])/(20*Sqrt[5]) + ((1 + Sqrt[5])*E^((1 + Sqrt[5])/2)*ExpIntegra lEi[(-1 - Sqrt[5] + 2*x)/2])/40 - (3*(3 + Sqrt[5])*E^((1 + Sqrt[5])/2)*Exp IntegralEi[(-1 - Sqrt[5] + 2*x)/2])/100 + (3*(5 + Sqrt[5])*E^((1 + Sqrt[5] )/2)*ExpIntegralEi[(-1 - Sqrt[5] + 2*x)/2])/200 - (E^(1/2 - Sqrt[5]/2)*Exp IntegralEi[(-1 + Sqrt[5] + 2*x)/2])/100 + (E^(1/2 - Sqrt[5]/2)*ExpIntegral Ei[(-1 + Sqrt[5] + 2*x)/2])/(20*Sqrt[5]) + ((1 - Sqrt[5])*E^(1/2 - Sqrt[5] /2)*ExpIntegralEi[(-1 + Sqrt[5] + 2*x)/2])/40 - (3*(3 - Sqrt[5])*E^(1/2 - Sqrt[5]/2)*ExpIntegralEi[(-1 + Sqrt[5] + 2*x)/2])/100 + (3*(5 - Sqrt[5])*E ^(1/2 - Sqrt[5]/2)*ExpIntegralEi[(-1 + Sqrt[5] + 2*x)/2])/200
3.7.96.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_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[ {v = RationalFunctionExpand[u/(a + b*x^n + c*x^(2*n)), x]}, Int[v, x] /; Su mQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]
Time = 1.11 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.17
method | result | size |
risch | \(-\frac {x^{2}}{4}+x -\frac {x^{2} {\mathrm e}^{x}}{4 \left (x^{4}-2 x^{3}-x^{2}+2 x +1\right )}\) | \(35\) |
default | \(-\frac {x^{2}}{4}+x -\frac {{\mathrm e}^{\ln \left (\frac {x^{2}}{x^{4}-2 x^{3}-x^{2}+2 x +1}\right )+x}}{4}\) | \(38\) |
norman | \(-\frac {x^{2}}{4}+x -\frac {{\mathrm e}^{\ln \left (\frac {x^{2}}{x^{4}-2 x^{3}-x^{2}+2 x +1}\right )+x}}{4}\) | \(38\) |
parts | \(-\frac {x^{2}}{4}+x -\frac {{\mathrm e}^{\ln \left (\frac {x^{2}}{x^{4}-2 x^{3}-x^{2}+2 x +1}\right )+x}}{4}\) | \(38\) |
parallelrisch | \(-\frac {3}{4}-\frac {x^{2}}{4}+x -\frac {{\mathrm e}^{\ln \left (\frac {x^{2}}{x^{4}-2 x^{3}-x^{2}+2 x +1}\right )+x}}{4}\) | \(39\) |
int(((-x^3+3*x^2+x+2)*exp(ln(x^2/(x^4-2*x^3-x^2+2*x+1))+x)-2*x^4+6*x^3-2*x ^2-4*x)/(4*x^3-4*x^2-4*x),x,method=_RETURNVERBOSE)
Time = 0.27 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.23 \begin {dmath*} \int \frac {-4 x-2 x^2+6 x^3-2 x^4+\frac {e^x x^2 \left (2+x+3 x^2-x^3\right )}{1+2 x-x^2-2 x^3+x^4}}{-4 x-4 x^2+4 x^3} \, dx=-\frac {1}{4} \, x^{2} + x - \frac {1}{4} \, e^{\left (x + \log \left (\frac {x^{2}}{x^{4} - 2 \, x^{3} - x^{2} + 2 \, x + 1}\right )\right )} \end {dmath*}
integrate(((-x^3+3*x^2+x+2)*exp(log(x^2/(x^4-2*x^3-x^2+2*x+1))+x)-2*x^4+6* x^3-2*x^2-4*x)/(4*x^3-4*x^2-4*x),x, algorithm=\
Time = 0.08 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.07 \begin {dmath*} \int \frac {-4 x-2 x^2+6 x^3-2 x^4+\frac {e^x x^2 \left (2+x+3 x^2-x^3\right )}{1+2 x-x^2-2 x^3+x^4}}{-4 x-4 x^2+4 x^3} \, dx=- \frac {x^{2}}{4} - \frac {x^{2} e^{x}}{4 x^{4} - 8 x^{3} - 4 x^{2} + 8 x + 4} + x \end {dmath*}
integrate(((-x**3+3*x**2+x+2)*exp(ln(x**2/(x**4-2*x**3-x**2+2*x+1))+x)-2*x **4+6*x**3-2*x**2-4*x)/(4*x**3-4*x**2-4*x),x)
Time = 0.31 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.13 \begin {dmath*} \int \frac {-4 x-2 x^2+6 x^3-2 x^4+\frac {e^x x^2 \left (2+x+3 x^2-x^3\right )}{1+2 x-x^2-2 x^3+x^4}}{-4 x-4 x^2+4 x^3} \, dx=-\frac {1}{4} \, x^{2} - \frac {x^{2} e^{x}}{4 \, {\left (x^{4} - 2 \, x^{3} - x^{2} + 2 \, x + 1\right )}} + x \end {dmath*}
integrate(((-x^3+3*x^2+x+2)*exp(log(x^2/(x^4-2*x^3-x^2+2*x+1))+x)-2*x^4+6* x^3-2*x^2-4*x)/(4*x^3-4*x^2-4*x),x, algorithm=\
Leaf count of result is larger than twice the leaf count of optimal. 55 vs. \(2 (27) = 54\).
Time = 0.26 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.83 \begin {dmath*} \int \frac {-4 x-2 x^2+6 x^3-2 x^4+\frac {e^x x^2 \left (2+x+3 x^2-x^3\right )}{1+2 x-x^2-2 x^3+x^4}}{-4 x-4 x^2+4 x^3} \, dx=-\frac {x^{6} - 6 \, x^{5} + 7 \, x^{4} + 6 \, x^{3} + x^{2} e^{x} - 7 \, x^{2} - 4 \, x}{4 \, {\left (x^{4} - 2 \, x^{3} - x^{2} + 2 \, x + 1\right )}} \end {dmath*}
integrate(((-x^3+3*x^2+x+2)*exp(log(x^2/(x^4-2*x^3-x^2+2*x+1))+x)-2*x^4+6* x^3-2*x^2-4*x)/(4*x^3-4*x^2-4*x),x, algorithm=\
Time = 15.28 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.80 \begin {dmath*} \int \frac {-4 x-2 x^2+6 x^3-2 x^4+\frac {e^x x^2 \left (2+x+3 x^2-x^3\right )}{1+2 x-x^2-2 x^3+x^4}}{-4 x-4 x^2+4 x^3} \, dx=x-\frac {x^2}{4}-\frac {x^2\,{\mathrm {e}}^x}{4\,{\left (-x^2+x+1\right )}^2} \end {dmath*}