\(\int \frac {(d+e x+f x^2)^q}{(a+b x+c x^2)^2} \, dx\) [171]

Optimal result
Mathematica [F]
Rubi [F]
Maple [F]
Fricas [F]
Sympy [F(-1)]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 25, antiderivative size = 1127 \[ \int \frac {\left (d+e x+f x^2\right )^q}{\left (a+b x+c x^2\right )^2} \, dx =\text {Too large to display} \] Output:

(b^2*c*e-2*a*c^2*e-b^3*f-b*c*(-3*a*f+c*d)-c*(-2*a*c*f+b^2*f-b*c*e+2*c^2*d) 
*x)*(f*x^2+e*x+d)^(1+q)/(-4*a*c+b^2)/((-a*f+c*d)^2-(-a*e+b*d)*(-b*f+c*e))/ 
(c*x^2+b*x+a)+1/4*((2*a*f-b*e+2*c*d)*(-b*f+c*e)-(4*c^3*d^2-4*c^2*(b*d*e-a* 
(-2*d*f+e^2)*(1-q))-b^2*f*(-2*a*f+b*e)*q+c*(4*a^2*f^2*(1-2*q)-4*a*b*e*f*(1 
-q)+b^2*(2*d*f*(2-q)+e^2*q)))/(-4*a*c+b^2)^(1/2)/q)*(f*x^2+e*x+d)^q*Appell 
F1(-2*q,-q,-q,1-2*q,(b-(-4*a*c+b^2)^(1/2)-c*(e-(-4*d*f+e^2)^(1/2))/f)/(b-( 
-4*a*c+b^2)^(1/2)+2*c*x),(b-(-4*a*c+b^2)^(1/2)-c*(e+(-4*d*f+e^2)^(1/2))/f) 
/(b-(-4*a*c+b^2)^(1/2)+2*c*x))/(-4*a*c+b^2)/((-a*f+c*d)^2-(-a*e+b*d)*(-b*f 
+c*e))/((c*(e-(-4*d*f+e^2)^(1/2)+2*f*x)/f/(b-(-4*a*c+b^2)^(1/2)+2*c*x))^q) 
/((c*(2*f*x+(-4*d*f+e^2)^(1/2)+e)/f/(b-(-4*a*c+b^2)^(1/2)+2*c*x))^q)+1/4*( 
(2*a*f-b*e+2*c*d)*(-b*f+c*e)+(4*c^3*d^2-4*c^2*(b*d*e-a*(-2*d*f+e^2)*(1-q)) 
-b^2*f*(-2*a*f+b*e)*q+c*(4*a^2*f^2*(1-2*q)-4*a*b*e*f*(1-q)+b^2*(2*d*f*(2-q 
)+e^2*q)))/(-4*a*c+b^2)^(1/2)/q)*(f*x^2+e*x+d)^q*AppellF1(-2*q,-q,-q,1-2*q 
,((b+(-4*a*c+b^2)^(1/2))*f-c*(e-(-4*d*f+e^2)^(1/2)))/f/(b+(-4*a*c+b^2)^(1/ 
2)+2*c*x),((b+(-4*a*c+b^2)^(1/2))*f-c*(e+(-4*d*f+e^2)^(1/2)))/f/(b+(-4*a*c 
+b^2)^(1/2)+2*c*x))/(-4*a*c+b^2)/((-a*f+c*d)^2-(-a*e+b*d)*(-b*f+c*e))/((c* 
(e-(-4*d*f+e^2)^(1/2)+2*f*x)/f/(b+(-4*a*c+b^2)^(1/2)+2*c*x))^q)/((c*(2*f*x 
+(-4*d*f+e^2)^(1/2)+e)/f/(b+(-4*a*c+b^2)^(1/2)+2*c*x))^q)+2^(-1-2*q)*(2*c^ 
2*d+b^2*f-c*(2*a*f+b*e))*(1+2*q)*(2*f*x+e)*(f*x^2+e*x+d)^q*hypergeom([1/2, 
 -q],[3/2],(2*f*x+e)^2/(-4*d*f+e^2))/(-4*a*c+b^2)/((-a*f+c*d)^2-(-a*e+b...
 

Mathematica [F]

\[ \int \frac {\left (d+e x+f x^2\right )^q}{\left (a+b x+c x^2\right )^2} \, dx=\int \frac {\left (d+e x+f x^2\right )^q}{\left (a+b x+c x^2\right )^2} \, dx \] Input:

Integrate[(d + e*x + f*x^2)^q/(a + b*x + c*x^2)^2,x]
 

Output:

Integrate[(d + e*x + f*x^2)^q/(a + b*x + c*x^2)^2, x]
 

Rubi [F]

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 {\left (d+e x+f x^2\right )^q}{\left (a+b x+c x^2\right )^2} \, dx\)

\(\Big \downarrow \) 1305

\(\displaystyle \frac {\int -\frac {\left (f x^2+e x+d\right )^q \left (2 d^2 c^3-\left (-2 a (1-q) e^2+b d (q+2) e+6 a d f\right ) c^2-f \left (f b^2-c e b+2 c^2 d-2 a c f\right ) (2 q+1) x^2 c+\left (\left (q e^2+2 d f\right ) b^2-a e f (1-3 q) b+4 a^2 f^2\right ) c-b^2 f (a f+b e q)-\left (f^2 (2 q+1) b^3-c e f (q+1) b^2-c \left (c q e^2-2 c d f (q+1)+2 a f^2 (3 q+1)\right ) b+2 c^2 e (c d+a f) q\right ) x\right )}{c x^2+b x+a}dx}{\left (b^2-4 a c\right ) \left ((c d-a f)^2-(b d-a e) (c e-b f)\right )}+\frac {\left (d+e x+f x^2\right )^{q+1} \left (-c x \left (-2 a c f+b^2 f-b c e+2 c^2 d\right )-b c (c d-3 a f)-2 a c^2 e+b^3 (-f)+b^2 c e\right )}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right ) \left ((c d-a f)^2-(b d-a e) (c e-b f)\right )}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\left (d+e x+f x^2\right )^{q+1} \left (-c x \left (-2 a c f+b^2 f-b c e+2 c^2 d\right )-b c (c d-3 a f)-2 a c^2 e+b^3 (-f)+b^2 c e\right )}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right ) \left ((c d-a f)^2-(b d-a e) (c e-b f)\right )}-\frac {\int \frac {\left (f x^2+e x+d\right )^q \left (2 d^2 c^3-\left (-2 a (1-q) e^2+b d (q+2) e+6 a d f\right ) c^2-f \left (f b^2-c e b+2 c^2 d-2 a c f\right ) (2 q+1) x^2 c+\left (\left (q e^2+2 d f\right ) b^2-a e f (1-3 q) b+4 a^2 f^2\right ) c-b^2 f (a f+b e q)-\left (f^2 (2 q+1) b^3-c e f (q+1) b^2-c \left (c q e^2-2 c d f (q+1)+2 a f^2 (3 q+1)\right ) b+2 c^2 e (c d+a f) q\right ) x\right )}{c x^2+b x+a}dx}{\left (b^2-4 a c\right ) \left ((c d-a f)^2-(b d-a e) (c e-b f)\right )}\)

