Integrand size = 29, antiderivative size = 84 \[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=-\frac {B (b c-a d) n x}{2 d}+\frac {B (b c-a d)^2 n \log (c+d x)}{2 b d^2}+\frac {(a+b x)^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{2 b} \] Output:
-1/2*B*(-a*d+b*c)*n*x/d+1/2*B*(-a*d+b*c)^2*n*ln(d*x+c)/b/d^2+1/2*(b*x+a)^2 *(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))/b
Time = 0.17 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.50 \[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {-a^2 B d^2 n \log (a+b x)+B \left (b^2 c^2-2 a b c d+2 a^2 d^2\right ) n \log (c+d x)+d \left (b x (2 a A d-b B c n+a B d n+A b d x)+B d \left (2 a^2+2 a b x+b^2 x^2\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{2 b d^2} \] Input:
Integrate[(a + b*x)*(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n]),x]
Output:
(-(a^2*B*d^2*n*Log[a + b*x]) + B*(b^2*c^2 - 2*a*b*c*d + 2*a^2*d^2)*n*Log[c + d*x] + d*(b*x*(2*a*A*d - b*B*c*n + a*B*d*n + A*b*d*x) + B*d*(2*a^2 + 2* a*b*x + b^2*x^2)*Log[(e*(a + b*x)^n)/(c + d*x)^n]))/(2*b*d^2)
Time = 0.25 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.96, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2948, 49, 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 (a+b x) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right ) \, dx\) |
\(\Big \downarrow \) 2948 |
\(\displaystyle \frac {(a+b x)^2 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{2 b}-\frac {B n (b c-a d) \int \frac {a+b x}{c+d x}dx}{2 b}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle \frac {(a+b x)^2 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{2 b}-\frac {B n (b c-a d) \int \left (\frac {b}{d}+\frac {a d-b c}{d (c+d x)}\right )dx}{2 b}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(a+b x)^2 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{2 b}-\frac {B n (b c-a d) \left (\frac {b x}{d}-\frac {(b c-a d) \log (c+d x)}{d^2}\right )}{2 b}\) |
Input:
Int[(a + b*x)*(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n]),x]
Output:
-1/2*(B*(b*c - a*d)*n*((b*x)/d - ((b*c - a*d)*Log[c + d*x])/d^2))/b + ((a + b*x)^2*(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n]))/(2*b)
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 0] && IGtQ[m + n + 2, 0]
Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_ )]*(B_.))*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(f + g*x)^(m + 1)*( (A + B*Log[e*((a + b*x)^n/(c + d*x)^n)])/(g*(m + 1))), x] - Simp[B*n*((b*c - a*d)/(g*(m + 1))) Int[(f + g*x)^(m + 1)/((a + b*x)*(c + d*x)), x], x] / ; FreeQ[{a, b, c, d, e, f, g, A, B, m, n}, x] && EqQ[n + mn, 0] && NeQ[b*c - a*d, 0] && NeQ[m, -1] && !(EqQ[m, -2] && IntegerQ[n])
Leaf count of result is larger than twice the leaf count of optimal. \(264\) vs. \(2(78)=156\).
Time = 3.45 (sec) , antiderivative size = 265, normalized size of antiderivative = 3.15
method | result | size |
parallelrisch | \(\frac {B \,x^{2} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{2} d^{2} n +A \,x^{2} b^{2} d^{2} n +B \ln \left (b x +a \right ) a^{2} d^{2} n^{2}-2 B \ln \left (b x +a \right ) a b c d \,n^{2}+B \ln \left (b x +a \right ) b^{2} c^{2} n^{2}+2 B x \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a b \,d^{2} n +B x a b \,d^{2} n^{2}-B x \,b^{2} c d \,n^{2}+2 A x a b \,d^{2} n +2 B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a b c d n -B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{2} c^{2} n -B \,a^{2} d^{2} n^{2}+B \,b^{2} c^{2} n^{2}-2 A \,a^{2} d^{2} n -3 A a b c d n}{2 b \,d^{2} n}\) | \(265\) |
risch | \(\text {Expression too large to display}\) | \(818\) |
Input:
int((b*x+a)*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n))),x,method=_RETURNVERBOSE)
Output:
1/2*(B*x^2*ln(e*(b*x+a)^n/((d*x+c)^n))*b^2*d^2*n+A*x^2*b^2*d^2*n+B*ln(b*x+ a)*a^2*d^2*n^2-2*B*ln(b*x+a)*a*b*c*d*n^2+B*ln(b*x+a)*b^2*c^2*n^2+2*B*x*ln( e*(b*x+a)^n/((d*x+c)^n))*a*b*d^2*n+B*x*a*b*d^2*n^2-B*x*b^2*c*d*n^2+2*A*x*a *b*d^2*n+2*B*ln(e*(b*x+a)^n/((d*x+c)^n))*a*b*c*d*n-B*ln(e*(b*x+a)^n/((d*x+ c)^n))*b^2*c^2*n-B*a^2*d^2*n^2+B*b^2*c^2*n^2-2*A*a^2*d^2*n-3*A*a*b*c*d*n)/ b/d^2/n
Leaf count of result is larger than twice the leaf count of optimal. 163 vs. \(2 (78) = 156\).
Time = 0.07 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.94 \[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {A b^{2} d^{2} x^{2} + {\left (2 \, A a b d^{2} - {\left (B b^{2} c d - B a b d^{2}\right )} n\right )} x + {\left (B b^{2} d^{2} n x^{2} + 2 \, B a b d^{2} n x + B a^{2} d^{2} n\right )} \log \left (b x + a\right ) - {\left (B b^{2} d^{2} n x^{2} + 2 \, B a b d^{2} n x - {\left (B b^{2} c^{2} - 2 \, B a b c d\right )} n\right )} \log \left (d x + c\right ) + {\left (B b^{2} d^{2} x^{2} + 2 \, B a b d^{2} x\right )} \log \left (e\right )}{2 \, b d^{2}} \] Input:
integrate((b*x+a)*(A+B*log(e*(b*x+a)^n/((d*x+c)^n))),x, algorithm="fricas" )
Output:
1/2*(A*b^2*d^2*x^2 + (2*A*a*b*d^2 - (B*b^2*c*d - B*a*b*d^2)*n)*x + (B*b^2* d^2*n*x^2 + 2*B*a*b*d^2*n*x + B*a^2*d^2*n)*log(b*x + a) - (B*b^2*d^2*n*x^2 + 2*B*a*b*d^2*n*x - (B*b^2*c^2 - 2*B*a*b*c*d)*n)*log(d*x + c) + (B*b^2*d^ 2*x^2 + 2*B*a*b*d^2*x)*log(e))/(b*d^2)
Exception generated. \[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\text {Exception raised: HeuristicGCDFailed} \] Input:
integrate((b*x+a)*(A+B*ln(e*(b*x+a)**n/((d*x+c)**n))),x)
Output:
Exception raised: HeuristicGCDFailed >> no luck
Time = 0.04 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.83 \[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {1}{2} \, B b x^{2} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + \frac {1}{2} \, A b x^{2} + B a x \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A a x + \frac {{\left (\frac {a e n \log \left (b x + a\right )}{b} - \frac {c e n \log \left (d x + c\right )}{d}\right )} B a}{e} - \frac {{\left (\frac {a^{2} e n \log \left (b x + a\right )}{b^{2}} - \frac {c^{2} e n \log \left (d x + c\right )}{d^{2}} + \frac {{\left (b c e n - a d e n\right )} x}{b d}\right )} B b}{2 \, e} \] Input:
integrate((b*x+a)*(A+B*log(e*(b*x+a)^n/((d*x+c)^n))),x, algorithm="maxima" )
Output:
1/2*B*b*x^2*log((b*x + a)^n*e/(d*x + c)^n) + 1/2*A*b*x^2 + B*a*x*log((b*x + a)^n*e/(d*x + c)^n) + A*a*x + (a*e*n*log(b*x + a)/b - c*e*n*log(d*x + c) /d)*B*a/e - 1/2*(a^2*e*n*log(b*x + a)/b^2 - c^2*e*n*log(d*x + c)/d^2 + (b* c*e*n - a*d*e*n)*x/(b*d))*B*b/e
Time = 0.21 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.56 \[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {B a^{2} n \log \left (b x + a\right )}{2 \, b} + \frac {1}{2} \, {\left (B b \log \left (e\right ) + A b\right )} x^{2} + \frac {1}{2} \, {\left (B b n x^{2} + 2 \, B a n x\right )} \log \left (b x + a\right ) - \frac {1}{2} \, {\left (B b n x^{2} + 2 \, B a n x\right )} \log \left (d x + c\right ) - \frac {{\left (B b c n - B a d n - 2 \, B a d \log \left (e\right ) - 2 \, A a d\right )} x}{2 \, d} + \frac {{\left (B b c^{2} n - 2 \, B a c d n\right )} \log \left (d x + c\right )}{2 \, d^{2}} \] Input:
integrate((b*x+a)*(A+B*log(e*(b*x+a)^n/((d*x+c)^n))),x, algorithm="giac")
Output:
1/2*B*a^2*n*log(b*x + a)/b + 1/2*(B*b*log(e) + A*b)*x^2 + 1/2*(B*b*n*x^2 + 2*B*a*n*x)*log(b*x + a) - 1/2*(B*b*n*x^2 + 2*B*a*n*x)*log(d*x + c) - 1/2* (B*b*c*n - B*a*d*n - 2*B*a*d*log(e) - 2*A*a*d)*x/d + 1/2*(B*b*c^2*n - 2*B* a*c*d*n)*log(d*x + c)/d^2
Time = 25.22 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.51 \[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )\,\left (\frac {B\,b\,x^2}{2}+B\,a\,x\right )+x\,\left (\frac {4\,A\,a\,d+2\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n}{2\,d}-\frac {A\,\left (2\,a\,d+2\,b\,c\right )}{2\,d}\right )+\frac {\ln \left (c+d\,x\right )\,\left (B\,b\,c^2\,n-2\,B\,a\,c\,d\,n\right )}{2\,d^2}+\frac {A\,b\,x^2}{2}+\frac {B\,a^2\,n\,\ln \left (a+b\,x\right )}{2\,b} \] Input:
int((A + B*log((e*(a + b*x)^n)/(c + d*x)^n))*(a + b*x),x)
Output:
log((e*(a + b*x)^n)/(c + d*x)^n)*(B*a*x + (B*b*x^2)/2) + x*((4*A*a*d + 2*A *b*c + B*a*d*n - B*b*c*n)/(2*d) - (A*(2*a*d + 2*b*c))/(2*d)) + (log(c + d* x)*(B*b*c^2*n - 2*B*a*c*d*n))/(2*d^2) + (A*b*x^2)/2 + (B*a^2*n*log(a + b*x ))/(2*b)
Time = 0.16 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.95 \[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {\mathrm {log}\left (d x +c \right ) a^{2} d^{2} n -2 \,\mathrm {log}\left (d x +c \right ) a b c d n +\mathrm {log}\left (d x +c \right ) b^{2} c^{2} n +\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) a^{2} d^{2}+2 \,\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) a b \,d^{2} x +\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) b^{2} d^{2} x^{2}+2 a^{2} d^{2} x +a b \,d^{2} n x +a b \,d^{2} x^{2}-b^{2} c d n x}{2 d^{2}} \] Input:
int((b*x+a)*(A+B*log(e*(b*x+a)^n/((d*x+c)^n))),x)
Output:
(log(c + d*x)*a**2*d**2*n - 2*log(c + d*x)*a*b*c*d*n + log(c + d*x)*b**2*c **2*n + log(((a + b*x)**n*e)/(c + d*x)**n)*a**2*d**2 + 2*log(((a + b*x)**n *e)/(c + d*x)**n)*a*b*d**2*x + log(((a + b*x)**n*e)/(c + d*x)**n)*b**2*d** 2*x**2 + 2*a**2*d**2*x + a*b*d**2*n*x + a*b*d**2*x**2 - b**2*c*d*n*x)/(2*d **2)