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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [B] (verified)
Fricas [F(-1)]
Sympy [F(-1)]
Maxima [F(-2)]
Giac [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 25, antiderivative size = 664 \[ \int \frac {f+g x}{(d+e x) \left (a+b x+c x^2\right )^3} \, dx=-\frac {b c d f-b^2 e f+2 a c e f-2 a c d g+a b e g+c (2 c d f+2 a e g-b (e f+d g)) x}{2 \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \left (a+b x+c x^2\right )^2}-\frac {3 a c e (2 c d-b e) (2 c d f+2 a e g-b (e f+d g))-\left (b c d-b^2 e+2 a c e\right ) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )+c \left (3 c e (b d-2 a e) (2 c d f+2 a e g-b (e f+d g))-(2 c d-b e) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )\right ) x}{2 \left (b^2-4 a c\right )^2 \left (c d^2-b d e+a e^2\right )^2 \left (a+b x+c x^2\right )}-\frac {\left (12 c^5 d^5 f-b^5 e^4 (e f-d g)+10 a b^3 c e^4 (e f-d g)+2 c^4 d^3 (2 a e (10 e f-d g)-3 b d (5 e f+d g))-6 c^2 e^2 \left (2 b^3 d^3 g-6 a b^2 d^2 e g-2 a^3 e^3 g+a^2 b e^2 (5 e f+d g)\right )+4 c^3 d e \left (3 a^2 e^2 (5 e f-2 d g)-3 a b d e (5 e f+d g)+b^2 d^2 (5 e f+4 d g)\right )\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{5/2} \left (c d^2-b d e+a e^2\right )^3}+\frac {e^4 (e f-d g) \log (d+e x)}{\left (c d^2-b d e+a e^2\right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(sec) , antiderivative size = 668, normalized size of antiderivative = 1.01 \[ \int \frac {f+g x}{(d+e x) \left (a+b x+c x^2\right )^3} \, dx=\frac {1}{2} \left (\frac {-b^2 e f+b (a e g-c e f x+c d (f-g x))+2 c (-a d g+c d f x+a e (f+g x))}{\left (b^2-4 a c\right ) \left (-c d^2+e (b d-a e)\right ) (a+x (b+c x))^2}+\frac {2 b^4 e^2 (e f-d g)+b^3 c e \left (5 d^2 g+2 e^2 f x+d e (f-2 g x)\right )-4 c^2 \left (-3 c^2 d^3 f x+a c d e (-7 e f+d g) x+a^2 e^2 (-4 e f+4 d g-3 e g x)\right )+2 b c \left (3 a^2 e^3 g+3 c^2 d^2 (d f-3 e f x-d g x)-a c e \left (-7 d e f+d^2 g+7 e^2 f x+5 d e g x\right )\right )+b^2 c \left (3 a e^2 (-5 e f+d g)+c d \left (-9 d e f-3 d^2 g+2 e^2 f x+10 d e g x\right )\right )}{\left (b^2-4 a c\right )^2 \left (c d^2+e (-b d+a e)\right )^2 (a+x (b+c x))}-\frac {2 \left (12 c^5 d^5 f+10 a b^3 c e^4 (e f-d g)+b^5 e^4 (-e f+d g)-2 c^4 d^3 (2 a e (-10 e f+d g)+3 b d (5 e f+d g))+6 c^2 e^2 \left (-2 b^3 d^3 g+6 a b^2 d^2 e g+2 a^3 e^3 g-a^2 b e^2 (5 e f+d g)\right )+4 c^3 d e \left (3 a^2 e^2 (5 e f-2 d g)-3 a b d e (5 e f+d g)+b^2 d^2 (5 e f+4 d g)\right )\right ) \arctan \left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\left (-b^2+4 a c\right )^{5/2} \left (-c d^2+e (b d-a e)\right )^3}+\frac {2 e^4 (e f-d g) \log (d+e x)}{\left (c d^2+e (-b d+a e)\right )^3}+\frac {e^4 (-e f+d g) \log (a+x (b+c x))}{\left (c d^2+e (-b d+a e)\right )^3}\right ) \] Input:

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

Output:

((-(b^2*e*f) + b*(a*e*g - c*e*f*x + c*d*(f - g*x)) + 2*c*(-(a*d*g) + c*d*f 
*x + a*e*(f + g*x)))/((b^2 - 4*a*c)*(-(c*d^2) + e*(b*d - a*e))*(a + x*(b + 
 c*x))^2) + (2*b^4*e^2*(e*f - d*g) + b^3*c*e*(5*d^2*g + 2*e^2*f*x + d*e*(f 
 - 2*g*x)) - 4*c^2*(-3*c^2*d^3*f*x + a*c*d*e*(-7*e*f + d*g)*x + a^2*e^2*(- 
4*e*f + 4*d*g - 3*e*g*x)) + 2*b*c*(3*a^2*e^3*g + 3*c^2*d^2*(d*f - 3*e*f*x 
- d*g*x) - a*c*e*(-7*d*e*f + d^2*g + 7*e^2*f*x + 5*d*e*g*x)) + b^2*c*(3*a* 
e^2*(-5*e*f + d*g) + c*d*(-9*d*e*f - 3*d^2*g + 2*e^2*f*x + 10*d*e*g*x)))/( 
(b^2 - 4*a*c)^2*(c*d^2 + e*(-(b*d) + a*e))^2*(a + x*(b + c*x))) - (2*(12*c 
^5*d^5*f + 10*a*b^3*c*e^4*(e*f - d*g) + b^5*e^4*(-(e*f) + d*g) - 2*c^4*d^3 
*(2*a*e*(-10*e*f + d*g) + 3*b*d*(5*e*f + d*g)) + 6*c^2*e^2*(-2*b^3*d^3*g + 
 6*a*b^2*d^2*e*g + 2*a^3*e^3*g - a^2*b*e^2*(5*e*f + d*g)) + 4*c^3*d*e*(3*a 
^2*e^2*(5*e*f - 2*d*g) - 3*a*b*d*e*(5*e*f + d*g) + b^2*d^2*(5*e*f + 4*d*g) 
))*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]])/((-b^2 + 4*a*c)^(5/2)*(-(c*d^2) 
 + e*(b*d - a*e))^3) + (2*e^4*(e*f - d*g)*Log[d + e*x])/(c*d^2 + e*(-(b*d) 
 + a*e))^3 + (e^4*(-(e*f) + d*g)*Log[a + x*(b + c*x)])/(c*d^2 + e*(-(b*d) 
+ a*e))^3)/2
 

Rubi [A] (verified)

Time = 3.55 (sec) , antiderivative size = 742, normalized size of antiderivative = 1.12, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {1235, 1235, 25, 1200, 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 \frac {f+g x}{(d+e x) \left (a+b x+c x^2\right )^3} \, dx\)

\(\Big \downarrow \) 1235

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

\(\Big \downarrow \) 1235

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 1200

\(\displaystyle -\frac {\frac {\int \left (\frac {2 \left (e^4 (e f-d g) b^5-9 a c e^4 (e f-d g) b^3-6 c^5 d^5 f+c^2 e^2 \left (6 b^3 g d^3-18 a b^2 e g d^2-6 a^3 e^3 g+a^2 b e^2 (23 e f-5 d g)\right )-c^4 d^3 (2 a e (10 e f-d g)-3 b d (5 e f+d g))-2 c^3 d e \left (b^2 (5 e f+4 d g) d^2-3 a b e (5 e f+d g) d+3 a^2 e^2 (5 e f-2 d g)\right )+c \left (b^2-4 a c\right )^2 e^4 (e f-d g) x\right )}{\left (c d^2-b e d+a e^2\right ) \left (c x^2+b x+a\right )}-\frac {2 \left (b^2-4 a c\right )^2 e^5 (e f-d g)}{\left (c d^2-b e d+a e^2\right ) (d+e x)}\right )dx}{\left (b^2-4 a c\right ) \left (a e^2-b d e+c d^2\right )}+\frac {c x \left (3 c e (b d-2 a e) (2 a e g-b (d g+e f)+2 c d f)-(2 c d-b e) \left (2 a c e (4 e f-d g)-2 b^2 e (e f-d g)-3 b c d (d g+e f)+6 c^2 d^2 f\right )\right )-\left (2 a c e+b^2 (-e)+b c d\right ) \left (2 a c e (4 e f-d g)-2 b^2 e (e f-d g)-3 b c d (d g+e f)+6 c^2 d^2 f\right )+3 a c e (2 c d-b e) (2 a e g-b (d g+e f)+2 c d f)}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right ) \left (a e^2-b d e+c d^2\right )}}{2 \left (b^2-4 a c\right ) \left (a e^2-b d e+c d^2\right )}-\frac {c x (2 a e g-b (d g+e f)+2 c d f)+a b e g-2 a c d g+2 a c e f+b^2 (-e) f+b c d f}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2 \left (a e^2-b d e+c d^2\right )}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {\frac {\frac {2 \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (4 c^3 d e \left (3 a^2 e^2 (5 e f-2 d g)-3 a b d e (d g+5 e f)+b^2 d^2 (4 d g+5 e f)\right )-6 c^2 e^2 \left (-2 a^3 e^3 g+a^2 b e^2 (d g+5 e f)-6 a b^2 d^2 e g+2 b^3 d^3 g\right )+10 a b^3 c e^4 (e f-d g)+2 c^4 d^3 (2 a e (10 e f-d g)-3 b d (d g+5 e f))+b^5 \left (-e^4\right ) (e f-d g)+12 c^5 d^5 f\right )}{\sqrt {b^2-4 a c} \left (a e^2-b d e+c d^2\right )}+\frac {e^4 \left (b^2-4 a c\right )^2 (e f-d g) \log \left (a+b x+c x^2\right )}{a e^2-b d e+c d^2}-\frac {2 e^4 \left (b^2-4 a c\right )^2 (e f-d g) \log (d+e x)}{a e^2-b d e+c d^2}}{\left (b^2-4 a c\right ) \left (a e^2-b d e+c d^2\right )}+\frac {c x \left (3 c e (b d-2 a e) (2 a e g-b (d g+e f)+2 c d f)-(2 c d-b e) \left (2 a c e (4 e f-d g)-2 b^2 e (e f-d g)-3 b c d (d g+e f)+6 c^2 d^2 f\right )\right )-\left (2 a c e+b^2 (-e)+b c d\right ) \left (2 a c e (4 e f-d g)-2 b^2 e (e f-d g)-3 b c d (d g+e f)+6 c^2 d^2 f\right )+3 a c e (2 c d-b e) (2 a e g-b (d g+e f)+2 c d f)}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right ) \left (a e^2-b d e+c d^2\right )}}{2 \left (b^2-4 a c\right ) \left (a e^2-b d e+c d^2\right )}-\frac {c x (2 a e g-b (d g+e f)+2 c d f)+a b e g-2 a c d g+2 a c e f+b^2 (-e) f+b c d f}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2 \left (a e^2-b d e+c d^2\right )}\)

