Integrand size = 22, antiderivative size = 101 \[ \int \frac {1}{x \left (a+b x^n\right )^2 \left (c+d x^n\right )} \, dx=\frac {b}{a (b c-a d) n \left (a+b x^n\right )}+\frac {\log (x)}{a^2 c}-\frac {b (b c-2 a d) \log \left (a+b x^n\right )}{a^2 (b c-a d)^2 n}-\frac {d^2 \log \left (c+d x^n\right )}{c (b c-a d)^2 n} \] Output:
b/a/(-a*d+b*c)/n/(a+b*x^n)+ln(x)/a^2/c-b*(-2*a*d+b*c)*ln(a+b*x^n)/a^2/(-a* d+b*c)^2/n-d^2*ln(c+d*x^n)/c/(-a*d+b*c)^2/n
Time = 0.14 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.06 \[ \int \frac {1}{x \left (a+b x^n\right )^2 \left (c+d x^n\right )} \, dx=-\frac {b}{a (-b c+a d) n \left (a+b x^n\right )}+\frac {\log \left (x^n\right )}{a^2 c n}+\frac {b (-b c+2 a d) \log \left (a+b x^n\right )}{a^2 (-b c+a d)^2 n}-\frac {d^2 \log \left (c+d x^n\right )}{c (b c-a d)^2 n} \] Input:
Integrate[1/(x*(a + b*x^n)^2*(c + d*x^n)),x]
Output:
-(b/(a*(-(b*c) + a*d)*n*(a + b*x^n))) + Log[x^n]/(a^2*c*n) + (b*(-(b*c) + 2*a*d)*Log[a + b*x^n])/(a^2*(-(b*c) + a*d)^2*n) - (d^2*Log[c + d*x^n])/(c* (b*c - a*d)^2*n)
Time = 0.47 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.97, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {948, 93, 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}{x \left (a+b x^n\right )^2 \left (c+d x^n\right )} \, dx\) |
\(\Big \downarrow \) 948 |
\(\displaystyle \frac {\int \frac {x^{-n}}{\left (b x^n+a\right )^2 \left (d x^n+c\right )}dx^n}{n}\) |
\(\Big \downarrow \) 93 |
\(\displaystyle \frac {\int \left (\frac {x^{-n}}{a^2 c}+\frac {b^2 (2 a d-b c)}{a^2 (a d-b c)^2 \left (b x^n+a\right )}-\frac {d^3}{c (b c-a d)^2 \left (d x^n+c\right )}+\frac {b^2}{a (a d-b c) \left (b x^n+a\right )^2}\right )dx^n}{n}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {b (b c-2 a d) \log \left (a+b x^n\right )}{a^2 (b c-a d)^2}+\frac {\log \left (x^n\right )}{a^2 c}-\frac {d^2 \log \left (c+d x^n\right )}{c (b c-a d)^2}+\frac {b}{a (b c-a d) \left (a+b x^n\right )}}{n}\) |
Input:
Int[1/(x*(a + b*x^n)^2*(c + d*x^n)),x]
Output:
(b/(a*(b*c - a*d)*(a + b*x^n)) + Log[x^n]/(a^2*c) - (b*(b*c - 2*a*d)*Log[a + b*x^n])/(a^2*(b*c - a*d)^2) - (d^2*Log[c + d*x^n])/(c*(b*c - a*d)^2))/n
Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_] :> Int[ExpandIntegrand[(e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; Fre eQ[{a, b, c, d, e, f}, x] && IntegerQ[p]
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_. ), x_Symbol] :> Simp[1/n Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^ p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] && NeQ [b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]
Time = 0.26 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.99
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (x^{n}\right )}{a^{2} c}-\frac {d^{2} \ln \left (c +d \,x^{n}\right )}{\left (a d -c b \right )^{2} c}-\frac {b}{a \left (a d -c b \right ) \left (a +b \,x^{n}\right )}+\frac {b \left (2 a d -c b \right ) \ln \left (a +b \,x^{n}\right )}{a^{2} \left (a d -c b \right )^{2}}}{n}\) | \(100\) |
default | \(\frac {\frac {\ln \left (x^{n}\right )}{a^{2} c}-\frac {d^{2} \ln \left (c +d \,x^{n}\right )}{\left (a d -c b \right )^{2} c}-\frac {b}{a \left (a d -c b \right ) \left (a +b \,x^{n}\right )}+\frac {b \left (2 a d -c b \right ) \ln \left (a +b \,x^{n}\right )}{a^{2} \left (a d -c b \right )^{2}}}{n}\) | \(100\) |
norman | \(\frac {\frac {b^{2} {\mathrm e}^{n \ln \left (x \right )}}{n \,a^{2} \left (a d -c b \right )}+\frac {\ln \left (x \right )}{a c}+\frac {b \ln \left (x \right ) {\mathrm e}^{n \ln \left (x \right )}}{a^{2} c}}{a +b \,{\mathrm e}^{n \ln \left (x \right )}}+\frac {b \left (2 a d -c b \right ) \ln \left (a +b \,{\mathrm e}^{n \ln \left (x \right )}\right )}{\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) a^{2} n}-\frac {d^{2} \ln \left (c +d \,{\mathrm e}^{n \ln \left (x \right )}\right )}{c n \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}\) | \(158\) |
parallelrisch | \(\frac {x^{n} \ln \left (x \right ) a^{2} b \,d^{2} n -2 x^{n} \ln \left (x \right ) a \,b^{2} c d n +x^{n} \ln \left (x \right ) b^{3} c^{2} n +\ln \left (x \right ) a^{3} d^{2} n -2 \ln \left (x \right ) a^{2} b c d n +\ln \left (x \right ) a \,b^{2} c^{2} n +2 \ln \left (a +b \,x^{n}\right ) x^{n} a \,b^{2} c d -\ln \left (a +b \,x^{n}\right ) x^{n} b^{3} c^{2}-\ln \left (c +d \,x^{n}\right ) x^{n} a^{2} b \,d^{2}+2 \ln \left (a +b \,x^{n}\right ) a^{2} b c d -\ln \left (a +b \,x^{n}\right ) a \,b^{2} c^{2}-\ln \left (c +d \,x^{n}\right ) a^{3} d^{2}+x^{n} a \,b^{2} c d -x^{n} b^{3} c^{2}}{\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) c \left (a +b \,x^{n}\right ) a^{2} n}\) | \(245\) |
risch | \(\frac {\ln \left (x \right ) d^{2}}{c \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}-\frac {2 \ln \left (x \right ) b d}{\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) a}+\frac {\ln \left (x \right ) b^{2} c}{\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) a^{2}}-\frac {b}{\left (a d -c b \right ) a n \left (a +b \,x^{n}\right )}-\frac {d^{2} \ln \left (x^{n}+\frac {c}{d}\right )}{c n \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}+\frac {2 b \ln \left (x^{n}+\frac {a}{b}\right ) d}{\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) a n}-\frac {b^{2} \ln \left (x^{n}+\frac {a}{b}\right ) c}{\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) a^{2} n}\) | \(259\) |
Input:
int(1/x/(a+b*x^n)^2/(c+d*x^n),x,method=_RETURNVERBOSE)
Output:
1/n*(1/a^2/c*ln(x^n)-d^2/(a*d-b*c)^2/c*ln(c+d*x^n)-b/a/(a*d-b*c)/(a+b*x^n) +b*(2*a*d-b*c)/a^2/(a*d-b*c)^2*ln(a+b*x^n))
Leaf count of result is larger than twice the leaf count of optimal. 224 vs. \(2 (101) = 202\).
Time = 0.09 (sec) , antiderivative size = 224, normalized size of antiderivative = 2.22 \[ \int \frac {1}{x \left (a+b x^n\right )^2 \left (c+d x^n\right )} \, dx=\frac {a b^{2} c^{2} - a^{2} b c d + {\left (b^{3} c^{2} - 2 \, a b^{2} c d + a^{2} b d^{2}\right )} n x^{n} \log \left (x\right ) + {\left (a b^{2} c^{2} - 2 \, a^{2} b c d + a^{3} d^{2}\right )} n \log \left (x\right ) - {\left (a b^{2} c^{2} - 2 \, a^{2} b c d + {\left (b^{3} c^{2} - 2 \, a b^{2} c d\right )} x^{n}\right )} \log \left (b x^{n} + a\right ) - {\left (a^{2} b d^{2} x^{n} + a^{3} d^{2}\right )} \log \left (d x^{n} + c\right )}{{\left (a^{2} b^{3} c^{3} - 2 \, a^{3} b^{2} c^{2} d + a^{4} b c d^{2}\right )} n x^{n} + {\left (a^{3} b^{2} c^{3} - 2 \, a^{4} b c^{2} d + a^{5} c d^{2}\right )} n} \] Input:
integrate(1/x/(a+b*x^n)^2/(c+d*x^n),x, algorithm="fricas")
Output:
(a*b^2*c^2 - a^2*b*c*d + (b^3*c^2 - 2*a*b^2*c*d + a^2*b*d^2)*n*x^n*log(x) + (a*b^2*c^2 - 2*a^2*b*c*d + a^3*d^2)*n*log(x) - (a*b^2*c^2 - 2*a^2*b*c*d + (b^3*c^2 - 2*a*b^2*c*d)*x^n)*log(b*x^n + a) - (a^2*b*d^2*x^n + a^3*d^2)* log(d*x^n + c))/((a^2*b^3*c^3 - 2*a^3*b^2*c^2*d + a^4*b*c*d^2)*n*x^n + (a^ 3*b^2*c^3 - 2*a^4*b*c^2*d + a^5*c*d^2)*n)
Exception generated. \[ \int \frac {1}{x \left (a+b x^n\right )^2 \left (c+d x^n\right )} \, dx=\text {Exception raised: HeuristicGCDFailed} \] Input:
integrate(1/x/(a+b*x**n)**2/(c+d*x**n),x)
Output:
Exception raised: HeuristicGCDFailed >> no luck
Time = 0.04 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.50 \[ \int \frac {1}{x \left (a+b x^n\right )^2 \left (c+d x^n\right )} \, dx=-\frac {d^{2} \log \left (\frac {d x^{n} + c}{d}\right )}{b^{2} c^{3} n - 2 \, a b c^{2} d n + a^{2} c d^{2} n} - \frac {{\left (b^{2} c - 2 \, a b d\right )} \log \left (\frac {b x^{n} + a}{b}\right )}{a^{2} b^{2} c^{2} n - 2 \, a^{3} b c d n + a^{4} d^{2} n} + \frac {b}{a^{2} b c n - a^{3} d n + {\left (a b^{2} c n - a^{2} b d n\right )} x^{n}} + \frac {\log \left (x\right )}{a^{2} c} \] Input:
integrate(1/x/(a+b*x^n)^2/(c+d*x^n),x, algorithm="maxima")
Output:
-d^2*log((d*x^n + c)/d)/(b^2*c^3*n - 2*a*b*c^2*d*n + a^2*c*d^2*n) - (b^2*c - 2*a*b*d)*log((b*x^n + a)/b)/(a^2*b^2*c^2*n - 2*a^3*b*c*d*n + a^4*d^2*n) + b/(a^2*b*c*n - a^3*d*n + (a*b^2*c*n - a^2*b*d*n)*x^n) + log(x)/(a^2*c)
\[ \int \frac {1}{x \left (a+b x^n\right )^2 \left (c+d x^n\right )} \, dx=\int { \frac {1}{{\left (b x^{n} + a\right )}^{2} {\left (d x^{n} + c\right )} x} \,d x } \] Input:
integrate(1/x/(a+b*x^n)^2/(c+d*x^n),x, algorithm="giac")
Output:
integrate(1/((b*x^n + a)^2*(d*x^n + c)*x), x)
Timed out. \[ \int \frac {1}{x \left (a+b x^n\right )^2 \left (c+d x^n\right )} \, dx=\int \frac {1}{x\,{\left (a+b\,x^n\right )}^2\,\left (c+d\,x^n\right )} \,d x \] Input:
int(1/(x*(a + b*x^n)^2*(c + d*x^n)),x)
Output:
int(1/(x*(a + b*x^n)^2*(c + d*x^n)), x)
Time = 0.27 (sec) , antiderivative size = 270, normalized size of antiderivative = 2.67 \[ \int \frac {1}{x \left (a+b x^n\right )^2 \left (c+d x^n\right )} \, dx=\frac {2 x^{n} \mathrm {log}\left (x^{n} b +a \right ) a \,b^{2} c d -x^{n} \mathrm {log}\left (x^{n} b +a \right ) b^{3} c^{2}-x^{n} \mathrm {log}\left (x^{n} d +c \right ) a^{2} b \,d^{2}+x^{n} \mathrm {log}\left (x \right ) a^{2} b \,d^{2} n -2 x^{n} \mathrm {log}\left (x \right ) a \,b^{2} c d n +x^{n} \mathrm {log}\left (x \right ) b^{3} c^{2} n +x^{n} a \,b^{2} c d -x^{n} b^{3} c^{2}+2 \,\mathrm {log}\left (x^{n} b +a \right ) a^{2} b c d -\mathrm {log}\left (x^{n} b +a \right ) a \,b^{2} c^{2}-\mathrm {log}\left (x^{n} d +c \right ) a^{3} d^{2}+\mathrm {log}\left (x \right ) a^{3} d^{2} n -2 \,\mathrm {log}\left (x \right ) a^{2} b c d n +\mathrm {log}\left (x \right ) a \,b^{2} c^{2} n}{a^{2} c n \left (x^{n} a^{2} b \,d^{2}-2 x^{n} a \,b^{2} c d +x^{n} b^{3} c^{2}+a^{3} d^{2}-2 a^{2} b c d +a \,b^{2} c^{2}\right )} \] Input:
int(1/x/(a+b*x^n)^2/(c+d*x^n),x)
Output:
(2*x**n*log(x**n*b + a)*a*b**2*c*d - x**n*log(x**n*b + a)*b**3*c**2 - x**n *log(x**n*d + c)*a**2*b*d**2 + x**n*log(x)*a**2*b*d**2*n - 2*x**n*log(x)*a *b**2*c*d*n + x**n*log(x)*b**3*c**2*n + x**n*a*b**2*c*d - x**n*b**3*c**2 + 2*log(x**n*b + a)*a**2*b*c*d - log(x**n*b + a)*a*b**2*c**2 - log(x**n*d + c)*a**3*d**2 + log(x)*a**3*d**2*n - 2*log(x)*a**2*b*c*d*n + log(x)*a*b**2 *c**2*n)/(a**2*c*n*(x**n*a**2*b*d**2 - 2*x**n*a*b**2*c*d + x**n*b**3*c**2 + a**3*d**2 - 2*a**2*b*c*d + a*b**2*c**2))