Integrand size = 42, antiderivative size = 83 \[ \int (a+b x)^{1-n} (c+d x)^{-2+n} (-a d+b c (3+2 n)+2 b d (1+n) x) \, dx=2 (1+n) (a+b x)^{2-n} (c+d x)^{-1+n}-\frac {\left (1-2 n^2\right ) (a+b x)^{2-n} (c+d x)^{-1+n} \operatorname {Hypergeometric2F1}\left (1,1,n,\frac {b (c+d x)}{b c-a d}\right )}{1-n} \] Output:
2*(1+n)*(b*x+a)^(2-n)*(d*x+c)^(-1+n)-(-2*n^2+1)*(b*x+a)^(2-n)*(d*x+c)^(-1+ n)*hypergeom([1, 1],[n],b*(d*x+c)/(-a*d+b*c))/(1-n)
Time = 0.23 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.28 \[ \int (a+b x)^{1-n} (c+d x)^{-2+n} (-a d+b c (3+2 n)+2 b d (1+n) x) \, dx=-\frac {(a+b x)^{-n} (c+d x)^n \left (\frac {(a+b x)^2}{c+d x}+\frac {b (b c-a d) \left (-1+2 n^2\right ) \left (\frac {d (a+b x)}{-b c+a d}\right )^n \operatorname {Hypergeometric2F1}\left (-1+n,n,1+n,\frac {b (c+d x)}{b c-a d}\right )}{d^2 n}\right )}{-1+n} \] Input:
Integrate[(a + b*x)^(1 - n)*(c + d*x)^(-2 + n)*(-(a*d) + b*c*(3 + 2*n) + 2 *b*d*(1 + n)*x),x]
Output:
-(((c + d*x)^n*((a + b*x)^2/(c + d*x) + (b*(b*c - a*d)*(-1 + 2*n^2)*((d*(a + b*x))/(-(b*c) + a*d))^n*Hypergeometric2F1[-1 + n, n, 1 + n, (b*(c + d*x ))/(b*c - a*d)])/(d^2*n)))/((-1 + n)*(a + b*x)^n))
Time = 0.26 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.46, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {88, 80, 79}
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)^{1-n} (c+d x)^{n-2} (-a d+b c (2 n+3)+2 b d (n+1) x) \, dx\) |
\(\Big \downarrow \) 88 |
\(\displaystyle \frac {b \left (1-2 n^2\right ) \int (a+b x)^{1-n} (c+d x)^{n-1}dx}{1-n}+\frac {(a+b x)^{2-n} (c+d x)^{n-1}}{1-n}\) |
\(\Big \downarrow \) 80 |
\(\displaystyle \frac {(a+b x)^{2-n} (c+d x)^{n-1}}{1-n}-\frac {b \left (1-2 n^2\right ) (b c-a d) (a+b x)^{-n} \left (-\frac {d (a+b x)}{b c-a d}\right )^n \int (c+d x)^{n-1} \left (-\frac {b x d}{b c-a d}-\frac {a d}{b c-a d}\right )^{1-n}dx}{d (1-n)}\) |
\(\Big \downarrow \) 79 |
\(\displaystyle \frac {(a+b x)^{2-n} (c+d x)^{n-1}}{1-n}-\frac {b \left (1-2 n^2\right ) (b c-a d) (a+b x)^{-n} (c+d x)^n \left (-\frac {d (a+b x)}{b c-a d}\right )^n \operatorname {Hypergeometric2F1}\left (n-1,n,n+1,\frac {b (c+d x)}{b c-a d}\right )}{d^2 (1-n) n}\) |
Input:
Int[(a + b*x)^(1 - n)*(c + d*x)^(-2 + n)*(-(a*d) + b*c*(3 + 2*n) + 2*b*d*( 1 + n)*x),x]
Output:
((a + b*x)^(2 - n)*(c + d*x)^(-1 + n))/(1 - n) - (b*(b*c - a*d)*(1 - 2*n^2 )*(-((d*(a + b*x))/(b*c - a*d)))^n*(c + d*x)^n*Hypergeometric2F1[-1 + n, n , 1 + n, (b*(c + d*x))/(b*c - a*d)])/(d^2*(1 - n)*n*(a + b*x)^n)
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(( a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c - a*d))^n))*Hypergeometric2F1[-n, m + 1 , m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] || !(RationalQ[n] && GtQ[-d/(b*c - a*d), 0]))
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(c + d*x)^FracPart[n]/((b/(b*c - a*d))^IntPart[n]*(b*((c + d*x)/(b*c - a*d))) ^FracPart[n]) Int[(a + b*x)^m*Simp[b*(c/(b*c - a*d)) + b*d*(x/(b*c - a*d) ), x]^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !Integ erQ[n] && (RationalQ[m] || !SimplerQ[n + 1, m + 1])
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p _.), x_] :> Simp[(-(b*e - a*f))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)) Int[(c + d*x)^n*(e + f*x)^Simplify[p + 1], x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && !RationalQ[p] && SumSimpl erQ[p, 1]
\[\int \left (b x +a \right )^{-n +1} \left (x d +c \right )^{n -2} \left (-a d +b c \left (2 n +3\right )+2 b d \left (1+n \right ) x \right )d x\]
Input:
int((b*x+a)^(-n+1)*(d*x+c)^(n-2)*(-a*d+b*c*(2*n+3)+2*b*d*(1+n)*x),x)
Output:
int((b*x+a)^(-n+1)*(d*x+c)^(n-2)*(-a*d+b*c*(2*n+3)+2*b*d*(1+n)*x),x)
\[ \int (a+b x)^{1-n} (c+d x)^{-2+n} (-a d+b c (3+2 n)+2 b d (1+n) x) \, dx=\int { {\left (2 \, b d {\left (n + 1\right )} x + b c {\left (2 \, n + 3\right )} - a d\right )} {\left (b x + a\right )}^{-n + 1} {\left (d x + c\right )}^{n - 2} \,d x } \] Input:
integrate((b*x+a)^(1-n)*(d*x+c)^(-2+n)*(-a*d+b*c*(3+2*n)+2*b*d*(1+n)*x),x, algorithm="fricas")
Output:
integral((2*b*c*n + 3*b*c - a*d + 2*(b*d*n + b*d)*x)*(b*x + a)^(-n + 1)*(d *x + c)^(n - 2), x)
Exception generated. \[ \int (a+b x)^{1-n} (c+d x)^{-2+n} (-a d+b c (3+2 n)+2 b d (1+n) x) \, dx=\text {Exception raised: HeuristicGCDFailed} \] Input:
integrate((b*x+a)**(1-n)*(d*x+c)**(-2+n)*(-a*d+b*c*(3+2*n)+2*b*d*(1+n)*x), x)
Output:
Exception raised: HeuristicGCDFailed >> no luck
\[ \int (a+b x)^{1-n} (c+d x)^{-2+n} (-a d+b c (3+2 n)+2 b d (1+n) x) \, dx=\int { {\left (2 \, b d {\left (n + 1\right )} x + b c {\left (2 \, n + 3\right )} - a d\right )} {\left (b x + a\right )}^{-n + 1} {\left (d x + c\right )}^{n - 2} \,d x } \] Input:
integrate((b*x+a)^(1-n)*(d*x+c)^(-2+n)*(-a*d+b*c*(3+2*n)+2*b*d*(1+n)*x),x, algorithm="maxima")
Output:
integrate((2*b*d*(n + 1)*x + b*c*(2*n + 3) - a*d)*(b*x + a)^(-n + 1)*(d*x + c)^(n - 2), x)
\[ \int (a+b x)^{1-n} (c+d x)^{-2+n} (-a d+b c (3+2 n)+2 b d (1+n) x) \, dx=\int { {\left (2 \, b d {\left (n + 1\right )} x + b c {\left (2 \, n + 3\right )} - a d\right )} {\left (b x + a\right )}^{-n + 1} {\left (d x + c\right )}^{n - 2} \,d x } \] Input:
integrate((b*x+a)^(1-n)*(d*x+c)^(-2+n)*(-a*d+b*c*(3+2*n)+2*b*d*(1+n)*x),x, algorithm="giac")
Output:
integrate((2*b*d*(n + 1)*x + b*c*(2*n + 3) - a*d)*(b*x + a)^(-n + 1)*(d*x + c)^(n - 2), x)
Timed out. \[ \int (a+b x)^{1-n} (c+d x)^{-2+n} (-a d+b c (3+2 n)+2 b d (1+n) x) \, dx=\int {\left (a+b\,x\right )}^{1-n}\,{\left (c+d\,x\right )}^{n-2}\,\left (b\,c\,\left (2\,n+3\right )-a\,d+2\,b\,d\,x\,\left (n+1\right )\right ) \,d x \] Input:
int((a + b*x)^(1 - n)*(c + d*x)^(n - 2)*(b*c*(2*n + 3) - a*d + 2*b*d*x*(n + 1)),x)
Output:
int((a + b*x)^(1 - n)*(c + d*x)^(n - 2)*(b*c*(2*n + 3) - a*d + 2*b*d*x*(n + 1)), x)
\[ \int (a+b x)^{1-n} (c+d x)^{-2+n} (-a d+b c (3+2 n)+2 b d (1+n) x) \, dx=-\left (\int \frac {\left (d x +c \right )^{n}}{\left (b x +a \right )^{n} c^{2}+2 \left (b x +a \right )^{n} c d x +\left (b x +a \right )^{n} d^{2} x^{2}}d x \right ) a^{2} d +2 \left (\int \frac {\left (d x +c \right )^{n}}{\left (b x +a \right )^{n} c^{2}+2 \left (b x +a \right )^{n} c d x +\left (b x +a \right )^{n} d^{2} x^{2}}d x \right ) a b c n +3 \left (\int \frac {\left (d x +c \right )^{n}}{\left (b x +a \right )^{n} c^{2}+2 \left (b x +a \right )^{n} c d x +\left (b x +a \right )^{n} d^{2} x^{2}}d x \right ) a b c +2 \left (\int \frac {\left (d x +c \right )^{n} x^{2}}{\left (b x +a \right )^{n} c^{2}+2 \left (b x +a \right )^{n} c d x +\left (b x +a \right )^{n} d^{2} x^{2}}d x \right ) b^{2} d n +2 \left (\int \frac {\left (d x +c \right )^{n} x^{2}}{\left (b x +a \right )^{n} c^{2}+2 \left (b x +a \right )^{n} c d x +\left (b x +a \right )^{n} d^{2} x^{2}}d x \right ) b^{2} d +2 \left (\int \frac {\left (d x +c \right )^{n} x}{\left (b x +a \right )^{n} c^{2}+2 \left (b x +a \right )^{n} c d x +\left (b x +a \right )^{n} d^{2} x^{2}}d x \right ) a b d n +\left (\int \frac {\left (d x +c \right )^{n} x}{\left (b x +a \right )^{n} c^{2}+2 \left (b x +a \right )^{n} c d x +\left (b x +a \right )^{n} d^{2} x^{2}}d x \right ) a b d +2 \left (\int \frac {\left (d x +c \right )^{n} x}{\left (b x +a \right )^{n} c^{2}+2 \left (b x +a \right )^{n} c d x +\left (b x +a \right )^{n} d^{2} x^{2}}d x \right ) b^{2} c n +3 \left (\int \frac {\left (d x +c \right )^{n} x}{\left (b x +a \right )^{n} c^{2}+2 \left (b x +a \right )^{n} c d x +\left (b x +a \right )^{n} d^{2} x^{2}}d x \right ) b^{2} c \] Input:
int((b*x+a)^(1-n)*(d*x+c)^(-2+n)*(-a*d+b*c*(3+2*n)+2*b*d*(1+n)*x),x)
Output:
- int((c + d*x)**n/((a + b*x)**n*c**2 + 2*(a + b*x)**n*c*d*x + (a + b*x)* *n*d**2*x**2),x)*a**2*d + 2*int((c + d*x)**n/((a + b*x)**n*c**2 + 2*(a + b *x)**n*c*d*x + (a + b*x)**n*d**2*x**2),x)*a*b*c*n + 3*int((c + d*x)**n/((a + b*x)**n*c**2 + 2*(a + b*x)**n*c*d*x + (a + b*x)**n*d**2*x**2),x)*a*b*c + 2*int(((c + d*x)**n*x**2)/((a + b*x)**n*c**2 + 2*(a + b*x)**n*c*d*x + (a + b*x)**n*d**2*x**2),x)*b**2*d*n + 2*int(((c + d*x)**n*x**2)/((a + b*x)** n*c**2 + 2*(a + b*x)**n*c*d*x + (a + b*x)**n*d**2*x**2),x)*b**2*d + 2*int( ((c + d*x)**n*x)/((a + b*x)**n*c**2 + 2*(a + b*x)**n*c*d*x + (a + b*x)**n* d**2*x**2),x)*a*b*d*n + int(((c + d*x)**n*x)/((a + b*x)**n*c**2 + 2*(a + b *x)**n*c*d*x + (a + b*x)**n*d**2*x**2),x)*a*b*d + 2*int(((c + d*x)**n*x)/( (a + b*x)**n*c**2 + 2*(a + b*x)**n*c*d*x + (a + b*x)**n*d**2*x**2),x)*b**2 *c*n + 3*int(((c + d*x)**n*x)/((a + b*x)**n*c**2 + 2*(a + b*x)**n*c*d*x + (a + b*x)**n*d**2*x**2),x)*b**2*c