Integrand size = 28, antiderivative size = 111 \[ \int \frac {b+a x^4}{\left (-1+x^2\right ) \left (a x^3+b x^4\right )} \, dx=\frac {a b-2 b^2 x}{2 a^2 x^2}+\frac {1}{2} \log (-1+x)+\frac {\left (-a^2 b-b^3\right ) \log (x)}{a^3}+\frac {(a+b) \log (1+x)}{2 (a-b)}+\frac {\left (-a^4+a^3 b-a^2 b^2+a b^3-b^4\right ) \log (a+b x)}{a^3 (a-b)} \] Output:
1/2*(-2*b^2*x+a*b)/a^2/x^2+1/2*ln(-1+x)+(-a^2*b-b^3)*ln(x)/a^3+(a+b)*ln(1+ x)/(2*a-2*b)+(-a^4+a^3*b-a^2*b^2+a*b^3-b^4)*ln(b*x+a)/a^3/(a-b)
Time = 0.06 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.94 \[ \int \frac {b+a x^4}{\left (-1+x^2\right ) \left (a x^3+b x^4\right )} \, dx=\frac {1}{2} \left (\frac {b}{a x^2}-\frac {2 b^2}{a^2 x}+\log (1-x)-\frac {2 b \left (a^2+b^2\right ) \log (x)}{a^3}+\frac {(a+b) \log (1+x)}{a-b}-\frac {2 \left (a^4-a^3 b+a^2 b^2-a b^3+b^4\right ) \log (a+b x)}{a^3 (a-b)}\right ) \] Input:
Integrate[(b + a*x^4)/((-1 + x^2)*(a*x^3 + b*x^4)),x]
Output:
(b/(a*x^2) - (2*b^2)/(a^2*x) + Log[1 - x] - (2*b*(a^2 + b^2)*Log[x])/a^3 + ((a + b)*Log[1 + x])/(a - b) - (2*(a^4 - a^3*b + a^2*b^2 - a*b^3 + b^4)*L og[a + b*x])/(a^3*(a - b)))/2
Time = 0.41 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.99, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {2026, 2353, 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 {a x^4+b}{\left (x^2-1\right ) \left (a x^3+b x^4\right )} \, dx\) |
\(\Big \downarrow \) 2026 |
\(\displaystyle \int \frac {a x^4+b}{x^3 \left (x^2-1\right ) (a+b x)}dx\) |
\(\Big \downarrow \) 2353 |
\(\displaystyle \int \left (\frac {b^2}{a^2 x^2}-\frac {b \left (a^2+b^2\right )}{a^3 x}-\frac {b \left (a^4-a^3 b+a^2 b^2-a b^3+b^4\right )}{a^3 (a-b) (a+b x)}-\frac {b}{a x^3}+\frac {a+b}{2 (x+1) (a-b)}+\frac {1}{2 (x-1)}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {b^2}{a^2 x}-\frac {b \left (a^2+b^2\right ) \log (x)}{a^3}-\frac {\left (a^4-a^3 b+a^2 b^2-a b^3+b^4\right ) \log (a+b x)}{a^3 (a-b)}+\frac {b}{2 a x^2}+\frac {(a+b) \log (x+1)}{2 (a-b)}+\frac {1}{2} \log (1-x)\) |
Input:
Int[(b + a*x^4)/((-1 + x^2)*(a*x^3 + b*x^4)),x]
Output:
b/(2*a*x^2) - b^2/(a^2*x) + Log[1 - x]/2 - (b*(a^2 + b^2)*Log[x])/a^3 + (( a + b)*Log[1 + x])/(2*(a - b)) - ((a^4 - a^3*b + a^2*b^2 - a*b^3 + b^4)*Lo g[a + b*x])/(a^3*(a - b))
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[(Px_)*((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2) ^(p_), x_Symbol] :> Int[ExpandIntegrand[Px*(e*x)^m*(c + d*x)^n*(a + b*x^2)^ p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && PolyQ[Px, x] && (Integer Q[p] || (IntegerQ[2*p] && IntegerQ[m] && ILtQ[n, 0]))
Time = 0.13 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.93
method | result | size |
norman | \(\frac {\frac {b}{2 a}-\frac {b^{2} x}{a^{2}}}{x^{2}}+\frac {\left (a +b \right ) \ln \left (1+x \right )}{2 a -2 b}-\frac {b \left (a^{2}+b^{2}\right ) \ln \left (x \right )}{a^{3}}-\frac {\left (a^{4}-a^{3} b +a^{2} b^{2}-a \,b^{3}+b^{4}\right ) \ln \left (b x +a \right )}{a^{3} \left (a -b \right )}+\frac {\ln \left (-1+x \right )}{2}\) | \(103\) |
default | \(\frac {\ln \left (-1+x \right )}{2}-\frac {\left (a^{4}-a^{3} b +a^{2} b^{2}-a \,b^{3}+b^{4}\right ) \ln \left (b x +a \right )}{a^{3} \left (a -b \right )}-\frac {b^{2}}{a^{2} x}+\frac {b}{2 a \,x^{2}}-\frac {b \left (a^{2}+b^{2}\right ) \ln \left (x \right )}{a^{3}}+\frac {\left (a +b \right ) \ln \left (1+x \right )}{2 a -2 b}\) | \(104\) |
risch | \(\frac {\frac {b}{2 a}-\frac {b^{2} x}{a^{2}}}{x^{2}}-\frac {b \ln \left (x \right )}{a}-\frac {b^{3} \ln \left (x \right )}{a^{3}}+\frac {\ln \left (1-x \right )}{2}+\frac {\ln \left (1+x \right ) a}{2 a -2 b}+\frac {\ln \left (1+x \right ) b}{2 a -2 b}-\frac {a \ln \left (-b x -a \right )}{a -b}+\frac {\ln \left (-b x -a \right ) b}{a -b}-\frac {\ln \left (-b x -a \right ) b^{2}}{a \left (a -b \right )}+\frac {\ln \left (-b x -a \right ) b^{3}}{a^{2} \left (a -b \right )}-\frac {\ln \left (-b x -a \right ) b^{4}}{a^{3} \left (a -b \right )}\) | \(184\) |
parallelrisch | \(-\frac {2 \ln \left (x \right ) x^{2} a^{3} b -2 \ln \left (x \right ) x^{2} a^{2} b^{2}+2 \ln \left (x \right ) x^{2} a \,b^{3}-2 \ln \left (x \right ) x^{2} b^{4}-\ln \left (-1+x \right ) a^{4} x^{2}+\ln \left (-1+x \right ) a^{3} x^{2} b -\ln \left (1+x \right ) a^{4} x^{2}-\ln \left (1+x \right ) a^{3} x^{2} b +2 \ln \left (b x +a \right ) x^{2} a^{4}-2 \ln \left (b x +a \right ) x^{2} a^{3} b +2 \ln \left (b x +a \right ) x^{2} a^{2} b^{2}-2 \ln \left (b x +a \right ) x^{2} a \,b^{3}+2 \ln \left (b x +a \right ) x^{2} b^{4}+2 a^{2} b^{2} x -2 x a \,b^{3}-a^{3} b +a^{2} b^{2}}{2 a^{3} x^{2} \left (a -b \right )}\) | \(215\) |
Input:
int((a*x^4+b)/(x^2-1)/(b*x^4+a*x^3),x,method=_RETURNVERBOSE)
Output:
(1/2*b/a-b^2/a^2*x)/x^2+1/2*(a+b)/(a-b)*ln(1+x)-b*(a^2+b^2)/a^3*ln(x)-(a^4 -a^3*b+a^2*b^2-a*b^3+b^4)/a^3/(a-b)*ln(b*x+a)+1/2*ln(-1+x)
Time = 0.52 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.36 \[ \int \frac {b+a x^4}{\left (-1+x^2\right ) \left (a x^3+b x^4\right )} \, dx=\frac {a^{3} b - a^{2} b^{2} - 2 \, {\left (a^{4} - a^{3} b + a^{2} b^{2} - a b^{3} + b^{4}\right )} x^{2} \log \left (b x + a\right ) + {\left (a^{4} + a^{3} b\right )} x^{2} \log \left (x + 1\right ) + {\left (a^{4} - a^{3} b\right )} x^{2} \log \left (x - 1\right ) - 2 \, {\left (a^{3} b - a^{2} b^{2} + a b^{3} - b^{4}\right )} x^{2} \log \left (x\right ) - 2 \, {\left (a^{2} b^{2} - a b^{3}\right )} x}{2 \, {\left (a^{4} - a^{3} b\right )} x^{2}} \] Input:
integrate((a*x^4+b)/(x^2-1)/(b*x^4+a*x^3),x, algorithm="fricas")
Output:
1/2*(a^3*b - a^2*b^2 - 2*(a^4 - a^3*b + a^2*b^2 - a*b^3 + b^4)*x^2*log(b*x + a) + (a^4 + a^3*b)*x^2*log(x + 1) + (a^4 - a^3*b)*x^2*log(x - 1) - 2*(a ^3*b - a^2*b^2 + a*b^3 - b^4)*x^2*log(x) - 2*(a^2*b^2 - a*b^3)*x)/((a^4 - a^3*b)*x^2)
Timed out. \[ \int \frac {b+a x^4}{\left (-1+x^2\right ) \left (a x^3+b x^4\right )} \, dx=\text {Timed out} \] Input:
integrate((a*x**4+b)/(x**2-1)/(b*x**4+a*x**3),x)
Output:
Timed out
Time = 0.02 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.94 \[ \int \frac {b+a x^4}{\left (-1+x^2\right ) \left (a x^3+b x^4\right )} \, dx=-\frac {{\left (a^{4} - a^{3} b + a^{2} b^{2} - a b^{3} + b^{4}\right )} \log \left (b x + a\right )}{a^{4} - a^{3} b} + \frac {{\left (a + b\right )} \log \left (x + 1\right )}{2 \, {\left (a - b\right )}} - \frac {{\left (a^{2} b + b^{3}\right )} \log \left (x\right )}{a^{3}} - \frac {2 \, b^{2} x - a b}{2 \, a^{2} x^{2}} + \frac {1}{2} \, \log \left (x - 1\right ) \] Input:
integrate((a*x^4+b)/(x^2-1)/(b*x^4+a*x^3),x, algorithm="maxima")
Output:
-(a^4 - a^3*b + a^2*b^2 - a*b^3 + b^4)*log(b*x + a)/(a^4 - a^3*b) + 1/2*(a + b)*log(x + 1)/(a - b) - (a^2*b + b^3)*log(x)/a^3 - 1/2*(2*b^2*x - a*b)/ (a^2*x^2) + 1/2*log(x - 1)
Time = 0.14 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.07 \[ \int \frac {b+a x^4}{\left (-1+x^2\right ) \left (a x^3+b x^4\right )} \, dx=-\frac {{\left (a^{4} b - a^{3} b^{2} + a^{2} b^{3} - a b^{4} + b^{5}\right )} \log \left ({\left | b x + a \right |}\right )}{a^{4} b - a^{3} b^{2}} + \frac {{\left (a + b\right )} \log \left ({\left | x + 1 \right |}\right )}{2 \, {\left (a - b\right )}} - \frac {{\left (a^{2} b + b^{3}\right )} \log \left ({\left | x \right |}\right )}{a^{3}} - \frac {2 \, a b^{2} x - a^{2} b}{2 \, a^{3} x^{2}} + \frac {1}{2} \, \log \left ({\left | x - 1 \right |}\right ) \] Input:
integrate((a*x^4+b)/(x^2-1)/(b*x^4+a*x^3),x, algorithm="giac")
Output:
-(a^4*b - a^3*b^2 + a^2*b^3 - a*b^4 + b^5)*log(abs(b*x + a))/(a^4*b - a^3* b^2) + 1/2*(a + b)*log(abs(x + 1))/(a - b) - (a^2*b + b^3)*log(abs(x))/a^3 - 1/2*(2*a*b^2*x - a^2*b)/(a^3*x^2) + 1/2*log(abs(x - 1))
Time = 9.99 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.87 \[ \int \frac {b+a x^4}{\left (-1+x^2\right ) \left (a x^3+b x^4\right )} \, dx=\frac {\ln \left (x-1\right )}{2}+\frac {\frac {b}{2\,a}-\frac {b^2\,x}{a^2}}{x^2}-\ln \left (a+b\,x\right )\,\left (\frac {a^2\,b^2-a\,b^3+b^4}{a^3\,\left (a-b\right )}+1\right )+\frac {\ln \left (x+1\right )\,\left (a+b\right )}{2\,\left (a-b\right )}-\frac {b\,\ln \left (x\right )\,\left (a^2+b^2\right )}{a^3} \] Input:
int((b + a*x^4)/((x^2 - 1)*(a*x^3 + b*x^4)),x)
Output:
log(x - 1)/2 + (b/(2*a) - (b^2*x)/a^2)/x^2 - log(a + b*x)*((b^4 - a*b^3 + a^2*b^2)/(a^3*(a - b)) + 1) + (log(x + 1)*(a + b))/(2*(a - b)) - (b*log(x) *(a^2 + b^2))/a^3
Time = 0.16 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.91 \[ \int \frac {b+a x^4}{\left (-1+x^2\right ) \left (a x^3+b x^4\right )} \, dx=\frac {-2 \,\mathrm {log}\left (b x +a \right ) a^{4} x^{2}+2 \,\mathrm {log}\left (b x +a \right ) a^{3} b \,x^{2}-2 \,\mathrm {log}\left (b x +a \right ) a^{2} b^{2} x^{2}+2 \,\mathrm {log}\left (b x +a \right ) a \,b^{3} x^{2}-2 \,\mathrm {log}\left (b x +a \right ) b^{4} x^{2}+\mathrm {log}\left (x -1\right ) a^{4} x^{2}-\mathrm {log}\left (x -1\right ) a^{3} b \,x^{2}+\mathrm {log}\left (x +1\right ) a^{4} x^{2}+\mathrm {log}\left (x +1\right ) a^{3} b \,x^{2}-2 \,\mathrm {log}\left (x \right ) a^{3} b \,x^{2}+2 \,\mathrm {log}\left (x \right ) a^{2} b^{2} x^{2}-2 \,\mathrm {log}\left (x \right ) a \,b^{3} x^{2}+2 \,\mathrm {log}\left (x \right ) b^{4} x^{2}+a^{3} b -2 a^{2} b^{2} x -a^{2} b^{2}+2 a \,b^{3} x}{2 a^{3} x^{2} \left (a -b \right )} \] Input:
int((a*x^4+b)/(x^2-1)/(b*x^4+a*x^3),x)
Output:
( - 2*log(a + b*x)*a**4*x**2 + 2*log(a + b*x)*a**3*b*x**2 - 2*log(a + b*x) *a**2*b**2*x**2 + 2*log(a + b*x)*a*b**3*x**2 - 2*log(a + b*x)*b**4*x**2 + log(x - 1)*a**4*x**2 - log(x - 1)*a**3*b*x**2 + log(x + 1)*a**4*x**2 + log (x + 1)*a**3*b*x**2 - 2*log(x)*a**3*b*x**2 + 2*log(x)*a**2*b**2*x**2 - 2*l og(x)*a*b**3*x**2 + 2*log(x)*b**4*x**2 + a**3*b - 2*a**2*b**2*x - a**2*b** 2 + 2*a*b**3*x)/(2*a**3*x**2*(a - b))