Input:

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

Output:

-1/2*(b*c*d*f - b^2*e*f + 2*a*c*e*f - 2*a*c*d*g + a*b*e*g + c*(2*c*d*f + 2 
*a*e*g - b*(e*f + d*g))*x)/((b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2)*(a + b*x 
 + c*x^2)^2) - ((3*a*c*e*(2*c*d - b*e)*(2*c*d*f + 2*a*e*g - b*(e*f + d*g)) 
 - (b*c*d - b^2*e + 2*a*c*e)*(6*c^2*d^2*f - 2*b^2*e*(e*f - d*g) + 2*a*c*e* 
(4*e*f - d*g) - 3*b*c*d*(e*f + d*g)) + c*(3*c*e*(b*d - 2*a*e)*(2*c*d*f + 2 
*a*e*g - b*(e*f + d*g)) - (2*c*d - b*e)*(6*c^2*d^2*f - 2*b^2*e*(e*f - d*g) 
 + 2*a*c*e*(4*e*f - d*g) - 3*b*c*d*(e*f + d*g)))*x)/((b^2 - 4*a*c)*(c*d^2 
- b*d*e + a*e^2)*(a + b*x + c*x^2)) + ((2*(12*c^5*d^5*f - b^5*e^4*(e*f - d 
*g) + 10*a*b^3*c*e^4*(e*f - d*g) + 2*c^4*d^3*(2*a*e*(10*e*f - d*g) - 3*b*d 
*(5*e*f + d*g)) - 6*c^2*e^2*(2*b^3*d^3*g - 6*a*b^2*d^2*e*g - 2*a^3*e^3*g + 
 a^2*b*e^2*(5*e*f + d*g)) + 4*c^3*d*e*(3*a^2*e^2*(5*e*f - 2*d*g) - 3*a*b*d 
*e*(5*e*f + d*g) + b^2*d^2*(5*e*f + 4*d*g)))*ArcTanh[(b + 2*c*x)/Sqrt[b^2 
- 4*a*c]])/(Sqrt[b^2 - 4*a*c]*(c*d^2 - b*d*e + a*e^2)) - (2*(b^2 - 4*a*c)^ 
2*e^4*(e*f - d*g)*Log[d + e*x])/(c*d^2 - b*d*e + a*e^2) + ((b^2 - 4*a*c)^2 
*e^4*(e*f - d*g)*Log[a + b*x + c*x^2])/(c*d^2 - b*d*e + a*e^2))/((b^2 - 4* 
a*c)*(c*d^2 - b*d*e + a*e^2)))/(2*(b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2))
 

