\(\int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x)} \, dx\) [61]

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

Optimal result

Integrand size = 32, antiderivative size = 141 \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x)} \, dx=\frac {\left (A b^2-a (b B-a C)\right ) \log (a+b x)}{b (b c-a d) (b e-a f)}-\frac {\left (c^2 C-B c d+A d^2\right ) \log (c+d x)}{d (b c-a d) (d e-c f)}+\frac {\left (C e^2-B e f+A f^2\right ) \log (e+f x)}{f (b e-a f) (d e-c f)} \] Output:

(A*b^2-a*(B*b-C*a))*ln(b*x+a)/b/(-a*d+b*c)/(-a*f+b*e)-(A*d^2-B*c*d+C*c^2)* 
ln(d*x+c)/d/(-a*d+b*c)/(-c*f+d*e)+(A*f^2-B*e*f+C*e^2)*ln(f*x+e)/f/(-a*f+b* 
e)/(-c*f+d*e)
 

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.00 \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x)} \, dx=\frac {\left (A b^2-a b B+a^2 C\right ) \log (a+b x)}{b (b c-a d) (b e-a f)}-\frac {\left (-c^2 C+B c d-A d^2\right ) \log (c+d x)}{d (b c-a d) (-d e+c f)}+\frac {\left (C e^2-B e f+A f^2\right ) \log (e+f x)}{f (b e-a f) (d e-c f)} \] Input:

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

Output:

((A*b^2 - a*b*B + a^2*C)*Log[a + b*x])/(b*(b*c - a*d)*(b*e - a*f)) - ((-(c 
^2*C) + B*c*d - A*d^2)*Log[c + d*x])/(d*(b*c - a*d)*(-(d*e) + c*f)) + ((C* 
e^2 - B*e*f + A*f^2)*Log[e + f*x])/(f*(b*e - a*f)*(d*e - c*f))
 

Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {2115, 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 {A+B x+C x^2}{(a+b x) (c+d x) (e+f x)} \, dx\)

\(\Big \downarrow \) 2115

\(\displaystyle \int \left (\frac {A b^2-a (b B-a C)}{(a+b x) (b c-a d) (b e-a f)}+\frac {A d^2-B c d+c^2 C}{(c+d x) (b c-a d) (c f-d e)}+\frac {A f^2-B e f+C e^2}{(e+f x) (b e-a f) (d e-c f)}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\log (a+b x) \left (A b^2-a (b B-a C)\right )}{b (b c-a d) (b e-a f)}-\frac {\log (c+d x) \left (A d^2-B c d+c^2 C\right )}{d (b c-a d) (d e-c f)}+\frac {\log (e+f x) \left (A f^2-B e f+C e^2\right )}{f (b e-a f) (d e-c f)}\)

Input:

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

Output:

((A*b^2 - a*(b*B - a*C))*Log[a + b*x])/(b*(b*c - a*d)*(b*e - a*f)) - ((c^2 
*C - B*c*d + A*d^2)*Log[c + d*x])/(d*(b*c - a*d)*(d*e - c*f)) + ((C*e^2 - 
B*e*f + A*f^2)*Log[e + f*x])/(f*(b*e - a*f)*(d*e - c*f))
 

Defintions of rubi rules used

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

rule 2115
Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f 
_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)^m*(c + d*x)^ 
n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && PolyQ[Px, 
 x] && IntegersQ[m, n]
 
Maple [A] (verified)

Time = 0.85 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.00