\(\Big \downarrow \) 7279

\(\displaystyle \frac {\left (d+e x+f x^2\right )^{q+1} \left (-c x \left (-2 a c f+b^2 f-b c e+2 c^2 d\right )-b c (c d-3 a f)-2 a c^2 e+b^3 (-f)+b^2 c e\right )}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right ) \left ((c d-a f)^2-(b d-a e) (c e-b f)\right )}-\frac {\int \left (\frac {\left (2 d^2 c^3+\left (2 a \left (e^2-2 d f\right ) (1-q)-b d e (q+2)\right ) c^2+\left (\left (q e^2+2 d f\right ) b^2-a e f (2-q) b+2 a^2 f^2 (1-2 q)\right ) c-(2 c d-b e+2 a f) (c e-b f) q x c-b^2 f (b e-2 a f) q\right ) \left (f x^2+e x+d\right )^q}{c x^2+b x+a}-f \left (f b^2-c e b+2 c^2 d-2 a c f\right ) (2 q+1) \left (f x^2+e x+d\right )^q\right )dx}{\left (b^2-4 a c\right ) \left ((c d-a f)^2-(b d-a e) (c e-b f)\right )}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\left (d+e x+f x^2\right )^{q+1} \left (-c x \left (-2 a c f+b^2 f-b c e+2 c^2 d\right )-b c (c d-3 a f)-2 a c^2 e+b^3 (-f)+b^2 c e\right )}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right ) \left ((c d-a f)^2-(b d-a e) (c e-b f)\right )}-\frac {\int \frac {\left (2 d^2 c^3+\left (2 a \left (e^2-2 d f\right ) (1-q)-b d e (q+2)\right ) c^2+\left (\left (q e^2+2 d f\right ) b^2-a e f (2-q) b+2 a^2 f^2 (1-2 q)\right ) c-(2 c d-b e+2 a f) (c e-b f) q x c-b^2 f (b e-2 a f) q\right ) \left (f x^2+e x+d\right )^q}{c x^2+b x+a}dx+\frac {f 2^{q+1} (2 q+1) \left (d+e x+f x^2\right )^{q+1} \left (-\frac {-\sqrt {e^2-4 d f}+e+2 f x}{\sqrt {e^2-4 d f}}\right )^{-q-1} \left (-c (2 a f+b e)+b^2 f+2 c^2 d\right ) \operatorname {Hypergeometric2F1}\left (-q,q+1,q+2,\frac {e+2 f x+\sqrt {e^2-4 d f}}{2 \sqrt {e^2-4 d f}}\right )}{(q+1) \sqrt {e^2-4 d f}}}{\left (b^2-4 a c\right ) \left ((c d-a f)^2-(b d-a e) (c e-b f)\right )}\)

