Integrand size = 60, antiderivative size = 25 \[ \int \frac {2-4 x+6 x^2-2 x^3+x^4+\left (4-4 x+5 x^2-2 x^3+x^4\right ) \log (x)}{4-4 x+5 x^2-2 x^3+x^4} \, dx=-2+\frac {x}{-x+\frac {x}{\frac {2}{x}+x}}+x \log (x) \] Output:
x*ln(x)-2+x/(1/(x+2/x)*x-x)
Time = 0.08 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.60 \[ \int \frac {2-4 x+6 x^2-2 x^3+x^4+\left (4-4 x+5 x^2-2 x^3+x^4\right ) \log (x)}{4-4 x+5 x^2-2 x^3+x^4} \, dx=x \left (\frac {1}{-2+x-x^2}+\log (x)\right ) \] Input:
Integrate[(2 - 4*x + 6*x^2 - 2*x^3 + x^4 + (4 - 4*x + 5*x^2 - 2*x^3 + x^4) *Log[x])/(4 - 4*x + 5*x^2 - 2*x^3 + x^4),x]
Output:
x*((-2 + x - x^2)^(-1) + Log[x])
Result contains complex when optimal does not.
Time = 1.77 (sec) , antiderivative size = 1137, normalized size of antiderivative = 45.48, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.033, Rules used = {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 {x^4-2 x^3+6 x^2+\left (x^4-2 x^3+5 x^2-4 x+4\right ) \log (x)-4 x+2}{x^4-2 x^3+5 x^2-4 x+4} \, dx\) |
\(\Big \downarrow \) 2463 |
\(\displaystyle \int \left (\frac {4 i \left (x^4-2 x^3+6 x^2+\left (x^4-2 x^3+5 x^2-4 x+4\right ) \log (x)-4 x+2\right )}{7 \sqrt {7} \left (-2 x+i \sqrt {7}+1\right )}+\frac {4 i \left (x^4-2 x^3+6 x^2+\left (x^4-2 x^3+5 x^2-4 x+4\right ) \log (x)-4 x+2\right )}{7 \sqrt {7} \left (2 x+i \sqrt {7}-1\right )}-\frac {4 \left (x^4-2 x^3+6 x^2+\left (x^4-2 x^3+5 x^2-4 x+4\right ) \log (x)-4 x+2\right )}{7 \left (-2 x+i \sqrt {7}+1\right )^2}-\frac {4 \left (x^4-2 x^3+6 x^2+\left (x^4-2 x^3+5 x^2-4 x+4\right ) \log (x)-4 x+2\right )}{7 \left (2 x+i \sqrt {7}-1\right )^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {i \log (x) \left (i x+\frac {4}{i-\sqrt {7}}\right )^4}{14 \sqrt {7}}-\frac {1}{7} i \log (x) \left (i x+\frac {4}{i-\sqrt {7}}\right )^3-\frac {8 x^3}{21 \sqrt {7} \left (i+\sqrt {7}\right )}+\frac {1}{147} \left (7+3 i \sqrt {7}\right ) x^3+\frac {1}{147} \left (7-3 i \sqrt {7}\right ) x^3+\frac {8 x^3}{21 \sqrt {7} \left (i-\sqrt {7}\right )}+\frac {12 x^2}{7 \sqrt {7} \left (3 i+\sqrt {7}\right )}+\frac {24 i x^2}{7 \sqrt {7} \left (i+\sqrt {7}\right )^2}-\frac {1}{7} \left (1+i \sqrt {7}\right ) x^2-\frac {6 x^2}{7 \left (1+i \sqrt {7}\right )}-\frac {1}{7} \left (1-i \sqrt {7}\right ) x^2-\frac {6 x^2}{7 \left (1-i \sqrt {7}\right )}+\frac {2 x^2}{7}+\frac {32 x}{7 \sqrt {7} \left (5 i+\sqrt {7}\right )}+\frac {1}{49} \left (21+i \sqrt {7}\right ) x+\frac {3}{14} \left (3+i \sqrt {7}\right ) x-\frac {24 x}{7 \left (3+i \sqrt {7}\right )}+\frac {2}{7} \left (1+i \sqrt {7}\right ) x+\frac {1}{49} \left (21-i \sqrt {7}\right ) x+\frac {3}{14} \left (3-i \sqrt {7}\right ) x-\frac {24 x}{7 \left (3-i \sqrt {7}\right )}+\frac {2}{7} \left (1-i \sqrt {7}\right ) x-\frac {32 x}{7 \sqrt {7} \left (5 i-\sqrt {7}\right )}-\frac {12 x}{7}+\frac {2}{7} \left (5+i \sqrt {7}\right ) \log \left (-2 i x-\sqrt {7}+i\right )-\frac {5}{7} \left (1+i \sqrt {7}\right ) \log \left (-2 i x-\sqrt {7}+i\right )-\frac {3}{7} \left (3-i \sqrt {7}\right ) \log \left (-2 i x-\sqrt {7}+i\right )+\frac {4}{7} \log \left (-2 i x-\sqrt {7}+i\right )-\frac {3}{7} \left (3+i \sqrt {7}\right ) \log \left (-2 i x+\sqrt {7}+i\right )+\frac {2}{7} \left (5-i \sqrt {7}\right ) \log \left (-2 i x+\sqrt {7}+i\right )-\frac {5}{7} \left (1-i \sqrt {7}\right ) \log \left (-2 i x+\sqrt {7}+i\right )+\frac {4}{7} \log \left (-2 i x+\sqrt {7}+i\right )+\frac {i \left (i x+\frac {4}{i+\sqrt {7}}\right )^4 \log (x)}{14 \sqrt {7}}-\frac {1}{7} i \left (i x+\frac {4}{i+\sqrt {7}}\right )^3 \log (x)-\frac {128 i \log (x)}{7 \sqrt {7} \left (i+\sqrt {7}\right )^4}-\frac {64 \log (x)}{7 \left (1+i \sqrt {7}\right )^3}-\frac {64 \log (x)}{7 \left (1-i \sqrt {7}\right )^3}+\frac {128 i \log (x)}{7 \sqrt {7} \left (i-\sqrt {7}\right )^4}-\frac {i+3 \sqrt {7}}{7 \left (-2 i x-\sqrt {7}+i\right )}+\frac {6 \left (3 i+\sqrt {7}\right )}{7 \left (-2 i x-\sqrt {7}+i\right )}-\frac {2 \left (5 i-\sqrt {7}\right )}{7 \left (-2 i x-\sqrt {7}+i\right )}+\frac {4 \left (i-\sqrt {7}\right )}{7 \left (-2 i x-\sqrt {7}+i\right )}-\frac {4 i}{7 \left (-2 i x-\sqrt {7}+i\right )}-\frac {2 \left (5 i+\sqrt {7}\right )}{7 \left (-2 i x+\sqrt {7}+i\right )}+\frac {4 \left (i+\sqrt {7}\right )}{7 \left (-2 i x+\sqrt {7}+i\right )}+\frac {6 \left (3 i-\sqrt {7}\right )}{7 \left (-2 i x+\sqrt {7}+i\right )}-\frac {i-3 \sqrt {7}}{7 \left (-2 i x+\sqrt {7}+i\right )}-\frac {4 i}{7 \left (-2 i x+\sqrt {7}+i\right )}\) |
Input:
Int[(2 - 4*x + 6*x^2 - 2*x^3 + x^4 + (4 - 4*x + 5*x^2 - 2*x^3 + x^4)*Log[x ])/(4 - 4*x + 5*x^2 - 2*x^3 + x^4),x]
Output:
((-4*I)/7)/(I - Sqrt[7] - (2*I)*x) + (4*(I - Sqrt[7]))/(7*(I - Sqrt[7] - ( 2*I)*x)) - (2*(5*I - Sqrt[7]))/(7*(I - Sqrt[7] - (2*I)*x)) + (6*(3*I + Sqr t[7]))/(7*(I - Sqrt[7] - (2*I)*x)) - (I + 3*Sqrt[7])/(7*(I - Sqrt[7] - (2* I)*x)) - ((4*I)/7)/(I + Sqrt[7] - (2*I)*x) - (I - 3*Sqrt[7])/(7*(I + Sqrt[ 7] - (2*I)*x)) + (6*(3*I - Sqrt[7]))/(7*(I + Sqrt[7] - (2*I)*x)) + (4*(I + Sqrt[7]))/(7*(I + Sqrt[7] - (2*I)*x)) - (2*(5*I + Sqrt[7]))/(7*(I + Sqrt[ 7] - (2*I)*x)) - (12*x)/7 - (32*x)/(7*Sqrt[7]*(5*I - Sqrt[7])) + (2*(1 - I *Sqrt[7])*x)/7 - (24*x)/(7*(3 - I*Sqrt[7])) + (3*(3 - I*Sqrt[7])*x)/14 + ( (21 - I*Sqrt[7])*x)/49 + (2*(1 + I*Sqrt[7])*x)/7 - (24*x)/(7*(3 + I*Sqrt[7 ])) + (3*(3 + I*Sqrt[7])*x)/14 + ((21 + I*Sqrt[7])*x)/49 + (32*x)/(7*Sqrt[ 7]*(5*I + Sqrt[7])) + (2*x^2)/7 - (6*x^2)/(7*(1 - I*Sqrt[7])) - ((1 - I*Sq rt[7])*x^2)/7 - (6*x^2)/(7*(1 + I*Sqrt[7])) - ((1 + I*Sqrt[7])*x^2)/7 + (( (24*I)/7)*x^2)/(Sqrt[7]*(I + Sqrt[7])^2) + (12*x^2)/(7*Sqrt[7]*(3*I + Sqrt [7])) + (8*x^3)/(21*Sqrt[7]*(I - Sqrt[7])) + ((7 - (3*I)*Sqrt[7])*x^3)/147 + ((7 + (3*I)*Sqrt[7])*x^3)/147 - (8*x^3)/(21*Sqrt[7]*(I + Sqrt[7])) + (4 *Log[I - Sqrt[7] - (2*I)*x])/7 - (3*(3 - I*Sqrt[7])*Log[I - Sqrt[7] - (2*I )*x])/7 - (5*(1 + I*Sqrt[7])*Log[I - Sqrt[7] - (2*I)*x])/7 + (2*(5 + I*Sqr t[7])*Log[I - Sqrt[7] - (2*I)*x])/7 + (4*Log[I + Sqrt[7] - (2*I)*x])/7 - ( 5*(1 - I*Sqrt[7])*Log[I + Sqrt[7] - (2*I)*x])/7 + (2*(5 - I*Sqrt[7])*Log[I + Sqrt[7] - (2*I)*x])/7 - (3*(3 + I*Sqrt[7])*Log[I + Sqrt[7] - (2*I)*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.45 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76
method | result | size |
default | \(-\frac {x}{x^{2}-x +2}+x \ln \left (x \right )\) | \(19\) |
risch | \(-\frac {x}{x^{2}-x +2}+x \ln \left (x \right )\) | \(19\) |
parts | \(-\frac {x}{x^{2}-x +2}+x \ln \left (x \right )\) | \(19\) |
norman | \(\frac {x^{3} \ln \left (x \right )-x +2 x \ln \left (x \right )-x^{2} \ln \left (x \right )}{x^{2}-x +2}\) | \(34\) |
parallelrisch | \(\frac {x^{3} \ln \left (x \right )-x +2 x \ln \left (x \right )-x^{2} \ln \left (x \right )}{x^{2}-x +2}\) | \(34\) |
orering | \(\frac {\left (\left (x^{4}-2 x^{3}+5 x^{2}-4 x +4\right ) \ln \left (x \right )+x^{4}-2 x^{3}+6 x^{2}-4 x +2\right ) x}{x^{4}-2 x^{3}+5 x^{2}-4 x +4}-\frac {\left (x^{5}+3 x^{3}+5 x^{2}-4 x +8\right ) x \left (x^{2}-x +2\right ) \left (\frac {\left (4 x^{3}-6 x^{2}+10 x -4\right ) \ln \left (x \right )+\frac {x^{4}-2 x^{3}+5 x^{2}-4 x +4}{x}+4 x^{3}-6 x^{2}+12 x -4}{x^{4}-2 x^{3}+5 x^{2}-4 x +4}-\frac {\left (\left (x^{4}-2 x^{3}+5 x^{2}-4 x +4\right ) \ln \left (x \right )+x^{4}-2 x^{3}+6 x^{2}-4 x +2\right ) \left (4 x^{3}-6 x^{2}+10 x -4\right )}{\left (x^{4}-2 x^{3}+5 x^{2}-4 x +4\right )^{2}}\right )}{x^{6}-3 x^{5}+7 x^{4}-13 x^{3}+30 x^{2}-16 x +8}\) | \(275\) |
Input:
int(((x^4-2*x^3+5*x^2-4*x+4)*ln(x)+x^4-2*x^3+6*x^2-4*x+2)/(x^4-2*x^3+5*x^2 -4*x+4),x,method=_RETURNVERBOSE)
Output:
-x/(x^2-x+2)+x*ln(x)
Time = 0.08 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.20 \[ \int \frac {2-4 x+6 x^2-2 x^3+x^4+\left (4-4 x+5 x^2-2 x^3+x^4\right ) \log (x)}{4-4 x+5 x^2-2 x^3+x^4} \, dx=\frac {{\left (x^{3} - x^{2} + 2 \, x\right )} \log \left (x\right ) - x}{x^{2} - x + 2} \] Input:
integrate(((x^4-2*x^3+5*x^2-4*x+4)*log(x)+x^4-2*x^3+6*x^2-4*x+2)/(x^4-2*x^ 3+5*x^2-4*x+4),x, algorithm="fricas")
Output:
((x^3 - x^2 + 2*x)*log(x) - x)/(x^2 - x + 2)
Time = 0.07 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.48 \[ \int \frac {2-4 x+6 x^2-2 x^3+x^4+\left (4-4 x+5 x^2-2 x^3+x^4\right ) \log (x)}{4-4 x+5 x^2-2 x^3+x^4} \, dx=x \log {\left (x \right )} - \frac {x}{x^{2} - x + 2} \] Input:
integrate(((x**4-2*x**3+5*x**2-4*x+4)*ln(x)+x**4-2*x**3+6*x**2-4*x+2)/(x** 4-2*x**3+5*x**2-4*x+4),x)
Output:
x*log(x) - x/(x**2 - x + 2)
Leaf count of result is larger than twice the leaf count of optimal. 86 vs. \(2 (25) = 50\).
Time = 0.28 (sec) , antiderivative size = 86, normalized size of antiderivative = 3.44 \[ \int \frac {2-4 x+6 x^2-2 x^3+x^4+\left (4-4 x+5 x^2-2 x^3+x^4\right ) \log (x)}{4-4 x+5 x^2-2 x^3+x^4} \, dx=x \log \left (x\right ) + \frac {2 \, {\left (5 \, x - 6\right )}}{7 \, {\left (x^{2} - x + 2\right )}} - \frac {6 \, {\left (3 \, x + 2\right )}}{7 \, {\left (x^{2} - x + 2\right )}} + \frac {2 \, {\left (2 \, x - 1\right )}}{7 \, {\left (x^{2} - x + 2\right )}} + \frac {x + 10}{7 \, {\left (x^{2} - x + 2\right )}} - \frac {4 \, {\left (x - 4\right )}}{7 \, {\left (x^{2} - x + 2\right )}} \] Input:
integrate(((x^4-2*x^3+5*x^2-4*x+4)*log(x)+x^4-2*x^3+6*x^2-4*x+2)/(x^4-2*x^ 3+5*x^2-4*x+4),x, algorithm="maxima")
Output:
x*log(x) + 2/7*(5*x - 6)/(x^2 - x + 2) - 6/7*(3*x + 2)/(x^2 - x + 2) + 2/7 *(2*x - 1)/(x^2 - x + 2) + 1/7*(x + 10)/(x^2 - x + 2) - 4/7*(x - 4)/(x^2 - x + 2)
Time = 0.12 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72 \[ \int \frac {2-4 x+6 x^2-2 x^3+x^4+\left (4-4 x+5 x^2-2 x^3+x^4\right ) \log (x)}{4-4 x+5 x^2-2 x^3+x^4} \, dx=x \log \left (x\right ) - \frac {x}{x^{2} - x + 2} \] Input:
integrate(((x^4-2*x^3+5*x^2-4*x+4)*log(x)+x^4-2*x^3+6*x^2-4*x+2)/(x^4-2*x^ 3+5*x^2-4*x+4),x, algorithm="giac")
Output:
x*log(x) - x/(x^2 - x + 2)
Time = 3.47 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72 \[ \int \frac {2-4 x+6 x^2-2 x^3+x^4+\left (4-4 x+5 x^2-2 x^3+x^4\right ) \log (x)}{4-4 x+5 x^2-2 x^3+x^4} \, dx=x\,\ln \left (x\right )-\frac {x}{x^2-x+2} \] Input:
int((log(x)*(5*x^2 - 4*x - 2*x^3 + x^4 + 4) - 4*x + 6*x^2 - 2*x^3 + x^4 + 2)/(5*x^2 - 4*x - 2*x^3 + x^4 + 4),x)
Output:
x*log(x) - x/(x^2 - x + 2)
Time = 0.20 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.48 \[ \int \frac {2-4 x+6 x^2-2 x^3+x^4+\left (4-4 x+5 x^2-2 x^3+x^4\right ) \log (x)}{4-4 x+5 x^2-2 x^3+x^4} \, dx=\frac {\mathrm {log}\left (x \right ) x^{3}-\mathrm {log}\left (x \right ) x^{2}+2 \,\mathrm {log}\left (x \right ) x +x^{2}-2 x +2}{x^{2}-x +2} \] Input:
int(((x^4-2*x^3+5*x^2-4*x+4)*log(x)+x^4-2*x^3+6*x^2-4*x+2)/(x^4-2*x^3+5*x^ 2-4*x+4),x)
Output:
(log(x)*x**3 - log(x)*x**2 + 2*log(x)*x + x**2 - 2*x + 2)/(x**2 - x + 2)