Integrand size = 31, antiderivative size = 57 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3\right )}{4-5 x^2+x^4} \, dx=g x-\frac {1}{2} (d+e+f+g) \log (1-x)+\frac {1}{3} (d+2 e+4 f+8 g) \log (2-x)+\frac {1}{6} (d-e+f-g) \log (1+x) \] Output:
g*x-1/2*(d+e+f+g)*ln(1-x)+1/3*(d+2*e+4*f+8*g)*ln(2-x)+1/6*(d-e+f-g)*ln(1+x )
Time = 0.03 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.96 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3\right )}{4-5 x^2+x^4} \, dx=\frac {1}{6} (6 g x-3 (d+e+f+g) \log (1-x)+2 (d+2 e+4 f+8 g) \log (2-x)+(d-e+f-g) \log (1+x)) \] Input:
Integrate[((2 + x)*(d + e*x + f*x^2 + g*x^3))/(4 - 5*x^2 + x^4),x]
Output:
(6*g*x - 3*(d + e + f + g)*Log[1 - x] + 2*(d + 2*e + 4*f + 8*g)*Log[2 - x] + (d - e + f - g)*Log[1 + x])/6
Time = 0.28 (sec) , antiderivative size = 57, 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.097, 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\right )}{x^4-5 x^2+4} \, dx\) |
\(\Big \downarrow \) 2019 |
\(\displaystyle \int \frac {d+e x+f x^2+g x^3}{x^3-2 x^2-x+2}dx\) |
\(\Big \downarrow \) 2462 |
\(\displaystyle \int \left (\frac {-d-e-f-g}{2 (x-1)}+\frac {d+2 e+4 f+8 g}{3 (x-2)}+\frac {d-e+f-g}{6 (x+1)}+g\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {1}{2} \log (1-x) (d+e+f+g)+\frac {1}{3} \log (2-x) (d+2 e+4 f+8 g)+\frac {1}{6} \log (x+1) (d-e+f-g)+g x\) |
Input:
Int[((2 + x)*(d + e*x + f*x^2 + g*x^3))/(4 - 5*x^2 + x^4),x]
Output:
g*x - ((d + e + f + g)*Log[1 - x])/2 + ((d + 2*e + 4*f + 8*g)*Log[2 - x])/ 3 + ((d - e + f - g)*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 = 59, normalized size of antiderivative = 1.04
method | result | size |
default | \(g x +\left (\frac {d}{3}+\frac {2 e}{3}+\frac {4 f}{3}+\frac {8 g}{3}\right ) \ln \left (x -2\right )+\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}\right ) \ln \left (1+x \right )+\left (-\frac {d}{2}-\frac {e}{2}-\frac {f}{2}-\frac {g}{2}\right ) \ln \left (x -1\right )\) | \(59\) |
norman | \(g x +\left (\frac {d}{3}+\frac {2 e}{3}+\frac {4 f}{3}+\frac {8 g}{3}\right ) \ln \left (x -2\right )+\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}\right ) \ln \left (1+x \right )+\left (-\frac {d}{2}-\frac {e}{2}-\frac {f}{2}-\frac {g}{2}\right ) \ln \left (x -1\right )\) | \(59\) |
parallelrisch | \(g 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 {\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 (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}\) | \(89\) |
risch | \(g x -\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 ) 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 (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}\) | \(105\) |
Input:
int((x+2)*(g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4),x,method=_RETURNVERBOSE)
Output:
g*x+(1/3*d+2/3*e+4/3*f+8/3*g)*ln(x-2)+(1/6*d-1/6*e+1/6*f-1/6*g)*ln(1+x)+(- 1/2*d-1/2*e-1/2*f-1/2*g)*ln(x-1)
Time = 0.08 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.82 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3\right )}{4-5 x^2+x^4} \, dx=g x + \frac {1}{6} \, {\left (d - e + f - g\right )} \log \left (x + 1\right ) - \frac {1}{2} \, {\left (d + e + f + g\right )} \log \left (x - 1\right ) + \frac {1}{3} \, {\left (d + 2 \, e + 4 \, f + 8 \, g\right )} \log \left (x - 2\right ) \] Input:
integrate((2+x)*(g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4),x, algorithm="fricas")
Output:
g*x + 1/6*(d - e + f - g)*log(x + 1) - 1/2*(d + e + f + g)*log(x - 1) + 1/ 3*(d + 2*e + 4*f + 8*g)*log(x - 2)
Leaf count of result is larger than twice the leaf count of optimal. 1389 vs. \(2 (63) = 126\).
Time = 49.29 (sec) , antiderivative size = 1389, normalized size of antiderivative = 24.37 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3\right )}{4-5 x^2+x^4} \, dx=\text {Too large to display} \] Input:
integrate((2+x)*(g*x**3+f*x**2+e*x+d)/(x**4-5*x**2+4),x)
Output:
g*x + (d - e + f - g)*log(x + (26*d**3 + 66*d**2*e + 132*d**2*f + 174*d**2 *g - 9*d**2*(d - e + f - g) + 78*d*e**2 + 276*d*e*f + 444*d*e*g - 12*d*e*( d - e + f - g) + 222*d*f**2 + 636*d*f*g + 6*d*f*(d - e + f - g) + 510*d*g* *2 + 36*d*g*(d - e + f - g) - 7*d*(d - e + f - g)**2 + 46*e**3 + 204*e**2* f + 390*e**2*g + 3*e**2*(d - e + f - g) + 282*e*f**2 + 984*e*f*g + 36*e*f* (d - e + f - g) + 930*e*g**2 + 102*e*g*(d - e + f - g) - 8*e*(d - e + f - g)**2 + 116*f**3 + 534*f**2*g + 51*f**2*(d - e + f - g) + 924*f*g**2 + 228 *f*g*(d - e + f - g) - 13*f*(d - e + f - g)**2 + 586*g**3 + 243*g**2*(d - e + f - g) - 20*g*(d - e + f - g)**2)/(10*d**3 + 69*d**2*e + 102*d**2*f + 213*d**2*g + 102*d*e**2 + 318*d*e*f + 564*d*e*g + 246*d*f**2 + 894*d*f*g + 750*d*g**2 + 35*e**3 + 174*e**2*f + 249*e**2*g + 285*e*f**2 + 852*e*f*g + 537*e*g**2 + 154*f**3 + 717*f**2*g + 966*f*g**2 + 323*g**3))/6 - (d + e + f + g)*log(x + (26*d**3 + 66*d**2*e + 132*d**2*f + 174*d**2*g + 27*d**2*( d + e + f + g) + 78*d*e**2 + 276*d*e*f + 444*d*e*g + 36*d*e*(d + e + f + g ) + 222*d*f**2 + 636*d*f*g - 18*d*f*(d + e + f + g) + 510*d*g**2 - 108*d*g *(d + e + f + g) - 63*d*(d + e + f + g)**2 + 46*e**3 + 204*e**2*f + 390*e* *2*g - 9*e**2*(d + e + f + g) + 282*e*f**2 + 984*e*f*g - 108*e*f*(d + e + f + g) + 930*e*g**2 - 306*e*g*(d + e + f + g) - 72*e*(d + e + f + g)**2 + 116*f**3 + 534*f**2*g - 153*f**2*(d + e + f + g) + 924*f*g**2 - 684*f*g*(d + e + f + g) - 117*f*(d + e + f + g)**2 + 586*g**3 - 729*g**2*(d + e +...
Time = 0.04 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.82 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3\right )}{4-5 x^2+x^4} \, dx=g x + \frac {1}{6} \, {\left (d - e + f - g\right )} \log \left (x + 1\right ) - \frac {1}{2} \, {\left (d + e + f + g\right )} \log \left (x - 1\right ) + \frac {1}{3} \, {\left (d + 2 \, e + 4 \, f + 8 \, g\right )} \log \left (x - 2\right ) \] Input:
integrate((2+x)*(g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4),x, algorithm="maxima")
Output:
g*x + 1/6*(d - e + f - g)*log(x + 1) - 1/2*(d + e + f + g)*log(x - 1) + 1/ 3*(d + 2*e + 4*f + 8*g)*log(x - 2)
Time = 0.12 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.88 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3\right )}{4-5 x^2+x^4} \, dx=g x + \frac {1}{6} \, {\left (d - e + f - g\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{2} \, {\left (d + e + f + g\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{3} \, {\left (d + 2 \, e + 4 \, f + 8 \, g\right )} \log \left ({\left | x - 2 \right |}\right ) \] Input:
integrate((2+x)*(g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4),x, algorithm="giac")
Output:
g*x + 1/6*(d - e + f - g)*log(abs(x + 1)) - 1/2*(d + e + f + g)*log(abs(x - 1)) + 1/3*(d + 2*e + 4*f + 8*g)*log(abs(x - 2))
Time = 0.10 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.04 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3\right )}{4-5 x^2+x^4} \, dx=\ln \left (x+1\right )\,\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}\right )-\ln \left (x-1\right )\,\left (\frac {d}{2}+\frac {e}{2}+\frac {f}{2}+\frac {g}{2}\right )+\ln \left (x-2\right )\,\left (\frac {d}{3}+\frac {2\,e}{3}+\frac {4\,f}{3}+\frac {8\,g}{3}\right )+g\,x \] Input:
int(((x + 2)*(d + e*x + f*x^2 + g*x^3))/(x^4 - 5*x^2 + 4),x)
Output:
log(x + 1)*(d/6 - e/6 + f/6 - g/6) - log(x - 1)*(d/2 + e/2 + f/2 + g/2) + log(x - 2)*(d/3 + (2*e)/3 + (4*f)/3 + (8*g)/3) + g*x
Time = 0.18 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.54 \[ \int \frac {(2+x) \left (d+e x+f x^2+g x^3\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 {\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 ) 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}+g x \] Input:
int((2+x)*(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 - 3*lo g(x - 1)*d - 3*log(x - 1)*e - 3*log(x - 1)*f - 3*log(x - 1)*g + log(x + 1) *d - log(x + 1)*e + log(x + 1)*f - log(x + 1)*g + 6*g*x)/6