Input:

Int[(d + e*x + f*x^2)^q/(a + b*x + c*x^2)^2,x]
 

Output:

$Aborted
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 1305
Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_)*((d_.) + (e_.)*(x_) + (f_.)*(x 
_)^2)^(q_), x_Symbol] :> Simp[(2*a*c^2*e - b^2*c*e + b^3*f + b*c*(c*d - 3*a 
*f) + c*(2*c^2*d + b^2*f - c*(b*e + 2*a*f))*x)*(a + b*x + c*x^2)^(p + 1)*(( 
d + e*x + f*x^2)^(q + 1)/((b^2 - 4*a*c)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - 
 b*f))*(p + 1))), x] - Simp[1/((b^2 - 4*a*c)*((c*d - a*f)^2 - (b*d - a*e)*( 
c*e - b*f))*(p + 1))   Int[(a + b*x + c*x^2)^(p + 1)*(d + e*x + f*x^2)^q*Si 
mp[2*c*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(p + 1) - (2*c^2*d + b^2*f 
 - c*(b*e + 2*a*f))*(a*f*(p + 1) - c*d*(p + 2)) - e*(b^2*c*e - 2*a*c^2*e - 
b^3*f - b*c*(c*d - 3*a*f))*(p + q + 2) + (2*f*(2*a*c^2*e - b^2*c*e + b^3*f 
+ b*c*(c*d - 3*a*f))*(p + q + 2) - (2*c^2*d + b^2*f - c*(b*e + 2*a*f))*(b*f 
*(p + 1) - c*e*(2*p + q + 4)))*x + c*f*(2*c^2*d + b^2*f - c*(b*e + 2*a*f))* 
(2*p + 2*q + 5)*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[b 
^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && LtQ[p, -1] && NeQ[(c*d - a*f)^2 - 
(b*d - a*e)*(c*e - b*f), 0] &&  !( !IntegerQ[p] && ILtQ[q, -1]) &&  !IGtQ[q 
, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7279
Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[ 
{v = RationalFunctionExpand[u/(a + b*x^n + c*x^(2*n)), x]}, Int[v, x] /; Su 
mQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]
 
Maple [F]

\[\int \frac {\left (f \,x^{2}+e x +d \right )^{q}}{\left (c \,x^{2}+b x +a \right )^{2}}d x\]

Input:

int((f*x^2+e*x+d)^q/(c*x^2+b*x+a)^2,x)
 

Output:

int((f*x^2+e*x+d)^q/(c*x^2+b*x+a)^2,x)
 

Fricas [F]

\[ \int \frac {\left (d+e x+f x^2\right )^q}{\left (a+b x+c x^2\right )^2} \, dx=\int { \frac {{\left (f x^{2} + e x + d\right )}^{q}}{{\left (c x^{2} + b x + a\right )}^{2}} \,d x } \] Input:

integrate((f*x^2+e*x+d)^q/(c*x^2+b*x+a)^2,x, algorithm="fricas")
 

Output:

integral((f*x^2 + e*x + d)^q/(c^2*x^4 + 2*b*c*x^3 + 2*a*b*x + (b^2 + 2*a*c 
)*x^2 + a^2), x)
 

Sympy [F(-1)]

Timed out. \[ \int \frac {\left (d+e x+f x^2\right )^q}{\left (a+b x+c x^2\right )^2} \, dx=\text {Timed out} \] Input:

integrate((f*x**2+e*x+d)**q/(c*x**2+b*x+a)**2,x)
 

Output:

Timed out
 

Maxima [F]

\[ \int \frac {\left (d+e x+f x^2\right )^q}{\left (a+b x+c x^2\right )^2} \, dx=\int { \frac {{\left (f x^{2} + e x + d\right )}^{q}}{{\left (c x^{2} + b x + a\right )}^{2}} \,d x } \] Input:

integrate((f*x^2+e*x+d)^q/(c*x^2+b*x+a)^2,x, algorithm="maxima")
 

Output:

integrate((f*x^2 + e*x + d)^q/(c*x^2 + b*x + a)^2, x)
 

Giac [F]

\[ \int \frac {\left (d+e x+f x^2\right )^q}{\left (a+b x+c x^2\right )^2} \, dx=\int { \frac {{\left (f x^{2} + e x + d\right )}^{q}}{{\left (c x^{2} + b x + a\right )}^{2}} \,d x } \] Input:

integrate((f*x^2+e*x+d)^q/(c*x^2+b*x+a)^2,x, algorithm="giac")
 

Output:

integrate((f*x^2 + e*x + d)^q/(c*x^2 + b*x + a)^2, x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (d+e x+f x^2\right )^q}{\left (a+b x+c x^2\right )^2} \, dx=\int \frac {{\left (f\,x^2+e\,x+d\right )}^q}{{\left (c\,x^2+b\,x+a\right )}^2} \,d x \] Input:

int((d + e*x + f*x^2)^q/(a + b*x + c*x^2)^2,x)
 

Output:

int((d + e*x + f*x^2)^q/(a + b*x + c*x^2)^2, x)
 

Reduce [F]

\[ \int \frac {\left (d+e x+f x^2\right )^q}{\left (a+b x+c x^2\right )^2} \, dx=\int \frac {\left (f \,x^{2}+e x +d \right )^{q}}{c^{2} x^{4}+2 b c \,x^{3}+2 a c \,x^{2}+b^{2} x^{2}+2 a b x +a^{2}}d x \] Input:

int((f*x^2+e*x+d)^q/(c*x^2+b*x+a)^2,x)
 

Output:

int((d + e*x + f*x**2)**q/(a**2 + 2*a*b*x + 2*a*c*x**2 + b**2*x**2 + 2*b*c 
*x**3 + c**2*x**4),x)