Integrand size = 27, antiderivative size = 85 \[ \int \frac {A+B x}{x^3 \left (a^2+2 a b x+b^2 x^2\right )} \, dx=-\frac {A}{2 a^2 x^2}+\frac {2 A b-a B}{a^3 x}+\frac {b (A b-a B)}{a^3 (a+b x)}+\frac {b (3 A b-2 a B) \log (x)}{a^4}-\frac {b (3 A b-2 a B) \log (a+b x)}{a^4} \] Output:
-1/2*A/a^2/x^2+(2*A*b-B*a)/a^3/x+b*(A*b-B*a)/a^3/(b*x+a)+b*(3*A*b-2*B*a)*l n(x)/a^4-b*(3*A*b-2*B*a)*ln(b*x+a)/a^4
Time = 0.08 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.00 \[ \int \frac {A+B x}{x^3 \left (a^2+2 a b x+b^2 x^2\right )} \, dx=\frac {-\frac {a \left (-6 A b^2 x^2+a^2 (A+2 B x)+a b x (-3 A+4 B x)\right )}{x^2 (a+b x)}+2 b (3 A b-2 a B) \log (x)+2 b (-3 A b+2 a B) \log (a+b x)}{2 a^4} \] Input:
Integrate[(A + B*x)/(x^3*(a^2 + 2*a*b*x + b^2*x^2)),x]
Output:
(-((a*(-6*A*b^2*x^2 + a^2*(A + 2*B*x) + a*b*x*(-3*A + 4*B*x)))/(x^2*(a + b *x))) + 2*b*(3*A*b - 2*a*B)*Log[x] + 2*b*(-3*A*b + 2*a*B)*Log[a + b*x])/(2 *a^4)
Time = 0.47 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {1184, 27, 86, 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+B x}{x^3 \left (a^2+2 a b x+b^2 x^2\right )} \, dx\) |
\(\Big \downarrow \) 1184 |
\(\displaystyle b^2 \int \frac {A+B x}{b^2 x^3 (a+b x)^2}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \frac {A+B x}{x^3 (a+b x)^2}dx\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \int \left (\frac {b^2 (2 a B-3 A b)}{a^4 (a+b x)}-\frac {b (2 a B-3 A b)}{a^4 x}+\frac {b^2 (a B-A b)}{a^3 (a+b x)^2}+\frac {a B-2 A b}{a^3 x^2}+\frac {A}{a^2 x^3}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b \log (x) (3 A b-2 a B)}{a^4}-\frac {b (3 A b-2 a B) \log (a+b x)}{a^4}+\frac {2 A b-a B}{a^3 x}+\frac {b (A b-a B)}{a^3 (a+b x)}-\frac {A}{2 a^2 x^2}\) |
Input:
Int[(A + B*x)/(x^3*(a^2 + 2*a*b*x + b^2*x^2)),x]
Output:
-1/2*A/(a^2*x^2) + (2*A*b - a*B)/(a^3*x) + (b*(A*b - a*B))/(a^3*(a + b*x)) + (b*(3*A*b - 2*a*B)*Log[x])/a^4 - (b*(3*A*b - 2*a*B)*Log[a + b*x])/a^4
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_) + (b_.)*(x_ ) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[1/c^p Int[(d + e*x)^m*(f + g*x )^n*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n}, x] && E qQ[b^2 - 4*a*c, 0] && IntegerQ[p]
Time = 1.06 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.99
method | result | size |
default | \(-\frac {b \left (3 A b -2 B a \right ) \ln \left (b x +a \right )}{a^{4}}+\frac {b \left (A b -B a \right )}{a^{3} \left (b x +a \right )}-\frac {A}{2 a^{2} x^{2}}-\frac {-2 A b +B a}{x \,a^{3}}+\frac {b \left (3 A b -2 B a \right ) \ln \left (x \right )}{a^{4}}\) | \(84\) |
norman | \(\frac {\frac {\left (3 A \,b^{3}-2 B a \,b^{2}\right ) x^{2}}{a^{3} b}-\frac {A}{2 a}+\frac {\left (3 A b -2 B a \right ) x}{2 a^{2}}}{x^{2} \left (b x +a \right )}+\frac {b \left (3 A b -2 B a \right ) \ln \left (x \right )}{a^{4}}-\frac {b \left (3 A b -2 B a \right ) \ln \left (b x +a \right )}{a^{4}}\) | \(96\) |
risch | \(\frac {\frac {b \left (3 A b -2 B a \right ) x^{2}}{a^{3}}+\frac {\left (3 A b -2 B a \right ) x}{2 a^{2}}-\frac {A}{2 a}}{x^{2} \left (b x +a \right )}-\frac {3 b^{2} \ln \left (b x +a \right ) A}{a^{4}}+\frac {2 b \ln \left (b x +a \right ) B}{a^{3}}+\frac {3 b^{2} \ln \left (-x \right ) A}{a^{4}}-\frac {2 b \ln \left (-x \right ) B}{a^{3}}\) | \(104\) |
parallelrisch | \(\frac {6 A \ln \left (x \right ) x^{3} b^{3}-6 A \ln \left (b x +a \right ) x^{3} b^{3}-4 B \ln \left (x \right ) x^{3} a \,b^{2}+4 B \ln \left (b x +a \right ) x^{3} a \,b^{2}+6 A \ln \left (x \right ) x^{2} a \,b^{2}-6 A \ln \left (b x +a \right ) x^{2} a \,b^{2}-6 A \,b^{3} x^{3}-4 B \ln \left (x \right ) x^{2} a^{2} b +4 B \ln \left (b x +a \right ) x^{2} a^{2} b +4 B a \,b^{2} x^{3}+3 A \,a^{2} b x -2 B \,a^{3} x -a^{3} A}{2 a^{4} x^{2} \left (b x +a \right )}\) | \(167\) |
Input:
int((B*x+A)/x^3/(b^2*x^2+2*a*b*x+a^2),x,method=_RETURNVERBOSE)
Output:
-b*(3*A*b-2*B*a)*ln(b*x+a)/a^4+b*(A*b-B*a)/a^3/(b*x+a)-1/2*A/a^2/x^2-(-2*A *b+B*a)/x/a^3+b*(3*A*b-2*B*a)*ln(x)/a^4
Time = 0.07 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.76 \[ \int \frac {A+B x}{x^3 \left (a^2+2 a b x+b^2 x^2\right )} \, dx=-\frac {A a^{3} + 2 \, {\left (2 \, B a^{2} b - 3 \, A a b^{2}\right )} x^{2} + {\left (2 \, B a^{3} - 3 \, A a^{2} b\right )} x - 2 \, {\left ({\left (2 \, B a b^{2} - 3 \, A b^{3}\right )} x^{3} + {\left (2 \, B a^{2} b - 3 \, A a b^{2}\right )} x^{2}\right )} \log \left (b x + a\right ) + 2 \, {\left ({\left (2 \, B a b^{2} - 3 \, A b^{3}\right )} x^{3} + {\left (2 \, B a^{2} b - 3 \, A a b^{2}\right )} x^{2}\right )} \log \left (x\right )}{2 \, {\left (a^{4} b x^{3} + a^{5} x^{2}\right )}} \] Input:
integrate((B*x+A)/x^3/(b^2*x^2+2*a*b*x+a^2),x, algorithm="fricas")
Output:
-1/2*(A*a^3 + 2*(2*B*a^2*b - 3*A*a*b^2)*x^2 + (2*B*a^3 - 3*A*a^2*b)*x - 2* ((2*B*a*b^2 - 3*A*b^3)*x^3 + (2*B*a^2*b - 3*A*a*b^2)*x^2)*log(b*x + a) + 2 *((2*B*a*b^2 - 3*A*b^3)*x^3 + (2*B*a^2*b - 3*A*a*b^2)*x^2)*log(x))/(a^4*b* x^3 + a^5*x^2)
Leaf count of result is larger than twice the leaf count of optimal. 184 vs. \(2 (80) = 160\).
Time = 0.30 (sec) , antiderivative size = 184, normalized size of antiderivative = 2.16 \[ \int \frac {A+B x}{x^3 \left (a^2+2 a b x+b^2 x^2\right )} \, dx=\frac {- A a^{2} + x^{2} \cdot \left (6 A b^{2} - 4 B a b\right ) + x \left (3 A a b - 2 B a^{2}\right )}{2 a^{4} x^{2} + 2 a^{3} b x^{3}} - \frac {b \left (- 3 A b + 2 B a\right ) \log {\left (x + \frac {- 3 A a b^{2} + 2 B a^{2} b - a b \left (- 3 A b + 2 B a\right )}{- 6 A b^{3} + 4 B a b^{2}} \right )}}{a^{4}} + \frac {b \left (- 3 A b + 2 B a\right ) \log {\left (x + \frac {- 3 A a b^{2} + 2 B a^{2} b + a b \left (- 3 A b + 2 B a\right )}{- 6 A b^{3} + 4 B a b^{2}} \right )}}{a^{4}} \] Input:
integrate((B*x+A)/x**3/(b**2*x**2+2*a*b*x+a**2),x)
Output:
(-A*a**2 + x**2*(6*A*b**2 - 4*B*a*b) + x*(3*A*a*b - 2*B*a**2))/(2*a**4*x** 2 + 2*a**3*b*x**3) - b*(-3*A*b + 2*B*a)*log(x + (-3*A*a*b**2 + 2*B*a**2*b - a*b*(-3*A*b + 2*B*a))/(-6*A*b**3 + 4*B*a*b**2))/a**4 + b*(-3*A*b + 2*B*a )*log(x + (-3*A*a*b**2 + 2*B*a**2*b + a*b*(-3*A*b + 2*B*a))/(-6*A*b**3 + 4 *B*a*b**2))/a**4
Time = 0.03 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.16 \[ \int \frac {A+B x}{x^3 \left (a^2+2 a b x+b^2 x^2\right )} \, dx=-\frac {A a^{2} + 2 \, {\left (2 \, B a b - 3 \, A b^{2}\right )} x^{2} + {\left (2 \, B a^{2} - 3 \, A a b\right )} x}{2 \, {\left (a^{3} b x^{3} + a^{4} x^{2}\right )}} + \frac {{\left (2 \, B a b - 3 \, A b^{2}\right )} \log \left (b x + a\right )}{a^{4}} - \frac {{\left (2 \, B a b - 3 \, A b^{2}\right )} \log \left (x\right )}{a^{4}} \] Input:
integrate((B*x+A)/x^3/(b^2*x^2+2*a*b*x+a^2),x, algorithm="maxima")
Output:
-1/2*(A*a^2 + 2*(2*B*a*b - 3*A*b^2)*x^2 + (2*B*a^2 - 3*A*a*b)*x)/(a^3*b*x^ 3 + a^4*x^2) + (2*B*a*b - 3*A*b^2)*log(b*x + a)/a^4 - (2*B*a*b - 3*A*b^2)* log(x)/a^4
Time = 0.19 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.25 \[ \int \frac {A+B x}{x^3 \left (a^2+2 a b x+b^2 x^2\right )} \, dx=-\frac {{\left (2 \, B a b - 3 \, A b^{2}\right )} \log \left ({\left | x \right |}\right )}{a^{4}} + \frac {{\left (2 \, B a b^{2} - 3 \, A b^{3}\right )} \log \left ({\left | b x + a \right |}\right )}{a^{4} b} - \frac {A a^{3} + 2 \, {\left (2 \, B a^{2} b - 3 \, A a b^{2}\right )} x^{2} + {\left (2 \, B a^{3} - 3 \, A a^{2} b\right )} x}{2 \, {\left (b x + a\right )} a^{4} x^{2}} \] Input:
integrate((B*x+A)/x^3/(b^2*x^2+2*a*b*x+a^2),x, algorithm="giac")
Output:
-(2*B*a*b - 3*A*b^2)*log(abs(x))/a^4 + (2*B*a*b^2 - 3*A*b^3)*log(abs(b*x + a))/(a^4*b) - 1/2*(A*a^3 + 2*(2*B*a^2*b - 3*A*a*b^2)*x^2 + (2*B*a^3 - 3*A *a^2*b)*x)/((b*x + a)*a^4*x^2)
Time = 10.98 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.22 \[ \int \frac {A+B x}{x^3 \left (a^2+2 a b x+b^2 x^2\right )} \, dx=\frac {\frac {x\,\left (3\,A\,b-2\,B\,a\right )}{2\,a^2}-\frac {A}{2\,a}+\frac {b\,x^2\,\left (3\,A\,b-2\,B\,a\right )}{a^3}}{b\,x^3+a\,x^2}-\frac {2\,b\,\mathrm {atanh}\left (\frac {b\,\left (3\,A\,b-2\,B\,a\right )\,\left (a+2\,b\,x\right )}{a\,\left (3\,A\,b^2-2\,B\,a\,b\right )}\right )\,\left (3\,A\,b-2\,B\,a\right )}{a^4} \] Input:
int((A + B*x)/(x^3*(a^2 + b^2*x^2 + 2*a*b*x)),x)
Output:
((x*(3*A*b - 2*B*a))/(2*a^2) - A/(2*a) + (b*x^2*(3*A*b - 2*B*a))/a^3)/(a*x ^2 + b*x^3) - (2*b*atanh((b*(3*A*b - 2*B*a)*(a + 2*b*x))/(a*(3*A*b^2 - 2*B *a*b)))*(3*A*b - 2*B*a))/a^4
Time = 0.26 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.51 \[ \int \frac {A+B x}{x^3 \left (a^2+2 a b x+b^2 x^2\right )} \, dx=\frac {-2 \,\mathrm {log}\left (b x +a \right ) b^{2} x^{2}+2 \,\mathrm {log}\left (x \right ) b^{2} x^{2}-a^{2}+2 a b x}{2 a^{3} x^{2}} \] Input:
int((B*x+A)/x^3/(b^2*x^2+2*a*b*x+a^2),x)
Output:
( - 2*log(a + b*x)*b**2*x**2 + 2*log(x)*b**2*x**2 - a**2 + 2*a*b*x)/(2*a** 3*x**2)