Integrand size = 24, antiderivative size = 110 \[ \int \frac {A+B x}{(d+e x)^2 \left (b x+c x^2\right )} \, dx=\frac {B d-A e}{d (c d-b e) (d+e x)}+\frac {A \log (x)}{b d^2}+\frac {c (b B-A c) \log (b+c x)}{b (c d-b e)^2}-\frac {\left (B c d^2-A e (2 c d-b e)\right ) \log (d+e x)}{d^2 (c d-b e)^2} \] Output:
(-A*e+B*d)/d/(-b*e+c*d)/(e*x+d)+A*ln(x)/b/d^2+c*(-A*c+B*b)*ln(c*x+b)/b/(-b *e+c*d)^2-(B*c*d^2-A*e*(-b*e+2*c*d))*ln(e*x+d)/d^2/(-b*e+c*d)^2
Time = 0.15 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.96 \[ \int \frac {A+B x}{(d+e x)^2 \left (b x+c x^2\right )} \, dx=\frac {A \log (x)+\frac {b d (B d-A e) (c d-b e)+c (b B-A c) d^2 (d+e x) \log (b+c x)-b \left (B c d^2+A e (-2 c d+b e)\right ) (d+e x) \log (d+e x)}{(c d-b e)^2 (d+e x)}}{b d^2} \] Input:
Integrate[(A + B*x)/((d + e*x)^2*(b*x + c*x^2)),x]
Output:
(A*Log[x] + (b*d*(B*d - A*e)*(c*d - b*e) + c*(b*B - A*c)*d^2*(d + e*x)*Log [b + c*x] - b*(B*c*d^2 + A*e*(-2*c*d + b*e))*(d + e*x)*Log[d + e*x])/((c*d - b*e)^2*(d + e*x)))/(b*d^2)
Time = 0.53 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {1200, 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}{\left (b x+c x^2\right ) (d+e x)^2} \, dx\) |
\(\Big \downarrow \) 1200 |
\(\displaystyle \int \left (\frac {c^2 (b B-A c)}{b (b+c x) (b e-c d)^2}+\frac {e \left (A e (2 c d-b e)-B c d^2\right )}{d^2 (d+e x) (c d-b e)^2}-\frac {e (B d-A e)}{d (d+e x)^2 (c d-b e)}+\frac {A}{b d^2 x}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\log (d+e x) \left (B c d^2-A e (2 c d-b e)\right )}{d^2 (c d-b e)^2}+\frac {B d-A e}{d (d+e x) (c d-b e)}+\frac {c (b B-A c) \log (b+c x)}{b (c d-b e)^2}+\frac {A \log (x)}{b d^2}\) |
Input:
Int[(A + B*x)/((d + e*x)^2*(b*x + c*x^2)),x]
Output:
(B*d - A*e)/(d*(c*d - b*e)*(d + e*x)) + (A*Log[x])/(b*d^2) + (c*(b*B - A*c )*Log[b + c*x])/(b*(c*d - b*e)^2) - ((B*c*d^2 - A*e*(2*c*d - b*e))*Log[d + e*x])/(d^2*(c*d - b*e)^2)
Int[(((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.))/((a_.) + (b_.)* (x_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*((f + g* x)^n/(a + b*x + c*x^2)), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && In tegersQ[n]
Time = 1.06 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.01
method | result | size |
default | \(-\frac {\left (A c -B b \right ) c \ln \left (c x +b \right )}{b \left (b e -c d \right )^{2}}-\frac {\left (A b \,e^{2}-2 A c d e +B c \,d^{2}\right ) \ln \left (e x +d \right )}{d^{2} \left (b e -c d \right )^{2}}+\frac {A e -B d}{d \left (b e -c d \right ) \left (e x +d \right )}+\frac {A \ln \left (x \right )}{b \,d^{2}}\) | \(111\) |
norman | \(-\frac {\left (A e -B d \right ) e x}{d^{2} \left (b e -c d \right ) \left (e x +d \right )}+\frac {A \ln \left (x \right )}{b \,d^{2}}-\frac {\left (A b \,e^{2}-2 A c d e +B c \,d^{2}\right ) \ln \left (e x +d \right )}{d^{2} \left (b^{2} e^{2}-2 b c d e +c^{2} d^{2}\right )}-\frac {c \left (A c -B b \right ) \ln \left (c x +b \right )}{\left (b^{2} e^{2}-2 b c d e +c^{2} d^{2}\right ) b}\) | \(140\) |
risch | \(\frac {A e}{d \left (b e -c d \right ) \left (e x +d \right )}-\frac {B}{\left (b e -c d \right ) \left (e x +d \right )}-\frac {\ln \left (-e x -d \right ) A b \,e^{2}}{d^{2} \left (b^{2} e^{2}-2 b c d e +c^{2} d^{2}\right )}+\frac {2 \ln \left (-e x -d \right ) A c e}{d \left (b^{2} e^{2}-2 b c d e +c^{2} d^{2}\right )}-\frac {\ln \left (-e x -d \right ) B c}{b^{2} e^{2}-2 b c d e +c^{2} d^{2}}-\frac {c^{2} \ln \left (c x +b \right ) A}{\left (b^{2} e^{2}-2 b c d e +c^{2} d^{2}\right ) b}+\frac {c \ln \left (c x +b \right ) B}{b^{2} e^{2}-2 b c d e +c^{2} d^{2}}+\frac {A \ln \left (-x \right )}{d^{2} b}\) | \(245\) |
parallelrisch | \(\frac {-A b c \,d^{2} e^{2}+A \,b^{2} d \,e^{3}-2 A \ln \left (x \right ) x b c d \,e^{3}+2 A \ln \left (e x +d \right ) x b c d \,e^{3}+B \ln \left (c x +b \right ) x b c \,d^{2} e^{2}-B \ln \left (e x +d \right ) x b c \,d^{2} e^{2}+A \ln \left (x \right ) x \,b^{2} e^{4}-A \ln \left (e x +d \right ) x \,b^{2} e^{4}+A \ln \left (x \right ) b^{2} d \,e^{3}+A \ln \left (x \right ) c^{2} d^{3} e -A \ln \left (c x +b \right ) c^{2} d^{3} e -A \ln \left (e x +d \right ) b^{2} d \,e^{3}-B \,b^{2} d^{2} e^{2}+B b c \,d^{3} e +A \ln \left (x \right ) x \,c^{2} d^{2} e^{2}-A \ln \left (c x +b \right ) x \,c^{2} d^{2} e^{2}-2 A \ln \left (x \right ) b c \,d^{2} e^{2}+2 A \ln \left (e x +d \right ) b c \,d^{2} e^{2}+B \ln \left (c x +b \right ) b c \,d^{3} e -B \ln \left (e x +d \right ) b c \,d^{3} e}{\left (b^{2} e^{2}-2 b c d e +c^{2} d^{2}\right ) b \left (e x +d \right ) d^{2} e}\) | \(318\) |
Input:
int((B*x+A)/(e*x+d)^2/(c*x^2+b*x),x,method=_RETURNVERBOSE)
Output:
-(A*c-B*b)*c/b/(b*e-c*d)^2*ln(c*x+b)-(A*b*e^2-2*A*c*d*e+B*c*d^2)/d^2/(b*e- c*d)^2*ln(e*x+d)+(A*e-B*d)/d/(b*e-c*d)/(e*x+d)+A*ln(x)/b/d^2
Leaf count of result is larger than twice the leaf count of optimal. 260 vs. \(2 (110) = 220\).
Time = 5.52 (sec) , antiderivative size = 260, normalized size of antiderivative = 2.36 \[ \int \frac {A+B x}{(d+e x)^2 \left (b x+c x^2\right )} \, dx=\frac {B b c d^{3} + A b^{2} d e^{2} - {\left (B b^{2} + A b c\right )} d^{2} e + {\left ({\left (B b c - A c^{2}\right )} d^{2} e x + {\left (B b c - A c^{2}\right )} d^{3}\right )} \log \left (c x + b\right ) - {\left (B b c d^{3} - 2 \, A b c d^{2} e + A b^{2} d e^{2} + {\left (B b c d^{2} e - 2 \, A b c d e^{2} + A b^{2} e^{3}\right )} x\right )} \log \left (e x + d\right ) + {\left (A c^{2} d^{3} - 2 \, A b c d^{2} e + A b^{2} d e^{2} + {\left (A c^{2} d^{2} e - 2 \, A b c d e^{2} + A b^{2} e^{3}\right )} x\right )} \log \left (x\right )}{b c^{2} d^{5} - 2 \, b^{2} c d^{4} e + b^{3} d^{3} e^{2} + {\left (b c^{2} d^{4} e - 2 \, b^{2} c d^{3} e^{2} + b^{3} d^{2} e^{3}\right )} x} \] Input:
integrate((B*x+A)/(e*x+d)^2/(c*x^2+b*x),x, algorithm="fricas")
Output:
(B*b*c*d^3 + A*b^2*d*e^2 - (B*b^2 + A*b*c)*d^2*e + ((B*b*c - A*c^2)*d^2*e* x + (B*b*c - A*c^2)*d^3)*log(c*x + b) - (B*b*c*d^3 - 2*A*b*c*d^2*e + A*b^2 *d*e^2 + (B*b*c*d^2*e - 2*A*b*c*d*e^2 + A*b^2*e^3)*x)*log(e*x + d) + (A*c^ 2*d^3 - 2*A*b*c*d^2*e + A*b^2*d*e^2 + (A*c^2*d^2*e - 2*A*b*c*d*e^2 + A*b^2 *e^3)*x)*log(x))/(b*c^2*d^5 - 2*b^2*c*d^4*e + b^3*d^3*e^2 + (b*c^2*d^4*e - 2*b^2*c*d^3*e^2 + b^3*d^2*e^3)*x)
Timed out. \[ \int \frac {A+B x}{(d+e x)^2 \left (b x+c x^2\right )} \, dx=\text {Timed out} \] Input:
integrate((B*x+A)/(e*x+d)**2/(c*x**2+b*x),x)
Output:
Timed out
Time = 0.04 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.36 \[ \int \frac {A+B x}{(d+e x)^2 \left (b x+c x^2\right )} \, dx=\frac {{\left (B b c - A c^{2}\right )} \log \left (c x + b\right )}{b c^{2} d^{2} - 2 \, b^{2} c d e + b^{3} e^{2}} - \frac {{\left (B c d^{2} - 2 \, A c d e + A b e^{2}\right )} \log \left (e x + d\right )}{c^{2} d^{4} - 2 \, b c d^{3} e + b^{2} d^{2} e^{2}} + \frac {B d - A e}{c d^{3} - b d^{2} e + {\left (c d^{2} e - b d e^{2}\right )} x} + \frac {A \log \left (x\right )}{b d^{2}} \] Input:
integrate((B*x+A)/(e*x+d)^2/(c*x^2+b*x),x, algorithm="maxima")
Output:
(B*b*c - A*c^2)*log(c*x + b)/(b*c^2*d^2 - 2*b^2*c*d*e + b^3*e^2) - (B*c*d^ 2 - 2*A*c*d*e + A*b*e^2)*log(e*x + d)/(c^2*d^4 - 2*b*c*d^3*e + b^2*d^2*e^2 ) + (B*d - A*e)/(c*d^3 - b*d^2*e + (c*d^2*e - b*d*e^2)*x) + A*log(x)/(b*d^ 2)
Leaf count of result is larger than twice the leaf count of optimal. 322 vs. \(2 (110) = 220\).
Time = 0.27 (sec) , antiderivative size = 322, normalized size of antiderivative = 2.93 \[ \int \frac {A+B x}{(d+e x)^2 \left (b x+c x^2\right )} \, dx=\frac {{\left (B c d^{2} - 2 \, A c d e + A b e^{2}\right )} \log \left ({\left | c - \frac {2 \, c d}{e x + d} + \frac {c d^{2}}{{\left (e x + d\right )}^{2}} + \frac {b e}{e x + d} - \frac {b d e}{{\left (e x + d\right )}^{2}} \right |}\right )}{2 \, {\left (c^{2} d^{4} - 2 \, b c d^{3} e + b^{2} d^{2} e^{2}\right )}} + \frac {\frac {B d e^{2}}{e x + d} - \frac {A e^{3}}{e x + d}}{c d^{2} e^{2} - b d e^{3}} - \frac {{\left (B b c d^{2} e^{2} - 2 \, A c^{2} d^{2} e^{2} + 2 \, A b c d e^{3} - A b^{2} e^{4}\right )} \log \left (\frac {{\left | 2 \, c d e - \frac {2 \, c d^{2} e}{e x + d} - b e^{2} + \frac {2 \, b d e^{2}}{e x + d} - e^{2} {\left | b \right |} \right |}}{{\left | 2 \, c d e - \frac {2 \, c d^{2} e}{e x + d} - b e^{2} + \frac {2 \, b d e^{2}}{e x + d} + e^{2} {\left | b \right |} \right |}}\right )}{2 \, {\left (c^{2} d^{4} - 2 \, b c d^{3} e + b^{2} d^{2} e^{2}\right )} e^{2} {\left | b \right |}} \] Input:
integrate((B*x+A)/(e*x+d)^2/(c*x^2+b*x),x, algorithm="giac")
Output:
1/2*(B*c*d^2 - 2*A*c*d*e + A*b*e^2)*log(abs(c - 2*c*d/(e*x + d) + c*d^2/(e *x + d)^2 + b*e/(e*x + d) - b*d*e/(e*x + d)^2))/(c^2*d^4 - 2*b*c*d^3*e + b ^2*d^2*e^2) + (B*d*e^2/(e*x + d) - A*e^3/(e*x + d))/(c*d^2*e^2 - b*d*e^3) - 1/2*(B*b*c*d^2*e^2 - 2*A*c^2*d^2*e^2 + 2*A*b*c*d*e^3 - A*b^2*e^4)*log(ab s(2*c*d*e - 2*c*d^2*e/(e*x + d) - b*e^2 + 2*b*d*e^2/(e*x + d) - e^2*abs(b) )/abs(2*c*d*e - 2*c*d^2*e/(e*x + d) - b*e^2 + 2*b*d*e^2/(e*x + d) + e^2*ab s(b)))/((c^2*d^4 - 2*b*c*d^3*e + b^2*d^2*e^2)*e^2*abs(b))
Time = 11.25 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.28 \[ \int \frac {A+B x}{(d+e x)^2 \left (b x+c x^2\right )} \, dx=\frac {A\,\ln \left (x\right )}{b\,d^2}-\frac {\ln \left (d+e\,x\right )\,\left (c\,\left (B\,d^2-2\,A\,d\,e\right )+A\,b\,e^2\right )}{b^2\,d^2\,e^2-2\,b\,c\,d^3\,e+c^2\,d^4}-\frac {\ln \left (b+c\,x\right )\,\left (A\,c^2-B\,b\,c\right )}{b^3\,e^2-2\,b^2\,c\,d\,e+b\,c^2\,d^2}+\frac {A\,e-B\,d}{d\,\left (b\,e-c\,d\right )\,\left (d+e\,x\right )} \] Input:
int((A + B*x)/((b*x + c*x^2)*(d + e*x)^2),x)
Output:
(A*log(x))/(b*d^2) - (log(d + e*x)*(c*(B*d^2 - 2*A*d*e) + A*b*e^2))/(c^2*d ^4 + b^2*d^2*e^2 - 2*b*c*d^3*e) - (log(b + c*x)*(A*c^2 - B*b*c))/(b^3*e^2 + b*c^2*d^2 - 2*b^2*c*d*e) + (A*e - B*d)/(d*(b*e - c*d)*(d + e*x))
Time = 0.25 (sec) , antiderivative size = 323, normalized size of antiderivative = 2.94 \[ \int \frac {A+B x}{(d+e x)^2 \left (b x+c x^2\right )} \, dx=\frac {-\mathrm {log}\left (c x +b \right ) a \,c^{2} d^{3}-\mathrm {log}\left (c x +b \right ) a \,c^{2} d^{2} e x +\mathrm {log}\left (c x +b \right ) b^{2} c \,d^{3}+\mathrm {log}\left (c x +b \right ) b^{2} c \,d^{2} e x -\mathrm {log}\left (e x +d \right ) a \,b^{2} d \,e^{2}-\mathrm {log}\left (e x +d \right ) a \,b^{2} e^{3} x +2 \,\mathrm {log}\left (e x +d \right ) a b c \,d^{2} e +2 \,\mathrm {log}\left (e x +d \right ) a b c d \,e^{2} x -\mathrm {log}\left (e x +d \right ) b^{2} c \,d^{3}-\mathrm {log}\left (e x +d \right ) b^{2} c \,d^{2} e x +\mathrm {log}\left (x \right ) a \,b^{2} d \,e^{2}+\mathrm {log}\left (x \right ) a \,b^{2} e^{3} x -2 \,\mathrm {log}\left (x \right ) a b c \,d^{2} e -2 \,\mathrm {log}\left (x \right ) a b c d \,e^{2} x +\mathrm {log}\left (x \right ) a \,c^{2} d^{3}+\mathrm {log}\left (x \right ) a \,c^{2} d^{2} e x -a \,b^{2} e^{3} x +a b c d \,e^{2} x +b^{3} d \,e^{2} x -b^{2} c \,d^{2} e x}{b \,d^{2} \left (b^{2} e^{3} x -2 b c d \,e^{2} x +c^{2} d^{2} e x +b^{2} d \,e^{2}-2 b c \,d^{2} e +c^{2} d^{3}\right )} \] Input:
int((B*x+A)/(e*x+d)^2/(c*x^2+b*x),x)
Output:
( - log(b + c*x)*a*c**2*d**3 - log(b + c*x)*a*c**2*d**2*e*x + log(b + c*x) *b**2*c*d**3 + log(b + c*x)*b**2*c*d**2*e*x - log(d + e*x)*a*b**2*d*e**2 - log(d + e*x)*a*b**2*e**3*x + 2*log(d + e*x)*a*b*c*d**2*e + 2*log(d + e*x) *a*b*c*d*e**2*x - log(d + e*x)*b**2*c*d**3 - log(d + e*x)*b**2*c*d**2*e*x + log(x)*a*b**2*d*e**2 + log(x)*a*b**2*e**3*x - 2*log(x)*a*b*c*d**2*e - 2* log(x)*a*b*c*d*e**2*x + log(x)*a*c**2*d**3 + log(x)*a*c**2*d**2*e*x - a*b* *2*e**3*x + a*b*c*d*e**2*x + b**3*d*e**2*x - b**2*c*d**2*e*x)/(b*d**2*(b** 2*d*e**2 + b**2*e**3*x - 2*b*c*d**2*e - 2*b*c*d*e**2*x + c**2*d**3 + c**2* d**2*e*x))