Integrand size = 36, antiderivative size = 74 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3+h x^4\right )}{4-5 x^2+x^4} \, dx=(g+2 h) x+\frac {h x^2}{2}-\frac {1}{2} (d+e+f+g+h) \log (1-x)+\frac {1}{3} (d+2 e+4 f+8 g+16 h) \log (2-x)+\frac {1}{6} (d-e+f-g+h) \log (1+x) \] Output:
(g+2*h)*x+1/2*h*x^2-1/2*(d+e+f+g+h)*ln(1-x)+1/3*(d+2*e+4*f+8*g+16*h)*ln(2- x)+1/6*(d-e+f-g+h)*ln(1+x)
Time = 0.04 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.96 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3+h x^4\right )}{4-5 x^2+x^4} \, dx=\frac {1}{6} \left (6 (g+2 h) x+3 h x^2-3 (d+e+f+g+h) \log (1-x)+2 (d+2 (e+2 f+4 g+8 h)) \log (2-x)+(d-e+f-g+h) \log (1+x)\right ) \] Input:
Integrate[((2 + x)*(d + e*x + f*x^2 + g*x^3 + h*x^4))/(4 - 5*x^2 + x^4),x]
Output:
(6*(g + 2*h)*x + 3*h*x^2 - 3*(d + e + f + g + h)*Log[1 - x] + 2*(d + 2*(e + 2*f + 4*g + 8*h))*Log[2 - x] + (d - e + f - g + h)*Log[1 + x])/6
Time = 0.31 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2019, 2462, 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+2) \left (d+e x+f x^2+g x^3+h x^4\right )}{x^4-5 x^2+4} \, dx\) |
\(\Big \downarrow \) 2019 |
\(\displaystyle \int \frac {d+e x+f x^2+g x^3+h x^4}{x^3-2 x^2-x+2}dx\) |
\(\Big \downarrow \) 2462 |
\(\displaystyle \int \left (\frac {-d-e-f-g-h}{2 (x-1)}+\frac {d+2 e+4 f+8 g+16 h}{3 (x-2)}+\frac {d-e+f-g+h}{6 (x+1)}+g \left (\frac {2 h}{g}+1\right )+h x\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {1}{2} \log (1-x) (d+e+f+g+h)+\frac {1}{3} \log (2-x) (d+2 e+4 f+8 g+16 h)+\frac {1}{6} \log (x+1) (d-e+f-g+h)+x (g+2 h)+\frac {h x^2}{2}\) |
Input:
Int[((2 + x)*(d + e*x + f*x^2 + g*x^3 + h*x^4))/(4 - 5*x^2 + x^4),x]
Output:
(g + 2*h)*x + (h*x^2)/2 - ((d + e + f + g + h)*Log[1 - x])/2 + ((d + 2*e + 4*f + 8*g + 16*h)*Log[2 - x])/3 + ((d - e + f - g + h)*Log[1 + x])/6
Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px , Qx, x]^p*Qx^(p + q), x] /; FreeQ[q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]
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] && GtQ [Expon[Px, x], 2] && !BinomialQ[Px, x] && !TrinomialQ[Px, x] && ILtQ[p, 0 ] && RationalFunctionQ[u, x]
Time = 0.06 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.05
method | result | size |
default | \(\frac {h \,x^{2}}{2}+g x +2 h x +\left (\frac {d}{3}+\frac {2 e}{3}+\frac {4 f}{3}+\frac {8 g}{3}+\frac {16 h}{3}\right ) \ln \left (x -2\right )+\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}+\frac {h}{6}\right ) \ln \left (1+x \right )+\left (-\frac {d}{2}-\frac {e}{2}-\frac {f}{2}-\frac {g}{2}-\frac {h}{2}\right ) \ln \left (x -1\right )\) | \(78\) |
norman | \(\left (g +2 h \right ) x +\frac {h \,x^{2}}{2}+\left (-\frac {d}{2}-\frac {e}{2}-\frac {f}{2}-\frac {g}{2}-\frac {h}{2}\right ) \ln \left (x -1\right )+\left (\frac {d}{3}+\frac {2 e}{3}+\frac {4 f}{3}+\frac {8 g}{3}+\frac {16 h}{3}\right ) \ln \left (x -2\right )+\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}+\frac {h}{6}\right ) \ln \left (1+x \right )\) | \(78\) |
parallelrisch | \(\frac {h \,x^{2}}{2}+g x +2 h x +\frac {\ln \left (x -2\right ) d}{3}+\frac {2 \ln \left (x -2\right ) e}{3}+\frac {4 \ln \left (x -2\right ) f}{3}+\frac {8 \ln \left (x -2\right ) g}{3}+\frac {16 \ln \left (x -2\right ) h}{3}-\frac {\ln \left (x -1\right ) d}{2}-\frac {\ln \left (x -1\right ) e}{2}-\frac {\ln \left (x -1\right ) f}{2}-\frac {\ln \left (x -1\right ) g}{2}-\frac {\ln \left (x -1\right ) h}{2}+\frac {\ln \left (1+x \right ) d}{6}-\frac {\ln \left (1+x \right ) e}{6}+\frac {\ln \left (1+x \right ) f}{6}-\frac {\ln \left (1+x \right ) g}{6}+\frac {\ln \left (1+x \right ) h}{6}\) | \(120\) |
risch | \(\frac {h \,x^{2}}{2}+g x +2 h x +\frac {\ln \left (2-x \right ) d}{3}+\frac {2 \ln \left (2-x \right ) e}{3}+\frac {4 \ln \left (2-x \right ) f}{3}+\frac {8 \ln \left (2-x \right ) g}{3}+\frac {16 \ln \left (2-x \right ) h}{3}-\frac {\ln \left (1-x \right ) d}{2}-\frac {\ln \left (1-x \right ) e}{2}-\frac {\ln \left (1-x \right ) f}{2}-\frac {\ln \left (1-x \right ) g}{2}-\frac {\ln \left (1-x \right ) h}{2}+\frac {\ln \left (1+x \right ) d}{6}-\frac {\ln \left (1+x \right ) e}{6}+\frac {\ln \left (1+x \right ) f}{6}-\frac {\ln \left (1+x \right ) g}{6}+\frac {\ln \left (1+x \right ) h}{6}\) | \(140\) |
Input:
int((x+2)*(h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4),x,method=_RETURNVERBOSE)
Output:
1/2*h*x^2+g*x+2*h*x+(1/3*d+2/3*e+4/3*f+8/3*g+16/3*h)*ln(x-2)+(1/6*d-1/6*e+ 1/6*f-1/6*g+1/6*h)*ln(1+x)+(-1/2*d-1/2*e-1/2*f-1/2*g-1/2*h)*ln(x-1)
Time = 0.10 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.84 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3+h x^4\right )}{4-5 x^2+x^4} \, dx=\frac {1}{2} \, h x^{2} + {\left (g + 2 \, h\right )} x + \frac {1}{6} \, {\left (d - e + f - g + h\right )} \log \left (x + 1\right ) - \frac {1}{2} \, {\left (d + e + f + g + h\right )} \log \left (x - 1\right ) + \frac {1}{3} \, {\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h\right )} \log \left (x - 2\right ) \] Input:
integrate((2+x)*(h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4),x, algorithm="fric as")
Output:
1/2*h*x^2 + (g + 2*h)*x + 1/6*(d - e + f - g + h)*log(x + 1) - 1/2*(d + e + f + g + h)*log(x - 1) + 1/3*(d + 2*e + 4*f + 8*g + 16*h)*log(x - 2)
Timed out. \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3+h x^4\right )}{4-5 x^2+x^4} \, dx=\text {Timed out} \] Input:
integrate((2+x)*(h*x**4+g*x**3+f*x**2+e*x+d)/(x**4-5*x**2+4),x)
Output:
Timed out
Time = 0.03 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.84 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3+h x^4\right )}{4-5 x^2+x^4} \, dx=\frac {1}{2} \, h x^{2} + {\left (g + 2 \, h\right )} x + \frac {1}{6} \, {\left (d - e + f - g + h\right )} \log \left (x + 1\right ) - \frac {1}{2} \, {\left (d + e + f + g + h\right )} \log \left (x - 1\right ) + \frac {1}{3} \, {\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h\right )} \log \left (x - 2\right ) \] Input:
integrate((2+x)*(h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4),x, algorithm="maxi ma")
Output:
1/2*h*x^2 + (g + 2*h)*x + 1/6*(d - e + f - g + h)*log(x + 1) - 1/2*(d + e + f + g + h)*log(x - 1) + 1/3*(d + 2*e + 4*f + 8*g + 16*h)*log(x - 2)
Time = 0.14 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.88 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3+h x^4\right )}{4-5 x^2+x^4} \, dx=\frac {1}{2} \, h x^{2} + g x + 2 \, h x + \frac {1}{6} \, {\left (d - e + f - g + h\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{2} \, {\left (d + e + f + g + h\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{3} \, {\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h\right )} \log \left ({\left | x - 2 \right |}\right ) \] Input:
integrate((2+x)*(h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4),x, algorithm="giac ")
Output:
1/2*h*x^2 + g*x + 2*h*x + 1/6*(d - e + f - g + h)*log(abs(x + 1)) - 1/2*(d + e + f + g + h)*log(abs(x - 1)) + 1/3*(d + 2*e + 4*f + 8*g + 16*h)*log(a bs(x - 2))
Time = 17.84 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.05 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3+h x^4\right )}{4-5 x^2+x^4} \, dx=x\,\left (g+2\,h\right )+\frac {h\,x^2}{2}-\ln \left (x-1\right )\,\left (\frac {d}{2}+\frac {e}{2}+\frac {f}{2}+\frac {g}{2}+\frac {h}{2}\right )+\ln \left (x+1\right )\,\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}+\frac {h}{6}\right )+\ln \left (x-2\right )\,\left (\frac {d}{3}+\frac {2\,e}{3}+\frac {4\,f}{3}+\frac {8\,g}{3}+\frac {16\,h}{3}\right ) \] Input:
int(((x + 2)*(d + e*x + f*x^2 + g*x^3 + h*x^4))/(x^4 - 5*x^2 + 4),x)
Output:
x*(g + 2*h) + (h*x^2)/2 - log(x - 1)*(d/2 + e/2 + f/2 + g/2 + h/2) + log(x + 1)*(d/6 - e/6 + f/6 - g/6 + h/6) + log(x - 2)*(d/3 + (2*e)/3 + (4*f)/3 + (8*g)/3 + (16*h)/3)
Time = 0.17 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.61 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3+h x^4\right )}{4-5 x^2+x^4} \, dx=\frac {\mathrm {log}\left (x -2\right ) d}{3}+\frac {2 \,\mathrm {log}\left (x -2\right ) e}{3}+\frac {4 \,\mathrm {log}\left (x -2\right ) f}{3}+\frac {8 \,\mathrm {log}\left (x -2\right ) g}{3}+\frac {16 \,\mathrm {log}\left (x -2\right ) h}{3}-\frac {\mathrm {log}\left (x -1\right ) d}{2}-\frac {\mathrm {log}\left (x -1\right ) e}{2}-\frac {\mathrm {log}\left (x -1\right ) f}{2}-\frac {\mathrm {log}\left (x -1\right ) g}{2}-\frac {\mathrm {log}\left (x -1\right ) h}{2}+\frac {\mathrm {log}\left (x +1\right ) d}{6}-\frac {\mathrm {log}\left (x +1\right ) e}{6}+\frac {\mathrm {log}\left (x +1\right ) f}{6}-\frac {\mathrm {log}\left (x +1\right ) g}{6}+\frac {\mathrm {log}\left (x +1\right ) h}{6}+g x +\frac {h \,x^{2}}{2}+2 h x \] Input:
int((2+x)*(h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4),x)
Output:
(2*log(x - 2)*d + 4*log(x - 2)*e + 8*log(x - 2)*f + 16*log(x - 2)*g + 32*l og(x - 2)*h - 3*log(x - 1)*d - 3*log(x - 1)*e - 3*log(x - 1)*f - 3*log(x - 1)*g - 3*log(x - 1)*h + log(x + 1)*d - log(x + 1)*e + log(x + 1)*f - log( x + 1)*g + log(x + 1)*h + 6*g*x + 3*h*x**2 + 12*h*x)/6