Integrand size = 76, antiderivative size = 30 \[ \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 ) \] Output:
-1/4*exp(x+ln(x^2/(-x^2+x+1)^2))-1/4*x^2+x
Time = 2.32 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.53 \[ \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 ) \] Input:
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]
Output:
(4*x - x^2 + E^x*((-1 - x)/(-1 - x + x^2)^2 - (-1 - x + x^2)^(-1)))/4
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 2.28 (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}\) |
Input:
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]
Output:
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
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 = 0.84 (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\) |
orering | \(\frac {\left (x^{8}-10 x^{7}+14 x^{6}+72 x^{5}-138 x^{4}-122 x^{3}-357 x^{2}-8 x -34\right ) \left (\left (-x^{3}+3 x^{2}+x +2\right ) {\mathrm e}^{\ln \left (\frac {x^{2}}{x^{4}-2 x^{3}-x^{2}+2 x +1}\right )+x}-2 x^{4}+6 x^{3}-2 x^{2}-4 x \right )}{2 \left (x^{7}-9 x^{6}+25 x^{5}-17 x^{4}+15 x^{3}-45 x^{2}-4\right ) \left (4 x^{3}-4 x^{2}-4 x \right )}-\frac {x \left (x^{5}-9 x^{4}+51 x^{2}+21 x +34\right ) \left (x^{2}-x -1\right ) \left (\frac {\left (-3 x^{2}+6 x +1\right ) {\mathrm e}^{\ln \left (\frac {x^{2}}{x^{4}-2 x^{3}-x^{2}+2 x +1}\right )+x}+\left (-x^{3}+3 x^{2}+x +2\right ) \left (\frac {\left (\frac {2 x}{x^{4}-2 x^{3}-x^{2}+2 x +1}-\frac {x^{2} \left (4 x^{3}-6 x^{2}-2 x +2\right )}{\left (x^{4}-2 x^{3}-x^{2}+2 x +1\right )^{2}}\right ) \left (x^{4}-2 x^{3}-x^{2}+2 x +1\right )}{x^{2}}+1\right ) {\mathrm e}^{\ln \left (\frac {x^{2}}{x^{4}-2 x^{3}-x^{2}+2 x +1}\right )+x}-8 x^{3}+18 x^{2}-4 x -4}{4 x^{3}-4 x^{2}-4 x}-\frac {\left (\left (-x^{3}+3 x^{2}+x +2\right ) {\mathrm e}^{\ln \left (\frac {x^{2}}{x^{4}-2 x^{3}-x^{2}+2 x +1}\right )+x}-2 x^{4}+6 x^{3}-2 x^{2}-4 x \right ) \left (12 x^{2}-8 x -4\right )}{\left (4 x^{3}-4 x^{2}-4 x \right )^{2}}\right )}{2 \left (x^{7}-9 x^{6}+25 x^{5}-17 x^{4}+15 x^{3}-45 x^{2}-4\right )}\) | \(503\) |
Input:
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)
Output:
-1/4*x^2+x-1/4*x^2/(x^4-2*x^3-x^2+2*x+1)*exp(x)
Time = 0.10 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.23 \[ \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 )} \] Input:
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="fricas")
Output:
-1/4*x^2 + x - 1/4*e^(x + log(x^2/(x^4 - 2*x^3 - x^2 + 2*x + 1)))
Time = 0.08 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.07 \[ \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 \] Input:
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)
Output:
-x**2/4 - x**2*exp(x)/(4*x**4 - 8*x**3 - 4*x**2 + 8*x + 4) + x
Time = 0.16 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.13 \[ \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 \] Input:
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="maxima")
Output:
-1/4*x^2 - 1/4*x^2*e^x/(x^4 - 2*x^3 - x^2 + 2*x + 1) + x
Leaf count of result is larger than twice the leaf count of optimal. 55 vs. \(2 (27) = 54\).
Time = 0.11 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.83 \[ \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 )}} \] Input:
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="giac")
Output:
-1/4*(x^6 - 6*x^5 + 7*x^4 + 6*x^3 + x^2*e^x - 7*x^2 - 4*x)/(x^4 - 2*x^3 - x^2 + 2*x + 1)
Time = 4.62 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.80 \[ \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} \] Input:
int((4*x - exp(x + log(x^2/(2*x - x^2 - 2*x^3 + x^4 + 1)))*(x + 3*x^2 - x^ 3 + 2) + 2*x^2 - 6*x^3 + 2*x^4)/(4*x + 4*x^2 - 4*x^3),x)
Output:
x - x^2/4 - (x^2*exp(x))/(4*(x - x^2 + 1)^2)
Time = 0.16 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.83 \[ \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 \left (-e^{x} x -x^{5}+6 x^{4}-7 x^{3}-6 x^{2}+7 x +4\right )}{4 x^{4}-8 x^{3}-4 x^{2}+8 x +4} \] Input:
int(((-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)
Output:
(x*( - e**x*x - x**5 + 6*x**4 - 7*x**3 - 6*x**2 + 7*x + 4))/(4*(x**4 - 2*x **3 - x**2 + 2*x + 1))