Defintions of rubi rules used

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

rule 1200
Int[(((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.))/((a_.) + (b_.)* 
(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*((f + g* 
x)^n/(a + b*x + c*x^2)), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && In 
tegersQ[n]
 

rule 1235
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c 
_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(d + e*x)^(m + 1)*(f*(b*c*d - b^2*e + 2 
*a*c*e) - a*g*(2*c*d - b*e) + c*(f*(2*c*d - b*e) - g*(b*d - 2*a*e))*x)*((a 
+ b*x + c*x^2)^(p + 1)/((p + 1)*(b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2))), x] 
 + Simp[1/((p + 1)*(b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2))   Int[(d + e*x)^m 
*(a + b*x + c*x^2)^(p + 1)*Simp[f*(b*c*d*e*(2*p - m + 2) + b^2*e^2*(p + m + 
 2) - 2*c^2*d^2*(2*p + 3) - 2*a*c*e^2*(m + 2*p + 3)) - g*(a*e*(b*e - 2*c*d* 
m + b*e*m) - b*d*(3*c*d - b*e + 2*c*d*p - b*e*p)) + c*e*(g*(b*d - 2*a*e) - 
f*(2*c*d - b*e))*(m + 2*p + 4)*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, 
 m}, x] && LtQ[p, -1] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p] 
)
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(2086\) vs. \(2(654)=1308\).

Time = 2.20 (sec) , antiderivative size = 2087, normalized size of antiderivative = 3.14

method result size
default \(\text {Expression too large to display}\) \(2087\)
risch \(\text {Expression too large to display}\) \(9497\)

Input:

int((g*x+f)/(e*x+d)/(c*x^2+b*x+a)^3,x,method=_RETURNVERBOSE)
 

Output:

-(d*g-e*f)*e^4/(a*e^2-b*d*e+c*d^2)^3*ln(e*x+d)+1/(a*e^2-b*d*e+c*d^2)^3*((c 
^2*(6*a^3*c*e^5*g-11*a^2*b*c*d*e^4*g-7*a^2*b*c*e^5*f+4*a^2*c^2*d^2*e^3*g+1 
4*a^2*c^2*d*e^4*f-a*b^3*d*e^4*g+a*b^3*e^5*f+10*a*b^2*c*d^2*e^3*g+8*a*b^2*c 
*d*e^4*f-6*a*b*c^2*d^3*e^2*g-30*a*b*c^2*d^2*e^3*f-2*a*c^3*d^4*e*g+20*a*c^3 
*d^3*e^2*f+b^4*d^2*e^3*g-b^4*d*e^4*f-6*b^3*c*d^3*e^2*g+8*b^2*c^2*d^4*e*g+1 
0*b^2*c^2*d^3*e^2*f-3*b*c^3*d^5*g-15*b*c^3*d^4*e*f+6*c^4*d^5*f)/(16*a^2*c^ 
2-8*a*b^2*c+b^4)*x^3+1/2*c*(18*a^3*b*c*e^5*g-16*a^3*c^2*d*e^4*g+16*a^3*c^2 
*e^5*f-25*a^2*b^2*c*d*e^4*g-29*a^2*b^2*c*e^5*f+28*a^2*b*c^2*d^2*e^3*g+26*a 
^2*b*c^2*d*e^4*f-16*a^2*c^3*d^3*e^2*g+16*a^2*c^3*d^2*e^3*f-4*a*b^4*d*e^4*g 
+4*a*b^4*e^5*f+22*a*b^3*c*d^2*e^3*g+32*a*b^3*c*d*e^4*f-10*a*b^2*c^2*d^3*e^ 
2*g-98*a*b^2*c^2*d^2*e^3*f-6*a*b*c^3*d^4*e*g+60*a*b*c^3*d^3*e^2*f+4*b^5*d^ 
2*e^3*g-4*b^5*d*e^4*f-19*b^4*c*d^3*e^2*g+b^4*c*d^2*e^3*f+24*b^3*c^2*d^4*e* 
g+30*b^3*c^2*d^3*e^2*f-9*b^2*c^3*d^5*g-45*b^2*c^3*d^4*e*f+18*b*c^4*d^5*f)/ 
(16*a^2*c^2-8*a*b^2*c+b^4)*x^2+(10*a^4*c^2*e^5*g+2*a^3*b^2*c*e^5*g-29*a^3* 
b*c^2*d*e^4*g-a^3*b*c^2*e^5*f+12*a^3*c^3*d^2*e^3*g+18*a^3*c^3*d*e^4*f-6*a^ 
2*b^3*c*e^5*f+26*a^2*b^2*c^2*d^2*e^3*g+10*a^2*b^2*c^2*d*e^4*f-26*a^2*b*c^3 
*d^3*e^2*g-34*a^2*b*c^3*d^2*e^3*f+2*a^2*c^4*d^4*e*g+28*a^2*c^4*d^3*e^2*f-a 
*b^5*d*e^4*g+a*b^5*e^5*f+6*a*b^4*c*d*e^4*f-4*a*b^3*c^2*d^3*e^2*g-18*a*b^3* 
c^2*d^2*e^3*f+10*a*b^2*c^3*d^4*e*g+26*a*b^2*c^3*d^3*e^2*f-5*a*b*c^4*d^5*g- 
25*a*b*c^4*d^4*e*f+10*a*c^5*d^5*f+b^6*d^2*e^3*g-b^6*d*e^4*f-3*b^5*c*d^3...
 

Fricas [F(-1)]

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

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

Output:

Timed out
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {f+g x}{(d+e x) \left (a+b x+c x^2\right )^3} \, dx=\text {Exception raised: ValueError} \] Input:

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` for 
 more deta
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2398 vs. \(2 (654) = 1308\).

Time = 0.23 (sec) , antiderivative size = 2398, normalized size of antiderivative = 3.61 \[ \int \frac {f+g x}{(d+e x) \left (a+b x+c x^2\right )^3} \, dx=\text {Too large to display} \] Input:

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

Output:

-1/2*(e^5*f - d*e^4*g)*log(c*x^2 + b*x + a)/(c^3*d^6 - 3*b*c^2*d^5*e + 3*b 
^2*c*d^4*e^2 + 3*a*c^2*d^4*e^2 - b^3*d^3*e^3 - 6*a*b*c*d^3*e^3 + 3*a*b^2*d 
^2*e^4 + 3*a^2*c*d^2*e^4 - 3*a^2*b*d*e^5 + a^3*e^6) + (e^6*f - d*e^5*g)*lo 
g(abs(e*x + d))/(c^3*d^6*e - 3*b*c^2*d^5*e^2 + 3*b^2*c*d^4*e^3 + 3*a*c^2*d 
^4*e^3 - b^3*d^3*e^4 - 6*a*b*c*d^3*e^4 + 3*a*b^2*d^2*e^5 + 3*a^2*c*d^2*e^5 
 - 3*a^2*b*d*e^6 + a^3*e^7) + (12*c^5*d^5*f - 30*b*c^4*d^4*e*f + 20*b^2*c^ 
3*d^3*e^2*f + 40*a*c^4*d^3*e^2*f - 60*a*b*c^3*d^2*e^3*f + 60*a^2*c^3*d*e^4 
*f - b^5*e^5*f + 10*a*b^3*c*e^5*f - 30*a^2*b*c^2*e^5*f - 6*b*c^4*d^5*g + 1 
6*b^2*c^3*d^4*e*g - 4*a*c^4*d^4*e*g - 12*b^3*c^2*d^3*e^2*g - 12*a*b*c^3*d^ 
3*e^2*g + 36*a*b^2*c^2*d^2*e^3*g - 24*a^2*c^3*d^2*e^3*g + b^5*d*e^4*g - 10 
*a*b^3*c*d*e^4*g - 6*a^2*b*c^2*d*e^4*g + 12*a^3*c^2*e^5*g)*arctan((2*c*x + 
 b)/sqrt(-b^2 + 4*a*c))/((b^4*c^3*d^6 - 8*a*b^2*c^4*d^6 + 16*a^2*c^5*d^6 - 
 3*b^5*c^2*d^5*e + 24*a*b^3*c^3*d^5*e - 48*a^2*b*c^4*d^5*e + 3*b^6*c*d^4*e 
^2 - 21*a*b^4*c^2*d^4*e^2 + 24*a^2*b^2*c^3*d^4*e^2 + 48*a^3*c^4*d^4*e^2 - 
b^7*d^3*e^3 + 2*a*b^5*c*d^3*e^3 + 32*a^2*b^3*c^2*d^3*e^3 - 96*a^3*b*c^3*d^ 
3*e^3 + 3*a*b^6*d^2*e^4 - 21*a^2*b^4*c*d^2*e^4 + 24*a^3*b^2*c^2*d^2*e^4 + 
48*a^4*c^3*d^2*e^4 - 3*a^2*b^5*d*e^5 + 24*a^3*b^3*c*d*e^5 - 48*a^4*b*c^2*d 
*e^5 + a^3*b^4*e^6 - 8*a^4*b^2*c*e^6 + 16*a^5*c^2*e^6)*sqrt(-b^2 + 4*a*c)) 
 - 1/2*(b^3*c^3*d^5*f - 10*a*b*c^4*d^5*f - 3*b^4*c^2*d^4*e*f + 29*a*b^2*c^ 
3*d^4*e*f - 8*a^2*c^4*d^4*e*f + 3*b^5*c*d^3*e^2*f - 24*a*b^3*c^2*d^3*e^...
 

Mupad [B] (verification not implemented)

Time = 18.85 (sec) , antiderivative size = 25467, normalized size of antiderivative = 38.35 \[ \int \frac {f+g x}{(d+e x) \left (a+b x+c x^2\right )^3} \, dx=\text {Too large to display} \] Input:

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

Output:

((24*a^3*c^2*e^3*f - 8*a^2*c^3*d^3*g - a^2*b^3*e^3*g - b^3*c^2*d^3*f + 3*a 
*b^4*e^3*f - b^5*d*e^2*f + 10*a*b*c^3*d^3*f + 10*a^3*b*c*e^3*g - a*b^4*d*e 
^2*g + 2*b^4*c*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^3*f + 6*a^2*c^3*e^3*g + b^3*c^2 
*e^3*f - 3*b*c^4*d^3*g - 7*a*b*c^3*e^3*f + 14*a*c^4*d*e^2*f - 2*a*c^4*d^2* 
e*g - 9*b*c^4*d^2*e*f + b^2*c^3*d*e^2*f + 5*b^2*c^3*d^2*e*g - b^3*c^2*d*e^ 
2*g - 5*a*b*c^3*d*e^2*g))/(a^2*b^4*e^4 + 16*a^2*c^4*d^4 + 16*a^4*c^2*e^...
 

Reduce [B] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 12935, normalized size of antiderivative = 19.48 \[ \int \frac {f+g x}{(d+e x) \left (a+b x+c x^2\right )^3} \, dx =\text {Too large to display} \] Input:

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

Output:

(24*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a**5*b*c**2*e* 
*5*g - 12*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a**4*b** 
2*c**2*d*e**4*g - 60*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2 
))*a**4*b**2*c**2*e**5*f + 48*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a 
*c - b**2))*a**4*b**2*c**2*e**5*g*x - 48*sqrt(4*a*c - b**2)*atan((b + 2*c* 
x)/sqrt(4*a*c - b**2))*a**4*b*c**3*d**2*e**3*g + 120*sqrt(4*a*c - b**2)*at 
an((b + 2*c*x)/sqrt(4*a*c - b**2))*a**4*b*c**3*d*e**4*f + 48*sqrt(4*a*c - 
b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a**4*b*c**3*e**5*g*x**2 - 20*sq 
rt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a**3*b**4*c*d*e**4*g 
 + 20*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a**3*b**4*c* 
e**5*f + 72*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a**3*b 
**3*c**2*d**2*e**3*g - 24*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - 
 b**2))*a**3*b**3*c**2*d*e**4*g*x - 120*sqrt(4*a*c - b**2)*atan((b + 2*c*x 
)/sqrt(4*a*c - b**2))*a**3*b**3*c**2*e**5*f*x + 24*sqrt(4*a*c - b**2)*atan 
((b + 2*c*x)/sqrt(4*a*c - b**2))*a**3*b**3*c**2*e**5*g*x**2 - 24*sqrt(4*a* 
c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a**3*b**2*c**3*d**3*e**2*g 
- 120*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a**3*b**2*c* 
*3*d**2*e**3*f - 96*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2) 
)*a**3*b**2*c**3*d**2*e**3*g*x + 240*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/s 
qrt(4*a*c - b**2))*a**3*b**2*c**3*d*e**4*f*x - 24*sqrt(4*a*c - b**2)*at...