method result size
default \(\frac {\left (-d^{2} A +c d B -C \,c^{2}\right ) \ln \left (x d +c \right )}{\left (c f -d e \right ) \left (a d -b c \right ) d}+\frac {\left (b^{2} A -a b B +a^{2} C \right ) \ln \left (b x +a \right )}{\left (a f -b e \right ) \left (a d -b c \right ) b}+\frac {\left (A \,f^{2}-B e f +C \,e^{2}\right ) \ln \left (f x +e \right )}{\left (c f -d e \right ) \left (a f -b e \right ) f}\) \(141\)
norman \(\frac {\left (A \,f^{2}-B e f +C \,e^{2}\right ) \ln \left (f x +e \right )}{f \left (a c \,f^{2}-a d e f -b c e f +b d \,e^{2}\right )}+\frac {\left (b^{2} A -a b B +a^{2} C \right ) \ln \left (b x +a \right )}{\left (a f -b e \right ) \left (a d -b c \right ) b}-\frac {\left (d^{2} A -c d B +C \,c^{2}\right ) \ln \left (x d +c \right )}{\left (a d -b c \right ) d \left (c f -d e \right )}\) \(148\)
parallelrisch \(\frac {A \ln \left (b x +a \right ) b^{2} c d \,f^{2}-A \ln \left (b x +a \right ) b^{2} d^{2} e f -A \ln \left (x d +c \right ) a b \,d^{2} f^{2}+A \ln \left (x d +c \right ) b^{2} d^{2} e f +A \ln \left (f x +e \right ) a b \,d^{2} f^{2}-A \ln \left (f x +e \right ) b^{2} c d \,f^{2}-B \ln \left (b x +a \right ) a b c d \,f^{2}+B \ln \left (b x +a \right ) a b \,d^{2} e f +B \ln \left (x d +c \right ) a b c d \,f^{2}-B \ln \left (x d +c \right ) b^{2} c d e f -B \ln \left (f x +e \right ) a b \,d^{2} e f +B \ln \left (f x +e \right ) b^{2} c d e f +C \ln \left (b x +a \right ) a^{2} c d \,f^{2}-C \ln \left (b x +a \right ) a^{2} d^{2} e f -C \ln \left (x d +c \right ) a b \,c^{2} f^{2}+C \ln \left (x d +c \right ) b^{2} c^{2} e f +C \ln \left (f x +e \right ) a b \,d^{2} e^{2}-C \ln \left (f x +e \right ) b^{2} c d \,e^{2}}{\left (a c \,f^{2}-a d e f -b c e f +b d \,e^{2}\right ) f d \left (a d -b c \right ) b}\) \(340\)
risch \(-\frac {d \ln \left (-x d -c \right ) A}{a c d f -a \,d^{2} e -b \,c^{2} f +b c d e}+\frac {\ln \left (-x d -c \right ) c B}{a c d f -a \,d^{2} e -b \,c^{2} f +b c d e}-\frac {\ln \left (-x d -c \right ) C \,c^{2}}{d \left (a c d f -a \,d^{2} e -b \,c^{2} f +b c d e \right )}+\frac {f \ln \left (-f x -e \right ) A}{a c \,f^{2}-a d e f -b c e f +b d \,e^{2}}-\frac {\ln \left (-f x -e \right ) B e}{a c \,f^{2}-a d e f -b c e f +b d \,e^{2}}+\frac {\ln \left (-f x -e \right ) C \,e^{2}}{f \left (a c \,f^{2}-a d e f -b c e f +b d \,e^{2}\right )}+\frac {b \ln \left (b x +a \right ) A}{a^{2} d f -a b c f -a b d e +c e \,b^{2}}-\frac {\ln \left (b x +a \right ) a B}{a^{2} d f -a b c f -a b d e +c e \,b^{2}}+\frac {\ln \left (b x +a \right ) a^{2} C}{b \left (a^{2} d f -a b c f -a b d e +c e \,b^{2}\right )}\) \(363\)

Input:

int((C*x^2+B*x+A)/(b*x+a)/(d*x+c)/(f*x+e),x,method=_RETURNVERBOSE)
 

Output:

(-A*d^2+B*c*d-C*c^2)/(c*f-d*e)/(a*d-b*c)/d*ln(d*x+c)+(A*b^2-B*a*b+C*a^2)/( 
a*f-b*e)/(a*d-b*c)/b*ln(b*x+a)+(A*f^2-B*e*f+C*e^2)/(c*f-d*e)/(a*f-b*e)/f*l 
n(f*x+e)
 

Fricas [F(-1)]

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

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

Output:

Timed out
 

Sympy [F(-1)]

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

integrate((C*x**2+B*x+A)/(b*x+a)/(d*x+c)/(f*x+e),x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.21 \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x)} \, dx=\frac {{\left (C a^{2} - B a b + A b^{2}\right )} \log \left (b x + a\right )}{{\left (b^{3} c - a b^{2} d\right )} e - {\left (a b^{2} c - a^{2} b d\right )} f} - \frac {{\left (C c^{2} - B c d + A d^{2}\right )} \log \left (d x + c\right )}{{\left (b c d^{2} - a d^{3}\right )} e - {\left (b c^{2} d - a c d^{2}\right )} f} + \frac {{\left (C e^{2} - B e f + A f^{2}\right )} \log \left (f x + e\right )}{b d e^{2} f + a c f^{3} - {\left (b c + a d\right )} e f^{2}} \] Input:

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

Output:

(C*a^2 - B*a*b + A*b^2)*log(b*x + a)/((b^3*c - a*b^2*d)*e - (a*b^2*c - a^2 
*b*d)*f) - (C*c^2 - B*c*d + A*d^2)*log(d*x + c)/((b*c*d^2 - a*d^3)*e - (b* 
c^2*d - a*c*d^2)*f) + (C*e^2 - B*e*f + A*f^2)*log(f*x + e)/(b*d*e^2*f + a* 
c*f^3 - (b*c + a*d)*e*f^2)
 

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.21 \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x)} \, dx=\frac {{\left (C a^{2} - B a b + A b^{2}\right )} \log \left ({\left | b x + a \right |}\right )}{b^{3} c e - a b^{2} d e - a b^{2} c f + a^{2} b d f} - \frac {{\left (C c^{2} - B c d + A d^{2}\right )} \log \left ({\left | d x + c \right |}\right )}{b c d^{2} e - a d^{3} e - b c^{2} d f + a c d^{2} f} + \frac {{\left (C e^{2} - B e f + A f^{2}\right )} \log \left ({\left | f x + e \right |}\right )}{b d e^{2} f - b c e f^{2} - a d e f^{2} + a c f^{3}} \] Input:

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

