Integrand size = 20, antiderivative size = 82 \[ \int \frac {A+B x}{(a+b x)^2 (d+e x)} \, dx=-\frac {A b-a B}{b (b d-a e) (a+b x)}+\frac {(B d-A e) \log (a+b x)}{(b d-a e)^2}-\frac {(B d-A e) \log (d+e x)}{(b d-a e)^2} \] Output:
-(A*b-B*a)/b/(-a*e+b*d)/(b*x+a)+(-A*e+B*d)*ln(b*x+a)/(-a*e+b*d)^2-(-A*e+B* d)*ln(e*x+d)/(-a*e+b*d)^2
Time = 0.04 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.84 \[ \int \frac {A+B x}{(a+b x)^2 (d+e x)} \, dx=\frac {\frac {(-A b+a B) (b d-a e)}{b (a+b x)}+(B d-A e) \log (a+b x)+(-B d+A e) \log (d+e x)}{(b d-a e)^2} \] Input:
Integrate[(A + B*x)/((a + b*x)^2*(d + e*x)),x]
Output:
(((-(A*b) + a*B)*(b*d - a*e))/(b*(a + b*x)) + (B*d - A*e)*Log[a + b*x] + ( -(B*d) + A*e)*Log[d + e*x])/(b*d - a*e)^2
Time = 0.24 (sec) , antiderivative size = 82, 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.100, Rules used = {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}{(a+b x)^2 (d+e x)} \, dx\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \int \left (\frac {A b-a B}{(a+b x)^2 (b d-a e)}+\frac {b (B d-A e)}{(a+b x) (b d-a e)^2}+\frac {e (A e-B d)}{(d+e x) (b d-a e)^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {A b-a B}{b (a+b x) (b d-a e)}+\frac {\log (a+b x) (B d-A e)}{(b d-a e)^2}-\frac {(B d-A e) \log (d+e x)}{(b d-a e)^2}\) |
Input:
Int[(A + B*x)/((a + b*x)^2*(d + e*x)),x]
Output:
-((A*b - a*B)/(b*(b*d - a*e)*(a + b*x))) + ((B*d - A*e)*Log[a + b*x])/(b*d - a*e)^2 - ((B*d - A*e)*Log[d + e*x])/(b*d - a*e)^2
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]))))
Time = 0.29 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.01
method | result | size |
default | \(-\frac {-A b +B a}{\left (a e -d b \right ) b \left (b x +a \right )}-\frac {\left (A e -B d \right ) \ln \left (b x +a \right )}{\left (a e -d b \right )^{2}}+\frac {\left (A e -B d \right ) \ln \left (e x +d \right )}{\left (a e -d b \right )^{2}}\) | \(83\) |
norman | \(-\frac {\left (A b -B a \right ) x}{a \left (a e -d b \right ) \left (b x +a \right )}+\frac {\left (A e -B d \right ) \ln \left (e x +d \right )}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}-\frac {\left (A e -B d \right ) \ln \left (b x +a \right )}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}\) | \(110\) |
parallelrisch | \(-\frac {A \ln \left (b x +a \right ) x \,b^{2} e -A \ln \left (e x +d \right ) x \,b^{2} e -B \ln \left (b x +a \right ) x \,b^{2} d +B \ln \left (e x +d \right ) x \,b^{2} d +A \ln \left (b x +a \right ) a b e -A \ln \left (e x +d \right ) a b e -B \ln \left (b x +a \right ) a b d +B \ln \left (e x +d \right ) a b d -A a b e +A \,b^{2} d +B \,a^{2} e -B a b d}{\left (a^{2} e^{2}-2 a b d e +b^{2} d^{2}\right ) \left (b x +a \right ) b}\) | \(161\) |
risch | \(\frac {A}{\left (a e -d b \right ) \left (b x +a \right )}-\frac {B a}{\left (a e -d b \right ) b \left (b x +a \right )}-\frac {\ln \left (b x +a \right ) A e}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}+\frac {\ln \left (b x +a \right ) B d}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}+\frac {\ln \left (-e x -d \right ) A e}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}-\frac {\ln \left (-e x -d \right ) B d}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}\) | \(181\) |
Input:
int((B*x+A)/(b*x+a)^2/(e*x+d),x,method=_RETURNVERBOSE)
Output:
-(-A*b+B*a)/(a*e-b*d)/b/(b*x+a)-(A*e-B*d)/(a*e-b*d)^2*ln(b*x+a)+(A*e-B*d)/ (a*e-b*d)^2*ln(e*x+d)
Time = 0.08 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.91 \[ \int \frac {A+B x}{(a+b x)^2 (d+e x)} \, dx=\frac {{\left (B a b - A b^{2}\right )} d - {\left (B a^{2} - A a b\right )} e + {\left (B a b d - A a b e + {\left (B b^{2} d - A b^{2} e\right )} x\right )} \log \left (b x + a\right ) - {\left (B a b d - A a b e + {\left (B b^{2} d - A b^{2} e\right )} x\right )} \log \left (e x + d\right )}{a b^{3} d^{2} - 2 \, a^{2} b^{2} d e + a^{3} b e^{2} + {\left (b^{4} d^{2} - 2 \, a b^{3} d e + a^{2} b^{2} e^{2}\right )} x} \] Input:
integrate((B*x+A)/(b*x+a)^2/(e*x+d),x, algorithm="fricas")
Output:
((B*a*b - A*b^2)*d - (B*a^2 - A*a*b)*e + (B*a*b*d - A*a*b*e + (B*b^2*d - A *b^2*e)*x)*log(b*x + a) - (B*a*b*d - A*a*b*e + (B*b^2*d - A*b^2*e)*x)*log( e*x + d))/(a*b^3*d^2 - 2*a^2*b^2*d*e + a^3*b*e^2 + (b^4*d^2 - 2*a*b^3*d*e + a^2*b^2*e^2)*x)
Leaf count of result is larger than twice the leaf count of optimal. 355 vs. \(2 (63) = 126\).
Time = 0.70 (sec) , antiderivative size = 355, normalized size of antiderivative = 4.33 \[ \int \frac {A+B x}{(a+b x)^2 (d+e x)} \, dx=\frac {A b - B a}{a^{2} b e - a b^{2} d + x \left (a b^{2} e - b^{3} d\right )} - \frac {\left (- A e + B d\right ) \log {\left (x + \frac {- A a e^{2} - A b d e + B a d e + B b d^{2} - \frac {a^{3} e^{3} \left (- A e + B d\right )}{\left (a e - b d\right )^{2}} + \frac {3 a^{2} b d e^{2} \left (- A e + B d\right )}{\left (a e - b d\right )^{2}} - \frac {3 a b^{2} d^{2} e \left (- A e + B d\right )}{\left (a e - b d\right )^{2}} + \frac {b^{3} d^{3} \left (- A e + B d\right )}{\left (a e - b d\right )^{2}}}{- 2 A b e^{2} + 2 B b d e} \right )}}{\left (a e - b d\right )^{2}} + \frac {\left (- A e + B d\right ) \log {\left (x + \frac {- A a e^{2} - A b d e + B a d e + B b d^{2} + \frac {a^{3} e^{3} \left (- A e + B d\right )}{\left (a e - b d\right )^{2}} - \frac {3 a^{2} b d e^{2} \left (- A e + B d\right )}{\left (a e - b d\right )^{2}} + \frac {3 a b^{2} d^{2} e \left (- A e + B d\right )}{\left (a e - b d\right )^{2}} - \frac {b^{3} d^{3} \left (- A e + B d\right )}{\left (a e - b d\right )^{2}}}{- 2 A b e^{2} + 2 B b d e} \right )}}{\left (a e - b d\right )^{2}} \] Input:
integrate((B*x+A)/(b*x+a)**2/(e*x+d),x)
Output:
(A*b - B*a)/(a**2*b*e - a*b**2*d + x*(a*b**2*e - b**3*d)) - (-A*e + B*d)*l og(x + (-A*a*e**2 - A*b*d*e + B*a*d*e + B*b*d**2 - a**3*e**3*(-A*e + B*d)/ (a*e - b*d)**2 + 3*a**2*b*d*e**2*(-A*e + B*d)/(a*e - b*d)**2 - 3*a*b**2*d* *2*e*(-A*e + B*d)/(a*e - b*d)**2 + b**3*d**3*(-A*e + B*d)/(a*e - b*d)**2)/ (-2*A*b*e**2 + 2*B*b*d*e))/(a*e - b*d)**2 + (-A*e + B*d)*log(x + (-A*a*e** 2 - A*b*d*e + B*a*d*e + B*b*d**2 + a**3*e**3*(-A*e + B*d)/(a*e - b*d)**2 - 3*a**2*b*d*e**2*(-A*e + B*d)/(a*e - b*d)**2 + 3*a*b**2*d**2*e*(-A*e + B*d )/(a*e - b*d)**2 - b**3*d**3*(-A*e + B*d)/(a*e - b*d)**2)/(-2*A*b*e**2 + 2 *B*b*d*e))/(a*e - b*d)**2
Time = 0.03 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.44 \[ \int \frac {A+B x}{(a+b x)^2 (d+e x)} \, dx=\frac {{\left (B d - A e\right )} \log \left (b x + a\right )}{b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2}} - \frac {{\left (B d - A e\right )} \log \left (e x + d\right )}{b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2}} + \frac {B a - A b}{a b^{2} d - a^{2} b e + {\left (b^{3} d - a b^{2} e\right )} x} \] Input:
integrate((B*x+A)/(b*x+a)^2/(e*x+d),x, algorithm="maxima")
Output:
(B*d - A*e)*log(b*x + a)/(b^2*d^2 - 2*a*b*d*e + a^2*e^2) - (B*d - A*e)*log (e*x + d)/(b^2*d^2 - 2*a*b*d*e + a^2*e^2) + (B*a - A*b)/(a*b^2*d - a^2*b*e + (b^3*d - a*b^2*e)*x)
Time = 0.12 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.22 \[ \int \frac {A+B x}{(a+b x)^2 (d+e x)} \, dx=-\frac {{\left (B b d - A b e\right )} \log \left ({\left | \frac {b d}{b x + a} - \frac {a e}{b x + a} + e \right |}\right )}{b^{3} d^{2} - 2 \, a b^{2} d e + a^{2} b e^{2}} + \frac {\frac {B a}{b x + a} - \frac {A b}{b x + a}}{b^{2} d - a b e} \] Input:
integrate((B*x+A)/(b*x+a)^2/(e*x+d),x, algorithm="giac")
Output:
-(B*b*d - A*b*e)*log(abs(b*d/(b*x + a) - a*e/(b*x + a) + e))/(b^3*d^2 - 2* a*b^2*d*e + a^2*b*e^2) + (B*a/(b*x + a) - A*b/(b*x + a))/(b^2*d - a*b*e)
Time = 0.09 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.15 \[ \int \frac {A+B x}{(a+b x)^2 (d+e x)} \, dx=\frac {A\,b-B\,a}{b\,\left (a\,e-b\,d\right )\,\left (a+b\,x\right )}-\frac {2\,\mathrm {atanh}\left (\frac {a^2\,e^2-b^2\,d^2}{{\left (a\,e-b\,d\right )}^2}+\frac {2\,b\,e\,x}{a\,e-b\,d}\right )\,\left (A\,e-B\,d\right )}{{\left (a\,e-b\,d\right )}^2} \] Input:
int((A + B*x)/((a + b*x)^2*(d + e*x)),x)
Output:
(A*b - B*a)/(b*(a*e - b*d)*(a + b*x)) - (2*atanh((a^2*e^2 - b^2*d^2)/(a*e - b*d)^2 + (2*b*e*x)/(a*e - b*d))*(A*e - B*d))/(a*e - b*d)^2
Time = 0.16 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.32 \[ \int \frac {A+B x}{(a+b x)^2 (d+e x)} \, dx=\frac {-\mathrm {log}\left (b x +a \right )+\mathrm {log}\left (e x +d \right )}{a e -b d} \] Input:
int((B*x+A)/(b*x+a)^2/(e*x+d),x)
Output:
( - log(a + b*x) + log(d + e*x))/(a*e - b*d)