\(\int \frac {a+b \log (c (e+f x))}{(d e+d f x) (h+i x)^2} \, dx\) [181]

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

Optimal result

Integrand size = 30, antiderivative size = 151 \[ \int \frac {a+b \log (c (e+f x))}{(d e+d f x) (h+i x)^2} \, dx=-\frac {i (e+f x) (a+b \log (c (e+f x)))}{d (f h-e i)^2 (h+i x)}+\frac {b f \log (h+i x)}{d (f h-e i)^2}-\frac {f (a+b \log (c (e+f x))) \log \left (1+\frac {f h-e i}{i (e+f x)}\right )}{d (f h-e i)^2}+\frac {b f \operatorname {PolyLog}\left (2,-\frac {f h-e i}{i (e+f x)}\right )}{d (f h-e i)^2} \] Output:

-i*(f*x+e)*(a+b*ln(c*(f*x+e)))/d/(-e*i+f*h)^2/(i*x+h)+b*f*ln(i*x+h)/d/(-e* 
i+f*h)^2-f*(a+b*ln(c*(f*x+e)))*ln(1+(-e*i+f*h)/i/(f*x+e))/d/(-e*i+f*h)^2+b 
*f*polylog(2,-(-e*i+f*h)/i/(f*x+e))/d/(-e*i+f*h)^2
 

Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 141, normalized size of antiderivative = 0.93 \[ \int \frac {a+b \log (c (e+f x))}{(d e+d f x) (h+i x)^2} \, dx=\frac {\frac {2 (f h-e i) (a+b \log (c (e+f x)))}{h+i x}+\frac {f (a+b \log (c (e+f x)))^2}{b}+2 b f (-\log (e+f x)+\log (h+i x))-2 f (a+b \log (c (e+f x))) \log \left (\frac {f (h+i x)}{f h-e i}\right )-2 b f \operatorname {PolyLog}\left (2,\frac {i (e+f x)}{-f h+e i}\right )}{2 d (f h-e i)^2} \] Input:

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

Output:

((2*(f*h - e*i)*(a + b*Log[c*(e + f*x)]))/(h + i*x) + (f*(a + b*Log[c*(e + 
 f*x)])^2)/b + 2*b*f*(-Log[e + f*x] + Log[h + i*x]) - 2*f*(a + b*Log[c*(e 
+ f*x)])*Log[(f*(h + i*x))/(f*h - e*i)] - 2*b*f*PolyLog[2, (i*(e + f*x))/( 
-(f*h) + e*i)])/(2*d*(f*h - e*i)^2)
 

Rubi [A] (verified)

Time = 1.13 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.25, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.233, Rules used = {2858, 27, 2789, 2751, 16, 2779, 2838}

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 \log (c (e+f x))}{(h+i x)^2 (d e+d f x)} \, dx\)

\(\Big \downarrow \) 2858