Output:

(C*a^2 - B*a*b + A*b^2)*log(abs(b*x + a))/(b^3*c*e - a*b^2*d*e - a*b^2*c*f 
 + a^2*b*d*f) - (C*c^2 - B*c*d + A*d^2)*log(abs(d*x + c))/(b*c*d^2*e - a*d 
^3*e - b*c^2*d*f + a*c*d^2*f) + (C*e^2 - B*e*f + A*f^2)*log(abs(f*x + e))/ 
(b*d*e^2*f - b*c*e*f^2 - a*d*e*f^2 + a*c*f^3)
 

Mupad [B] (verification not implemented)

Time = 6.86 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.18 \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x)} \, dx=\frac {\ln \left (a+b\,x\right )\,\left (C\,a^2-B\,a\,b+A\,b^2\right )}{b^3\,c\,e-a\,b^2\,c\,f-a\,b^2\,d\,e+a^2\,b\,d\,f}+\frac {\ln \left (c+d\,x\right )\,\left (C\,c^2-B\,c\,d+A\,d^2\right )}{a\,d^3\,e-a\,c\,d^2\,f-b\,c\,d^2\,e+b\,c^2\,d\,f}+\frac {\ln \left (e+f\,x\right )\,\left (C\,e^2-B\,e\,f+A\,f^2\right )}{a\,c\,f^3-a\,d\,e\,f^2-b\,c\,e\,f^2+b\,d\,e^2\,f} \] Input:

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

Output:

(log(a + b*x)*(A*b^2 + C*a^2 - B*a*b))/(b^3*c*e - a*b^2*c*f - a*b^2*d*e + 
a^2*b*d*f) + (log(c + d*x)*(A*d^2 + C*c^2 - B*c*d))/(a*d^3*e - a*c*d^2*f - 
 b*c*d^2*e + b*c^2*d*f) + (log(e + f*x)*(A*f^2 + C*e^2 - B*e*f))/(a*c*f^3 
- a*d*e*f^2 - b*c*e*f^2 + b*d*e^2*f)
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 300, normalized size of antiderivative = 2.13 \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x)} \, dx=\frac {\mathrm {log}\left (b x +a \right ) a^{2} c^{2} d \,f^{2}-\mathrm {log}\left (b x +a \right ) a^{2} c \,d^{2} e f -\mathrm {log}\left (d x +c \right ) a^{2} b \,d^{2} f^{2}+\mathrm {log}\left (d x +c \right ) a \,b^{2} c d \,f^{2}+\mathrm {log}\left (d x +c \right ) a \,b^{2} d^{2} e f -\mathrm {log}\left (d x +c \right ) a b \,c^{3} f^{2}-\mathrm {log}\left (d x +c \right ) b^{3} c d e f +\mathrm {log}\left (d x +c \right ) b^{2} c^{3} e f +\mathrm {log}\left (f x +e \right ) a^{2} b \,d^{2} f^{2}-\mathrm {log}\left (f x +e \right ) a \,b^{2} c d \,f^{2}-\mathrm {log}\left (f x +e \right ) a \,b^{2} d^{2} e f +\mathrm {log}\left (f x +e \right ) a b c \,d^{2} e^{2}+\mathrm {log}\left (f x +e \right ) b^{3} c d e f -\mathrm {log}\left (f x +e \right ) b^{2} c^{2} d \,e^{2}}{b d f \left (a^{2} c d \,f^{2}-a^{2} d^{2} e f -a b \,c^{2} f^{2}+a b \,d^{2} e^{2}+b^{2} c^{2} e f -b^{2} c d \,e^{2}\right )} \] Input:

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

Output:

(log(a + b*x)*a**2*c**2*d*f**2 - log(a + b*x)*a**2*c*d**2*e*f - log(c + d* 
x)*a**2*b*d**2*f**2 + log(c + d*x)*a*b**2*c*d*f**2 + log(c + d*x)*a*b**2*d 
**2*e*f - log(c + d*x)*a*b*c**3*f**2 - log(c + d*x)*b**3*c*d*e*f + log(c + 
 d*x)*b**2*c**3*e*f + log(e + f*x)*a**2*b*d**2*f**2 - log(e + f*x)*a*b**2* 
c*d*f**2 - log(e + f*x)*a*b**2*d**2*e*f + log(e + f*x)*a*b*c*d**2*e**2 + l 
og(e + f*x)*b**3*c*d*e*f - log(e + f*x)*b**2*c**2*d*e**2)/(b*d*f*(a**2*c*d 
*f**2 - a**2*d**2*e*f - a*b*c**2*f**2 + a*b*d**2*e**2 + b**2*c**2*e*f - b* 
*2*c*d*e**2))