Integrand size = 20, antiderivative size = 82 \[ \int \frac {A+B x}{(a+b x) (d+e x)^2} \, dx=-\frac {B d-A e}{e (b d-a e) (d+e x)}+\frac {(A b-a B) \log (a+b x)}{(b d-a e)^2}-\frac {(A b-a B) \log (d+e x)}{(b d-a e)^2} \] Output:
-(-A*e+B*d)/e/(-a*e+b*d)/(e*x+d)+(A*b-B*a)*ln(b*x+a)/(-a*e+b*d)^2-(A*b-B*a )*ln(e*x+d)/(-a*e+b*d)^2
Time = 0.05 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.98 \[ \int \frac {A+B x}{(a+b x) (d+e x)^2} \, dx=\frac {B d-A e}{e (-b d+a e) (d+e x)}+\frac {(A b-a B) \log (a+b x)}{(b d-a e)^2}+\frac {(-A b+a B) \log (d+e x)}{(b d-a e)^2} \] Input:
Integrate[(A + B*x)/((a + b*x)*(d + e*x)^2),x]
Output:
(B*d - A*e)/(e*(-(b*d) + a*e)*(d + e*x)) + ((A*b - a*B)*Log[a + b*x])/(b*d - a*e)^2 + ((-(A*b) + a*B)*Log[d + e*x])/(b*d - a*e)^2
Time = 0.25 (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) (d+e x)^2} \, dx\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \int \left (\frac {b (A b-a B)}{(a+b x) (b d-a e)^2}+\frac {e (a B-A b)}{(d+e x) (b d-a e)^2}+\frac {B d-A e}{(d+e x)^2 (b d-a e)}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {B d-A e}{e (d+e x) (b d-a e)}+\frac {(A b-a B) \log (a+b x)}{(b d-a e)^2}-\frac {(A b-a B) \log (d+e x)}{(b d-a e)^2}\) |
Input:
Int[(A + B*x)/((a + b*x)*(d + e*x)^2),x]
Output:
-((B*d - A*e)/(e*(b*d - a*e)*(d + e*x))) + ((A*b - a*B)*Log[a + b*x])/(b*d - a*e)^2 - ((A*b - a*B)*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 {\left (A b -B a \right ) \ln \left (b x +a \right )}{\left (a e -d b \right )^{2}}-\frac {A e -B d}{\left (a e -d b \right ) e \left (e x +d \right )}-\frac {\left (A b -B a \right ) \ln \left (e x +d \right )}{\left (a e -d b \right )^{2}}\) | \(83\) |
norman | \(\frac {\left (A e -B d \right ) x}{d \left (a e -d b \right ) \left (e x +d \right )}+\frac {\left (A b -B a \right ) \ln \left (b x +a \right )}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}-\frac {\left (A b -B a \right ) \ln \left (e x +d \right )}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}\) | \(109\) |
parallelrisch | \(\frac {A \ln \left (b x +a \right ) x b \,e^{2}-A \ln \left (e x +d \right ) x b \,e^{2}-B \ln \left (b x +a \right ) x a \,e^{2}+B \ln \left (e x +d \right ) x a \,e^{2}+A \ln \left (b x +a \right ) b d e -A \ln \left (e x +d \right ) b d e -B \ln \left (b x +a \right ) a d e +B \ln \left (e x +d \right ) a d e -A a \,e^{2}+A b d e +B a d e -b B \,d^{2}}{\left (a^{2} e^{2}-2 a b d e +b^{2} d^{2}\right ) \left (e x +d \right ) e}\) | \(160\) |
risch | \(-\frac {A}{\left (a e -d b \right ) \left (e x +d \right )}+\frac {B d}{\left (a e -d b \right ) e \left (e x +d \right )}-\frac {\ln \left (e x +d \right ) A b}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}+\frac {\ln \left (e x +d \right ) B a}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}+\frac {\ln \left (-b x -a \right ) A b}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}-\frac {\ln \left (-b x -a \right ) B a}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}\) | \(181\) |
Input:
int((B*x+A)/(b*x+a)/(e*x+d)^2,x,method=_RETURNVERBOSE)
Output:
(A*b-B*a)/(a*e-b*d)^2*ln(b*x+a)-(A*e-B*d)/(a*e-b*d)/e/(e*x+d)-(A*b-B*a)/(a *e-b*d)^2*ln(e*x+d)
Time = 0.08 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.80 \[ \int \frac {A+B x}{(a+b x) (d+e x)^2} \, dx=-\frac {B b d^{2} + A a e^{2} - {\left (B a + A b\right )} d e + {\left ({\left (B a - A b\right )} e^{2} x + {\left (B a - A b\right )} d e\right )} \log \left (b x + a\right ) - {\left ({\left (B a - A b\right )} e^{2} x + {\left (B a - A b\right )} d e\right )} \log \left (e x + d\right )}{b^{2} d^{3} e - 2 \, a b d^{2} e^{2} + a^{2} d e^{3} + {\left (b^{2} d^{2} e^{2} - 2 \, a b d e^{3} + a^{2} e^{4}\right )} x} \] Input:
integrate((B*x+A)/(b*x+a)/(e*x+d)^2,x, algorithm="fricas")
Output:
-(B*b*d^2 + A*a*e^2 - (B*a + A*b)*d*e + ((B*a - A*b)*e^2*x + (B*a - A*b)*d *e)*log(b*x + a) - ((B*a - A*b)*e^2*x + (B*a - A*b)*d*e)*log(e*x + d))/(b^ 2*d^3*e - 2*a*b*d^2*e^2 + a^2*d*e^3 + (b^2*d^2*e^2 - 2*a*b*d*e^3 + a^2*e^4 )*x)
Leaf count of result is larger than twice the leaf count of optimal. 355 vs. \(2 (63) = 126\).
Time = 0.73 (sec) , antiderivative size = 355, normalized size of antiderivative = 4.33 \[ \int \frac {A+B x}{(a+b x) (d+e x)^2} \, dx=\frac {\left (- A b + B a\right ) \log {\left (x + \frac {- A a b e - A b^{2} d + B a^{2} e + B a b d - \frac {a^{3} e^{3} \left (- A b + B a\right )}{\left (a e - b d\right )^{2}} + \frac {3 a^{2} b d e^{2} \left (- A b + B a\right )}{\left (a e - b d\right )^{2}} - \frac {3 a b^{2} d^{2} e \left (- A b + B a\right )}{\left (a e - b d\right )^{2}} + \frac {b^{3} d^{3} \left (- A b + B a\right )}{\left (a e - b d\right )^{2}}}{- 2 A b^{2} e + 2 B a b e} \right )}}{\left (a e - b d\right )^{2}} - \frac {\left (- A b + B a\right ) \log {\left (x + \frac {- A a b e - A b^{2} d + B a^{2} e + B a b d + \frac {a^{3} e^{3} \left (- A b + B a\right )}{\left (a e - b d\right )^{2}} - \frac {3 a^{2} b d e^{2} \left (- A b + B a\right )}{\left (a e - b d\right )^{2}} + \frac {3 a b^{2} d^{2} e \left (- A b + B a\right )}{\left (a e - b d\right )^{2}} - \frac {b^{3} d^{3} \left (- A b + B a\right )}{\left (a e - b d\right )^{2}}}{- 2 A b^{2} e + 2 B a b e} \right )}}{\left (a e - b d\right )^{2}} + \frac {- A e + B d}{a d e^{2} - b d^{2} e + x \left (a e^{3} - b d e^{2}\right )} \] Input:
integrate((B*x+A)/(b*x+a)/(e*x+d)**2,x)
Output:
(-A*b + B*a)*log(x + (-A*a*b*e - A*b**2*d + B*a**2*e + B*a*b*d - a**3*e**3 *(-A*b + B*a)/(a*e - b*d)**2 + 3*a**2*b*d*e**2*(-A*b + B*a)/(a*e - b*d)**2 - 3*a*b**2*d**2*e*(-A*b + B*a)/(a*e - b*d)**2 + b**3*d**3*(-A*b + B*a)/(a *e - b*d)**2)/(-2*A*b**2*e + 2*B*a*b*e))/(a*e - b*d)**2 - (-A*b + B*a)*log (x + (-A*a*b*e - A*b**2*d + B*a**2*e + B*a*b*d + a**3*e**3*(-A*b + B*a)/(a *e - b*d)**2 - 3*a**2*b*d*e**2*(-A*b + B*a)/(a*e - b*d)**2 + 3*a*b**2*d**2 *e*(-A*b + B*a)/(a*e - b*d)**2 - b**3*d**3*(-A*b + B*a)/(a*e - b*d)**2)/(- 2*A*b**2*e + 2*B*a*b*e))/(a*e - b*d)**2 + (-A*e + B*d)/(a*d*e**2 - b*d**2* e + x*(a*e**3 - b*d*e**2))
Time = 0.04 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.45 \[ \int \frac {A+B x}{(a+b x) (d+e x)^2} \, dx=-\frac {{\left (B a - A b\right )} \log \left (b x + a\right )}{b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2}} + \frac {{\left (B a - A b\right )} \log \left (e x + d\right )}{b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2}} - \frac {B d - A e}{b d^{2} e - a d e^{2} + {\left (b d e^{2} - a e^{3}\right )} x} \] Input:
integrate((B*x+A)/(b*x+a)/(e*x+d)^2,x, algorithm="maxima")
Output:
-(B*a - A*b)*log(b*x + a)/(b^2*d^2 - 2*a*b*d*e + a^2*e^2) + (B*a - A*b)*lo g(e*x + d)/(b^2*d^2 - 2*a*b*d*e + a^2*e^2) - (B*d - A*e)/(b*d^2*e - a*d*e^ 2 + (b*d*e^2 - a*e^3)*x)
Time = 0.12 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.23 \[ \int \frac {A+B x}{(a+b x) (d+e x)^2} \, dx=-\frac {{\left (B a e - A b e\right )} \log \left ({\left | b - \frac {b d}{e x + d} + \frac {a e}{e x + d} \right |}\right )}{b^{2} d^{2} e - 2 \, a b d e^{2} + a^{2} e^{3}} - \frac {\frac {B d}{e x + d} - \frac {A e}{e x + d}}{b d e - a e^{2}} \] Input:
integrate((B*x+A)/(b*x+a)/(e*x+d)^2,x, algorithm="giac")
Output:
-(B*a*e - A*b*e)*log(abs(b - b*d/(e*x + d) + a*e/(e*x + d)))/(b^2*d^2*e - 2*a*b*d*e^2 + a^2*e^3) - (B*d/(e*x + d) - A*e/(e*x + d))/(b*d*e - a*e^2)
Time = 1.03 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.16 \[ \int \frac {A+B x}{(a+b x) (d+e x)^2} \, dx=\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\,b-B\,a\right )}{{\left (a\,e-b\,d\right )}^2}-\frac {A\,e-B\,d}{e\,\left (a\,e-b\,d\right )\,\left (d+e\,x\right )} \] Input:
int((A + B*x)/((a + b*x)*(d + e*x)^2),x)
Output:
(2*atanh((a^2*e^2 - b^2*d^2)/(a*e - b*d)^2 + (2*b*e*x)/(a*e - b*d))*(A*b - B*a))/(a*e - b*d)^2 - (A*e - B*d)/(e*(a*e - b*d)*(d + e*x))
Time = 0.16 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.15 \[ \int \frac {A+B x}{(a+b x) (d+e x)^2} \, dx=\frac {x}{d \left (e x +d \right )} \] Input:
int((B*x+A)/(b*x+a)/(e*x+d)^2,x)
Output:
x/(d*(d + e*x))