\(\displaystyle \frac {\int \frac {f^2 (a+b \log (c (e+f x)))}{d (e+f x) \left (f \left (h-\frac {e i}{f}\right )+i (e+f x)\right )^2}d(e+f x)}{f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {f \int \frac {a+b \log (c (e+f x))}{(e+f x) (f h-e i+i (e+f x))^2}d(e+f x)}{d}\)

\(\Big \downarrow \) 2789

\(\displaystyle \frac {f \left (\frac {\int \frac {a+b \log (c (e+f x))}{(e+f x) (f h-e i+i (e+f x))}d(e+f x)}{f h-e i}-\frac {i \int \frac {a+b \log (c (e+f x))}{(f h-e i+i (e+f x))^2}d(e+f x)}{f h-e i}\right )}{d}\)

\(\Big \downarrow \) 2751

\(\displaystyle \frac {f \left (\frac {\int \frac {a+b \log (c (e+f x))}{(e+f x) (f h-e i+i (e+f x))}d(e+f x)}{f h-e i}-\frac {i \left (\frac {(e+f x) (a+b \log (c (e+f x)))}{(f h-e i) (i (e+f x)-e i+f h)}-\frac {b \int \frac {1}{f h-e i+i (e+f x)}d(e+f x)}{f h-e i}\right )}{f h-e i}\right )}{d}\)

\(\Big \downarrow \) 16

\(\displaystyle \frac {f \left (\frac {\int \frac {a+b \log (c (e+f x))}{(e+f x) (f h-e i+i (e+f x))}d(e+f x)}{f h-e i}-\frac {i \left (\frac {(e+f x) (a+b \log (c (e+f x)))}{(f h-e i) (i (e+f x)-e i+f h)}-\frac {b \log (i (e+f x)-e i+f h)}{i (f h-e i)}\right )}{f h-e i}\right )}{d}\)

\(\Big \downarrow \) 2779

\(\displaystyle \frac {f \left (\frac {\frac {b \int \frac {\log \left (\frac {f h-e i}{i (e+f x)}+1\right )}{e+f x}d(e+f x)}{f h-e i}-\frac {\log \left (\frac {f h-e i}{i (e+f x)}+1\right ) (a+b \log (c (e+f x)))}{f h-e i}}{f h-e i}-\frac {i \left (\frac {(e+f x) (a+b \log (c (e+f x)))}{(f h-e i) (i (e+f x)-e i+f h)}-\frac {b \log (i (e+f x)-e i+f h)}{i (f h-e i)}\right )}{f h-e i}\right )}{d}\)

\(\Big \downarrow \) 2838

\(\displaystyle \frac {f \left (\frac {\frac {b \operatorname {PolyLog}\left (2,-\frac {f h-e i}{i (e+f x)}\right )}{f h-e i}-\frac {\log \left (\frac {f h-e i}{i (e+f x)}+1\right ) (a+b \log (c (e+f x)))}{f h-e i}}{f h-e i}-\frac {i \left (\frac {(e+f x) (a+b \log (c (e+f x)))}{(f h-e i) (i (e+f x)-e i+f h)}-\frac {b \log (i (e+f x)-e i+f h)}{i (f h-e i)}\right )}{f h-e i}\right )}{d}\)

Input:

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

Output:

(f*(-((i*(((e + f*x)*(a + b*Log[c*(e + f*x)]))/((f*h - e*i)*(f*h - e*i + i 
*(e + f*x))) - (b*Log[f*h - e*i + i*(e + f*x)])/(i*(f*h - e*i))))/(f*h - e 
*i)) + (-(((a + b*Log[c*(e + f*x)])*Log[1 + (f*h - e*i)/(i*(e + f*x))])/(f 
*h - e*i)) + (b*PolyLog[2, -((f*h - e*i)/(i*(e + f*x)))])/(f*h - e*i))/(f* 
h - e*i)))/d
 

Defintions of rubi rules used

rule 16
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + 
b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2751
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_), x 
_Symbol] :> Simp[x*(d + e*x^r)^(q + 1)*((a + b*Log[c*x^n])/d), x] - Simp[b* 
(n/d)   Int[(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, n, q, r}, 
x] && EqQ[r*(q + 1) + 1, 0]
 

rule 2779
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r 
_.))), x_Symbol] :> Simp[(-Log[1 + d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)) 
, x] + Simp[b*n*(p/(d*r))   Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^(p - 
 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]
 

rule 2789
Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_))/ 
(x_), x_Symbol] :> Simp[1/d   Int[(d + e*x)^(q + 1)*((a + b*Log[c*x^n])^p/x 
), x], x] - Simp[e/d   Int[(d + e*x)^q*(a + b*Log[c*x^n])^p, x], x] /; Free 
Q[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && LtQ[q, -1] && IntegerQ[2*q]
 

rule 2838
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 
, (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
 

rule 2858
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_ 
.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))^(r_.), x_Symbol] :> Simp[1/e   Subst[In 
t[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x, d + 
e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - 
d*g, 0] && (IGtQ[p, 0] || IGtQ[r, 0]) && IntegerQ[2*r]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(316\) vs. \(2(151)=302\).

Time = 3.67 (sec) , antiderivative size = 317, normalized size of antiderivative = 2.10

method result size
parts \(\frac {a \left (-\frac {1}{\left (e i -f h \right ) \left (i x +h \right )}-\frac {f \ln \left (i x +h \right )}{\left (e i -f h \right )^{2}}+\frac {f \ln \left (f x +e \right )}{\left (e i -f h \right )^{2}}\right )}{d}+\frac {b \left (\frac {\left (\frac {\ln \left (-c e i +h c f +i \left (c f x +c e \right )\right )}{c \left (e i -f h \right ) i}-\frac {\ln \left (c f x +c e \right ) \left (c f x +c e \right )}{c \left (e i -f h \right ) \left (-c e i +h c f +i \left (c f x +c e \right )\right )}\right ) c^{2} f^{2} i}{e i -f h}-\frac {\left (\frac {\operatorname {dilog}\left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{i}+\frac {\ln \left (c f x +c e \right ) \ln \left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{i}\right ) c \,f^{2} i}{\left (e i -f h \right )^{2}}+\frac {\ln \left (c f x +c e \right )^{2} c \,f^{2}}{2 \left (e i -f h \right )^{2}}\right )}{d c f}\) \(317\)
risch \(-\frac {a}{d \left (e i -f h \right ) \left (i x +h \right )}-\frac {a f \ln \left (i x +h \right )}{d \left (e i -f h \right )^{2}}+\frac {a f \ln \left (f x +e \right )}{d \left (e i -f h \right )^{2}}+\frac {b f \ln \left (-c e i +h c f +i \left (c f x +c e \right )\right )}{d \left (e i -f h \right )^{2}}-\frac {b c \,f^{2} i \ln \left (c f x +c e \right ) x}{d \left (e i -f h \right )^{2} \left (c f i x +h c f \right )}-\frac {b c f i \ln \left (c f x +c e \right ) e}{d \left (e i -f h \right )^{2} \left (c f i x +h c f \right )}-\frac {b f \operatorname {dilog}\left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )^{2}}-\frac {b f \ln \left (c f x +c e \right ) \ln \left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )^{2}}+\frac {b f \ln \left (c f x +c e \right )^{2}}{2 d \left (e i -f h \right )^{2}}\) \(330\)
derivativedivides \(\frac {\frac {c^{3} f^{2} a \left (\frac {1}{c \left (e i -f h \right ) \left (c e i -h c f -i \left (c f x +c e \right )\right )}-\frac {\ln \left (c e i -h c f -i \left (c f x +c e \right )\right )}{c^{2} \left (e i -f h \right )^{2}}+\frac {\ln \left (c f x +c e \right )}{c^{2} \left (e i -f h \right )^{2}}\right )}{d}+\frac {c^{3} f^{2} b \left (\frac {\left (\frac {\ln \left (c e i -h c f -i \left (c f x +c e \right )\right )}{c \left (e i -f h \right ) i}+\frac {\ln \left (c f x +c e \right ) \left (c f x +c e \right )}{c \left (e i -f h \right ) \left (c e i -h c f -i \left (c f x +c e \right )\right )}\right ) i}{c \left (e i -f h \right )}-\frac {\left (\frac {\operatorname {dilog}\left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{i}+\frac {\ln \left (c f x +c e \right ) \ln \left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{i}\right ) i}{c^{2} \left (e i -f h \right )^{2}}+\frac {\ln \left (c f x +c e \right )^{2}}{2 c^{2} \left (e i -f h \right )^{2}}\right )}{d}}{c f}\) \(367\)
default \(\frac {\frac {c^{3} f^{2} a \left (\frac {1}{c \left (e i -f h \right ) \left (c e i -h c f -i \left (c f x +c e \right )\right )}-\frac {\ln \left (c e i -h c f -i \left (c f x +c e \right )\right )}{c^{2} \left (e i -f h \right )^{2}}+\frac {\ln \left (c f x +c e \right )}{c^{2} \left (e i -f h \right )^{2}}\right )}{d}+\frac {c^{3} f^{2} b \left (\frac {\left (\frac {\ln \left (c e i -h c f -i \left (c f x +c e \right )\right )}{c \left (e i -f h \right ) i}+\frac {\ln \left (c f x +c e \right ) \left (c f x +c e \right )}{c \left (e i -f h \right ) \left (c e i -h c f -i \left (c f x +c e \right )\right )}\right ) i}{c \left (e i -f h \right )}-\frac {\left (\frac {\operatorname {dilog}\left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{i}+\frac {\ln \left (c f x +c e \right ) \ln \left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{i}\right ) i}{c^{2} \left (e i -f h \right )^{2}}+\frac {\ln \left (c f x +c e \right )^{2}}{2 c^{2} \left (e i -f h \right )^{2}}\right )}{d}}{c f}\) \(367\)

Input:

int((a+b*ln(c*(f*x+e)))/(d*f*x+d*e)/(i*x+h)^2,x,method=_RETURNVERBOSE)
 

Output:

a/d*(-1/(e*i-f*h)/(i*x+h)-f/(e*i-f*h)^2*ln(i*x+h)+f/(e*i-f*h)^2*ln(f*x+e)) 
+b/d/c/f*((1/c/(e*i-f*h)*ln(-c*e*i+h*c*f+i*(c*f*x+c*e))/i-ln(c*f*x+c*e)*(c 
*f*x+c*e)/c/(e*i-f*h)/(-c*e*i+h*c*f+i*(c*f*x+c*e)))*c^2*f^2/(e*i-f*h)*i-(d 
ilog((-c*e*i+h*c*f+i*(c*f*x+c*e))/(-c*e*i+c*f*h))/i+ln(c*f*x+c*e)*ln((-c*e 
*i+h*c*f+i*(c*f*x+c*e))/(-c*e*i+c*f*h))/i)*c*f^2/(e*i-f*h)^2*i+1/2*ln(c*f* 
x+c*e)^2*c*f^2/(e*i-f*h)^2)
 

Fricas [F]

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

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

Output:

integral((b*log(c*f*x + c*e) + a)/(d*f*i^2*x^3 + d*e*h^2 + (2*d*f*h*i + d* 
e*i^2)*x^2 + (d*f*h^2 + 2*d*e*h*i)*x), x)
 

Sympy [F]

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

integrate((a+b*ln(c*(f*x+e)))/(d*f*x+d*e)/(i*x+h)**2,x)
 

Output:

(Integral(a/(e*h**2 + 2*e*h*i*x + e*i**2*x**2 + f*h**2*x + 2*f*h*i*x**2 + 
f*i**2*x**3), x) + Integral(b*log(c*e + c*f*x)/(e*h**2 + 2*e*h*i*x + e*i** 
2*x**2 + f*h**2*x + 2*f*h*i*x**2 + f*i**2*x**3), x))/d
 

Maxima [F]

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

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

Output:

a*(f*log(f*x + e)/(d*f^2*h^2 - 2*d*e*f*h*i + d*e^2*i^2) - f*log(i*x + h)/( 
d*f^2*h^2 - 2*d*e*f*h*i + d*e^2*i^2) + 1/(d*f*h^2 - d*e*h*i + (d*f*h*i - d 
*e*i^2)*x)) + b*integrate((log(f*x + e) + log(c))/(d*f*i^2*x^3 + d*e*h^2 + 
 (2*f*h*i + e*i^2)*d*x^2 + (f*h^2 + 2*e*h*i)*d*x), x)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \frac {a+b \log (c (e+f x))}{(d e+d f x) (h+i x)^2} \, dx=\frac {\left (\int \frac {\mathrm {log}\left (c f x +c e \right )}{2 f h i \,x^{2}+2 e h i x +f \,h^{2} x -f \,x^{3}+e \,h^{2}-e \,x^{2}}d x \right ) b +\left (\int \frac {1}{2 f h i \,x^{2}+2 e h i x +f \,h^{2} x -f \,x^{3}+e \,h^{2}-e \,x^{2}}d x \right ) a}{d} \] Input:

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

Output:

(int(log(c*e + c*f*x)/(e*h**2 + 2*e*h*i*x - e*x**2 + f*h**2*x + 2*f*h*i*x* 
*2 - f*x**3),x)*b + int(1/(e*h**2 + 2*e*h*i*x - e*x**2 + f*h**2*x + 2*f*h* 
i*x**2 - f*x**3),x)*a)/d