Integrand size = 25, antiderivative size = 282 \[ \int \frac {(f+g x) \left (a+b x+c x^2\right )^p}{d+e x} \, dx=\frac {2^{-1+2 p} (e f-d g) \left (\frac {e \left (b-\sqrt {b^2-4 a c}+2 c x\right )}{c (d+e x)}\right )^{-p} \left (\frac {e \left (b+\sqrt {b^2-4 a c}+2 c x\right )}{c (d+e x)}\right )^{-p} \left (a+b x+c x^2\right )^p \operatorname {AppellF1}\left (-2 p,-p,-p,1-2 p,\frac {2 c d-\left (b-\sqrt {b^2-4 a c}\right ) e}{2 c (d+e x)},\frac {2 d-\frac {\left (b+\sqrt {b^2-4 a c}\right ) e}{c}}{2 (d+e x)}\right )}{e^2 p}+\frac {2^{-1-2 p} g (b+2 c x) \left (a+b x+c x^2\right )^p \left (-\frac {c \left (a+b x+c x^2\right )}{b^2-4 a c}\right )^{-p} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-p,\frac {3}{2},\frac {(b+2 c x)^2}{b^2-4 a c}\right )}{c e} \] Output:
2^(-1+2*p)*(-d*g+e*f)*(c*x^2+b*x+a)^p*AppellF1(-2*p,-p,-p,1-2*p,(2*d-(b+(- 4*a*c+b^2)^(1/2))*e/c)/(2*e*x+2*d),1/2*(2*c*d-(b-(-4*a*c+b^2)^(1/2))*e)/c/ (e*x+d))/e^2/p/((e*(b-(-4*a*c+b^2)^(1/2)+2*c*x)/c/(e*x+d))^p)/((e*(b+(-4*a *c+b^2)^(1/2)+2*c*x)/c/(e*x+d))^p)+2^(-1-2*p)*g*(2*c*x+b)*(c*x^2+b*x+a)^p* hypergeom([1/2, -p],[3/2],(2*c*x+b)^2/(-4*a*c+b^2))/c/e/((-c*(c*x^2+b*x+a) /(-4*a*c+b^2))^p)
Time = 1.06 (sec) , antiderivative size = 306, normalized size of antiderivative = 1.09 \[ \int \frac {(f+g x) \left (a+b x+c x^2\right )^p}{d+e x} \, dx=\frac {(a+x (b+c x))^p \left (\frac {4^p (e f-d g) \left (\frac {e \left (b-\sqrt {b^2-4 a c}+2 c x\right )}{c (d+e x)}\right )^{-p} \left (\frac {e \left (b+\sqrt {b^2-4 a c}+2 c x\right )}{c (d+e x)}\right )^{-p} \operatorname {AppellF1}\left (-2 p,-p,-p,1-2 p,\frac {2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e}{2 c (d+e x)},\frac {2 c d-b e+\sqrt {b^2-4 a c} e}{2 c d+2 c e x}\right )}{p}+\frac {2^p e g \left (b-\sqrt {b^2-4 a c}+2 c x\right ) \left (\frac {b+\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p} \operatorname {Hypergeometric2F1}\left (-p,1+p,2+p,\frac {-b+\sqrt {b^2-4 a c}-2 c x}{2 \sqrt {b^2-4 a c}}\right )}{c (1+p)}\right )}{2 e^2} \] Input:
Integrate[((f + g*x)*(a + b*x + c*x^2)^p)/(d + e*x),x]
Output:
((a + x*(b + c*x))^p*((4^p*(e*f - d*g)*AppellF1[-2*p, -p, -p, 1 - 2*p, (2* c*d - (b + Sqrt[b^2 - 4*a*c])*e)/(2*c*(d + e*x)), (2*c*d - b*e + Sqrt[b^2 - 4*a*c]*e)/(2*c*d + 2*c*e*x)])/(p*((e*(b - Sqrt[b^2 - 4*a*c] + 2*c*x))/(c *(d + e*x)))^p*((e*(b + Sqrt[b^2 - 4*a*c] + 2*c*x))/(c*(d + e*x)))^p) + (2 ^p*e*g*(b - Sqrt[b^2 - 4*a*c] + 2*c*x)*Hypergeometric2F1[-p, 1 + p, 2 + p, (-b + Sqrt[b^2 - 4*a*c] - 2*c*x)/(2*Sqrt[b^2 - 4*a*c])])/(c*(1 + p)*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c])^p)))/(2*e^2)
Time = 0.87 (sec) , antiderivative size = 319, normalized size of antiderivative = 1.13, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {1269, 1096, 1178, 150}
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 {(f+g x) \left (a+b x+c x^2\right )^p}{d+e x} \, dx\) |
\(\Big \downarrow \) 1269 |
\(\displaystyle \frac {(e f-d g) \int \frac {\left (c x^2+b x+a\right )^p}{d+e x}dx}{e}+\frac {g \int \left (c x^2+b x+a\right )^pdx}{e}\) |
\(\Big \downarrow \) 1096 |
\(\displaystyle \frac {(e f-d g) \int \frac {\left (c x^2+b x+a\right )^p}{d+e x}dx}{e}-\frac {g 2^{p+1} \left (-\frac {-\sqrt {b^2-4 a c}+b+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p-1} \left (a+b x+c x^2\right )^{p+1} \operatorname {Hypergeometric2F1}\left (-p,p+1,p+2,\frac {b+2 c x+\sqrt {b^2-4 a c}}{2 \sqrt {b^2-4 a c}}\right )}{e (p+1) \sqrt {b^2-4 a c}}\) |
\(\Big \downarrow \) 1178 |
\(\displaystyle -\frac {4^p (e f-d g) \left (\frac {1}{d+e x}\right )^{2 p} \left (a+b x+c x^2\right )^p \left (\frac {e \left (-\sqrt {b^2-4 a c}+b+2 c x\right )}{c (d+e x)}\right )^{-p} \left (\frac {e \left (\sqrt {b^2-4 a c}+b+2 c x\right )}{c (d+e x)}\right )^{-p} \int \left (\frac {1}{d+e x}\right )^{-2 p-1} \left (1-\frac {2 d-\frac {\left (b-\sqrt {b^2-4 a c}\right ) e}{c}}{2 (d+e x)}\right )^p \left (1-\frac {2 d-\frac {\left (b+\sqrt {b^2-4 a c}\right ) e}{c}}{2 (d+e x)}\right )^pd\frac {1}{d+e x}}{e^2}-\frac {g 2^{p+1} \left (a+b x+c x^2\right )^{p+1} \left (-\frac {-\sqrt {b^2-4 a c}+b+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p-1} \operatorname {Hypergeometric2F1}\left (-p,p+1,p+2,\frac {b+2 c x+\sqrt {b^2-4 a c}}{2 \sqrt {b^2-4 a c}}\right )}{e (p+1) \sqrt {b^2-4 a c}}\) |
\(\Big \downarrow \) 150 |
\(\displaystyle \frac {2^{2 p-1} (e f-d g) \left (a+b x+c x^2\right )^p \left (\frac {e \left (-\sqrt {b^2-4 a c}+b+2 c x\right )}{c (d+e x)}\right )^{-p} \left (\frac {e \left (\sqrt {b^2-4 a c}+b+2 c x\right )}{c (d+e x)}\right )^{-p} \operatorname {AppellF1}\left (-2 p,-p,-p,1-2 p,\frac {2 c d-\left (b-\sqrt {b^2-4 a c}\right ) e}{2 c (d+e x)},\frac {2 d-\frac {\left (b+\sqrt {b^2-4 a c}\right ) e}{c}}{2 (d+e x)}\right )}{e^2 p}-\frac {g 2^{p+1} \left (-\frac {-\sqrt {b^2-4 a c}+b+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p-1} \left (a+b x+c x^2\right )^{p+1} \operatorname {Hypergeometric2F1}\left (-p,p+1,p+2,\frac {b+2 c x+\sqrt {b^2-4 a c}}{2 \sqrt {b^2-4 a c}}\right )}{e (p+1) \sqrt {b^2-4 a c}}\) |
Input:
Int[((f + g*x)*(a + b*x + c*x^2)^p)/(d + e*x),x]
Output:
(2^(-1 + 2*p)*(e*f - d*g)*(a + b*x + c*x^2)^p*AppellF1[-2*p, -p, -p, 1 - 2 *p, (2*c*d - (b - Sqrt[b^2 - 4*a*c])*e)/(2*c*(d + e*x)), (2*d - ((b + Sqrt [b^2 - 4*a*c])*e)/c)/(2*(d + e*x))])/(e^2*p*((e*(b - Sqrt[b^2 - 4*a*c] + 2 *c*x))/(c*(d + e*x)))^p*((e*(b + Sqrt[b^2 - 4*a*c] + 2*c*x))/(c*(d + e*x)) )^p) - (2^(1 + p)*g*(-((b - Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c])) ^(-1 - p)*(a + b*x + c*x^2)^(1 + p)*Hypergeometric2F1[-p, 1 + p, 2 + p, (b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(2*Sqrt[b^2 - 4*a*c])])/(Sqrt[b^2 - 4*a*c]*e *(1 + p))
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ ] :> Simp[c^n*e^p*((b*x)^(m + 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2 , (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p}, x] && !In tegerQ[m] && !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])
Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(-(a + b*x + c*x^2)^(p + 1)/(q*(p + 1)*((q - b - 2*c*x) /(2*q))^(p + 1)))*Hypergeometric2F1[-p, p + 1, p + 2, (b + q + 2*c*x)/(2*q) ], x]] /; FreeQ[{a, b, c, p}, x] && !IntegerQ[4*p] && !IntegerQ[3*p]
Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_S ymbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(-(1/(d + e*x))^(2*p))*((a + b*x + c*x^2)^p/(e*(e*((b - q + 2*c*x)/(2*c*(d + e*x))))^p*(e*((b + q + 2*c* x)/(2*c*(d + e*x))))^p)) Subst[Int[x^(-m - 2*(p + 1))*Simp[1 - (d - e*((b - q)/(2*c)))*x, x]^p*Simp[1 - (d - e*((b + q)/(2*c)))*x, x]^p, x], x, 1/(d + e*x)], x]] /; FreeQ[{a, b, c, d, e, p}, x] && ILtQ[m, 0]
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c _.)*(x_)^2)^(p_.), x_Symbol] :> Simp[g/e Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Simp[(e*f - d*g)/e Int[(d + e*x)^m*(a + b*x + c*x^2)^ p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && !IGtQ[m, 0]
\[\int \frac {\left (g x +f \right ) \left (c \,x^{2}+b x +a \right )^{p}}{e x +d}d x\]
Input:
int((g*x+f)*(c*x^2+b*x+a)^p/(e*x+d),x)
Output:
int((g*x+f)*(c*x^2+b*x+a)^p/(e*x+d),x)
\[ \int \frac {(f+g x) \left (a+b x+c x^2\right )^p}{d+e x} \, dx=\int { \frac {{\left (g x + f\right )} {\left (c x^{2} + b x + a\right )}^{p}}{e x + d} \,d x } \] Input:
integrate((g*x+f)*(c*x^2+b*x+a)^p/(e*x+d),x, algorithm="fricas")
Output:
integral((g*x + f)*(c*x^2 + b*x + a)^p/(e*x + d), x)
Timed out. \[ \int \frac {(f+g x) \left (a+b x+c x^2\right )^p}{d+e x} \, dx=\text {Timed out} \] Input:
integrate((g*x+f)*(c*x**2+b*x+a)**p/(e*x+d),x)
Output:
Timed out
\[ \int \frac {(f+g x) \left (a+b x+c x^2\right )^p}{d+e x} \, dx=\int { \frac {{\left (g x + f\right )} {\left (c x^{2} + b x + a\right )}^{p}}{e x + d} \,d x } \] Input:
integrate((g*x+f)*(c*x^2+b*x+a)^p/(e*x+d),x, algorithm="maxima")
Output:
integrate((g*x + f)*(c*x^2 + b*x + a)^p/(e*x + d), x)
\[ \int \frac {(f+g x) \left (a+b x+c x^2\right )^p}{d+e x} \, dx=\int { \frac {{\left (g x + f\right )} {\left (c x^{2} + b x + a\right )}^{p}}{e x + d} \,d x } \] Input:
integrate((g*x+f)*(c*x^2+b*x+a)^p/(e*x+d),x, algorithm="giac")
Output:
integrate((g*x + f)*(c*x^2 + b*x + a)^p/(e*x + d), x)
Timed out. \[ \int \frac {(f+g x) \left (a+b x+c x^2\right )^p}{d+e x} \, dx=\int \frac {\left (f+g\,x\right )\,{\left (c\,x^2+b\,x+a\right )}^p}{d+e\,x} \,d x \] Input:
int(((f + g*x)*(a + b*x + c*x^2)^p)/(d + e*x),x)
Output:
int(((f + g*x)*(a + b*x + c*x^2)^p)/(d + e*x), x)
\[ \int \frac {(f+g x) \left (a+b x+c x^2\right )^p}{d+e x} \, dx=\text {too large to display} \] Input:
int((g*x+f)*(c*x^2+b*x+a)^p/(e*x+d),x)
Output:
(2*(a + b*x + c*x**2)**p*a*e*g*p - (a + b*x + c*x**2)**p*b*d*g*p - (a + b* x + c*x**2)**p*b*d*g + 2*(a + b*x + c*x**2)**p*b*e*f*p + (a + b*x + c*x**2 )**p*b*e*f + (a + b*x + c*x**2)**p*b*e*g*p*x + 2*(a + b*x + c*x**2)**p*c*d *g*p*x - 4*int((a + b*x + c*x**2)**p/(2*a*b*d*e*p + a*b*d*e + 2*a*b*e**2*p *x + a*b*e**2*x + 4*a*c*d**2*p + 2*a*c*d**2 + 4*a*c*d*e*p*x + 2*a*c*d*e*x + 2*b**2*d*e*p*x + b**2*d*e*x + 2*b**2*e**2*p*x**2 + b**2*e**2*x**2 + 4*b* c*d**2*p*x + 2*b*c*d**2*x + 6*b*c*d*e*p*x**2 + 3*b*c*d*e*x**2 + 2*b*c*e**2 *p*x**3 + b*c*e**2*x**3 + 4*c**2*d**2*p*x**2 + 2*c**2*d**2*x**2 + 4*c**2*d *e*p*x**3 + 2*c**2*d*e*x**3),x)*a*b**2*d*e**2*g*p**3 - 4*int((a + b*x + c* x**2)**p/(2*a*b*d*e*p + a*b*d*e + 2*a*b*e**2*p*x + a*b*e**2*x + 4*a*c*d**2 *p + 2*a*c*d**2 + 4*a*c*d*e*p*x + 2*a*c*d*e*x + 2*b**2*d*e*p*x + b**2*d*e* x + 2*b**2*e**2*p*x**2 + b**2*e**2*x**2 + 4*b*c*d**2*p*x + 2*b*c*d**2*x + 6*b*c*d*e*p*x**2 + 3*b*c*d*e*x**2 + 2*b*c*e**2*p*x**3 + b*c*e**2*x**3 + 4* c**2*d**2*p*x**2 + 2*c**2*d**2*x**2 + 4*c**2*d*e*p*x**3 + 2*c**2*d*e*x**3) ,x)*a*b**2*d*e**2*g*p**2 - int((a + b*x + c*x**2)**p/(2*a*b*d*e*p + a*b*d* e + 2*a*b*e**2*p*x + a*b*e**2*x + 4*a*c*d**2*p + 2*a*c*d**2 + 4*a*c*d*e*p* x + 2*a*c*d*e*x + 2*b**2*d*e*p*x + b**2*d*e*x + 2*b**2*e**2*p*x**2 + b**2* e**2*x**2 + 4*b*c*d**2*p*x + 2*b*c*d**2*x + 6*b*c*d*e*p*x**2 + 3*b*c*d*e*x **2 + 2*b*c*e**2*p*x**3 + b*c*e**2*x**3 + 4*c**2*d**2*p*x**2 + 2*c**2*d**2 *x**2 + 4*c**2*d*e*p*x**3 + 2*c**2*d*e*x**3),x)*a*b**2*d*e**2*g*p + 4*i...