Integrand size = 25, antiderivative size = 272 \[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=-\frac {(b c f h (2+m)-b d (f g+e h) (3+m+n)+a d f h (4+m+2 n)) (a+b x)^{1+m} (c+d x)^{1+n}}{b^2 d^2 (2+m+n) (3+m+n)}+\frac {f h (a+b x)^{2+m} (c+d x)^{1+n}}{b^2 d (3+m+n)}+\frac {\left ((b c (1+m)+a d (1+n)) (b c f h (2+m)-b d (f g+e h) (3+m+n)+a d f h (4+m+2 n))+d (2+m+n) \left (b^2 d e g (3+m+n)-a f h (b c (2+m)+a d (1+n))\right )\right ) (a+b x)^{1+m} (c+d x)^{1+n} \operatorname {Hypergeometric2F1}\left (1,2+m+n,2+m,-\frac {d (a+b x)}{b c-a d}\right )}{b^2 d^2 (b c-a d) (1+m) (2+m+n) (3+m+n)} \] Output:
-(b*c*f*h*(2+m)-b*d*(e*h+f*g)*(3+m+n)+a*d*f*h*(4+m+2*n))*(b*x+a)^(1+m)*(d* x+c)^(1+n)/b^2/d^2/(2+m+n)/(3+m+n)+f*h*(b*x+a)^(2+m)*(d*x+c)^(1+n)/b^2/d/( 3+m+n)+((b*c*(1+m)+a*d*(1+n))*(b*c*f*h*(2+m)-b*d*(e*h+f*g)*(3+m+n)+a*d*f*h *(4+m+2*n))+d*(2+m+n)*(b^2*d*e*g*(3+m+n)-a*f*h*(b*c*(2+m)+a*d*(1+n))))*(b* x+a)^(1+m)*(d*x+c)^(1+n)*hypergeom([1, 2+m+n],[2+m],-d*(b*x+a)/(-a*d+b*c)) /b^2/d^2/(-a*d+b*c)/(1+m)/(2+m+n)/(3+m+n)
Time = 0.20 (sec) , antiderivative size = 195, normalized size of antiderivative = 0.72 \[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\frac {(a+b x)^{1+m} (c+d x)^n \left (\frac {b (c+d x)}{b c-a d}\right )^{-n} \left ((b c-a d)^2 f h \operatorname {Hypergeometric2F1}\left (1+m,-2-n,2+m,\frac {d (a+b x)}{-b c+a d}\right )+b \left (-\left ((b c-a d) (2 c f h-d (f g+e h)) \operatorname {Hypergeometric2F1}\left (1+m,-1-n,2+m,\frac {d (a+b x)}{-b c+a d}\right )\right )+b (d e-c f) (d g-c h) \operatorname {Hypergeometric2F1}\left (1+m,-n,2+m,\frac {d (a+b x)}{-b c+a d}\right )\right )\right )}{b^3 d^2 (1+m)} \] Input:
Integrate[(a + b*x)^m*(c + d*x)^n*(e + f*x)*(g + h*x),x]
Output:
((a + b*x)^(1 + m)*(c + d*x)^n*((b*c - a*d)^2*f*h*Hypergeometric2F1[1 + m, -2 - n, 2 + m, (d*(a + b*x))/(-(b*c) + a*d)] + b*(-((b*c - a*d)*(2*c*f*h - d*(f*g + e*h))*Hypergeometric2F1[1 + m, -1 - n, 2 + m, (d*(a + b*x))/(-( b*c) + a*d)]) + b*(d*e - c*f)*(d*g - c*h)*Hypergeometric2F1[1 + m, -n, 2 + m, (d*(a + b*x))/(-(b*c) + a*d)])))/(b^3*d^2*(1 + m)*((b*(c + d*x))/(b*c - a*d))^n)
Time = 0.38 (sec) , antiderivative size = 266, normalized size of antiderivative = 0.98, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {164, 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 (e+f x) (g+h x) (a+b x)^m (c+d x)^n \, dx\) |
\(\Big \downarrow \) 164 |
\(\displaystyle \frac {\left (a^2 d^2 f h (n+1) (n+2)+a b d (n+1) (2 c f h (m+1)-d (m+n+3) (e h+f g))+b^2 \left (c^2 f h (m+1) (m+2)-c d (m+1) (m+n+3) (e h+f g)+d^2 e g (m+n+2) (m+n+3)\right )\right ) \int (a+b x)^m (c+d x)^ndx}{b^2 d^2 (m+n+2) (m+n+3)}-\frac {(a+b x)^{m+1} (c+d x)^{n+1} (a d f h (n+2)+b c f h (m+2)-b d (m+n+3) (e h+f g)-b d f h x (m+n+2))}{b^2 d^2 (m+n+2) (m+n+3)}\) |
\(\Big \downarrow \) 80 |
\(\displaystyle \frac {(c+d x)^n \left (\frac {b (c+d x)}{b c-a d}\right )^{-n} \left (a^2 d^2 f h (n+1) (n+2)+a b d (n+1) (2 c f h (m+1)-d (m+n+3) (e h+f g))+b^2 \left (c^2 f h (m+1) (m+2)-c d (m+1) (m+n+3) (e h+f g)+d^2 e g (m+n+2) (m+n+3)\right )\right ) \int (a+b x)^m \left (\frac {b c}{b c-a d}+\frac {b d x}{b c-a d}\right )^ndx}{b^2 d^2 (m+n+2) (m+n+3)}-\frac {(a+b x)^{m+1} (c+d x)^{n+1} (a d f h (n+2)+b c f h (m+2)-b d (m+n+3) (e h+f g)-b d f h x (m+n+2))}{b^2 d^2 (m+n+2) (m+n+3)}\) |
\(\Big \downarrow \) 79 |
\(\displaystyle \frac {(a+b x)^{m+1} (c+d x)^n \left (\frac {b (c+d x)}{b c-a d}\right )^{-n} \operatorname {Hypergeometric2F1}\left (m+1,-n,m+2,-\frac {d (a+b x)}{b c-a d}\right ) \left (a^2 d^2 f h (n+1) (n+2)+a b d (n+1) (2 c f h (m+1)-d (m+n+3) (e h+f g))+b^2 \left (c^2 f h (m+1) (m+2)-c d (m+1) (m+n+3) (e h+f g)+d^2 e g (m+n+2) (m+n+3)\right )\right )}{b^3 d^2 (m+1) (m+n+2) (m+n+3)}-\frac {(a+b x)^{m+1} (c+d x)^{n+1} (a d f h (n+2)+b c f h (m+2)-b d (m+n+3) (e h+f g)-b d f h x (m+n+2))}{b^2 d^2 (m+n+2) (m+n+3)}\) |
Input:
Int[(a + b*x)^m*(c + d*x)^n*(e + f*x)*(g + h*x),x]
Output:
-(((a + b*x)^(1 + m)*(c + d*x)^(1 + n)*(b*c*f*h*(2 + m) + a*d*f*h*(2 + n) - b*d*(f*g + e*h)*(3 + m + n) - b*d*f*h*(2 + m + n)*x))/(b^2*d^2*(2 + m + n)*(3 + m + n))) + ((a^2*d^2*f*h*(1 + n)*(2 + n) + a*b*d*(1 + n)*(2*c*f*h* (1 + m) - d*(f*g + e*h)*(3 + m + n)) + b^2*(c^2*f*h*(1 + m)*(2 + m) - c*d* (f*g + e*h)*(1 + m)*(3 + m + n) + d^2*e*g*(2 + m + n)*(3 + m + n)))*(a + b *x)^(1 + m)*(c + d*x)^n*Hypergeometric2F1[1 + m, -n, 2 + m, -((d*(a + b*x) )/(b*c - a*d))])/(b^3*d^2*(1 + m)*(2 + m + n)*(3 + m + n)*((b*(c + d*x))/( b*c - a*d))^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_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_ ))*((g_.) + (h_.)*(x_)), x_] :> Simp[(-(a*d*f*h*(n + 2) + b*c*f*h*(m + 2) - b*d*(f*g + e*h)*(m + n + 3) - b*d*f*h*(m + n + 2)*x))*(a + b*x)^(m + 1)*(( c + d*x)^(n + 1)/(b^2*d^2*(m + n + 2)*(m + n + 3))), x] + Simp[(a^2*d^2*f*h *(n + 1)*(n + 2) + a*b*d*(n + 1)*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(m + n + 3)) + b^2*(c^2*f*h*(m + 1)*(m + 2) - c*d*(f*g + e*h)*(m + 1)*(m + n + 3) + d^2*e*g*(m + n + 2)*(m + n + 3)))/(b^2*d^2*(m + n + 2)*(m + n + 3)) Int[( a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && NeQ[m + n + 2, 0] && NeQ[m + n + 3, 0]
\[\int \left (b x +a \right )^{m} \left (x d +c \right )^{n} \left (f x +e \right ) \left (h x +g \right )d x\]
Input:
int((b*x+a)^m*(d*x+c)^n*(f*x+e)*(h*x+g),x)
Output:
int((b*x+a)^m*(d*x+c)^n*(f*x+e)*(h*x+g),x)
\[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\int { {\left (f x + e\right )} {\left (h x + g\right )} {\left (b x + a\right )}^{m} {\left (d x + c\right )}^{n} \,d x } \] Input:
integrate((b*x+a)^m*(d*x+c)^n*(f*x+e)*(h*x+g),x, algorithm="fricas")
Output:
integral((f*h*x^2 + e*g + (f*g + e*h)*x)*(b*x + a)^m*(d*x + c)^n, x)
Exception generated. \[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\text {Exception raised: HeuristicGCDFailed} \] Input:
integrate((b*x+a)**m*(d*x+c)**n*(f*x+e)*(h*x+g),x)
Output:
Exception raised: HeuristicGCDFailed >> no luck
\[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\int { {\left (f x + e\right )} {\left (h x + g\right )} {\left (b x + a\right )}^{m} {\left (d x + c\right )}^{n} \,d x } \] Input:
integrate((b*x+a)^m*(d*x+c)^n*(f*x+e)*(h*x+g),x, algorithm="maxima")
Output:
integrate((f*x + e)*(h*x + g)*(b*x + a)^m*(d*x + c)^n, x)
\[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\int { {\left (f x + e\right )} {\left (h x + g\right )} {\left (b x + a\right )}^{m} {\left (d x + c\right )}^{n} \,d x } \] Input:
integrate((b*x+a)^m*(d*x+c)^n*(f*x+e)*(h*x+g),x, algorithm="giac")
Output:
integrate((f*x + e)*(h*x + g)*(b*x + a)^m*(d*x + c)^n, x)
Timed out. \[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\int \left (e+f\,x\right )\,\left (g+h\,x\right )\,{\left (a+b\,x\right )}^m\,{\left (c+d\,x\right )}^n \,d x \] Input:
int((e + f*x)*(g + h*x)*(a + b*x)^m*(c + d*x)^n,x)
Output:
int((e + f*x)*(g + h*x)*(a + b*x)^m*(c + d*x)^n, x)
\[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\text {too large to display} \] Input:
int((b*x+a)^m*(d*x+c)^n*(f*x+e)*(h*x+g),x)
Output:
((c + d*x)**n*(a + b*x)**m*a**3*c*d**2*f*h*m*n + 2*(c + d*x)**n*(a + b*x)* *m*a**3*c*d**2*f*h*m - (c + d*x)**n*(a + b*x)**m*a**3*d**3*f*h*m*n**2*x - 2*(c + d*x)**n*(a + b*x)**m*a**3*d**3*f*h*m*n*x - 2*(c + d*x)**n*(a + b*x) **m*a**2*b*c**2*d*f*h*m*n - (c + d*x)**n*(a + b*x)**m*a**2*b*c*d**2*e*h*m* *2 - (c + d*x)**n*(a + b*x)**m*a**2*b*c*d**2*e*h*m*n - 3*(c + d*x)**n*(a + b*x)**m*a**2*b*c*d**2*e*h*m - (c + d*x)**n*(a + b*x)**m*a**2*b*c*d**2*f*g *m**2 - (c + d*x)**n*(a + b*x)**m*a**2*b*c*d**2*f*g*m*n - 3*(c + d*x)**n*( a + b*x)**m*a**2*b*c*d**2*f*g*m - (c + d*x)**n*(a + b*x)**m*a**2*b*c*d**2* f*h*m**2*n*x - 2*(c + d*x)**n*(a + b*x)**m*a**2*b*c*d**2*f*h*m**2*x + 2*(c + d*x)**n*(a + b*x)**m*a**2*b*c*d**2*f*h*m*n**2*x + (c + d*x)**n*(a + b*x )**m*a**2*b*d**3*e*h*m**2*n*x + (c + d*x)**n*(a + b*x)**m*a**2*b*d**3*e*h* m*n**2*x + 3*(c + d*x)**n*(a + b*x)**m*a**2*b*d**3*e*h*m*n*x + (c + d*x)** n*(a + b*x)**m*a**2*b*d**3*f*g*m**2*n*x + (c + d*x)**n*(a + b*x)**m*a**2*b *d**3*f*g*m*n**2*x + 3*(c + d*x)**n*(a + b*x)**m*a**2*b*d**3*f*g*m*n*x + ( c + d*x)**n*(a + b*x)**m*a**2*b*d**3*f*h*m**2*n*x**2 + (c + d*x)**n*(a + b *x)**m*a**2*b*d**3*f*h*m*n**2*x**2 + (c + d*x)**n*(a + b*x)**m*a**2*b*d**3 *f*h*m*n*x**2 + (c + d*x)**n*(a + b*x)**m*a*b**2*c**3*f*h*m*n + 2*(c + d*x )**n*(a + b*x)**m*a*b**2*c**3*f*h*n - (c + d*x)**n*(a + b*x)**m*a*b**2*c** 2*d*e*h*m*n - (c + d*x)**n*(a + b*x)**m*a*b**2*c**2*d*e*h*n**2 - 3*(c + d* x)**n*(a + b*x)**m*a*b**2*c**2*d*e*h*n - (c + d*x)**n*(a + b*x)**m*a*b*...