Integrand size = 15, antiderivative size = 81 \[ \int \frac {1}{(a+b x)^2 (c+d x)^2} \, dx=-\frac {b}{(b c-a d)^2 (a+b x)}-\frac {d}{(b c-a d)^2 (c+d x)}-\frac {2 b d \log (a+b x)}{(b c-a d)^3}+\frac {2 b d \log (c+d x)}{(b c-a d)^3} \] Output:
-b/(-a*d+b*c)^2/(b*x+a)-d/(-a*d+b*c)^2/(d*x+c)-2*b*d*ln(b*x+a)/(-a*d+b*c)^ 3+2*b*d*ln(d*x+c)/(-a*d+b*c)^3
Time = 0.04 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.81 \[ \int \frac {1}{(a+b x)^2 (c+d x)^2} \, dx=\frac {\frac {b (-b c+a d)}{a+b x}+\frac {d (-b c+a d)}{c+d x}-2 b d \log (a+b x)+2 b d \log (c+d x)}{(b c-a d)^3} \] Input:
Integrate[1/((a + b*x)^2*(c + d*x)^2),x]
Output:
((b*(-(b*c) + a*d))/(a + b*x) + (d*(-(b*c) + a*d))/(c + d*x) - 2*b*d*Log[a + b*x] + 2*b*d*Log[c + d*x])/(b*c - a*d)^3
Time = 0.22 (sec) , antiderivative size = 81, 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.133, Rules used = {54, 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 {1}{(a+b x)^2 (c+d x)^2} \, dx\) |
\(\Big \downarrow \) 54 |
\(\displaystyle \int \left (-\frac {2 b^2 d}{(a+b x) (b c-a d)^3}+\frac {b^2}{(a+b x)^2 (b c-a d)^2}+\frac {2 b d^2}{(c+d x) (b c-a d)^3}+\frac {d^2}{(c+d x)^2 (b c-a d)^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {b}{(a+b x) (b c-a d)^2}-\frac {d}{(c+d x) (b c-a d)^2}-\frac {2 b d \log (a+b x)}{(b c-a d)^3}+\frac {2 b d \log (c+d x)}{(b c-a d)^3}\) |
Input:
Int[1/((a + b*x)^2*(c + d*x)^2),x]
Output:
-(b/((b*c - a*d)^2*(a + b*x))) - d/((b*c - a*d)^2*(c + d*x)) - (2*b*d*Log[ a + b*x])/(b*c - a*d)^3 + (2*b*d*Log[c + d*x])/(b*c - a*d)^3
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[E xpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[m, 0] && IntegerQ[n] && !(IGtQ[n, 0] && LtQ[m + n + 2, 0])
Time = 0.17 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.01
method | result | size |
default | \(-\frac {d}{\left (a d -b c \right )^{2} \left (x d +c \right )}-\frac {2 d b \ln \left (x d +c \right )}{\left (a d -b c \right )^{3}}-\frac {b}{\left (a d -b c \right )^{2} \left (b x +a \right )}+\frac {2 d b \ln \left (b x +a \right )}{\left (a d -b c \right )^{3}}\) | \(82\) |
risch | \(\frac {-\frac {2 d b x}{a^{2} d^{2}-2 a b c d +b^{2} c^{2}}-\frac {a d +b c}{a^{2} d^{2}-2 a b c d +b^{2} c^{2}}}{\left (b x +a \right ) \left (x d +c \right )}-\frac {2 d b \ln \left (x d +c \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}+\frac {2 d b \ln \left (-b x -a \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}\) | \(177\) |
norman | \(\frac {\frac {-a b \,d^{2}-b^{2} c d}{b d \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}-\frac {2 d b x}{a^{2} d^{2}-2 a b c d +b^{2} c^{2}}}{\left (b x +a \right ) \left (x d +c \right )}+\frac {2 d b \ln \left (b x +a \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}-\frac {2 d b \ln \left (x d +c \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}\) | \(187\) |
parallelrisch | \(\frac {2 \ln \left (b x +a \right ) x^{2} b^{3} d^{3}-2 \ln \left (x d +c \right ) x^{2} b^{3} d^{3}+2 \ln \left (b x +a \right ) x a \,b^{2} d^{3}+2 \ln \left (b x +a \right ) x \,b^{3} c \,d^{2}-2 \ln \left (x d +c \right ) x a \,b^{2} d^{3}-2 \ln \left (x d +c \right ) x \,b^{3} c \,d^{2}+2 \ln \left (b x +a \right ) a \,b^{2} c \,d^{2}-2 \ln \left (x d +c \right ) a \,b^{2} c \,d^{2}-2 x a \,b^{2} d^{3}+2 x \,b^{3} c \,d^{2}-a^{2} b \,d^{3}+b^{3} c^{2} d}{\left (a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}\right ) \left (x d +c \right ) \left (b x +a \right ) d b}\) | \(228\) |
Input:
int(1/(b*x+a)^2/(d*x+c)^2,x,method=_RETURNVERBOSE)
Output:
-d/(a*d-b*c)^2/(d*x+c)-2*d/(a*d-b*c)^3*b*ln(d*x+c)-b/(a*d-b*c)^2/(b*x+a)+2 *d/(a*d-b*c)^3*b*ln(b*x+a)
Leaf count of result is larger than twice the leaf count of optimal. 241 vs. \(2 (81) = 162\).
Time = 0.08 (sec) , antiderivative size = 241, normalized size of antiderivative = 2.98 \[ \int \frac {1}{(a+b x)^2 (c+d x)^2} \, dx=-\frac {b^{2} c^{2} - a^{2} d^{2} + 2 \, {\left (b^{2} c d - a b d^{2}\right )} x + 2 \, {\left (b^{2} d^{2} x^{2} + a b c d + {\left (b^{2} c d + a b d^{2}\right )} x\right )} \log \left (b x + a\right ) - 2 \, {\left (b^{2} d^{2} x^{2} + a b c d + {\left (b^{2} c d + a b d^{2}\right )} x\right )} \log \left (d x + c\right )}{a b^{3} c^{4} - 3 \, a^{2} b^{2} c^{3} d + 3 \, a^{3} b c^{2} d^{2} - a^{4} c d^{3} + {\left (b^{4} c^{3} d - 3 \, a b^{3} c^{2} d^{2} + 3 \, a^{2} b^{2} c d^{3} - a^{3} b d^{4}\right )} x^{2} + {\left (b^{4} c^{4} - 2 \, a b^{3} c^{3} d + 2 \, a^{3} b c d^{3} - a^{4} d^{4}\right )} x} \] Input:
integrate(1/(b*x+a)^2/(d*x+c)^2,x, algorithm="fricas")
Output:
-(b^2*c^2 - a^2*d^2 + 2*(b^2*c*d - a*b*d^2)*x + 2*(b^2*d^2*x^2 + a*b*c*d + (b^2*c*d + a*b*d^2)*x)*log(b*x + a) - 2*(b^2*d^2*x^2 + a*b*c*d + (b^2*c*d + a*b*d^2)*x)*log(d*x + c))/(a*b^3*c^4 - 3*a^2*b^2*c^3*d + 3*a^3*b*c^2*d^ 2 - a^4*c*d^3 + (b^4*c^3*d - 3*a*b^3*c^2*d^2 + 3*a^2*b^2*c*d^3 - a^3*b*d^4 )*x^2 + (b^4*c^4 - 2*a*b^3*c^3*d + 2*a^3*b*c*d^3 - a^4*d^4)*x)
Leaf count of result is larger than twice the leaf count of optimal. 406 vs. \(2 (70) = 140\).
Time = 0.54 (sec) , antiderivative size = 406, normalized size of antiderivative = 5.01 \[ \int \frac {1}{(a+b x)^2 (c+d x)^2} \, dx=- \frac {2 b d \log {\left (x + \frac {- \frac {2 a^{4} b d^{5}}{\left (a d - b c\right )^{3}} + \frac {8 a^{3} b^{2} c d^{4}}{\left (a d - b c\right )^{3}} - \frac {12 a^{2} b^{3} c^{2} d^{3}}{\left (a d - b c\right )^{3}} + \frac {8 a b^{4} c^{3} d^{2}}{\left (a d - b c\right )^{3}} + 2 a b d^{2} - \frac {2 b^{5} c^{4} d}{\left (a d - b c\right )^{3}} + 2 b^{2} c d}{4 b^{2} d^{2}} \right )}}{\left (a d - b c\right )^{3}} + \frac {2 b d \log {\left (x + \frac {\frac {2 a^{4} b d^{5}}{\left (a d - b c\right )^{3}} - \frac {8 a^{3} b^{2} c d^{4}}{\left (a d - b c\right )^{3}} + \frac {12 a^{2} b^{3} c^{2} d^{3}}{\left (a d - b c\right )^{3}} - \frac {8 a b^{4} c^{3} d^{2}}{\left (a d - b c\right )^{3}} + 2 a b d^{2} + \frac {2 b^{5} c^{4} d}{\left (a d - b c\right )^{3}} + 2 b^{2} c d}{4 b^{2} d^{2}} \right )}}{\left (a d - b c\right )^{3}} + \frac {- a d - b c - 2 b d x}{a^{3} c d^{2} - 2 a^{2} b c^{2} d + a b^{2} c^{3} + x^{2} \left (a^{2} b d^{3} - 2 a b^{2} c d^{2} + b^{3} c^{2} d\right ) + x \left (a^{3} d^{3} - a^{2} b c d^{2} - a b^{2} c^{2} d + b^{3} c^{3}\right )} \] Input:
integrate(1/(b*x+a)**2/(d*x+c)**2,x)
Output:
-2*b*d*log(x + (-2*a**4*b*d**5/(a*d - b*c)**3 + 8*a**3*b**2*c*d**4/(a*d - b*c)**3 - 12*a**2*b**3*c**2*d**3/(a*d - b*c)**3 + 8*a*b**4*c**3*d**2/(a*d - b*c)**3 + 2*a*b*d**2 - 2*b**5*c**4*d/(a*d - b*c)**3 + 2*b**2*c*d)/(4*b** 2*d**2))/(a*d - b*c)**3 + 2*b*d*log(x + (2*a**4*b*d**5/(a*d - b*c)**3 - 8* a**3*b**2*c*d**4/(a*d - b*c)**3 + 12*a**2*b**3*c**2*d**3/(a*d - b*c)**3 - 8*a*b**4*c**3*d**2/(a*d - b*c)**3 + 2*a*b*d**2 + 2*b**5*c**4*d/(a*d - b*c) **3 + 2*b**2*c*d)/(4*b**2*d**2))/(a*d - b*c)**3 + (-a*d - b*c - 2*b*d*x)/( a**3*c*d**2 - 2*a**2*b*c**2*d + a*b**2*c**3 + x**2*(a**2*b*d**3 - 2*a*b**2 *c*d**2 + b**3*c**2*d) + x*(a**3*d**3 - a**2*b*c*d**2 - a*b**2*c**2*d + b* *3*c**3))
Leaf count of result is larger than twice the leaf count of optimal. 208 vs. \(2 (81) = 162\).
Time = 0.04 (sec) , antiderivative size = 208, normalized size of antiderivative = 2.57 \[ \int \frac {1}{(a+b x)^2 (c+d x)^2} \, dx=-\frac {2 \, b d \log \left (b x + a\right )}{b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}} + \frac {2 \, b d \log \left (d x + c\right )}{b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}} - \frac {2 \, b d x + b c + a d}{a b^{2} c^{3} - 2 \, a^{2} b c^{2} d + a^{3} c d^{2} + {\left (b^{3} c^{2} d - 2 \, a b^{2} c d^{2} + a^{2} b d^{3}\right )} x^{2} + {\left (b^{3} c^{3} - a b^{2} c^{2} d - a^{2} b c d^{2} + a^{3} d^{3}\right )} x} \] Input:
integrate(1/(b*x+a)^2/(d*x+c)^2,x, algorithm="maxima")
Output:
-2*b*d*log(b*x + a)/(b^3*c^3 - 3*a*b^2*c^2*d + 3*a^2*b*c*d^2 - a^3*d^3) + 2*b*d*log(d*x + c)/(b^3*c^3 - 3*a*b^2*c^2*d + 3*a^2*b*c*d^2 - a^3*d^3) - ( 2*b*d*x + b*c + a*d)/(a*b^2*c^3 - 2*a^2*b*c^2*d + a^3*c*d^2 + (b^3*c^2*d - 2*a*b^2*c*d^2 + a^2*b*d^3)*x^2 + (b^3*c^3 - a*b^2*c^2*d - a^2*b*c*d^2 + a ^3*d^3)*x)
Time = 0.12 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.89 \[ \int \frac {1}{(a+b x)^2 (c+d x)^2} \, dx=\frac {2 \, b^{2} d \log \left ({\left | \frac {b c}{b x + a} - \frac {a d}{b x + a} + d \right |}\right )}{b^{4} c^{3} - 3 \, a b^{3} c^{2} d + 3 \, a^{2} b^{2} c d^{2} - a^{3} b d^{3}} - \frac {b^{3}}{{\left (b^{4} c^{2} - 2 \, a b^{3} c d + a^{2} b^{2} d^{2}\right )} {\left (b x + a\right )}} + \frac {b d^{2}}{{\left (b c - a d\right )}^{3} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )}} \] Input:
integrate(1/(b*x+a)^2/(d*x+c)^2,x, algorithm="giac")
Output:
2*b^2*d*log(abs(b*c/(b*x + a) - a*d/(b*x + a) + d))/(b^4*c^3 - 3*a*b^3*c^2 *d + 3*a^2*b^2*c*d^2 - a^3*b*d^3) - b^3/((b^4*c^2 - 2*a*b^3*c*d + a^2*b^2* d^2)*(b*x + a)) + b*d^2/((b*c - a*d)^3*(b*c/(b*x + a) - a*d/(b*x + a) + d) )
Time = 0.20 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.91 \[ \int \frac {1}{(a+b x)^2 (c+d x)^2} \, dx=\frac {1}{\left (a\,d-b\,c\right )\,\left (a+b\,x\right )\,\left (c+d\,x\right )}-\frac {2\,d}{{\left (a\,d-b\,c\right )}^2\,\left (c+d\,x\right )}-\frac {2\,b\,d\,\ln \left (\frac {c+d\,x}{a+b\,x}\right )}{{\left (a\,d-b\,c\right )}^3} \] Input:
int(1/((a + b*x)^2*(c + d*x)^2),x)
Output:
1/((a*d - b*c)*(a + b*x)*(c + d*x)) - (2*d)/((a*d - b*c)^2*(c + d*x)) - (2 *b*d*log((c + d*x)/(a + b*x)))/(a*d - b*c)^3
Time = 0.16 (sec) , antiderivative size = 459, normalized size of antiderivative = 5.67 \[ \int \frac {1}{(a+b x)^2 (c+d x)^2} \, dx=\frac {2 \,\mathrm {log}\left (b x +a \right ) a^{2} b c \,d^{2}+2 \,\mathrm {log}\left (b x +a \right ) a^{2} b \,d^{3} x +2 \,\mathrm {log}\left (b x +a \right ) a \,b^{2} c^{2} d +4 \,\mathrm {log}\left (b x +a \right ) a \,b^{2} c \,d^{2} x +2 \,\mathrm {log}\left (b x +a \right ) a \,b^{2} d^{3} x^{2}+2 \,\mathrm {log}\left (b x +a \right ) b^{3} c^{2} d x +2 \,\mathrm {log}\left (b x +a \right ) b^{3} c \,d^{2} x^{2}-2 \,\mathrm {log}\left (d x +c \right ) a^{2} b c \,d^{2}-2 \,\mathrm {log}\left (d x +c \right ) a^{2} b \,d^{3} x -2 \,\mathrm {log}\left (d x +c \right ) a \,b^{2} c^{2} d -4 \,\mathrm {log}\left (d x +c \right ) a \,b^{2} c \,d^{2} x -2 \,\mathrm {log}\left (d x +c \right ) a \,b^{2} d^{3} x^{2}-2 \,\mathrm {log}\left (d x +c \right ) b^{3} c^{2} d x -2 \,\mathrm {log}\left (d x +c \right ) b^{3} c \,d^{2} x^{2}-a^{3} d^{3}+a^{2} b c \,d^{2}-a \,b^{2} c^{2} d +2 a \,b^{2} d^{3} x^{2}+b^{3} c^{3}-2 b^{3} c \,d^{2} x^{2}}{a^{4} b \,d^{5} x^{2}-2 a^{3} b^{2} c \,d^{4} x^{2}+2 a \,b^{4} c^{3} d^{2} x^{2}-b^{5} c^{4} d \,x^{2}+a^{5} d^{5} x -a^{4} b c \,d^{4} x -2 a^{3} b^{2} c^{2} d^{3} x +2 a^{2} b^{3} c^{3} d^{2} x +a \,b^{4} c^{4} d x -b^{5} c^{5} x +a^{5} c \,d^{4}-2 a^{4} b \,c^{2} d^{3}+2 a^{2} b^{3} c^{4} d -a \,b^{4} c^{5}} \] Input:
int(1/(b*x+a)^2/(d*x+c)^2,x)
Output:
(2*log(a + b*x)*a**2*b*c*d**2 + 2*log(a + b*x)*a**2*b*d**3*x + 2*log(a + b *x)*a*b**2*c**2*d + 4*log(a + b*x)*a*b**2*c*d**2*x + 2*log(a + b*x)*a*b**2 *d**3*x**2 + 2*log(a + b*x)*b**3*c**2*d*x + 2*log(a + b*x)*b**3*c*d**2*x** 2 - 2*log(c + d*x)*a**2*b*c*d**2 - 2*log(c + d*x)*a**2*b*d**3*x - 2*log(c + d*x)*a*b**2*c**2*d - 4*log(c + d*x)*a*b**2*c*d**2*x - 2*log(c + d*x)*a*b **2*d**3*x**2 - 2*log(c + d*x)*b**3*c**2*d*x - 2*log(c + d*x)*b**3*c*d**2* x**2 - a**3*d**3 + a**2*b*c*d**2 - a*b**2*c**2*d + 2*a*b**2*d**3*x**2 + b* *3*c**3 - 2*b**3*c*d**2*x**2)/(a**5*c*d**4 + a**5*d**5*x - 2*a**4*b*c**2*d **3 - a**4*b*c*d**4*x + a**4*b*d**5*x**2 - 2*a**3*b**2*c**2*d**3*x - 2*a** 3*b**2*c*d**4*x**2 + 2*a**2*b**3*c**4*d + 2*a**2*b**3*c**3*d**2*x - a*b**4 *c**5 + a*b**4*c**4*d*x + 2*a*b**4*c**3*d**2*x**2 - b**5*c**5*x - b**5*c** 4*d*x**2)