Integrand size = 26, antiderivative size = 47 \[ \int \frac {(2+x) \left (d+e x+f x^2\right )}{4-5 x^2+x^4} \, dx=-\frac {1}{2} (d+e+f) \log (1-x)+\frac {1}{3} (d+2 e+4 f) \log (2-x)+\frac {1}{6} (d-e+f) \log (1+x) \] Output:
-1/2*(d+e+f)*ln(1-x)+1/3*(d+2*e+4*f)*ln(2-x)+1/6*(d-e+f)*ln(1+x)
Time = 0.02 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.94 \[ \int \frac {(2+x) \left (d+e x+f x^2\right )}{4-5 x^2+x^4} \, dx=\frac {1}{6} (-3 (d+e+f) \log (1-x)+2 (d+2 e+4 f) \log (2-x)+(d-e+f) \log (1+x)) \] Input:
Integrate[((2 + x)*(d + e*x + f*x^2))/(4 - 5*x^2 + x^4),x]
Output:
(-3*(d + e + f)*Log[1 - x] + 2*(d + 2*e + 4*f)*Log[2 - x] + (d - e + f)*Lo g[1 + x])/6
Time = 0.27 (sec) , antiderivative size = 47, 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.115, 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\right )}{x^4-5 x^2+4} \, dx\) |
\(\Big \downarrow \) 2019 |
\(\displaystyle \int \frac {d+e x+f x^2}{x^3-2 x^2-x+2}dx\) |
\(\Big \downarrow \) 2462 |
\(\displaystyle \int \left (\frac {-d-e-f}{2 (x-1)}+\frac {d+2 e+4 f}{3 (x-2)}+\frac {d-e+f}{6 (x+1)}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {1}{2} \log (1-x) (d+e+f)+\frac {1}{3} \log (2-x) (d+2 e+4 f)+\frac {1}{6} \log (x+1) (d-e+f)\) |
Input:
Int[((2 + x)*(d + e*x + f*x^2))/(4 - 5*x^2 + x^4),x]
Output:
-1/2*((d + e + f)*Log[1 - x]) + ((d + 2*e + 4*f)*Log[2 - x])/3 + ((d - e + f)*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.05 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.00
method | result | size |
default | \(\left (\frac {d}{3}+\frac {2 e}{3}+\frac {4 f}{3}\right ) \ln \left (x -2\right )+\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}\right ) \ln \left (1+x \right )+\left (-\frac {d}{2}-\frac {e}{2}-\frac {f}{2}\right ) \ln \left (x -1\right )\) | \(47\) |
norman | \(\left (\frac {d}{3}+\frac {2 e}{3}+\frac {4 f}{3}\right ) \ln \left (x -2\right )+\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}\right ) \ln \left (1+x \right )+\left (-\frac {d}{2}-\frac {e}{2}-\frac {f}{2}\right ) \ln \left (x -1\right )\) | \(47\) |
parallelrisch | \(\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 {\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 (1+x \right ) d}{6}-\frac {\ln \left (1+x \right ) e}{6}+\frac {\ln \left (1+x \right ) f}{6}\) | \(65\) |
risch | \(-\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 (2-x \right ) d}{3}+\frac {2 \ln \left (2-x \right ) e}{3}+\frac {4 \ln \left (2-x \right ) f}{3}+\frac {\ln \left (1+x \right ) d}{6}-\frac {\ln \left (1+x \right ) e}{6}+\frac {\ln \left (1+x \right ) f}{6}\) | \(77\) |
Input:
int((x+2)*(f*x^2+e*x+d)/(x^4-5*x^2+4),x,method=_RETURNVERBOSE)
Output:
(1/3*d+2/3*e+4/3*f)*ln(x-2)+(1/6*d-1/6*e+1/6*f)*ln(1+x)+(-1/2*d-1/2*e-1/2* f)*ln(x-1)
Time = 0.07 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.79 \[ \int \frac {(2+x) \left (d+e x+f x^2\right )}{4-5 x^2+x^4} \, dx=\frac {1}{6} \, {\left (d - e + f\right )} \log \left (x + 1\right ) - \frac {1}{2} \, {\left (d + e + f\right )} \log \left (x - 1\right ) + \frac {1}{3} \, {\left (d + 2 \, e + 4 \, f\right )} \log \left (x - 2\right ) \] Input:
integrate((2+x)*(f*x^2+e*x+d)/(x^4-5*x^2+4),x, algorithm="fricas")
Output:
1/6*(d - e + f)*log(x + 1) - 1/2*(d + e + f)*log(x - 1) + 1/3*(d + 2*e + 4 *f)*log(x - 2)
Leaf count of result is larger than twice the leaf count of optimal. 716 vs. \(2 (49) = 98\).
Time = 7.13 (sec) , antiderivative size = 716, normalized size of antiderivative = 15.23 \[ \int \frac {(2+x) \left (d+e x+f x^2\right )}{4-5 x^2+x^4} \, dx=\frac {\left (d - e + f\right ) \log {\left (x + \frac {26 d^{3} + 66 d^{2} e + 132 d^{2} f - 9 d^{2} \left (d - e + f\right ) + 78 d e^{2} + 276 d e f - 12 d e \left (d - e + f\right ) + 222 d f^{2} + 6 d f \left (d - e + f\right ) - 7 d \left (d - e + f\right )^{2} + 46 e^{3} + 204 e^{2} f + 3 e^{2} \left (d - e + f\right ) + 282 e f^{2} + 36 e f \left (d - e + f\right ) - 8 e \left (d - e + f\right )^{2} + 116 f^{3} + 51 f^{2} \left (d - e + f\right ) - 13 f \left (d - e + f\right )^{2}}{10 d^{3} + 69 d^{2} e + 102 d^{2} f + 102 d e^{2} + 318 d e f + 246 d f^{2} + 35 e^{3} + 174 e^{2} f + 285 e f^{2} + 154 f^{3}} \right )}}{6} - \frac {\left (d + e + f\right ) \log {\left (x + \frac {26 d^{3} + 66 d^{2} e + 132 d^{2} f + 27 d^{2} \left (d + e + f\right ) + 78 d e^{2} + 276 d e f + 36 d e \left (d + e + f\right ) + 222 d f^{2} - 18 d f \left (d + e + f\right ) - 63 d \left (d + e + f\right )^{2} + 46 e^{3} + 204 e^{2} f - 9 e^{2} \left (d + e + f\right ) + 282 e f^{2} - 108 e f \left (d + e + f\right ) - 72 e \left (d + e + f\right )^{2} + 116 f^{3} - 153 f^{2} \left (d + e + f\right ) - 117 f \left (d + e + f\right )^{2}}{10 d^{3} + 69 d^{2} e + 102 d^{2} f + 102 d e^{2} + 318 d e f + 246 d f^{2} + 35 e^{3} + 174 e^{2} f + 285 e f^{2} + 154 f^{3}} \right )}}{2} + \frac {\left (d + 2 e + 4 f\right ) \log {\left (x + \frac {26 d^{3} + 66 d^{2} e + 132 d^{2} f - 18 d^{2} \left (d + 2 e + 4 f\right ) + 78 d e^{2} + 276 d e f - 24 d e \left (d + 2 e + 4 f\right ) + 222 d f^{2} + 12 d f \left (d + 2 e + 4 f\right ) - 28 d \left (d + 2 e + 4 f\right )^{2} + 46 e^{3} + 204 e^{2} f + 6 e^{2} \left (d + 2 e + 4 f\right ) + 282 e f^{2} + 72 e f \left (d + 2 e + 4 f\right ) - 32 e \left (d + 2 e + 4 f\right )^{2} + 116 f^{3} + 102 f^{2} \left (d + 2 e + 4 f\right ) - 52 f \left (d + 2 e + 4 f\right )^{2}}{10 d^{3} + 69 d^{2} e + 102 d^{2} f + 102 d e^{2} + 318 d e f + 246 d f^{2} + 35 e^{3} + 174 e^{2} f + 285 e f^{2} + 154 f^{3}} \right )}}{3} \] Input:
integrate((2+x)*(f*x**2+e*x+d)/(x**4-5*x**2+4),x)
Output:
(d - e + f)*log(x + (26*d**3 + 66*d**2*e + 132*d**2*f - 9*d**2*(d - e + f) + 78*d*e**2 + 276*d*e*f - 12*d*e*(d - e + f) + 222*d*f**2 + 6*d*f*(d - e + f) - 7*d*(d - e + f)**2 + 46*e**3 + 204*e**2*f + 3*e**2*(d - e + f) + 28 2*e*f**2 + 36*e*f*(d - e + f) - 8*e*(d - e + f)**2 + 116*f**3 + 51*f**2*(d - e + f) - 13*f*(d - e + f)**2)/(10*d**3 + 69*d**2*e + 102*d**2*f + 102*d *e**2 + 318*d*e*f + 246*d*f**2 + 35*e**3 + 174*e**2*f + 285*e*f**2 + 154*f **3))/6 - (d + e + f)*log(x + (26*d**3 + 66*d**2*e + 132*d**2*f + 27*d**2* (d + e + f) + 78*d*e**2 + 276*d*e*f + 36*d*e*(d + e + f) + 222*d*f**2 - 18 *d*f*(d + e + f) - 63*d*(d + e + f)**2 + 46*e**3 + 204*e**2*f - 9*e**2*(d + e + f) + 282*e*f**2 - 108*e*f*(d + e + f) - 72*e*(d + e + f)**2 + 116*f* *3 - 153*f**2*(d + e + f) - 117*f*(d + e + f)**2)/(10*d**3 + 69*d**2*e + 1 02*d**2*f + 102*d*e**2 + 318*d*e*f + 246*d*f**2 + 35*e**3 + 174*e**2*f + 2 85*e*f**2 + 154*f**3))/2 + (d + 2*e + 4*f)*log(x + (26*d**3 + 66*d**2*e + 132*d**2*f - 18*d**2*(d + 2*e + 4*f) + 78*d*e**2 + 276*d*e*f - 24*d*e*(d + 2*e + 4*f) + 222*d*f**2 + 12*d*f*(d + 2*e + 4*f) - 28*d*(d + 2*e + 4*f)** 2 + 46*e**3 + 204*e**2*f + 6*e**2*(d + 2*e + 4*f) + 282*e*f**2 + 72*e*f*(d + 2*e + 4*f) - 32*e*(d + 2*e + 4*f)**2 + 116*f**3 + 102*f**2*(d + 2*e + 4 *f) - 52*f*(d + 2*e + 4*f)**2)/(10*d**3 + 69*d**2*e + 102*d**2*f + 102*d*e **2 + 318*d*e*f + 246*d*f**2 + 35*e**3 + 174*e**2*f + 285*e*f**2 + 154*f** 3))/3
Time = 0.02 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.79 \[ \int \frac {(2+x) \left (d+e x+f x^2\right )}{4-5 x^2+x^4} \, dx=\frac {1}{6} \, {\left (d - e + f\right )} \log \left (x + 1\right ) - \frac {1}{2} \, {\left (d + e + f\right )} \log \left (x - 1\right ) + \frac {1}{3} \, {\left (d + 2 \, e + 4 \, f\right )} \log \left (x - 2\right ) \] Input:
integrate((2+x)*(f*x^2+e*x+d)/(x^4-5*x^2+4),x, algorithm="maxima")
Output:
1/6*(d - e + f)*log(x + 1) - 1/2*(d + e + f)*log(x - 1) + 1/3*(d + 2*e + 4 *f)*log(x - 2)
Time = 0.13 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.85 \[ \int \frac {(2+x) \left (d+e x+f x^2\right )}{4-5 x^2+x^4} \, dx=\frac {1}{6} \, {\left (d - e + f\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{2} \, {\left (d + e + f\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{3} \, {\left (d + 2 \, e + 4 \, f\right )} \log \left ({\left | x - 2 \right |}\right ) \] Input:
integrate((2+x)*(f*x^2+e*x+d)/(x^4-5*x^2+4),x, algorithm="giac")
Output:
1/6*(d - e + f)*log(abs(x + 1)) - 1/2*(d + e + f)*log(abs(x - 1)) + 1/3*(d + 2*e + 4*f)*log(abs(x - 2))
Time = 0.11 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.00 \[ \int \frac {(2+x) \left (d+e x+f x^2\right )}{4-5 x^2+x^4} \, dx=\ln \left (x-2\right )\,\left (\frac {d}{3}+\frac {2\,e}{3}+\frac {4\,f}{3}\right )-\ln \left (x-1\right )\,\left (\frac {d}{2}+\frac {e}{2}+\frac {f}{2}\right )+\ln \left (x+1\right )\,\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}\right ) \] Input:
int(((x + 2)*(d + e*x + f*x^2))/(x^4 - 5*x^2 + 4),x)
Output:
log(x - 2)*(d/3 + (2*e)/3 + (4*f)/3) - log(x - 1)*(d/2 + e/2 + f/2) + log( x + 1)*(d/6 - e/6 + f/6)
Time = 0.16 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.36 \[ \int \frac {(2+x) \left (d+e x+f x^2\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 {\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 ) d}{6}-\frac {\mathrm {log}\left (x +1\right ) e}{6}+\frac {\mathrm {log}\left (x +1\right ) f}{6} \] Input:
int((2+x)*(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 - 3*log(x - 1)*d - 3*log (x - 1)*e - 3*log(x - 1)*f + log(x + 1)*d - log(x + 1)*e + log(x + 1)*f)/6